/* ============================================================
   Print Affairs — alternate landing page

   Apple's page grammar applied to a print shop:
     · very few type sizes, very large at the top of the scale
     · tight tracking on display, generous line-height on body
     · enormous vertical breathing room
     · centred narrative moments, left-aligned detail
     · product photographed big on a calm ground
     · colour as accent and as full-bleed chapter, never as noise

   The palette is sampled from the brand logo, which is a glossy splat
   of wet ink. Colour lives in grounds and accents; type stays ink-black
   or paper-white so the page reads calm at speed.
   ============================================================ */

:root {
  /* --- Inks, sampled from the logo --------------------------- */
  --violet:  #B013E6;
  --magenta: #FF0275;
  --orange:  #FF7E01;
  --blue:    #17009A;
  --amber:   #FFB300;
  --red:     #FE0F00;

  --violet-deep: #55066F;
  --blush:       #FFD9E8;

  /* Text-safe variants. The logo inks are vivid but light: magenta is
     only 3.68:1 on paper and amber is 1.79:1 on white, so none of them
     can carry small text. These are the same hues darkened until they
     clear 4.5:1. Use the bright originals for large fills and swatches,
     these for anything you have to read. */
  --magenta-txt: #C4005A;   /* 5.6:1  on paper */
  --violet-txt:  #8009AD;   /* 6.4:1  on paper */
  --orange-txt:  #A34700;   /* 5.4:1  on paper */
  --blue-txt:    #17009A;   /* 14.4:1 on paper */
  --amber-txt:   #7A5200;   /* 6.4:1  on paper */
  --red-txt:     #C60B00;   /* 5.4:1  on paper */

  /* --- Ground and type --------------------------------------- */
  --paper:      #FBFBFD;   /* Apple's near-white, very slightly cool */
  --paper-warm: #F5F2ED;
  --ink:        #1D1D1F;   /* Apple's near-black */
  --ink-soft:   #4B4B4F;
  --graphite:   #6E6E73;
  --rule:       #E4E4E7;
  --white:      #FFFFFF;

  /* --- Type -------------------------------------------------- */
  --font-display: "Fraunces", Georgia, serif;
  --font-sans:    "Archivo", -apple-system, "Helvetica Neue", Arial, sans-serif;

  /* A deliberately short scale. Six sizes carry the whole page. */
  --t-hero:  116px;   /* the one enormous moment */
  --t-title:  80px;   /* chapter openers */
  --t-lead:   40px;   /* section leads, pull quotes */
  --t-sub:    28px;   /* card titles */
  --t-body:   19px;   /* everything readable */
  --t-fine:   14px;   /* labels, meta, nav */

  /* Two radii. Rectangles for printed stock, pills for controls. */
  --radius:      20px;
  --radius-pill: 980px;

  --gutter: 40px;
  --page-max: 1440px;
  --measure: 680px;   /* comfortable reading width */
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--t-body);
  line-height: 1.6;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }

.page { position: relative; }

/* Every band of content sits in the same measure. */
.wrap {
  max-width: var(--page-max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ============================================================
   TYPE PRIMITIVES
   Apple's signature is tight tracking that gets tighter as type
   grows, and line-height that approaches 1 at display sizes.
   ============================================================ */
.display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.02;
  margin: 0;
}

.t-hero  { font-size: var(--t-hero);  letter-spacing: -0.04em; }
.t-title { font-size: var(--t-title); letter-spacing: -0.035em; }
.t-lead  { font-size: var(--t-lead);  letter-spacing: -0.025em; line-height: 1.15; }
.t-sub   { font-size: var(--t-sub);   letter-spacing: -0.02em;  line-height: 1.2; }

.lede {
  font-size: var(--t-lead);
  line-height: 1.35;
  letter-spacing: -0.015em;
  color: var(--ink-soft);
  font-weight: 400;
  margin: 0;
}

.body { font-size: var(--t-body); line-height: 1.65; color: var(--ink-soft); margin: 0; }

.eyebrow {
  font-size: var(--t-fine);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--graphite);
  margin: 0;
}

