/* ==========================================================================
   DOJ – Diary of Journeys · Responsive layer
   Desktop-first overrides. Breakpoints:
   1200 navigation · 1024 tablet landscape · 860 tablet · 600 mobile · 380 small
   ========================================================================== */

/* --------------------------------------------------------------------------
   ≤ 1439 / ≤ 1280 – laptop tightening
   -------------------------------------------------------------------------- */
@media (max-width: 1439px) {
  .primary-nav__list { gap: 1.25rem; }
  .primary-nav a { font-size: 0.875rem; }
}
@media (max-width: 1280px) {
  .primary-nav__list { gap: 1rem; }
  .primary-nav a { font-size: 0.84375rem; }
}

/* --------------------------------------------------------------------------
   ≤ 1200 – navigation collapses
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
  :root {
    --header-h: 88px;
    --header-h-scrolled: 72px;
  }
  .primary-nav { display: none; }
  .site-header__cta { margin-left: auto; }
  .nav-toggle { display: block; margin-right: -10px; }
  .brand img { height: 60px; }
  .is-scrolled .brand img { height: 50px; }
}

@media (min-width: 1201px) {
  .mobile-menu { display: none; }
}

/* --------------------------------------------------------------------------
   ≤ 1024 – tablet landscape
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  /* Hero */
  .hero__copy,
  .hero__aside { grid-column: 1 / -1; }
  .hero__aside {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem 3rem;
    margin-top: 2.25rem;
    padding-bottom: 0;
  }
  .hero__lede { max-width: 32rem; }
  .hero__aside .btn { margin-top: 0; }

  /* Story */
  .story__head { grid-column: 1 / -1; }
  .story__media {
    grid-column: 1 / span 10;
    position: relative;
    top: auto;
  }
  .story__body { grid-column: 1 / -1; max-width: 42rem; }

  /* Who We Are */
  .who__visual,
  .who__content { grid-column: 1 / -1; }
  .who__visual {
    margin-right: calc(var(--bleed) + clamp(2rem, 10vw, 7rem));
    margin-bottom: clamp(3rem, 6vw, 4.5rem);
  }
  .who__media img { aspect-ratio: 16 / 11; object-position: 70% 50%; }
  .who__goal { right: clamp(-6rem, -10vw, -2rem); }
  .who__content { max-width: 44rem; }

  /* Approach */
  .approach__head > :first-child,
  .approach__intro { grid-column: 1 / -1; }
  .approach__intro { margin-top: 2rem; max-width: 40rem; }

  /* Expertise */
  .expertise__head > :first-child,
  .expertise__intro { grid-column: 1 / -1; }
  .expertise__intro { margin-top: 1.75rem; max-width: 38rem; }

  /* Closing */
  .closing__content { grid-column: 1 / span 8; }
  .closing__visual { grid-column: 9 / -1; }

  /* Section head */
  .section-head > :first-child,
  .section-head__intro { grid-column: 1 / -1; }
  .section-head__intro { margin-top: 1.75rem; max-width: 40rem; }

  /* FAQ */
  .faq-section__head,
  .faq { grid-column: 1 / -1; }
  .faq-section__head {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 3rem;
    align-items: end;
    margin-bottom: clamp(2.5rem, 5vw, 3.5rem);
  }
  .faq-section__head > :not(.faq-section__contact) { grid-column: 1; }
  .faq-section__contact {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin-top: 0;
    padding: 0 0 0 2rem;
    border-top: 0;
    border-left: 1px solid var(--c-line);
  }

  /* CTA arch */
  .cta-arch__content { grid-column: 1 / span 8; }
  .cta-arch__visual { grid-column: 9 / -1; }

  /* Footer */
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; gap: 2.5rem; align-items: center; }
  .footer__intro { margin-top: 0; max-width: 34rem; }
}

/* --------------------------------------------------------------------------
   ≤ 860 – tablet portrait
   -------------------------------------------------------------------------- */
@media (max-width: 860px) {
  .story__media { grid-column: 1 / -1; }

  /* Vision & Mission stack */
  .purpose__grid { grid-template-columns: 1fr; }
  .purpose__item--alt { border-left: 0; border-top: 1px solid var(--c-line); }

  /* Vertical timeline */
  .timeline { grid-template-columns: 1fr; }
  .step {
    display: grid;
    grid-template-columns: 4rem minmax(0, 1fr);
    column-gap: 1.75rem;
    padding: 0 0 2.5rem;
  }
  .step:last-child { padding-bottom: 0; }
  .step__node { grid-row: 1 / span 3; }
  .step__num { margin-top: 0.35rem; }
  .step__title,
  .step__text { grid-column: 2; }
  .step__title { min-height: 0; }
  .step__text { max-width: 28rem; }
  .step:not(:last-child)::after {
    top: calc(4rem + 0.6rem);
    bottom: 0.6rem;
    left: 2rem;
    right: auto;
    width: 1px;
    height: auto;
    background: linear-gradient(180deg, var(--c-champagne), rgba(196, 154, 82, 0.2));
    transform-origin: center top;
  }
  .js .timeline .step:not(:last-child)::after { transform: scaleY(0); }
  .js .timeline.is-visible .step::after { transform: scaleY(1); }

  /* Closing stacks: window first, then the statement */
  .closing__grid { row-gap: 3.5rem; }
  .closing__content,
  .closing__visual { grid-column: 1 / -1; }
  .closing__visual { order: -1; justify-self: start; }
  .window { width: clamp(12.5rem, 38vw, 16rem); }
  .closing::before { top: 0; right: auto; left: -20%; transform: none; }

  /* FAQ head stacks */
  .faq-section__head { display: block; }
  .faq-section__contact {
    margin-top: 2rem;
    padding: 1.5rem 0 0;
    border-left: 0;
    border-top: 1px solid var(--c-line);
  }

  /* CTA arch stacks: arch first, then the statement */
  .cta-arch__grid { row-gap: 4rem; }
  .cta-arch__content,
  .cta-arch__visual { grid-column: 1 / -1; }
  .cta-arch__visual { order: -1; justify-self: start; margin-left: 0.875rem; }
  .arch { width: clamp(12rem, 36vw, 15rem); }
  .cta-arch::before { top: 0; right: auto; left: -20%; transform: none; }
}

