/*
Theme Name: Director's Frequency
Theme URI: 
Author: DYNAMIKWORKS INC
Requires at least: 6.3
Tested up to: 6.9
Requires PHP: 7.4
Description: Native block theme for Director's Frequency.
Version: 1.0.7
Text Domain: directors-frequency
*/

:root {
  --df-white: #f8f6ff;
  --df-paper: #f9f7ff;
  --df-ink: #140b27;
  --df-near-black: #120e1e;
  --df-violet: #49217b;
  --df-lavender: #9d7cd0;
  --df-orange: #fa9000;
  --df-gutter: clamp(20px, 4vw, 68px);
  --df-radius: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  background: var(--df-ink);
  color: var(--df-paper);
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 400;
  line-height: 1.4;
  font-size: 16px;
  min-height: 100%;
}

p,
h1,
h2,
h3,
h4,
h5,
h6,
ul,
figure {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--df-orange);
  outline-offset: 4px;
}

button,
a {
  min-height: 44px;
  cursor: pointer;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 999;
  background: var(--df-white);
  color: var(--df-ink);
  padding: 12px 16px;
  border-radius: 999px;
  font-family: "Courier New", Courier, monospace;
  font-size: 12px;
}

.skip-link:focus {
  top: 12px;
}

.wp-site-blocks {
  position: relative;
  overflow-x: clip;
  gap: 0;
}

body.home .wp-site-blocks {
  padding: 0;
  margin: 0;
}

body.home .wp-site-blocks main,
body.home .wp-site-blocks main > section {
  width: 100%;
  max-width: none;
}

body.home .wp-site-blocks > .hybrid-home {
  width: 100%;
}

body.home .wp-site-blocks .hybrid-home > .mast,
body.home .wp-site-blocks .hybrid-home > .hybrid-hero,
body.home .wp-site-blocks .hybrid-home > .opening,
body.home .wp-site-blocks .hybrid-home > .sound,
body.home .wp-site-blocks .hybrid-home > .mind,
body.home .wp-site-blocks .hybrid-home > .ending,
body.home .wp-site-blocks .hybrid-home > .sequence {
  max-width: none;
}

body.home .wp-site-blocks main {
  padding: 0;
}

body.home .df-shell {
  max-width: none;
  padding: 0;
}

body.home .hybrid-home .mast .logo img,
body.home .hybrid-home .mast .wp-block-site-logo img {
  filter: none;
}

.df-shell {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 var(--df-gutter);
}

.df-empty-state {
  border: 1px dashed #5f5f79;
  border-radius: var(--df-radius);
  padding: 14px 18px;
  color: #e7ddff;
  background: #24133e;
}

/* Header */
.df-site-header {
  position: sticky;
  top: 0;
  z-index: 80;
  background: #fff;
  color: var(--df-ink);
  border-bottom: 1px solid #d5d0e3;
}

.df-site-header > .wp-block-group {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 86px;
}

.df-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.df-site-header .wp-block-site-logo img,
.df-site-header .wp-block-site-logo .custom-logo {
  display: block;
  width: 66px;
  height: 66px;
  object-fit: contain;
  border-radius: 0;
  box-shadow: none;
  filter: brightness(0) saturate(100%);
}

.wp-block-site-logo,
.wp-block-site-logo a,
.df-logo-fallback {
  background: transparent !important;
}

.df-site-title {
  margin: 0;
  letter-spacing: -0.03em;
  font-size: clamp(17px, 1.95vw, 24px);
  font-weight: 900;
  text-transform: uppercase;
}

.df-primary-nav {
  flex: 1;
}

.df-primary-nav .wp-block-navigation {
  justify-content: flex-end;
}

.df-primary-nav .wp-block-navigation__container {
  gap: 16px;
}

.df-site-tagline {
  margin-top: 2px;
  color: #4e4866;
  letter-spacing: 0.08em;
  font: 10px/1.4 "Courier New", Courier, monospace;
  text-transform: uppercase;
}

/* Front page hero inspired by approved C + D */
.df-front-page {
  padding: 0 var(--df-gutter) 62px;
}

