/* ===== Brand fonts (self-hosted, Latin subset, woff2) ===== */
@font-face { font-family: "Bricolage Grotesque"; src: url("fonts/bricolage-grotesque-latin.woff2") format("woff2"); font-weight: 400 800; font-display: swap; }
@font-face { font-family: "Lato"; src: url("fonts/lato-regular-latin.woff2") format("woff2"); font-weight: 400 500; font-display: swap; }

/* ===== Design tokens (Mark's final identity, Nov 2026; Amy approved) ===== */
:root {
  --brand-orange: #E46D34;  /* "tailor" letters, buttons, decoration (3.2:1 on white: never small text) */
  --brand-pink: #E4548E;    /* the swirl, decoration */
  --orange-display: #F5641A; /* brand guide mood-word orange (client request); ~2.4:1 on apricot mesh */
  --pink-soft: #F9D5E3;     /* pink wash behind ink text (chip) */
  --bg: #FCDFBE;            /* apricot base, sampled from Amy's mesh */
  --surface: #FFFFFF;
  --ink: #1D1D1B;
  --ink-soft: #4A4140;      /* 7.7:1 on apricot */
  --ink-faint: #8C7E78;
  --line: rgba(29, 29, 27, 0.14);
  --accent: var(--brand-orange);
  --accent-ink: var(--ink);  /* ink on orange is 5.3:1; white on orange is only 3.2:1 */
  --accent-soft: rgba(228, 109, 52, 0.18);
  --accent-2: var(--brand-pink);
  --accent-2-soft: var(--pink-soft);
  --focus: var(--ink);
  /* Backgrounds: Amy's apricot mesh (hero + rail), pink mesh (pick card), light neutral mesh (signup) */
  --mesh: url("img/apricot-mesh.webp");
  --mesh-card: url("img/pink-mesh.webp");
  --mesh-signup: url("img/bw-mesh-light.webp");
  --rod: #1B1918;
  --hanger: #2C2826;
  --shadow: 17, 12, 10; /* rgb triplet used for soft shadows */

  /* Garment palette (muted) */
  --g-olive: #77744E;
  --g-pink: #D9A7A0;
  --g-rust: #A85B3C;
  --g-navy: #34405E;
  --g-camel: #C39B6C;
  --g-charcoal: #46474C;
  --g-cream: #E8DCC5;
  --g-sage: #9BA78B;
  --g-breton: #F2EDE3;
  --g-breton-stripe: #2F3B57;
  --g-mustard: #C79B3F;
  --g-yellow: #E9CF5B;   /* real pieces: used for focus rings / fallbacks only */
  --g-emerald: #3E9A5A;
  --g-white: #EFECE6;    /* Oct 23 real pieces: focus rings / fallbacks */
  --g-denim: #4D74A0;
  --g-hotpink: #EC7FAE;
  --g-oat: #CDB896;
  --g-black: #1E1E22;
  --g-leather: #2A2624;
  --g-polka: #F1EADB;
  --g-burgundy: #6E1F2E;

  --font-sans: "Lato", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Bricolage Grotesque", "Lato", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --radius-card: 24px;
  --radius-pill: 999px;
  --pad: clamp(20px, 4vw, 56px);
  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);

  /* set by JS from viewport */
  --gw: 128px;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  position: relative;
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ===== Nav ===== */
.nav {
  position: relative; z-index: 3;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--pad) 0;
  max-width: 1360px; margin: 0 auto;
}
.wordmark { display: inline-flex; align-items: center; text-decoration: none; line-height: 0; }
.wordmark svg { height: 58px; width: auto; display: block; margin: -4px 0 -4px; overflow: visible; }
.wm-l { fill: var(--brand-orange); }
.wm-swirl { fill: var(--brand-pink); }
.pen { stroke-dasharray: 1 1; stroke-dashoffset: 0; }
/* intro: the swirl draws in (pen path), then the letters slide out from behind its stem, as in Mark's sting */
.intro .wordmark .pen { animation: pen-draw 1.05s cubic-bezier(.5,.05,.35,1) .2s both; }
.intro .wm-l { animation: wm-in .9s cubic-bezier(.2,.8,.2,1) both; }
.intro .wm-ta { --dx: 46px; animation-delay: 1.35s; }
.intro .wm-r  { --dx: -46px; animation-delay: 1.35s; }
.intro .wm-o  { --dx: -26px; animation-delay: 1.5s; }
.intro .wm-i  { --dx: 22px; animation-delay: 1.62s; }
@keyframes pen-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes wm-in { from { opacity: 0; transform: translateX(var(--dx, 0)); } to { opacity: 1; transform: none; } }
.nav-link {
  font: 600 14px/1.2 var(--font-display); color: var(--ink); text-decoration: none; background: rgba(255,255,255,.45);
  padding: 9px 14px; border-radius: var(--radius-pill); border: 1px solid var(--line);
  transition: background .2s, border-color .2s;
}
.nav-link:hover { background: var(--surface); border-color: rgba(17,17,17,.2); }

