/* ==========================================================================
   Light Astra — responsive
   Every breakpoint override, grouped by breakpoint then by component.
   Breakpoints: 600 (large phones / small tablets), 900 (desktop navigation,
   multi-column layouts), 1200 (wide). Mobile-first: nothing below 600 lives
   here except the phone menu sheet.
   ========================================================================== */

/* ---- phones only: the menu is an opaque full-screen sheet ----------------------------- */
@media (max-width: 599.98px) {
  html.js .site-header.is-menu-open .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 49;
    overflow-y: auto;
    padding: var(--space-5) var(--gutter) var(--space-7);
    background: var(--milk);
    border-top: var(--border);
  }

  html.js .is-menu-open .site-nav__list {
    flex-direction: column;
    gap: 0;
  }

  html.js .is-menu-open .site-nav__list li {
    border-bottom: var(--border);
  }

  html.js .is-menu-open .site-nav__link {
    width: 100%;
    min-height: 3.75rem;
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 500;
    letter-spacing: var(--tracking-display);
  }

  html.js .is-menu-open .site-nav__link::after {
    bottom: 1.1rem;
    right: auto;
    width: 2.5rem;
  }

  html.js .is-menu-open .site-nav__link[aria-current]::after {
    transform: scaleX(1);
  }

  html.js .is-menu-open .site-nav__foot {
    margin-top: var(--space-6);
  }

  /* While the sheet is open the page behind it must not scroll under it. */
  html.js .site-header.is-menu-open {
    border-bottom-color: var(--hairline);
  }

  /* Both calls to action side by side, so the 375 x 667 fold shows them whole. */
  .hero__actions .btn {
    flex: 1 1 auto;
    min-width: 0;
    padding-inline: 1rem;
  }
}

/* ---- 600 and up ------------------------------------------------------------------------- */
@media (min-width: 600px) {
  :root {
    --header-h: 4.5rem;
  }

  .site-header__cta-prefix {
    display: inline;
  }

  /* Tablets: the open menu is a card under the bar, aligned right. */
  html.js .site-header.is-menu-open .site-nav {
    position: absolute;
    top: calc(100% - 1px);
    right: var(--gutter);
    width: min(22rem, calc(100% - 2 * var(--gutter)));
    padding: var(--space-4) var(--space-5) var(--space-5);
    background: var(--paper);
    border: var(--border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sheet);
  }

  html.js .is-menu-open .site-nav__list {
    flex-direction: column;
    gap: 0;
  }

  html.js .is-menu-open .site-nav__list li {
    border-bottom: var(--border);
  }

  html.js .is-menu-open .site-nav__link {
    width: 100%;
    min-height: 3rem;
    font-size: 1rem;
  }

  html.js .is-menu-open .site-nav__link::after {
    right: auto;
    width: 2rem;
    bottom: 0.75rem;
  }

  .grid--2,
  .grid--3,
  .grid--4 {
    --cols: 2;
  }

  .grid--ruled > * {
    padding-inline: var(--space-5);
    border-top: 0;
    border-left: var(--border);
  }

  .grid--ruled > *:nth-child(2n + 1) {
    padding-left: 0;
    border-left: 0;
  }

  .grid--ruled > *:nth-child(n + 3) {
    border-top: var(--border);
  }

  .form__grid {
    grid-template-columns: 1fr 1fr;
  }

  .field--full {
    grid-column: 1 / -1;
  }

  .form__submit {
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: var(--space-3) var(--space-5);
  }

  .form__submit .fineprint:last-child {
    grid-column: 1 / -1;
  }

  .choice {
    grid-template-columns: 1fr 1fr;
  }

  .facts {
    grid-template-columns: 1fr 1fr;
    column-gap: var(--space-5);
  }

  .steps {
    grid-template-columns: 1fr 1fr;
    column-gap: var(--space-6);
  }

  .step:nth-child(-n + 2) {
    border-top: var(--border);
  }

  .spec__row {
    grid-template-columns: minmax(6rem, 10rem) 1fr;
  }

  .site-footer__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: var(--space-6);
  }

  .cta-band__inner {
    grid-template-columns: 1fr 1fr;
    align-items: end;
  }

  .cta-band__contact {
    grid-column: 1 / -1;
  }

  .project {
    grid-template-columns: 1.15fr 1fr;
    align-items: center;
    gap: var(--space-6);
  }
}

