/* ==========================================================================
   RESPONSIVE — the breakpoints that restructure rather than merely resize.

   Loaded last so it wins over the component defaults without needing any
   !important. Most sizing is fluid via clamp() in tokens.css; what is here
   is the handful of places where the LAYOUT has to change shape.
   ========================================================================== */

/* ==========================================================================
   NAV — below 860px the links leave the bar and become a drop panel.

   The panel is positioned under the header rather than inside it, so opening
   it never changes the height of the sticky bar and the page does not jump.
   ========================================================================== */
@media (max-width: 859px) {
  .nav__burger { display: flex; }

  .nav__menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--c-charcoal);
    border-bottom: var(--rule);
    /* Collapsed by max-height rather than display:none so it can animate,
       and hidden from assistive tech and tab order by visibility. */
    max-height: 0;
    visibility: hidden;
    overflow: hidden;
    transition: max-height var(--dur-base) var(--ease),
                visibility 0s linear var(--dur-base);
  }

  .nav__menu.is-open {
    max-height: 70svh;
    visibility: visible;
    overflow-y: auto;
    transition: max-height var(--dur-base) var(--ease), visibility 0s;
  }

  .nav__links {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--sp-2) var(--gutter) var(--sp-5);
  }

  .nav__links li { border-bottom: var(--rule); }
  .nav__links li:last-child { border-bottom: 0; }

  .nav__link {
    padding-block: var(--sp-4);
    font-size: var(--fs-body);
    letter-spacing: 0.06em;
  }

  /* A left bar reads better than an underline in a stacked list. */
  .nav__link::after {
    left: calc(-1 * var(--sp-4));
    right: auto;
    top: var(--sp-3);
    bottom: var(--sp-3);
    width: 2px;
    height: auto;
    transform: scaleY(0);
    transform-origin: top;
    transition: transform var(--dur-base) var(--ease);
  }
  .nav__link:hover::after,
  .nav__link.is-current::after { transform: scaleY(1); }

  /* The nav has to establish the containing block for the absolute panel. */
  .nav { position: sticky; }
  .nav .shell { position: relative; }
}

@media (min-width: 860px) {
  /* Above the breakpoint the panel is just a flex child again — every
     collapsing property from the block above has to be undone explicitly. */
  .nav__menu {
    position: static;
    max-height: none;
    visibility: visible;
    overflow: visible;
    background: transparent;
    border: 0;
  }
}

/* ==========================================================================
   HERO
   ========================================================================== */
@media (max-width: 899px) {
  .hero { min-height: 0; padding-block: var(--sp-7) var(--sp-8); }
  /* The cue points at content that is only a short scroll away on mobile,
     where it is noise rather than a signal. */
  .hero__cue { display: none; }
  .hero__portrait { max-width: 460px; }
}

/* Landscape phones: a full-height hero leaves no room for anything else. */
@media (max-height: 560px) and (orientation: landscape) {
  .hero { min-height: 0; }
}

/* ==========================================================================
   GALLERIES — two columns is the floor. One 210px card per row on a phone
   wastes the width; below 420px the vertical tiles get a tighter minimum
   instead of dropping to a single column.
   ========================================================================== */
@media (max-width: 520px) {
  .grid[data-ratio="9-16"] { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
  .grid[data-ratio="16-9"] { grid-template-columns: 1fr; }
  .tile__body { padding: var(--sp-3); }
  .tile__play { width: 44px; height: 44px; }
  .tile__play svg { width: 14px; height: 14px; }
}

/* ==========================================================================
   BRANDS / QUOTES / RATES
   ========================================================================== */
@media (max-width: 520px) {
  .brands { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .brand { min-height: 88px; padding: var(--sp-4); }
  .quote, .rate { padding: var(--sp-5); }
}

/* ==========================================================================
   LIGHTBOX — on a phone the stage takes the whole screen; a rounded, inset
   dialog wastes the only space a vertical video has.
   ========================================================================== */
@media (max-width: 640px) {
  .lightbox { padding: 0; }
  .lightbox__stage { width: 100%; max-height: 100svh; gap: 0; }
  .lightbox__frame {
    border-radius: 0;
    height: auto;
    max-height: 84svh;
    width: 100%;
  }
  /* Forcing a height on a 9:16 frame here would push the caption off-screen;
     let the aspect ratio drive the box instead. */
  .lightbox__frame[data-ratio="9-16"],
  .lightbox__frame[data-ratio="1-1"] { width: 100%; height: auto; }
  .lightbox__caption { padding: var(--sp-4); }
  .lightbox__nav { width: 38px; height: 38px; }
}

/* ==========================================================================
   PRINT — an acting portfolio gets printed as a leave-behind more often than
   anyone expects. Drop the furniture and put the type on white.
   ========================================================================== */
@media print {
  .nav, .marquee, .lightbox, .grain, .hero__cue, .footer__socials,
  .contact__form, .tile__play { display: none !important; }

  body { background: #fff; color: #000; }
  .section, .section--invert { background: #fff; color: #000; padding-block: 1.5rem; }
  .hero { min-height: 0; }
  .tile, .quote, .rate, .brand { border: 1px solid #999; background: #fff; }
  a { text-decoration: underline; }
}