/* Apple's blue-link affordance, in our magenta. */
.link {
  color: var(--magenta-txt);
  font-size: var(--t-body);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.link::after { content: "›"; font-size: 1.2em; line-height: 0.9; }
.link:hover { text-decoration: underline; }

/* ============================================================
   BUTTONS — Apple's pill, sized for touch, two variants only
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0;
  padding: 13px 26px;
  transition: background-color 0.24s ease, color 0.24s ease,
              border-color 0.24s ease, transform 0.24s ease;
}

.btn--fill {
  background: var(--magenta-txt);
  color: var(--white);
}
.btn--fill:hover { background: #A80049; }

.btn--quiet {
  border: 1px solid rgba(29,29,31,0.28);
  color: var(--ink);
}
.btn--quiet:hover { border-color: var(--ink); background: rgba(29,29,31,0.04); }

.btn--on-dark { background: var(--white); color: var(--ink); }
.btn--on-dark:hover { background: #EDEDF0; }

.btn--ghost-dark {
  border: 1px solid rgba(255,255,255,0.4);
  color: var(--white);
}
.btn--ghost-dark:hover { border-color: #fff; background: rgba(255,255,255,0.1); }

/* ============================================================
   NAV — thin, quiet, glassy. Apple's is 44px and recedes.
   ============================================================ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251,251,253,0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(29,29,31,0.08);
}

.nav__inner {
  max-width: var(--page-max);
  margin-inline: auto;
  padding: 0 var(--gutter);
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.nav__brand { display: flex; align-items: center; gap: 9px; }
.nav__logo  { width: 26px; height: 26px; object-fit: contain; }
.nav__wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
}

.nav__links { display: flex; align-items: center; gap: 34px; }

.nav__link {
  font-size: var(--t-fine);
  color: var(--ink);
  opacity: 0.86;
  transition: opacity 0.2s ease;
}
.nav__link:hover { opacity: 1; }

.nav__right { display: flex; align-items: center; gap: 20px; }
.nav__phone { font-size: var(--t-fine); opacity: 0.86; }

.nav__cta {
  font-size: var(--t-fine);
  font-weight: 500;
  background: var(--magenta-txt);
  color: var(--white);
  border-radius: var(--radius-pill);
  padding: 8px 17px;
  transition: background-color 0.24s ease;
}
.nav__cta:hover { background: #A80049; }

/* ============================================================
   HERO
   Two columns inside the same centred 1440 measure every other
   section uses. The copy holds the left column, the product
   composition the right, and the two are balanced on a shared
   optical centre line rather than on fixed pixel offsets.
   ============================================================ */
.hero {
  position: relative;
  overflow: clip;
}

.hero__inner {
  max-width: var(--page-max);
  margin-inline: auto;
  padding: 76px var(--gutter) 84px;
  display: grid;
  grid-template-columns: minmax(0, 47fr) minmax(0, 53fr);
  align-items: center;
  gap: 48px;
}

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  z-index: 2;
}

.hero__eyebrow { margin-bottom: 20px; color: var(--magenta-txt); }

.hero__title {
  margin: 0 0 22px;
  text-align: left;
}

.hero__lede {
  max-width: 30ch;
  margin: 0 0 34px;
  font-size: 24px;
  line-height: 1.45;
  letter-spacing: -0.01em;
  text-align: left;
}

.hero__actions {
  display: flex;
  gap: 18px;
  align-items: center;
}

/* The product composition: arches behind, the couple cut out in front.
   The stage keeps the art's aspect so the column can flex without the
   layers drifting apart. */
.hero__stage {
  position: relative;
  aspect-ratio: 749 / 620;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.hero__glow {
  position: absolute;
  left: 50%;
  top: 8%;
  transform: translateX(-50%);
  width: 94%;
  height: 76%;
  background: radial-gradient(ellipse at center,
    rgba(255,2,117,0.14) 0%,
    rgba(176,19,230,0.09) 38%,
    transparent 70%);
  filter: blur(50px);
  pointer-events: none;
}

/* Layers are placed as percentages of the stage, so the composition
   holds together at any column width. */
.hero__back {
  position: absolute;
  left: 0;
  bottom: 14%;
  width: 96%;
  height: auto;
  max-width: none;
}

/* The couple are cut out on a clean ground, so they composite over the
   arches rather than carrying their own background. */
/* Shares a baseline with the arches so the couple stand on the same
   ground line and their feet are never clipped. */
.hero__front {
  position: absolute;
  left: 54%;
  bottom: 14%;
  width: 34%;
  height: auto;
  max-width: none;
  z-index: 2;
}

.hero__caption {
  position: absolute;
  left: 0;
  bottom: 16%;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.86);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border: 1px solid rgba(255,255,255,0.7);
  box-shadow: 0 12px 34px rgba(29,29,31,0.12);
  text-align: left;
  z-index: 3;
}
.hero__caption strong { display: block; font-size: 15px; font-weight: 600; }
.hero__caption span   { display: block; font-size: 13px; color: var(--graphite); }