/* ---- 768 and up: the three pillars side by side ------------------------------------------ */
@media (min-width: 768px) {
  .pillars {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pillar {
    padding-block: var(--space-6) var(--space-7);
    padding-inline: var(--space-5);
    border-top: var(--border);
    border-left: var(--border);
  }

  .pillar:first-child {
    padding-left: 0;
    border-left: 0;
    border-top: var(--border);
  }

  .pillar:last-child {
    padding-right: 0;
  }
}

/* ---- 900 and up: desktop navigation and the editorial layouts ------------------------------ */
@media (min-width: 900px) {
  :root {
    --header-h: 5rem;
  }

  .site-header__bar {
    grid-template-columns: auto 1fr auto;
    grid-template-areas: "brand nav cta";
    gap: var(--space-6);
  }

  .menu-toggle {
    display: none;
  }

  html.js .site-nav,
  .site-nav {
    display: block;
    grid-area: nav;
    grid-column: auto;
    padding: 0;
    border: 0;
    justify-self: center;
  }

  .site-nav__list {
    flex-wrap: nowrap;
    gap: clamp(1.25rem, 0.5rem + 1.5vw, 2.25rem);
  }

  .site-nav__link {
    min-height: var(--header-h);
    font-size: 0.9375rem;
  }

  .site-nav__link::after {
    bottom: calc(50% - 0.95rem);
  }

  html.js .is-menu-open .site-nav__foot,
  .site-nav__foot {
    display: none;
  }

  .split {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: var(--space-8);
  }

  .split__aside {
    position: sticky;
    top: calc(var(--header-h) + 2rem);
  }

  .section__head--split {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: end;
  }

  .section__head--split .section__lead {
    padding-bottom: 0.35rem;
  }

  .grid--3 {
    --cols: 3;
  }

  .grid--4 {
    --cols: 4;
  }

  .grid--ruled.grid--3 > *:nth-child(2n + 1) {
    padding-left: var(--space-5);
    border-left: var(--border);
  }

  .grid--ruled.grid--3 > *:nth-child(3n + 1) {
    padding-left: 0;
    border-left: 0;
  }

  .grid--ruled.grid--3 > *:nth-child(n + 3) {
    border-top: 0;
  }

  .grid--ruled.grid--3 > *:nth-child(n + 4) {
    border-top: var(--border);
  }

  .grid--ruled.grid--4 > *:nth-child(2n + 1) {
    padding-left: var(--space-5);
    border-left: var(--border);
  }

  .grid--ruled.grid--4 > *:nth-child(4n + 1) {
    padding-left: 0;
    border-left: 0;
  }

  .grid--ruled.grid--4 > *:nth-child(n + 3) {
    border-top: 0;
  }

  .grid--ruled.grid--4 > *:nth-child(n + 5) {
    border-top: var(--border);
  }

  .pillar {
    padding-inline: var(--space-6);
  }

  .pillar:first-child {
    padding-left: 0;
  }

  .pillar:last-child {
    padding-right: 0;
  }

  .facts {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: var(--space-5);
  }

  .steps {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: var(--space-6);
  }

  .step {
    border-top: var(--border);
  }

  .page-hero__inner {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: end;
    gap: var(--space-7);
  }

  .page-hero--center .page-hero__inner {
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: var(--space-5);
  }

  .brand__star {
    width: 2rem;
    height: 2rem;
  }

  .brand__word {
    --word-w: 11rem;
  }

  .site-footer__grid {
    grid-template-columns: 1.5fr repeat(3, minmax(0, 1fr));
  }

  .site-footer__brand {
    grid-column: auto;
  }

  .site-footer__lockup {
    width: 8rem;
    height: 8rem;
  }

  .cta-band__inner {
    grid-template-columns: 1.2fr 1fr;
    gap: var(--space-7);
  }

  .project {
    grid-template-columns: 1.25fr 1fr;
    gap: var(--space-8);
  }

  .project--flip .project__frame {
    order: 2;
  }
}

/* ---- 1200 and up: breathing room ---------------------------------------------------------- */
@media (min-width: 1200px) {
  .site-nav__list {
    gap: 2.5rem;
  }

  .split {
    gap: var(--space-9);
  }

  .pillar {
    padding-inline: var(--space-7);
  }

  .project {
    gap: var(--space-9);
  }
}

/* The narrowest phones: the brand wordmark, the Quote button and the Menu toggle do not fit
   side by side under 360px; the menu sheet keeps its full-width Get a Quote button. */
@media (max-width: 359px) {
  .site-header__cta {
    display: none;
  }
}

/* The Client Support link: its full label in the phone sheet and from 1200px; the desktop
   row between 900 and 1199px has room for "Support" only. Only one span is rendered, so
   the link's accessible name is the visible one. */
.site-nav__label--short {
  display: none;
}

@media (min-width: 900px) and (max-width: 1199px) {
  .site-nav__label--short {
    display: inline;
  }

  .site-nav__label--full {
    display: none;
  }
}
