/* ============================================================================
   AllStamps.club — coming soon
   Built to the Figma (node 16-895 desktop / 88-4946 mobile). One full screen:
   café photo → frosted "Tel Aviv" on the counter line → tagline → card fan.
   Tokens drive the art direction; structure stays put. See docs/COMING-SOON-SPEC.md.
   ========================================================================== */

:root{
  /* — type — */
  --font: "Clash Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-wallet: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;

  /* — color (DESIGN.md: neutral base, one accent held for the last 10%) — */
  --ink: #000;
  --paper: #f6f4ef;
  --paper-2: #ffffff;
  --line: rgba(26, 23, 18, .12);
  --ink-soft: rgba(26, 23, 18, .60);
  --ink-faint: rgba(26, 23, 18, .38);
  --accent: #450c3f;          /* decided; held for a single late moment */
  --on-accent: #fff;

  /* — space / radius — */
  --pad-page: clamp(18px, 4.4vw, 64px);
  --radius: 16px;
  --radius-pill: 16px;

  /* — motion — */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --dur-fast: .18s;
  --dur-base: .45s;
  --rise-dur: 1600ms;
  --spin-dur: 26s;

  /* — the card — Wallet "Key" proportions (268×169) — */
  /* 6-card line + centred phone; width tracks the viewport so the outer cards land
     ~32pt from each edge with FIXED gaps (they crop on narrower screens, no squish). */
  --card-w: clamp(150px, calc(13.6vw - 20px), 380px);
  --fan-bottom: clamp(16px, 3.6vh, 42px);   /* how far the card line sits above the fold */
  --card-radius: 16px;
  /* Figma "Key" shadow as chained drop-shadows so it follows the card's rounded alpha */
  --card-shadow: drop-shadow(0 8px 8.5px rgba(0,0,0,.10)) drop-shadow(0 30px 15px rgba(0,0,0,.08)) drop-shadow(0 66px 20px rgba(0,0,0,.05));
}

*, *::before, *::after{ box-sizing: border-box; margin: 0; padding: 0; }
html, body{ height: 100%; }
body{
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper-2);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img, svg{ display: block; max-width: 100%; }
button{ font: inherit; cursor: pointer; }
a{ color: inherit; text-decoration: none; }

/* ── top bar ──────────────────────────────────────────────────────────── */
.topbar{
  position: absolute; inset: 0 0 auto 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(20px, 3.1vw, 48px) var(--pad-page);
}
.wordmark{
  font-weight: 500; font-size: clamp(18px, 1.67vw, 24px);
  letter-spacing: -.02em; color: #fff;
}
.pill{
  font-weight: 400; font-size: clamp(15px, 1.25vw, 18px);
  letter-spacing: -.02em; color: #fff;
  background: rgba(255, 255, 255, .12);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border: 0; border-radius: var(--radius-pill);
  padding: clamp(11px, 1.1vw, 15px) clamp(18px, 1.7vw, 24px);
  transition: background var(--dur-fast) ease, transform var(--dur-fast) var(--ease-out);
}
.pill:hover{ background: rgba(255, 255, 255, .22); }
.pill:active{ transform: scale(.97); }

/* ── hero: one screen ─────────────────────────────────────────────────── */
.hero{
  position: relative; height: 100svh; min-height: 640px;
  overflow: hidden; background: var(--paper-2);
  isolation: isolate;
}

/* full-bleed photo — full scene (shelves → counter → floor); white wash covers the floor */
.photo{ position: absolute; inset: 0; z-index: 1; }
.photo img{ width: 100%; height: 100%; object-fit: cover; object-position: 50% 24%; }
.scrim{ position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    radial-gradient(52% 30% at 50% 39%, rgba(0,0,0,.42), rgba(0,0,0,0) 74%),
    linear-gradient(to bottom, rgba(0,0,0,.26) 0%, rgba(0,0,0,.10) 34%, rgba(0,0,0,0) 56%); }