/* ============================================================
   STAT STRIP — Apple's "by the numbers" row
   ============================================================ */
.stats {
  padding: 96px 0;
  border-bottom: 1px solid var(--rule);
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  text-align: center;
}

.stat__num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 60px;
  letter-spacing: -0.035em;
  line-height: 1;
  color: var(--c-txt, var(--ink));
  display: block;
  margin-bottom: 10px;
}

.stat__label { font-size: 15px; color: var(--graphite); }

/* ============================================================
   CHAPTER — a centred statement opening each section
   ============================================================ */
.chapter {
  text-align: center;
  padding: 128px 0 0;
}

.chapter__eyebrow { margin-bottom: 16px; }

.chapter__title { max-width: 900px; margin: 0 auto; }

.chapter__lede {
  max-width: var(--measure);
  margin: 22px auto 0;
  font-size: 20px;
  line-height: 1.55;
  color: var(--graphite);
}

.chapter__link { margin-top: 22px; }

/* ============================================================
   SHOWCASE — one product, photographed large, alternating sides
   Apple never crowds three images together; it gives each one air.
   ============================================================ */
/* The artboard gives the copy a fixed 480px column and lets the media
   take whatever is left, so each product photo can be as large as its
   crop allows. An even 1fr/1fr split forced all three to one width. */
.showcase {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 480px;
  align-items: center;
  gap: 80px;
  padding: 110px 0;
}

.showcase--flip { grid-template-columns: 480px minmax(0, 1fr); }
.showcase--flip .showcase__media { order: 2; }

.showcase__copy { max-width: 480px; }

.showcase__kicker {
  font-size: var(--t-fine);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-txt, var(--magenta-txt));
  display: block;
  margin-bottom: 14px;
}

.showcase__title { margin-bottom: 18px; }
.showcase__body  { margin-bottom: 24px; }

.showcase__specs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  padding-top: 22px;
  border-top: 1px solid var(--rule);
}

.showcase__spec {
  font-size: 15px;
  color: var(--graphite);
  display: flex;
  align-items: center;
  gap: 7px;
}
.showcase__spec::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--c, var(--magenta));
}

/* The media well: a soft tinted panel with the product floating on it.
   Each showcase sets its own --ratio and --focus, taken from the Paper
   artboard, because the three products are shot at different crops —
   the arch is portrait, the welcome sign taller still, the cutouts
   landscape. A single shared ratio croppped two of the three. */
.showcase__media {
  border-radius: var(--radius);
  background: var(--well, var(--paper-warm));
  aspect-ratio: var(--ratio, 4 / 3);
  /* Capped at the artboard's own width so a tall crop can't balloon the
     row — the media column is otherwise free to take all leftover space. */
  width: 100%;
  max-width: var(--well-w, 651px);
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  justify-self: center;
}

.showcase__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--focus, 50% 50%);
  transition: transform 0.9s cubic-bezier(0.16,1,0.3,1);
}
.showcase:hover .showcase__media img { transform: scale(1.03); }

/* Ratios and focal points ported from the artboard:
   backdrops 651x719, signs 492x655, cutouts 640x480. */
.showcase--backdrops .showcase__media { --ratio: 651 / 719; --focus: 50% 20%; --well-w: 651px; }
.showcase--signs     .showcase__media { --ratio: 492 / 655; --focus: 50% 45%; --well-w: 492px; }
.showcase--cutouts   .showcase__media { --ratio: 640 / 480; --focus: 50% 30%; --well-w: 640px; }

/* ============================================================
   CHAPTER BAND — full-bleed colour, the one loud moment per topic
   ============================================================ */
.band {
  position: relative;
  padding: 128px 0;
  color: var(--white);
  text-align: center;
  overflow: hidden;
}

.band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--band-bg, var(--violet-deep));
  z-index: -1;
}

.band__title { max-width: 900px; margin: 0 auto 20px; }
.band__lede {
  max-width: 600px;
  margin: 0 auto 32px;
  font-size: 20px;
  line-height: 1.55;
  color: rgba(255,255,255,0.78);
}

