/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE — Mobile-first breakpoints
   ═══════════════════════════════════════════════════════════════ */

/* ─── Mobile base (up to 768px) ──────────────────────────────── */

.mobile-toggle {
  display: flex;
}

.main-nav {
  position: fixed;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100vh;
  background: rgba(8, 8, 8, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: right 0.5s var(--ease-out);
  z-index: 1000;
}

.main-nav.is-open {
  right: 0;
}
.nav-list {
  flex-direction: column;
  gap: 2rem;
  text-align: center;
}
.nav-link {
  font-size: 1.1rem;
  letter-spacing: 0.2em;
}
.header-cta {
  display: none;
}

/* Hero mobile — brain moves to top, content below */
.hero {
  align-items: flex-end;
  min-height: 100svh;
}

.hero-brain {
  width: 90%;
  right: 50%;
  top: 0;
  transform: translateX(50%);
  opacity: 0.6;
}

.hero-vignette {
  background: linear-gradient(
    180deg,
    rgba(242, 239, 233, 0.3) 0%,
    transparent 30%,
    rgba(242, 239, 233, 0.7) 70%,
    rgba(242, 239, 233, 0.95) 100%
  );
}

.hero-content {
  padding: 2rem 1.5rem 5rem;
  text-align: left;
  max-width: 100%;
}

.hero-kicker {
  justify-content: flex-start;
}
.hero-description {
  max-width: 100%;
}
.hero-actions {
  justify-content: flex-start;
}

/* Challenge — stack heading above questions, two-up questions */
.challenge-inner {
  flex-direction: column;
  align-items: flex-start;
  gap: 2.5rem;
}
.challenge-lead {
  flex: none;
  width: 100%;
}
.challenge-questions {
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem 1.5rem;
}

/* Inner pages — stack on mobile */
.about-grid {
  grid-template-columns: 1fr;
}
.form-row {
  grid-template-columns: 1fr;
}

/* Expertise grid — single column */
.expertise-grid {
  grid-template-columns: 1fr;
  gap: 2px;
}

/* Framework */
.framework-header {
  grid-template-columns: 1fr;
}
.framework-header-visual {
  display: none;
}
.framework-grid {
  grid-template-columns: 1fr;
}
/* Approach layout — single column, soundwave on top */
.framework-layout {
  grid-template-columns: 1fr;
}
.framework-visual {
  order: -1;
  margin-bottom: 2rem;
}
/* Sound of Leadership journey — stack; soundwave below the steps */
.sol-layout {
  grid-template-columns: 1fr;
}

/* Availability */
.availability-layout {
  grid-template-columns: 1fr;
}
.availability-channels {
  grid-template-columns: 1fr;
}
.availability-visual {
  order: -1;
  position: static;
}

/* Book */
.book-layout {
  grid-template-columns: 1fr;
}
.book-visual {
  order: -1;
}
.book-flip {
  width: 200px;
}
/* 3:4 render — match the original 2:3 card's height (300px) */
.book-flip--render {
  width: 225px;
}

/* Stats */
.stats-grid {
  grid-template-columns: repeat(2, 1fr);
}
.stat {
  border-right: 1px solid rgba(200, 149, 108, 0.12);
  border-bottom: 1px solid rgba(200, 149, 108, 0.12);
}

/* Footer */
.footer-top {
  grid-template-columns: 1fr;
  gap: 2rem;
}
.footer-bottom {
  flex-direction: column;
  text-align: center;
}

/* ─── Tablet (768px+) ────────────────────────────────────────── */
@media (min-width: 768px) {
  /* Breaks tagged .mobile-break apply on phones only */
  br.mobile-break {
    display: none;
  }

  .expertise-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .challenge-questions {
    grid-template-columns: repeat(3, 1fr);
  }

  .challenge-title {
    white-space: nowrap;
  }

  .hero-brain {
    width: 60%;
    right: -5%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
  }

  .hero-vignette {
    background:
      linear-gradient(
        90deg,
        rgba(242, 239, 233, 0.5) 0%,
        rgba(242, 239, 233, 0.2) 42%,
        transparent 65%
      ),
      linear-gradient(
        180deg,
        rgba(242, 239, 233, 0.3) 0%,
        transparent 20%,
        transparent 80%,
        rgba(242, 239, 233, 0.5) 100%
      );
  }

  .hero {
    align-items: center;
  }
  .hero-content {
    text-align: left;
    padding: 8rem 3rem 6rem;
    max-width: 680px;
  }
  /* Keep each forced headline phrase on one line (matches the mockup) */
  .title-line {
    white-space: nowrap;
  }
  .hero-kicker {
    justify-content: flex-start;
  }
  .hero-actions {
    justify-content: flex-start;
  }

  .book-flip {
    width: 240px;
  }
  /* 3:4 render — match the original 2:3 card's height (360px) */
  .book-flip--render {
    width: 270px;
  }

  .stats-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .footer-top {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ─── Desktop (1024px+) ──────────────────────────────────────── */
@media (min-width: 1024px) {
  /* Nav */
  .mobile-toggle {
    display: none;
  }
  .main-nav {
    position: static;
    width: auto;
    height: auto;
    background: none;
    backdrop-filter: none;
    margin-left: auto;
  }
  .nav-list {
    flex-direction: row;
    gap: clamp(1.5rem, 3vw, 2.5rem);
  }
  .nav-link {
    font-size: 0.78rem;
    letter-spacing: 0.1em;
  }
  .header-cta {
    display: inline-block;
    margin-left: clamp(1.5rem, 2.5vw, 2.5rem);
  }
  /* Desktop uses the header CTA button, so drop the menu's Contact item */
  .nav-item--contact {
    display: none;
  }

  /* Grids */
  .expertise-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5px;
  }

  /* Challenge — heading beside the full five-question row */
  .challenge-inner {
    flex-direction: row;
    align-items: flex-start;
    gap: clamp(3rem, 6vw, 5.5rem);
  }
  .challenge-lead {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
  }
  .challenge-questions {
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
  }
  .challenge-item {
    padding: 0 clamp(1rem, 1.5vw, 1.6rem);
    border-left: 1px solid var(--border-grey);
  }
  .challenge-item:first-child {
    border-left: none;
    padding-left: 0;
  }

  /* Inner pages — restore multi-column */
  .about-grid {
    grid-template-columns: 1fr 1.25fr 1fr;
  }
  .about-col {
    border-left: 1px solid var(--border-grey);
    padding-left: clamp(1.75rem, 2.5vw, 3rem);
  }
  .about-col:first-child {
    border-left: none;
    padding-left: 0;
  }

  .framework-header {
    grid-template-columns: 1fr auto;
  }
  .framework-header-visual {
    display: block;
  }
  .framework-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  /* Approach layout — two columns, soundwave back on the right */
  .framework-layout {
    grid-template-columns: 1fr 1fr;
  }
  .framework-visual {
    order: 0;
    margin-bottom: 0;
  }
  /* Sound of Leadership journey — journey + soundwave side by side */
  .sol-layout {
    grid-template-columns: 1fr 1fr;
  }

  .availability-layout {
    grid-template-columns: 1fr 1fr;
  }
  .availability-visual {
    order: 0;
  }
  .availability-channels {
    grid-template-columns: 1fr 1fr;
  }

  .book-layout {
    grid-template-columns: 1fr 1fr;
  }
  .book-visual {
    order: 0;
  }
  .book-flip {
    width: 400px;
  }
  /* 3:4 render — fill the column, trimmed slightly so it doesn't run past the text */
  .book-flip--render {
    width: calc(100% - 20px);
  }

  .footer-top {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
  }
  .footer-bottom {
    flex-direction: row;
  }

  /* Hero */
  .hero-brain {
    width: 55%;
  }
  .hero-content {
    padding-left: clamp(3rem, 4.5vw, 4.5rem);
    max-width: 680px;
  }
}

/* ─── Large Desktop (1400px+) ────────────────────────────────── */
@media (min-width: 1400px) {
  :root {
    --container: 1300px;
  }
  .hero-brain {
    width: 52%;
  }
}

/* Per-card expertise result — hidden by default, shown on mobile only */
.card-result {
  display: none;
}

/* Flip hint reads "Hover" by default; the "Tap" variant shows on touch */
.hint-mobile {
  display: none;
}

/* ─── Mobile-only refinements (up to 767px) ──────────────────────
   Placed last so these win over the mobile-base rules above; nothing
   here leaks into the 768px+ tablet/desktop layouts. */
@media (max-width: 767px) {

  /* Sound of Leadership journey — tighten spacing on small screens */
  .sol-step {
    gap: 1.15rem;
  }
  .sol-title {
    font-size: 1.2rem;
  }
  .sol-desc {
    max-width: none;
  }

  /* Expertise — show a result beneath each card, hide the shared
     bottom results row */
  .card-result {
    display: block;
    align-self: stretch;
    margin-top: 1.5rem;
    padding-top: 1.15rem;
    border-top: 2px solid #e07b39;
    text-align: center;
  }
  .card-result-heading {
    font-family: var(--font-display);
    font-weight: 500;
    font-style: italic;
    font-size: 1.05rem;
    color: var(--charcoal);
    margin-bottom: 0.4rem;
  }
  .card-result-text {
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--charcoal);
    line-height: 1.5;
  }
  .expertise-results {
    display: none;
  }

  /* Hero — give the scroll cue breathing room below the buttons */
  .hero-content {
    padding-bottom: 7rem;
  }
  .hero-scroll-cue {
    bottom: 1.5rem;
  }

  /* Expertise — drop only the mid-sentence forced breaks (tagged
     .soft-break in the markup) so each line flows to full width. The
     <br><br> paragraph breaks are left intact, so every card keeps its
     two distinct paragraphs. */
  .card-desc br.soft-break,
  .service-desc br.soft-break {
    display: none;
  }

  /* The Leadership Decision Challenge — centred heading, questions
     stacked one per row (icon above its description) */
  .challenge-lead {
    text-align: center;
  }
  .challenge-kicker {
    white-space: normal;
  }
  .challenge-questions {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }

  /* The Approach — centred title and description */
  .framework-header-text {
    text-align: center;
  }
  .framework-header-text .section-kicker {
    justify-content: center;
  }

  /* Footer — centred logo and stacked, centred sections */
  .footer-brand {
    text-align: center;
  }
  .footer-logo-img {
    margin-left: auto;
    margin-right: auto;
  }
  .footer-nav,
  .footer-contact,
  .footer-social {
    text-align: center;
  }
  .social-links {
    justify-content: center;
  }

  /* Buttons — never let a long label overflow a narrow phone.
     Trim the oversized large-button padding and allow the label to
     wrap centred as a safety net on the smallest screens. */
  .btn {
    white-space: normal;
    max-width: 100%;
    text-align: center;
  }
  .btn--large {
    padding: 1rem 1.6rem;
  }

  /* About page — centre the stacked columns and separate them with a
     divider so the three sections read as distinct blocks */
  .about-col {
    text-align: center;
  }
  .about-quote-head {
    justify-content: center;
  }
  .about-col + .about-col {
    margin-top: 0.5rem;
    padding-top: clamp(2rem, 6vw, 2.75rem);
    border-top: 1px solid var(--border-grey);
  }
  /* Book column — stack the cover above the copy and centre it */
  .about-book-media {
    flex-direction: column;
    align-items: center;
  }
  .about-book-cover {
    width: clamp(110px, 34vw, 150px);
  }

  /* The Book — centre the "Why This Book Matters" column */
  .book-info {
    text-align: center;
  }
  .book-info .section-kicker {
    justify-content: center;
  }
  .book-list {
    display: inline-block;
    text-align: left;
  }
  .book-details {
    justify-content: center;
  }

  /* Flip hint — "Tap" on touch screens, "Hover" on desktop */
  .hint-desktop {
    display: none;
  }
  .hint-mobile {
    display: inline;
  }

  /* Availability — stack as [title] → [image] → [channels], centre the
     info, and turn the Draft2Digital platform pills into a tidy list.
     display:contents promotes the content's children so the image can
     be ordered between the title and the channels. */
  .availability-layout {
    display: flex;
    flex-direction: column;
    text-align: center;
  }
  .availability-content {
    display: contents;
  }
  .availability-content .section-kicker {
    order: 1;
    justify-content: center;
  }
  .availability-content .section-title {
    order: 2;
  }
  .availability-visual {
    order: 3;
  }
  .availability-content .availability-channels {
    order: 4;
    margin-top: 1.5rem;
  }
  .channel-platforms {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.45rem;
    text-align: left;
    margin-top: 0.9rem;
  }
  .platform {
    background: none;
    border: none;
    border-radius: 0;
    padding: 0 0 0 1.1rem;
    position: relative;
  }
  .platform::before {
    content: "\2022";
    position: absolute;
    left: 0;
    color: var(--gold);
  }
}