/* white wash — dissolves the photo's base into the white zone (basewash §9) */
.wash{
  position: absolute; inset: 0; z-index: 6; pointer-events: none;
  background:
    radial-gradient(74% 42% at 50% 96%, #fff 58%, rgba(255,255,255,0) 84%),
    linear-gradient(to bottom, rgba(255,255,255,0) 54%, #fff 71%);
}

/* spinning "coming soon" seal — centred on the top-bar line (inside .topbar) */
.seal{
  position: absolute; z-index: 1; top: 50%; left: 50%;
  width: clamp(84px, 6.8vw, 100px); aspect-ratio: 1;
}
.seal svg{ width: 100%; height: 100%; animation: spin var(--spin-dur) linear infinite; }
.seal-text{
  font-family: var(--font); font-size: 10.5px; font-weight: 500;
  fill: #fff; text-transform: uppercase;
}
.seal-ring{
  position: absolute; inset: 0; margin: auto; width: 61%; height: 61%;
  border: 1px solid rgba(255,255,255,.9); border-radius: 50%;
}
@keyframes spin{ to { transform: rotate(360deg); } }

/* THE bold event — the giant frosted wordmark on the counter line.
   Recipe (Figma): Clash Medium, gradient fill white→transparent, blur. */
/* THE bold event. frost = white text + bottom mask-fade (on the text) softened by
   a filter blur (on the WRAPPER). Blur must live on an ancestor — filter blur on the
   same element as background-clip/mask fails to composite in Chromium. */
.hero-word{
  position: absolute; z-index: 10; left: 50%; top: calc(51% + 32px);
  transform: translate(-50%, -50%);
  pointer-events: none; user-select: none;
}
.svg-defs{ position: absolute; width: 0; height: 0; }
.hero-word__text{
  display: block; white-space: nowrap;
  font-weight: 500; line-height: 1; letter-spacing: .03em;
  font-size: min(30.5vw, 66vh);
  color: rgba(255,255,255,.97);
  -webkit-mask-image: linear-gradient(179deg, #000 44%, rgba(0,0,0,0) 86%);
          mask-image: linear-gradient(179deg, #000 44%, rgba(0,0,0,0) 86%);
}
/* blurred copy stacked over the sharp one, revealed progressively toward the bottom
   → crisp at the top, heaviest blur low (like the Figma 0→24 gradient), then dissolves */
.hero-word__blur{
  position: absolute; left: 0; top: 0;
  filter: url(#frost);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0) 24%, #000 62%, #000 80%, rgba(0,0,0,0) 95%);
          mask-image: linear-gradient(180deg, rgba(0,0,0,0) 24%, #000 62%, #000 80%, rgba(0,0,0,0) 95%);
}

/* tagline — calm ink, on the white base */
.tagline{
  position: absolute; z-index: 11; left: 50%; top: 67.5%;
  transform: translateX(-50%); white-space: nowrap;
  font-weight: 500; font-size: clamp(19px, 1.67vw, 24px);
  letter-spacing: -.02em; color: #000; text-align: center;
}

/* ── card fan (desktop) — cards peek from the bottom edge ──────────────── */
.fan{
  position: absolute; z-index: 8; left: 50%; bottom: var(--fan-bottom);
  transform: translateX(-50%);
  display: flex; align-items: flex-end; justify-content: center;
  width: 100%; gap: clamp(10px, 1vw, 15px);      /* FIXED gap; line crops on narrow screens */
}
/* centre slot the phone sits over; keeps the gaps around it equal to the card gaps */
.fan-slot{ flex: 0 0 auto; width: calc(var(--card-w) * 1.309); }

/* mobile fan — hidden on desktop; two staggered rows on small screens */
.fan-m{ display: none; }

/* card — Serg's finished PNG (already rounded). No clip/radius of our own;
   the shadow follows the card's real silhouette via drop-shadow on the alpha. */
.card{
  position: relative; flex: 0 0 auto;
  width: var(--card-w); aspect-ratio: 268 / 169;
  filter: var(--card-shadow);
  transition: transform var(--dur-base) var(--ease-out), filter var(--dur-base) var(--ease-out);
}
.card-face{ position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; pointer-events: none; }

/* ── phone — Serg's cut-frame mockup (Lungo card baked in); desktop only ─ */
.phone{
  /* width chosen so the baked card == fan card width (card is 0.764 of the frame);
     bottom drops it so the card bottom (0.736 of frame height) meets the fan line. */
  position: absolute; z-index: 9; left: 50%;
  transform: translateX(-50%);
  width: calc(var(--card-w) * 1.309);
  bottom: calc(var(--fan-bottom) - var(--card-w) * 0.327);
  filter: drop-shadow(0 4px 44px rgba(0,0,0,.30));
  pointer-events: none;
}
.phone-img{ display: block; width: 100%; height: auto; }

/* ── the load rise (Tel Aviv + seal): start below + faded ─────────────── */
[data-rise]{ opacity: 0; transition: opacity var(--rise-dur) var(--ease-out), transform var(--rise-dur) var(--ease-out); }
.hero-word[data-rise]{ transform: translate(-50%, calc(-50% + 40px)); }
.hero-word[data-rise].risen{ transform: translate(-50%, -50%); opacity: 1; }
.seal{ transform: translate(-50%, -50%); }  /* base centering (on the top-bar line) */
.seal[data-rise]{ transform: translate(-50%, calc(-50% + 28px)); }
.seal[data-rise].risen{ transform: translate(-50%, -50%); opacity: 1; }

/* ── modal — liquid glass ────────────────────────────────────────────────
   An 80%-white card floating on a LIGHT veil, so the café photo and the card fan
   read through it as colour. The card's own backdrop-filter samples whatever the
   veil leaves behind, which is why the veil is a pale wash rather than the dark
   scrim this used to have — a dark scrim under translucent white just reads grey
   and kills the glass. */
.modal[hidden]{ display: none; }
.modal{ position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal-backdrop{ position: absolute; inset: 0; background: rgba(255,255,255,.30); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.modal-card{
  position: relative; width: 100%; max-width: 440px; border-radius: 18px;
  padding: 30px 30px 26px;
  background: rgba(255,255,255,.80);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  backdrop-filter: blur(30px) saturate(180%);
  box-shadow: 0 30px 80px rgba(0,0,0,.22);
}
/* The 1pt inner stroke — the rim that makes it read as a lens rather than a
   rectangle. NOTE: `mix-blend-mode: soft-light` was the ask, but it renders
   invisible here — `backdrop-filter` on .modal-card creates a stacking context,
   so a child blends against the card's OWN near-white surface, not the photo
   behind the glass, and soft-light of white on white is a no-op. A plain hairline
   plus a brighter top edge ("lit from above") is what actually produces the
   shine. */
.modal-card::after{
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.55),
    inset 0 1px 0 rgba(255,255,255,.95);
}
/* Without backdrop-filter the card would be flat 80% white over a pale veil —
   i.e. unreadable. Fall back to a near-opaque card on a dark scrim. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))){
  .modal-backdrop{ background: rgba(24,17,21,.45); }
  .modal-card{ background: rgba(255,255,255,.97); }
}
.modal-close{ position: absolute; top: 14px; right: 16px; width: 34px; height: 34px; border: none; background: transparent; font-size: 26px; line-height: 1; color: var(--ink-soft); border-radius: 10px; }
.modal-close:hover{ background: var(--paper); }
.modal-title{ font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.modal-sub{ color: var(--ink-soft); font-size: 15px; margin: 6px 0 22px; }
.lead-form{ display: flex; flex-direction: column; gap: 14px; }
/* `display:flex` above outranks the UA's [hidden]{display:none}, so the success
   state's `form.hidden = true` needs this to actually take the form away. Same
   guard as .modal / .form-error / .form-done below. */
.lead-form[hidden]{ display: none; }
.lead-form label{ display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--ink); }
/* The label is a column flex container, so a bare text node and the asterisk
   would each become their own flex item and stack. Wrapping them in one span
   keeps them on a single line. */
.lead-form .label-text{ display: block; }
.lead-form .req{ color: var(--ink-faint); }
/* Fields are defined by a translucent FILL, not a stroke — an outlined box reads
   dated next to the glass. They deepen on focus instead. */
.lead-form input{ font: inherit; font-size: 15px; color: var(--ink); background: rgba(255,255,255,.55); border: none; border-radius: 10px; padding: 12px 13px; transition: background var(--dur-fast) ease; }
.lead-form input::placeholder{ color: var(--ink-faint); }
.lead-form input:focus{ background: rgba(255,255,255,.92); outline: none; }
/* Keyboard users still need a real focus indicator; pointer users don't see it,
   so the resting look stays clean. */
.lead-form input:focus-visible{ outline: 2px solid rgba(26,23,18,.55); outline-offset: 1px; }

/* Honeypot wrapper (see index.html). Must stay reachable to a bot parsing the
   DOM but invisible and unfocusable for people — hence off-screen, not hidden. */
.hp{ position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-error{ color: #b23b3b; font-size: 13px; }
.form-error[hidden]{ display: none; }
.submit{ margin-top: 6px; height: 46px; border: none; border-radius: 12px; background: var(--ink); color: #fff; font-size: 15px; font-weight: 500; transition: transform var(--dur-fast) ease; }
.submit:active{ transform: scale(.985); }
.form-alt{ text-align: center; font-size: 13px; color: var(--ink-faint); margin-top: 12px; }
.form-alt a{ color: var(--ink-soft); text-decoration: underline; }
.form-done{ text-align: center; padding: 20px 0 8px; }
.form-done[hidden]{ display: none; }
.done-mark{ font-size: 40px; color: var(--ink); }
.done-title{ font-size: 20px; font-weight: 600; margin-top: 8px; }
.done-sub{ color: var(--ink-soft); margin-top: 4px; }

/* ══ RESPONSIVE ═══════════════════════════════════════════════════════════
   Mobile (Figma 88-4946): no phone; the fan becomes two staggered rows.     */
@media (max-width: 720px){
  :root{ --card-w: clamp(150px, 45vw, 186px); }
  html{ overflow: hidden; }
  /* WHITE body shows behind Safari's bottom toolbar → continuous with the hero's white
     base, so there is no white "line" where the content ends. No scroll. */
  body{ background: #fff; overflow: hidden; }

  /* Hero locked to the real VISIBLE height (JS --svh = innerHeight, excludes the bottom
     toolbar) so content sits right and the page is exactly one non-scrolling screen.
     The photo fills it up behind the top status bar; the white base meets the white body. */
  .hero{ height: var(--svh, 100svh); min-height: 0; background: transparent; overflow: hidden; }
  .topbar{ padding: max(18px, calc(env(safe-area-inset-top) + 6px)) clamp(14px, 4vw, 22px) 10px; }

  .photo{ position: absolute; inset: 0; z-index: 0; }
  .photo img{ object-position: 50% 40%; }
  .scrim{ position: absolute; inset: 0; z-index: 1;
    background:
      radial-gradient(90% 20% at 50% 60%, rgba(0,0,0,.50), rgba(0,0,0,0) 74%),
      linear-gradient(to bottom, rgba(0,0,0,.20) 0%, rgba(0,0,0,.05) 24%, rgba(0,0,0,0) 44%); }
  .wash{ background:
    radial-gradient(80% 32% at 50% 100%, #fff 54%, rgba(255,255,255,0) 82%),
    linear-gradient(to bottom, rgba(255,255,255,0) 58%, #fff 74%); }

  /* seal — 32pt below the top-bar line (not inline on mobile) */
  .seal{ top: 100%; width: clamp(108px, 30vw, 126px); }
  .seal, .seal[data-rise].risen{ transform: translate(-50%, 32px); }
  .seal[data-rise]{ transform: translate(-50%, 58px); }

  /* Tel-Aviv — lower, sitting inside the frost on the counter tiles */
  .hero-word{ top: 63%; }
  .hero-word__blur{ filter: url(#frost-m); }
  .hero-word__text{ font-size: 38vw; }

  .tagline{ top: 68.5%; font-size: clamp(18px, 5.4vw, 22px); }

  .fan, .phone{ display: none; }

  /* staggered mosaic, anchored below the tagline; the 2nd row is cut by the bottom.
     NOTE (for next session): making it bleed BEHIND Safari's floating toolbar without
     overlapping the tagline or scrolling is still unsolved — see memory. */
  .fan-m{
    display: flex; flex-direction: column; gap: clamp(7px, 2vw, 12px);
    position: absolute; z-index: 8; left: 50%; top: calc(68.5% + 60px); bottom: auto;
    transform: translateX(-50%); width: 100%;
  }
  .fan-row{ display: flex; gap: clamp(7px, 2vw, 12px); justify-content: center; }
  .fan-row:nth-child(1){ transform: translateX(7%); }
  .fan-row:nth-child(2){ transform: translateX(-11%); }
  .fan-row:nth-child(3){ transform: translateX(4%); }

  /* ── modal goes full-screen ──────────────────────────────────────────
     Edge to edge, no radius. The glass stays: the blur is heavy enough to calm
     the photo behind it even with nothing left to frame. Padding carries the
     safe-area insets so the title clears the notch and the mailto line clears
     the home indicator. `safe center` keeps the form vertically centred but
     refuses to centre it out of view once the keyboard shrinks the viewport;
     browsers without `safe` drop the declaration and top-align, which is the
     right degradation. */
  .modal{ padding: 0; place-items: stretch; }
  .modal-card{
    max-width: none; border-radius: 0;
    display: flex; flex-direction: column; justify-content: safe center;
    overflow-y: auto;
    padding:
      calc(env(safe-area-inset-top) + 30px)
      calc(env(safe-area-inset-right) + 24px)
      calc(env(safe-area-inset-bottom) + 26px)
      calc(env(safe-area-inset-left) + 24px);
  }
  .modal-card::after{ display: none; }          /* no edge to catch the light */
  .modal-close{
    top: calc(env(safe-area-inset-top) + 14px);
    right: calc(env(safe-area-inset-right) + 16px);
  }
}

/* mobile + reduced motion: seal rests 32pt below the header, no travel */
@media (max-width: 720px) and (prefers-reduced-motion: reduce){
  .seal[data-rise]{ transform: translate(-50%, 32px); }
}

/* ── reduced motion: land in place, no travel, no spin ───────────────── */
@media (prefers-reduced-motion: reduce){
  .seal svg{ animation: none; }
  [data-rise]{ opacity: 1 !important; transition: opacity .4s ease; }
  .hero-word[data-rise]{ transform: translate(-50%, -50%); }
  .seal[data-rise]{ transform: translate(-50%, -50%); }
  .card{ transition: none; }
}