/* ============================================================
   GALLERY — even grid, quiet captions
   ============================================================ */
.gallery { padding: 60px 0 128px; }

.gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.tile__media {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper-warm);
  margin-bottom: 14px;
}
.tile__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(0.16,1,0.3,1);
}
.tile:hover .tile__media img { transform: scale(1.04); }

.tile__name { font-size: 15px; font-weight: 600; display: block; }
.tile__kind { font-size: 15px; color: var(--graphite); display: block; }

/* ============================================================
   CATALOGUE — cards on a light ground, price on the right
   ============================================================ */
.catalogue { padding: 60px 0 128px; }

.catalogue__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.card {
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--rule);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 50px rgba(29,29,31,0.10);
}

.card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--paper-warm);
}
.card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.9s cubic-bezier(0.16,1,0.3,1);
}
.card:hover .card__media img { transform: scale(1.04); }

.card__body {
  padding: 24px 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.card__title { font-size: 20px; letter-spacing: -0.015em; font-weight: 600; }
.card__meta  { font-size: 15px; color: var(--graphite); }
.card__price {
  margin-top: 10px;
  font-size: 15px;
  font-weight: 600;
  color: var(--c-txt, var(--magenta-txt));
}

/* ============================================================
   QUOTES
   ============================================================ */
.quotes { padding: 60px 0 128px; }

.quotes__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.quote {
  margin: 0;
  padding: 34px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 26px;
}

.quote__text {
  margin: 0;
  font-size: 19px;
  line-height: 1.6;
  letter-spacing: -0.01em;
}

.quote--lead {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}
.quote--lead .quote__text {
  font-family: var(--font-display);
  font-size: var(--t-sub);
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.quote--lead .quote__where { color: rgba(255,255,255,0.6); }

.quote__name  { font-size: 15px; font-weight: 600; display: block; }
.quote__where { font-size: 15px; color: var(--graphite); display: block; }

/* ============================================================
   CLOSING CTA
   ============================================================ */
.close {
  text-align: center;
  padding: 140px 0 150px;
  position: relative;
  overflow: hidden;
}

.close__glow {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%,-50%);
  width: 1100px; height: 620px;
  background: radial-gradient(ellipse at center,
    rgba(255,2,117,0.15) 0%,
    rgba(176,19,230,0.11) 40%,
    transparent 72%);
  filter: blur(60px);
  pointer-events: none;
}

.close__inner { position: relative; }
.close__title { max-width: 900px; margin: 0 auto 20px; }
.close__lede  { max-width: 560px; margin: 0 auto 34px; color: var(--graphite); font-size: 20px; line-height: 1.55; }
.close__actions { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  border-top: 1px solid var(--rule);
  padding: 60px 0 24px;
  font-size: 15px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 50px;
  padding-bottom: 44px;
}

.footer__wordmark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.015em;
  display: block;
  margin-bottom: 10px;
}
.footer__blurb { color: var(--graphite); max-width: 280px; margin: 0 0 18px; font-size: 15px; line-height: 1.6; }

.footer__inks { display: flex; gap: 9px; align-items: flex-end; }

/* An ink droplet: round on three corners, drawn to a point on the
   fourth, then rotated so the point sits at the top. A print shop's
   colours should look like ink, not like a legend key. */
/* Scale is written before rotate in one transform so the stretch
   is applied in the droplet's own axis, then turned. Using the
   `scale` and `rotate` properties instead would rotate first and
   skew the shape diagonally. */
.footer__dot {
  width: 13px;
  height: 13px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg) scale(1, 1.16);
}

.footer__heading {
  font-size: var(--t-fine);
  font-weight: 600;
  margin-bottom: 14px;
  display: block;
}

.footer__col a, .footer__col span {
  display: block;
  color: var(--graphite);
  padding: 4px 0;
  transition: color 0.2s ease;
}
.footer__col a:hover { color: var(--ink); }

.footer__base {
  border-top: 1px solid var(--rule);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  color: var(--graphite);
  font-size: 13px;
}

/* ============================================================
   MOTION — Apple's quiet reveal on scroll
   ============================================================ */
/* Content is visible by default. The script adds .js-reveal to <html>,
   which is what actually hides it — so if the script never runs, or
   fails, nothing is lost. */