/* ===== Rail ===== */
.hero { min-height: 100svh; display: flex; flex-direction: column; }
/* Amy's apricot mesh sits behind the header, rail and hero (stretched, so the apricot corner and the
   pink-coral corner both stay in view on a tall phone screen), then settles into the apricot base */
body::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: max(100svh, 760px); z-index: -1; pointer-events: none;
  background: var(--mesh) 0 0 / 100% 100% no-repeat;
  -webkit-mask-image: linear-gradient(#000 82%, transparent); mask-image: linear-gradient(#000 82%, transparent);
}
.rail {
  --rod-y: 26px;
  position: relative;
  height: calc(var(--rod-y) + var(--gw) * 1.62);
  margin-top: 6px;
  touch-action: pan-y;
  cursor: grab;
  user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}
.rail.grabbing { cursor: grabbing; }
.rod {
  position: absolute; left: 0; right: 0; top: calc(var(--rod-y) - 1.5px); height: 3px;
  background: var(--rod); border-radius: 2px;
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 2px 4px rgba(var(--shadow), .12);
  z-index: 2;
}
.rail-items { position: absolute; inset: 0; }
.item {
  position: absolute; left: 0;
  top: calc(var(--rod-y) - var(--gw) * 0.04); /* hook loop sits on the rod */
  width: var(--gw); height: calc(var(--gw) * 200 / 120);
  transform-origin: 50% 2.4%;
  will-change: transform;
  pointer-events: none;
}
.item svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.item .h { z-index: 0; }
.item .g { z-index: 1; transition: opacity .25s; }
.item.lifted .g { opacity: 0; }
.rail .item:nth-child(odd) .h .hs { stroke: color-mix(in srgb, var(--hanger) 85%, #8a6a4a); }

.h .hs { fill: none; stroke: var(--hanger); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.h .hf { fill: var(--hanger); }

.rail-hint {
  position: absolute; right: var(--pad); bottom: 6px; margin: 0;
  display: inline-flex; align-items: center; gap: 8px;
  font: 600 12px/1.2 var(--font-display); letter-spacing: .02em; color: var(--ink-soft);
  background: rgba(255,255,255,.78); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); padding: 6px 10px; border-radius: var(--radius-pill);
  z-index: 3; transition: opacity .5s, transform .5s var(--ease-out);
}
.rail-hint.hide { opacity: 0; transform: translateY(6px); }

/* ===== Garment art ===== */
.g { --c: var(--tone); }
.g .c { fill: var(--c); }
.g .d { fill: color-mix(in srgb, var(--c) 74%, #000); }
.g .l { fill: color-mix(in srgb, var(--c) 62%, #fff); }
.g .o { stroke: color-mix(in srgb, var(--c) 78%, #000); stroke-width: .8; stroke-opacity: .55; }
.g .sd, .g .sl, .g .sc { fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.g .sd { stroke: color-mix(in srgb, var(--c) 70%, #000); }
.g .sl { stroke: color-mix(in srgb, var(--c) 55%, #fff); }
.g .sc { stroke: var(--c); stroke-width: 2.2; }
.g path.c.sd { fill: var(--c); }
.g path.l.sd { fill: color-mix(in srgb, var(--c) 62%, #fff); }
.g .thin { stroke-width: 1.3; }
.g .wide { stroke-width: 5; }
.g .cable { stroke-width: 1.7; stroke-opacity: .6; }
.g .stripe { fill: var(--g-breton-stripe); }
.g .sstripe { fill: none; stroke: var(--g-breton-stripe); stroke-width: 2.6; stroke-linecap: round; }

/* ===== Real garment photography ===== */
.g-photo { position: absolute; z-index: 1; pointer-events: none; }
.g-photo img { position: relative; z-index: 1; }
/* drawn hanger in the frame's own 440x600 space: the wire sits behind the shoulders, clips grip in front */
svg.hg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; z-index: 0; pointer-events: none; }
svg.hg-clip { z-index: 2; }
.hg .hs { fill: none; stroke: var(--hanger); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.hg .hf { fill: var(--hanger); }
.spin-hb, .spin-hf, .spin-phg { position: absolute; inset: 0; pointer-events: none; }
.spin-hb { z-index: 0; } .spin-hf { z-index: 2; }
.spin-canvas { position: relative; z-index: 1; }
.spin-phg { transform: rotate(4deg); transform-origin: 50% 0; }
.spin-phg:has(.front) { z-index: 2; }
.spin-pfly img { position: relative; z-index: 1; }
.spin .hg .hs { stroke-width: 1.5; }
.g-photo img { display: block; width: 100%; height: 100%; -webkit-user-drag: none; user-select: none;
  filter: drop-shadow(0 6px 8px rgba(var(--shadow), .16)); }
.item-photo .g { transition: none; }
.badge360 {
  position: absolute; left: 70%; top: 19%; z-index: 2;
  font: 700 10px/1 var(--font-display); letter-spacing: .02em; color: #fff; background: rgba(29,29,27,.84);
  padding: 4px 6px; border-radius: var(--radius-pill); transition: opacity .25s;
  box-shadow: 0 2px 6px rgba(var(--shadow), .2);
}
.item.lifted .badge360 { opacity: 0; }
.rail.over-photo:not(.grabbing) { cursor: zoom-in; }
.piece-photo { cursor: zoom-in; }

/* ===== 360 view (shared-element transition from the rail) ===== */
.spin { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.spin[hidden] { display: none; }
.spin-veil {
  position: absolute; inset: 0; pointer-events: auto;
  background: rgba(252, 236, 220, .70);
  -webkit-backdrop-filter: blur(14px) saturate(1.05); backdrop-filter: blur(14px) saturate(1.05);
}
.spin-main { position: absolute; pointer-events: auto; touch-action: none; cursor: grab; }
.spin-main.grabbing { cursor: grabbing; }
.spin-fly, .spin-pfly { position: absolute; inset: 0; transform-origin: 0 0; will-change: transform; }
.spin-fly { filter: drop-shadow(0 26px 30px rgba(var(--shadow), .18)); }
.spin-sway { position: absolute; inset: 0; transform-origin: 50% 0; }
.spin-canvas { display: block; width: 100%; height: 100%; }
.spin-partner { position: absolute; pointer-events: auto; cursor: pointer; visibility: hidden; }
.spin-partner.on { visibility: visible; }
.spin-pfly img { display: block; width: 100%; height: 100%; filter: drop-shadow(0 16px 20px rgba(var(--shadow), .16)); transform: rotate(4deg); transform-origin: 50% 0; }
.spin-plus {
  position: absolute; z-index: 2; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 6px 14px -4px rgba(228,109,52,.55);
  transform: translate(-50%, -50%) scale(0); opacity: 0; transition: opacity .2s;
}
.spin.paired .spin-plus { transform: translate(-50%, -50%) scale(1); opacity: 1; }
.spin-info {
  position: absolute; pointer-events: auto;
  opacity: 0; transform: translateY(10px); transition: opacity .45s, transform .55s var(--ease-out);
}
.spin.paired .spin-info { opacity: 1; transform: none; }
.spin-label { display: inline-flex; align-items: center; gap: 8px; font: 700 12px/1.2 var(--font-display); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.spin-cap { margin: 10px 0 12px; font-family: var(--font-display); font-size: clamp(20px, 2vw, 26px); line-height: 1.2; letter-spacing: -.02em; }
.spin-title { display: block; font-weight: 800; }
.spin-line { display: block; color: var(--ink-soft); font-weight: 500; }
.spin-info .spin-chip { opacity: 1; transform: none; display: inline-block; }
.spin-info.below { text-align: center; }
.spin-info.below .spin-cap { margin: 4px 0 0; font-size: 17px; }
.spin-info.below .spin-title, .spin-info.below .spin-line { display: inline; }
.spin-info.below .spin-line::before { content: " "; }
.spin-info.below .spin-label, .spin-info.below .spin-chip { display: none; }
.spin-hint {
  position: absolute; margin: 0; transform: translate(-50%, 6px); overflow: hidden;
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  font: 700 12px/1.2 var(--font-display); letter-spacing: .02em; color: #fff;
  background: rgba(29,29,27,.80); padding: 8px 12px; border-radius: var(--radius-pill);
  opacity: 0; transition: opacity .35s, transform .45s var(--ease-out);
}
.spin.show-extras .spin-hint.loading, .spin.show-hint .spin-hint { opacity: 1; transform: translate(-50%, 0); }
.spin-prog { position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); transition: transform .2s, opacity .3s; }
.spin-hint:not(.loading) .spin-prog { opacity: 0; }
.spin-close {
  position: absolute; pointer-events: auto; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer;
  display: grid; place-items: center; box-shadow: 0 6px 18px -8px rgba(var(--shadow), .35);
  opacity: 0; transform: scale(.8); transition: opacity .3s, transform .4s var(--ease-spring), background .2s, color .2s;
}
.spin.show-extras .spin-close { opacity: 1; transform: none; }
.spin-close:hover { background: var(--ink); color: #fff; }
.spin-close:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
/* the waitlist never hides behind the 360 view */
body.spin-open .signup, body.spin-open .thanks { position: relative; z-index: 70; }

/* ===== Hero copy + card grid ===== */
.hero-grid {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(330px, .8fr);
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
  width: 100%; max-width: 1360px; margin: 0 auto;
  padding: 8px var(--pad) 32px;
}
/* the tagline, in Bricolage, with a small swirl beside it */
.eyebrow {
  margin: 0 0 14px; display: inline-flex; align-items: center; gap: 8px;
  font: 600 clamp(18px, 1.6vw, 22px)/1.2 var(--font-display); letter-spacing: -.01em; color: var(--ink);
}
.eyebrow svg { width: .8em; height: .9em; color: var(--brand-pink); flex: none; }
.headline {
  margin: 0; font-family: var(--font-display); font-weight: 800; letter-spacing: -0.035em; line-height: .98;
  font-size: clamp(36px, 5.2vw, 76px);
}
.h1-line { display: block; }
.word-line { display: block; white-space: nowrap; }
.word { display: inline-block; color: var(--orange-display); will-change: transform, opacity; }
.word-dot { color: var(--ink); }
.sub {
  margin: 20px 0 0; max-width: 34em; font-size: clamp(15px, 1.25vw, 18px); line-height: 1.5; color: var(--ink-soft);
}

/* signup */
.signup { margin-top: 28px; max-width: 520px; }
.signup-row {
  display: flex; gap: 6px; padding: 6px; border-radius: var(--radius-pill);
  background: var(--mesh-signup) center / cover, var(--surface); border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(var(--shadow), .04), 0 10px 30px -12px rgba(var(--shadow), .14);
  transition: border-color .2s, box-shadow .2s;
}
.signup-row:focus-within { border-color: rgba(29,29,27,.45); box-shadow: 0 0 0 4px var(--accent-soft), 0 10px 30px -12px rgba(var(--shadow), .14); }
.signup.invalid .signup-row { border-color: var(--brand-pink); box-shadow: 0 0 0 3px var(--pink-soft); }
.signup input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font: 500 16px/1 var(--font-sans); color: var(--ink); padding: 0 16px; height: 48px;
}
.signup input::placeholder { color: var(--ink-faint); }
.btn-primary {
  flex: none; height: 48px; padding: 0 22px; border: 0; border-radius: var(--radius-pill);
  background: var(--brand-orange); color: var(--ink); font: 700 16px/1 var(--font-display); letter-spacing: -.01em; cursor: pointer;
  transition: background .2s, transform .15s;
}
.btn-primary:hover { background: var(--brand-pink); }  /* ink on pink is 4.8:1 */
.btn-primary:active { transform: scale(.97); }
.btn-primary:focus-visible, .btn-ghost:focus-visible, .nav-link:focus-visible, .foot a:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
.signup-note { margin: 12px 0 0 18px; font-size: 13px; color: var(--ink-soft); }
.signup.invalid .signup-note { color: var(--ink); font-family: var(--font-display); font-weight: 600; }

.thanks {
  margin-top: 28px; max-width: 520px; display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line);
  animation: rise .6s var(--ease-out) both;
}
.thanks[hidden] { display: none; }
.thanks-icon { flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; }
.thanks strong { display: block; font: 700 17px/1.25 var(--font-display); }
.thanks span { font-size: 14px; color: var(--ink-soft); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ===== Outfit card ===== */
.card {
  --sw: 132px; /* slot (garment) width */
  position: relative;
  background: linear-gradient(rgba(255,255,255,.38), rgba(255,255,255,.38)), var(--mesh-card) center / cover, var(--surface);
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(var(--shadow), .04), 0 24px 60px -28px rgba(var(--shadow), .28);
  padding: 18px 20px 20px;
  width: 100%; max-width: 440px; justify-self: end;
}
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 26px; }
.card-label { display: inline-flex; align-items: center; gap: 8px; font: 700 12px/1.2 var(--font-display); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.card.searching .pulse { animation: pulse 1s ease-in-out infinite; }
@keyframes pulse { 50% { transform: scale(.55); opacity: .45; } }
.chip {
  font: 600 12px/1.2 var(--font-display); color: var(--ink); background: var(--accent-2-soft); box-shadow: inset 0 0 0 1px rgba(228,84,142,.35);
  padding: 5px 10px; border-radius: var(--radius-pill);
  opacity: 0; transform: translateY(4px); transition: opacity .35s, transform .45s var(--ease-out);
}
.card.paired .chip { opacity: 1; transform: none; }

/* Top margin includes the slots' -0.22 lift so hanger hooks clear the label/chip row (Publica fix, Nov 2026) */
.stage { position: relative; height: calc(var(--sw) * 1.42); margin: calc(8px + var(--sw) * .22) 0 6px; }
.slot, .ghost {
  position: absolute; top: calc(var(--sw) * -0.22);
  width: var(--sw); height: calc(var(--sw) * 200 / 120);
}
.slot-a, .ghost-a { left: calc(50% - var(--sw) * .92); }
.slot-b, .ghost-b { left: calc(50% - var(--sw) * .08); }
.slot { z-index: 1; }
.slot-b { z-index: 2; }
.piece { position: absolute; inset: 0; transform-origin: 50% 2.4%; }
.piece svg, .fly svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.piece svg, .fly-r svg { filter: drop-shadow(0 10px 12px rgba(var(--shadow), .16)); }
.ghost {
  top: calc(var(--sw) * 0.08); height: calc(var(--sw) * 1.2);
  border: 1.5px dashed rgba(29,29,27,.16); border-radius: 18px; background: rgba(255,255,255,.18);
  transition: opacity .4s;
}
.ghost-a { transform: rotate(-4deg); }
.ghost-b { transform: rotate(4deg); }
.card.has-a .ghost-a, .card.has-b .ghost-b { opacity: 0; }
.plus {
  position: absolute; left: 50%; top: 46%; z-index: 3;
  width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 6px 14px -4px rgba(228,109,52,.55);
  transform: scale(0); opacity: 0;
}

.card-body { position: relative; }
.caption { margin: 4px 0 16px; min-height: 3.2em; font-size: 16px; line-height: 1.4; }
.cap-title { display: block; font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; }
.cap-line { display: block; color: var(--ink-soft); }
.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%;
  height: 46px; border-radius: var(--radius-pill); border: 1.5px solid var(--ink); background: transparent;
  font: 700 15px/1 var(--font-display); color: var(--ink); cursor: pointer;
  transition: background .2s, color .2s, transform .15s, opacity .2s;
}
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-ghost:active { transform: scale(.98); }
.btn-ghost[aria-busy="true"] { cursor: progress; }
.btn-ghost { background: rgba(255,255,255,.4); }
.btn-ghost .hook-ico { color: var(--brand-pink); transition: color .2s; }
.btn-ghost:hover .hook-ico { color: var(--brand-orange); }
/* the brand swirl redraws itself (pen path) while Tailor looks through the rail */
.btn-ghost[aria-busy="true"] .hook-ico .pen { animation: pen-loop 1.3s cubic-bezier(.5,.05,.35,1) infinite; }
@keyframes pen-loop { 0% { stroke-dashoffset: 1; } 70%, 100% { stroke-dashoffset: 0; } }

/* ===== Footer ===== */
.foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px;
  max-width: 1360px; margin: 0 auto; padding: 18px var(--pad) 26px;
  font-size: 14px; color: var(--ink-soft); border-top: 1px solid var(--line);
}
.foot p { margin: 0; }
.foot nav { display: flex; gap: 20px; }
.foot a { color: var(--ink); text-decoration: underline; text-decoration-color: rgba(29,29,27,.35); text-underline-offset: 3px; }
.foot a:hover { text-decoration-color: var(--brand-orange); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Flight layer for pieces travelling from rail to card */
.fly-layer { position: fixed; inset: 0; pointer-events: none; z-index: 50; }
.fly { position: fixed; left: 0; top: 0; will-change: transform; }
.fly-x, .fly-y, .fly-r { position: absolute; inset: 0; will-change: transform; }
.fly-r { transform-origin: 50% 2.4%; }

/* ===== Tablet / mobile ===== */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; align-items: start; gap: 22px; padding-top: 4px; }
  .card { order: -1; justify-self: stretch; max-width: none; }
}
@media (max-width: 560px) {
  .nav { padding-top: 14px; }
  .wordmark svg { height: 42px; }
  .nav-link { font-size: 13px; padding: 8px 12px; }
  .rail { --rod-y: 18px; margin-top: 4px; height: calc(var(--rod-y) + var(--gw) * 1.5); }
  .rail-hint { bottom: 2px; font-size: 11px; padding: 5px 9px; }
  .hero-grid { gap: 22px; padding-bottom: 28px; align-content: start; flex: none; }
  .card {
    --sw: 64px;
    display: grid; grid-template-columns: 132px 1fr; column-gap: 14px; align-items: center;
    padding: 12px 14px 14px; border-radius: 20px;
  }
  .card-top { grid-column: 1 / -1; }
  .card-label { font-size: 11px; }
  .chip { font-size: 11px; padding: 4px 8px; }
  .stage { height: 112px; margin: 6px 0 0; }
  .slot, .ghost { top: -8px; }
  .ghost { top: 10px; height: 88px; border-radius: 12px; }
  .plus { width: 22px; height: 22px; margin: -11px 0 0 -11px; }
  .plus svg { width: 9px; height: 9px; }
  .card-body { display: contents; }
  .caption { margin: 6px 0 0; font-size: 14px; min-height: 0; }
  .btn-ghost { grid-column: 1 / -1; height: 42px; font-size: 14px; margin-top: 6px; }
  .eyebrow { margin: 0 0 8px; font-size: 17px; } /* tagline shows on mobile too */
  .foot { justify-content: center; text-align: center; padding-bottom: calc(22px + env(safe-area-inset-bottom)); }
  .headline { font-size: 38px; letter-spacing: -0.045em; }
  .sub { margin-top: 12px; font-size: 15px; }
  .signup { margin-top: 18px; }
  .signup-row { flex-direction: column; border-radius: 22px; }
  .signup input { height: 46px; }
  .btn-primary { height: 48px; width: 100%; border-radius: 16px; }
  .signup-row { border-radius: 22px; }
  .signup-note { margin-left: 4px; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .card.searching .pulse, .btn-ghost[aria-busy="true"] svg, .btn-ghost[aria-busy="true"] .hook-ico .pen { animation: none; }
  .spin-info, .spin-hint, .spin-close, .spin-plus { transition: opacity .15s; transform: none !important; }
  .spin-hint { transform: translate(-50%, 0) !important; }
  .spin-plus { transform: translate(-50%, -50%) !important; }
  .thanks { animation: none; }
}