/* --------------------------------------------------------------------------
   ≤ 600 – mobile
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
  :root {
    --header-h: 80px;
    --header-h-scrolled: 68px;
  }
  .site-header__cta { display: none; }
  .nav-toggle { margin-left: auto; }
  .brand img { height: 54px; }
  .is-scrolled .brand img { height: 46px; }

  .eyebrow { gap: 0.75rem; letter-spacing: 0.18em; }
  .eyebrow--rule::before,
  .eyebrow__num::after { width: 1.75rem; }
  .eyebrow__num { gap: 0.75rem; }

  .btn { min-height: 3.125rem; padding-inline: 1.5rem; }

  /* Hero */
  .hero__title { margin-top: 1.25rem; }
  .hero__aside { display: block; margin-top: 1.5rem; }
  .hero__aside .btn { margin-top: 1.75rem; }
  .hero__media {
    height: auto;
    aspect-ratio: 4 / 4.3;
  }
  .hero__media img { object-position: 48% 50%; }
  .hero--stacked .hero__aside { display: block; margin-top: 1.5rem; }
  .hero--stacked .hero__lede { padding-left: 1.125rem; }
  .hero--stacked .hero__aside .btn { margin-top: 1.75rem; }

  /* Story */
  .frame::before { inset: 0.875rem -0.875rem -0.875rem 0.875rem; }
  .story__media { margin-right: 0.875rem; }
  .story__media img { aspect-ratio: 4 / 3; }
  .signature__mark { letter-spacing: 0.3em; }

  /* Who We Are */
  .who__visual {
    margin-left: var(--bleed);
    margin-right: var(--bleed);
    padding-bottom: 0;
    margin-bottom: 2.5rem;
  }
  .who__media img { aspect-ratio: 4 / 3.4; }
  .who__goal {
    position: relative;
    right: auto;
    width: auto;
    margin: -3rem var(--gutter) 0;
  }
  .who__needs { grid-template-columns: 1fr; }
  .who__needs li { padding: 0.9rem 0; }

  /* Vision & Mission */
  .purpose__item { padding: 2.25rem 1.5rem 2.5rem; }
  .purpose__label { margin-top: 1.75rem; }

  /* Expertise: single column, stagger off */
  .expertise__grid {
    grid-template-columns: 1fr;
    row-gap: 3.75rem;
    padding-bottom: 0;
  }
  .service:nth-child(even) { transform: none; }
  .service__body { column-gap: 1rem; padding-top: 1.5rem; }

  /* Closing */
  .closing__title em { margin-top: 0.25em; }
  .closing__actions { flex-direction: column; align-items: stretch; }
  .closing__actions .btn { width: 100%; }
  .closing__tagline { font-size: 0.6875rem; letter-spacing: 0.12em; }
  .closing__tagline::before { width: 1.75rem; }

  /* FAQ */
  .faq__trigger {
    grid-template-columns: 1.75rem minmax(0, 1fr) auto;
    column-gap: 0.75rem;
    padding: 1.4rem 0;
  }
  .faq__icon { width: 2.5rem; height: 2.5rem; }
  .faq__inner p { padding: 0 0 1.6rem 2.5rem; }

  /* CTA arch */
  .cta-arch__title em { margin-top: 0.25em; }
  .cta-arch__actions { flex-direction: column; align-items: stretch; }
  .cta-arch__actions .btn { width: 100%; }
  .cta-arch__phone { justify-content: center; }
  .checklist li { font-size: 0.9375rem; }

  /* Footer */
  .footer__grid { grid-template-columns: 1fr; gap: 2.75rem; }
  .footer__brand { display: block; }
  .footer__intro { margin-top: 1.25rem; }
  .brand--footer img { height: 64px; }
  .footer__bottom { flex-direction: column; align-items: flex-start; }
}

/* --------------------------------------------------------------------------
   ≤ 380 – small mobile
   -------------------------------------------------------------------------- */
@media (max-width: 380px) {
  :root { --gutter: 1.125rem; }
  .hero__title { font-size: 2.5rem; }
  .section-title { font-size: 2.05rem; }
  .who__needs li { font-size: 0.875rem; }
  .eyebrow { font-size: 0.6875rem; }
}