.js-reveal .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s cubic-bezier(0.16,1,0.3,1),
              transform 0.9s cubic-bezier(0.16,1,0.3,1);
  will-change: opacity, transform;
}
.js-reveal .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1180px) {
  :root { --t-hero: 88px; --t-title: 62px; --t-lead: 32px; }

  .hero__inner { gap: 36px; padding-block: 60px 68px; }
  .hero__lede  { max-width: none; font-size: 21px; }

  .showcase { gap: 50px; padding-block: 84px; }
  .gallery__grid    { grid-template-columns: repeat(2, 1fr); }
  .catalogue__grid  { grid-template-columns: repeat(2, 1fr); }
  .stats__grid      { grid-template-columns: repeat(2, 1fr); gap: 44px; }
  .footer__grid     { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 820px) {
  :root {
    --gutter: 22px;
    --t-hero: 52px;
    --t-title: 40px;
    --t-lead: 25px;
    --t-sub: 22px;
    --t-body: 17px;
  }

  .nav__links, .nav__phone { display: none; }

  .hero__inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-block: 48px 56px;
  }
  .hero__lede    { max-width: none; font-size: 19px; }
  .hero__actions { flex-wrap: wrap; }
  .hero__caption { padding: 10px 13px; }
  .hero__caption strong { font-size: 14px; }
  .hero__caption span   { font-size: 12px; }

  .chapter { padding-top: 84px; }
  .band { padding-block: 88px; }

  .showcase {
    grid-template-columns: 1fr;
    gap: 32px;
    padding-block: 64px;
  }
  .showcase--flip .showcase__media { order: 0; }
  .showcase__copy { max-width: none; }

  .gallery, .catalogue, .quotes { padding-bottom: 84px; }
  .gallery__grid, .catalogue__grid, .quotes__grid { grid-template-columns: 1fr; }
  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  .stat__num   { font-size: 42px; }

  .close { padding-block: 90px 100px; }
  .close__actions { flex-direction: column; }
  .close__actions .btn { width: 100%; }

  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .footer__base { flex-direction: column; gap: 6px; }
}

/* ============================================================
   MOBILE MENU
   The toggle and the panel only exist below the phone breakpoint;
   both are display:none above it, so desktop is untouched.
   ============================================================ */
.nav__toggle {
  display: none;          /* shown at the phone breakpoint */
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  margin-right: -10px;    /* optical alignment with the gutter */
  border-radius: 8px;
}

.nav__toggle-bar {
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.26s cubic-bezier(0.16,1,0.3,1),
              opacity 0.18s ease;
}

/* The two bars cross into an X. */
.nav__toggle.is-open .nav__toggle-bar:first-child {
  transform: translateY(3.5px) rotate(45deg);
}
.nav__toggle.is-open .nav__toggle-bar:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