.df-hero {
  position: relative;
  isolation: isolate;
  background: radial-gradient(circle at 56% 36%, #b7a7d9 0%, #7044bf 35%, #321166 72%, #190f2f 100%);
  color: var(--df-paper);
  overflow: hidden;
  min-height: min(88vh, 960px);
  border-radius: 0 0 var(--df-radius) var(--df-radius);
  padding: 38px;
  padding-top: 54px;
  margin-top: 0;
}

.df-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 82% 15%, #c4abed 0 8%, #ffffff00 58%),
    linear-gradient(180deg, #100d1f33, #100d1f00);
  z-index: 1;
}

.df-mastline {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  font: 10px/1.2 "Courier New", Courier, monospace;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.df-frequency-heading {
  position: relative;
  z-index: 3;
  max-width: 820px;
  margin-top: 26px;
}

.df-eyebrow {
  color: #e2daff;
  font: 10px/1.4 "Courier New", Courier, monospace;
  letter-spacing: 0.12em;
}

.df-frequency-title {
  font-size: clamp(48px, 6.6vw, 108px);
  line-height: 0.94;
  letter-spacing: -0.065em;
  text-transform: uppercase;
}

.df-frequency-title em {
  color: var(--df-lavender);
  font-style: italic;
  letter-spacing: -0.03em;
}

.df-orbit {
  position: absolute;
  width: min(640px, 62vw);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  right: clamp(20px, 4vw, 70px);
  top: 50%;
  transform: translateY(-50%);
  border: 1px solid #38295e;
  z-index: 2;
}

.df-orbit::before {
  content: "";
  position: absolute;
  inset: 13px;
  border-radius: 50%;
  border: 1px dashed #b8a5d6;
}

.df-orbit::after {
  content: "";
  position: absolute;
  inset: 24px;
  border-radius: 50%;
  background: linear-gradient(160deg, #b8a4de 0%, #7249bc 62%, #451e7f 100%);
  display: grid;
  place-items: center;
}

.df-orbit .wp-block-site-logo {
  position: absolute;
  inset: 24%;
  margin: 0;
}

.df-orbit .wp-block-site-logo img {
  width: 100%;
  height: 100%;
  filter: brightness(0) invert(1);
}

.df-orbit-link {
  position: absolute;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 12px 18px;
  border: 1px solid #d1c7eb;
  border-radius: 999px;
  background: var(--df-paper);
  color: #220d4a;
  font-size: clamp(16px, 1.7vw, 22px);
}

.df-orbit-link small {
  font: 9px/1 "Courier New", Courier, monospace;
  letter-spacing: 0.12em;
}

.df-orbit-link.is-media {
  right: -8%;
  top: 44%;
  background: var(--df-paper);
}

.df-orbit-link.is-music {
  right: -5%;
  top: 6%;
  background: var(--df-orange);
  color: #120e1e;
}

.df-orbit-link.is-mindset {
  left: -6%;
  bottom: 3%;
}

.df-hero-meta {
  position: absolute;
  right: 28px;
  bottom: 20px;
  width: 290px;
  z-index: 3;
}

.df-hero-meta p {
  font: 42px/0.98 "Arial Black", Arial, sans-serif;
  letter-spacing: -0.055em;
}

.df-hero-meta em {
  color: var(--df-lavender);
  font-style: italic;
  font-family: Georgia, "Times New Roman", serif;
}

.df-hero-meta a {
  margin-top: 18px;
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  border-top: 1px solid #cdbde5;
  width: 100%;
  padding-top: 12px;
  font: 12px/1.4 "Courier New", Courier, monospace;
}

.df-hero-caption {
  position: absolute;
  left: 42px;
  bottom: 52px;
  z-index: 3;
  width: 250px;
  border-top: 1px solid #9f8fb5;
  padding-top: 10px;
}

.df-hero-caption p {
  margin-top: 13px;
  font: 10px/1.4 "Courier New", Courier, monospace;
  letter-spacing: 0.08em;
}

.df-hero-caption .df-hero-label {
  color: #ceb8f7;
}

.df-opening {
  padding: 58px 0 70px;
  background: #2a133f;
  border-radius: 24px 24px 0 0;
  position: relative;
  min-height: min(860px, calc(100svh - 120px));
}

.df-opening-media {
  margin: 40px 0 0;
  position: relative;
}

.df-opening-media figure {
  margin: 0;
  position: absolute;
  right: 0;
  top: -20px;
  width: min(52%, 600px);
  aspect-ratio: 4/5;
  clip-path: polygon(12% 0, 100% 0, 88% 100%, 0 100%);
  overflow: hidden;
  border: 12px solid #242a24;
  box-shadow: 0 26px 56px #130a26cc;
  background-image: url("assets/richbz-current-hero.jpg");
  background-size: cover;
  background-position: 87% 50%;
  background-repeat: no-repeat;
}

.df-opening-media figure::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 -130px 0 #2f0c52a6;
}

.df-opening-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 89% 50%;
  filter: grayscale(0);
  opacity: 0;
  width: 1px;
  height: 1px;
}

.df-open-actions {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 56px;
}

.df-open-actions a {
  font-size: 14px;
  line-height: 1;
  border: 1px solid #ffffff60;
  border-radius: 999px;
  padding: 12px 16px;
  display: inline-flex;
  align-items: center;
  gap: 13px;
}

.df-open-actions a.is-button {
  background: var(--df-paper);
  color: var(--df-ink);
}

.df-section {
  padding: 58px 0 62px;
}

.df-section h2 {
  font-size: clamp(48px, 9.2vw, 112px);
  line-height: 0.94;
  letter-spacing: -0.06em;
  text-transform: uppercase;
}

.df-section .df-title-emphasis {
  color: var(--df-orange);
}

.df-music {
  background: var(--df-paper);
  color: var(--df-ink);
}

.df-music-grid {
  margin-top: 24px;
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.df-media-tile {
  border: 1px solid #cfd2dc;
  border-radius: var(--df-radius);
  overflow: hidden;
  background: #f6f3ff;
  padding: 16px;
}

.df-media-tile .wp-post-image {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.df-media-tile h3 {
  font-size: clamp(22px, 3.5vw, 34px);
  line-height: 0.98;
  margin: 14px 0;
}

.df-media-tile p {
  font-size: 16px;
}

.df-media-tile .df-video-link {
  margin-top: 16px;
  display: inline-block;
  border-top: 1px solid #b7b7cb;
  padding-top: 12px;
  font: 12px/1.2 "Courier New", Courier, monospace;
  letter-spacing: 0.04em;
}

.df-mindset {
  background: var(--df-orange);
  color: var(--df-ink);
  border-radius: 0 0 var(--df-radius) var(--df-radius);
}

.df-mindset p {
  max-width: 62ch;
}

.df-mind-slate {
  width: min(360px, 68vw);
  margin-top: 22px;
  padding: 16px;
  border: 1px solid #6a4a3b;
  background: rgba(0, 0, 0, 0.65);
  color: var(--df-paper);
}

.df-mind-slate p {
  font: 10px/1.45 "Courier New", Courier, monospace;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.df-mind-slate .wp-block-button__link {
  margin-top: 10px;
  display: inline-flex;
  width: 100%;
  justify-content: space-between;
  border-top: 1px solid #a7a1ad;
  border-radius: 0;
  padding: 10px 0 0;
}

.df-connect {
  background: #230d3f;
  padding-bottom: 110px;
}

.df-cta-grid {
  margin-top: 36px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.df-cta {
  border: 1px solid #5f5f77;
  border-radius: 999px;
  padding: 12px 14px;
  font-size: 14px;
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.df-chapter-rail {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 14px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid #4a4d4f;
  background: #1a1028f0;
  backdrop-filter: blur(10px);
  white-space: nowrap;
}

.df-chapter-rail a {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  border: 1px solid #c2bfd0;
  text-decoration: none;
  font: 10px/1 "Courier New", Courier, monospace;
}

.df-chapter-rail a[aria-current="true"] {
  background: var(--df-paper);
  color: #1b0f33;
}

.df-chapter-rail .df-chapter-track {
  width: 72px;
  height: 2px;
  background: #555c57;
  border-radius: 2px;
}

.df-chapter-rail .df-chapter-track span {
  display: block;
  height: 100%;
  width: var(--df-rail-progress, 0%);
  background: var(--df-orange);
}

.df-featured-video {
  margin: 44px 0 4px;
  border-radius: var(--df-radius);
  padding: 24px;
  border: 1px solid #6f75a2;
  background: rgba(22, 16, 40, 0.9);
}

.df-featured-video-heading {
  font-size: 20px;
  text-transform: uppercase;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.df-featured-video-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: 20px;
  align-items: center;
}

.df-featured-video img {
  width: 100%;
  height: auto;
  border-radius: 12px;
}

.df-featured-video-copy h3 {
  font-size: 42px;
  line-height: 0.96;
  letter-spacing: -0.055em;
}

.df-featured-video-copy p {
  margin-top: 10px;
  color: #d8d0ec;
  line-height: 1.6;
}

.df-featured-video-copy .df-featured-link {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 49px;
  border-top: 1px solid #9a9fb4;
  padding-top: 10px;
  font: 12px/1.5 "Courier New", Courier, monospace;
}

.df-content-details {
  margin: 12px 0 20px;
}

.df-content-details .df-content-date {
  color: #d8d0ec;
  font: 12px/1.5 "Courier New", Courier, monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* WooCommerce controls stay legible against the dark site canvas. */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.wc-block-components-button {
  min-height: 44px;
  border: 2px solid var(--df-orange) !important;
  border-radius: 999px !important;
  background: var(--df-orange) !important;
  color: var(--df-ink) !important;
  font-weight: 700 !important;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.wc-block-components-button:hover {
  border-color: var(--df-paper) !important;
  background: var(--df-paper) !important;
  color: var(--df-ink) !important;
}

.woocommerce a.button:disabled,
.woocommerce button.button:disabled,
.woocommerce input.button:disabled,
.wc-block-components-button:disabled {
  opacity: 0.65;
}

.woocommerce .woocommerce-message,
.woocommerce .woocommerce-info,
.woocommerce .woocommerce-error,
.wc-block-components-notice-banner {
  border-color: var(--df-lavender) !important;
  background: #f6f3ff !important;
  color: #17131d !important;
}

.woocommerce .woocommerce-message a,
.woocommerce .woocommerce-info a,
.woocommerce .woocommerce-error a,
.wc-block-components-notice-banner a {
  color: #35135f !important;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.woocommerce input.input-text,
.woocommerce textarea,
.woocommerce select,
.wc-block-components-text-input input,
.wc-block-components-combobox .wc-block-components-combobox-control input,
.wc-block-components-textarea,
.wc-block-components-select__select {
  min-height: 44px;
  border: 2px solid #81759b !important;
  border-radius: 6px;
  background: #ffffff !important;
  color: #17131d !important;
}

.woocommerce input.input-text::placeholder,
.woocommerce textarea::placeholder,
.wc-block-components-text-input input::placeholder,
.wc-block-components-textarea::placeholder {
  color: #62586f;
  opacity: 1;
}

.df-site-footer {
  background: #191127;
  color: #e9e3f4;
  padding: 42px var(--df-gutter) 55px;
}

.df-footer-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1.2fr 1fr;
}

.df-footer-grid nav .wp-block-navigation__container {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 20px;
}

.df-route-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px 14px;
}

.df-route {
  border-top: 1px solid #4f4f60;
  padding-top: 10px;
  font: 12px/1.3 "Courier New", Courier, monospace;
}

.df-route a {
  display: flex;
  width: fit-content;
  min-width: 44px;
  min-height: 44px;
  align-items: center;
}

.df-route strong {
  display: block;
  margin-bottom: 8px;
  font-size: 10px;
  color: #b3afbe;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (max-width: 1300px) {
  .df-orbit {
    width: 56vw;
  }

  .df-featured-video-copy h3 {
    font-size: 36px;
  }
}

@media (max-width: 1020px) {
  .df-hero {
    padding: 32px 22px 32px;
    min-height: 930px;
  }

  .df-frequency-title {
    font-size: clamp(45px, 12.7vw, 74px);
  }

  .df-orbit {
    width: min(490px, 79vw);
    top: 280px;
    right: 50%;
    transform: translate(50%, 0);
  }

  .df-orbit-link {
    font-size: 16px;
    padding: 9px 12px;
    min-height: 44px;
  }

  .df-orbit-link.is-media {
    right: 2%;
    top: 48%;
  }

  .df-orbit-link.is-mindset {
    left: 2%;
    bottom: 6%;
  }

  .df-hero-caption,
  .df-hero-meta {
    position: relative;
    right: auto;
    width: auto;
    margin-top: 390px;
  }

  .df-open-actions {
    flex-direction: column;
    align-items: flex-start;
  }

  .df-opening-media {
    min-height: 450px;
  }

  .df-opening-media figure {
    width: 64%;
    right: 8%;
    top: 150px;
  }

  .df-music-grid,
  .df-cta-grid {
    grid-template-columns: 1fr;
  }

  .df-featured-video-grid {
    grid-template-columns: 1fr;
  }

  .df-featured-video-copy p {
    font-size: 18px;
  }
}

@media (max-width: 700px) {
  .df-shell {
    padding: 0 14px;
  }

  body:not(.home) main.df-shell {
    padding: 32px 24px 56px;
  }

  .df-site-header {
    position: static;
  }

  .df-site-header > .wp-block-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    min-height: 0;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .df-site-header .df-brand {
    min-width: 0;
    gap: 10px;
  }

  .df-site-header .wp-block-site-logo img,
  .df-site-header .wp-block-site-logo .custom-logo {
    width: 54px;
    height: 54px;
  }

  .df-site-tagline {
    max-width: 14ch;
    text-align: right;
  }

  .df-primary-nav {
    grid-column: 1 / -1;
    width: 100%;
  }

  .df-primary-nav .wp-block-navigation,
  .df-primary-nav .wp-block-navigation__container {
    width: 100%;
  }

  .df-primary-nav .wp-block-navigation__container {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0 6px;
  }

  .df-primary-nav .wp-block-navigation-item__content {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
  }

  .df-site-title {
    font-size: 14px;
  }

  .df-hero {
    padding-top: 28px;
    min-height: 1040px;
  }

  .df-frequency-title {
    font-size: clamp(42px, 17vw, 68px);
  }

  .df-orbit {
    width: min(360px, calc(100% - 60px));
    top: 276px;
  }

  .df-orbit-link {
    position: static;
    margin: 12px 0 0;
  }

  .df-hero-links {
    position: relative;
    top: auto;
    right: auto;
    margin-top: 430px;
  }

  .df-hero-caption {
    margin-top: 34px;
    width: auto;
  }

  .df-hero-caption p,
  .df-hero-meta p {
    font-size: 34px;
  }

  .df-opening-media {
    margin-top: 20px;
    min-height: 660px;
  }

  .df-opening-media figure {
    width: 92%;
    right: 4%;
    top: 90px;
  }

  .df-section h2 {
    font-size: 19vw;
  }

  .df-chapter-rail {
    width: calc(100% - 24px);
    overflow: auto;
    justify-content: flex-start;
    padding: 6px 8px;
    gap: 6px;
  }

  .df-chapter-rail a {
    width: 36px;
    height: 36px;
  }

  .df-chapter-track {
    width: 26px;
  }

  .df-route-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .df-footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Archive cards keep readable foregrounds on their light surface. */
.df-media-tile,
.df-media-tile .wp-block-post-title,
.df-media-tile .wp-block-post-title a,
.df-media-tile .wp-block-post-excerpt { color: #17131d; }

/* Maintain brand contrast on native editor buttons, including the book handoff. */
.wp-block-button .wp-block-button__link { background-color: #fa9000; color: #140b27; }
.wp-block-button .wp-block-button__link:hover { background-color: #ffad3d; color: #140b27; }