.menu {
  /* Off entirely above the phone breakpoint — the toggle that opens it is
     hidden there too, so nothing can reveal it on desktop. */
  display: none;
  position: fixed;
  inset: 56px 0 0;        /* sits below the nav bar */
  z-index: 40;
  background: var(--paper);
  flex-direction: column;
  justify-content: space-between;
  padding: 24px var(--gutter) calc(24px + env(safe-area-inset-bottom));
  /* Opaque as soon as it is un-hidden. The fade is an enhancement layered
     on top via @starting-style, so a throttled or reduced-motion context
     still gets a fully visible menu rather than one stuck at opacity 0. */
  opacity: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@media (prefers-reduced-motion: no-preference) {
  .menu {
    transition: opacity 0.24s ease, transform 0.24s cubic-bezier(0.16,1,0.3,1);
  }
  @starting-style {
    .menu.is-open { opacity: 0; transform: translateY(-8px); }
  }
}

.menu__links { display: flex; flex-direction: column; }

.menu__link {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 32px;
  letter-spacing: -0.02em;
  color: var(--ink);
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
}

.menu__foot {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-top: 28px;
}

.menu__phone {
  font-size: 17px;
  color: var(--ink-soft);
  min-height: 44px;
  display: flex;
  align-items: center;
}

.menu__cta {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border-radius: var(--radius-pill);
  background: var(--magenta-txt);
  color: var(--white);
  font-size: 17px;
  font-weight: 500;
}

/* Lock the page behind the overlay. */
.menu-open body { overflow: hidden; }

/* ============================================================
   PHONE
   Everything below 640px. The 820px block above already handles
   tablets; this is the layer for handsets specifically.
   ============================================================ */
@media (max-width: 640px) {
  :root {
    --gutter: 20px;
    --t-hero: 40px;
    --t-title: 30px;
    --t-lead: 22px;
    --t-sub: 20px;
    --t-body: 17px;
    --radius: 16px;
  }

  /* --- Nav ------------------------------------------------- */
  .nav__inner { gap: 12px; }
  .nav__toggle { display: flex; }

  /* The panel becomes a flex column only here; `hidden` still governs
     whether it is on screen. */
  .menu:not([hidden]) { display: flex; }

  /* The quote button competes with the toggle in a 390px bar;
     the menu carries its own CTA, so drop it here. */
  .nav__cta { display: none; }

  /* --- Hero ------------------------------------------------ */
  .hero__inner { padding-block: 32px 40px; gap: 24px; }
  .hero__eyebrow { margin-bottom: 14px; }
  .hero__title { margin-bottom: 16px; }
  .hero__lede { margin-bottom: 26px; font-size: 17px; line-height: 1.5; }

  .hero__actions { width: 100%; gap: 12px; }
  .hero__actions .btn { flex: 1; min-height: 50px; }

  /* Give the composition a little more room now the copy is tighter. */
  .hero__stage { aspect-ratio: 749 / 560; }
  .hero__caption { padding: 9px 12px; border-radius: 10px; }
  .hero__caption strong { font-size: 13px; }
  .hero__caption span   { font-size: 11px; }

  /* --- Rhythm ---------------------------------------------- */
  .stats      { padding-block: 56px; }
  .stats__grid { gap: 32px 20px; }
  .stat__num  { font-size: 34px; }

  .chapter        { padding-top: 64px; }
  .chapter__lede  { font-size: 17px; margin-top: 16px; }

  .showcase       { padding-block: 48px; gap: 24px; }
  .showcase__body { margin-bottom: 20px; }
  .showcase__specs { gap: 8px 18px; padding-top: 18px; }
  .showcase__spec  { font-size: 14px; }

  .band { padding-block: 64px; }
  .band__lede { font-size: 17px; }

  .gallery, .catalogue, .quotes { padding-bottom: 64px; }
  .gallery__grid, .catalogue__grid, .quotes__grid { gap: 16px; }

  .quote { padding: 26px; }
  .quote__text { font-size: 17px; }
  .quote--lead .quote__text { font-size: 21px; line-height: 1.35; }

  .close { padding-block: 72px 80px; }
  .close__lede { font-size: 17px; }

  /* The glow is a fixed 1100px and overflows a phone; scale it to
     the viewport instead. */
  .close__glow { width: 140vw; height: 60vh; }

  /* --- Touch targets --------------------------------------- */
  .btn { min-height: 50px; padding-inline: 24px; }
  .link { min-height: 44px; }
  /* The footer uses bare <a>/<span> inside .footer__col, so target those
     directly — 42px was just under the 44px touch minimum. */
  .footer__col a,
  .footer__col span:not(.footer__heading) {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 2px 0;
  }

  /* Widen the brand's tap area without moving it visually. */
  .nav__brand { min-height: 44px; align-items: center; }

  /* --- Footer ---------------------------------------------- */
  .footer { padding-top: 48px; }
  .footer__grid { gap: 28px; padding-bottom: 32px; }
}

/* Very small handsets. */
@media (max-width: 380px) {
  :root { --t-hero: 34px; --t-title: 26px; }
  .menu__link { font-size: 27px; padding-block: 13px; }
  .stat__num { font-size: 30px; }
}

/* ============================================================
   TOUCH POLISH
   ============================================================ */
@media (hover: none) {
  /* Hover transforms stick on touch devices — suppress the ones that
     would otherwise leave an element scaled up after a tap. */
  .showcase:hover .showcase__media img,
  .tile:hover .tile__media img,
  .card:hover .card__media img { transform: none; }
  .card:hover { transform: none; box-shadow: none; }
}

/* Stop the grey flash on tap, and prevent the whole page bouncing
   past its ends on iOS. */
html {
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

/* Respect the notch on landscape phones. */
@supports (padding: max(0px)) {
  .wrap, .nav__inner {
    padding-left: max(var(--gutter), env(safe-area-inset-left));
    padding-right: max(var(--gutter), env(safe-area-inset-right));
  }
}
