/* FlexNa site: the launch film's studio stage. Shared by every page. */

@font-face { font-family: 'Barlow'; src: url('../fonts/barlow-300.woff2') format('woff2'); font-weight: 300; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('../fonts/barlow-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('../fonts/barlow-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Barlow'; src: url('../fonts/barlow-800.woff2') format('woff2'); font-weight: 800; font-display: swap; }
@font-face { font-family: 'Courier Prime'; src: url('../fonts/courier-prime-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Courier Prime'; src: url('../fonts/courier-prime-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  /* stage */
  --void: #050605;
  --stage: #0b0d0c;
  --floor: #101311;
  --ink: #f5f5f7;
  --grey: #a1a1a6;
  --dim: #6e6e73;
  --hair: rgba(245, 245, 247, 0.22);
  /* FlexNa green: mint -> brand green; Price Drop red */
  --mint-pale: #dcfce7;
  --mint: #5ee08f;
  --green: #17a34a;
  --green-deep: #15803d;
  --red-pale: #ffc9c0;
  --red-mid: #ff5b4d;
  --red: #e11d1d;
  /* the slab case's label */
  --label: #f4f4f2;
  --label-ink: #111111;
  /* white stage */
  --paper: #f5f5f7;
  --paper-ink: #1d1d1f;
  --paper-grey: #5f5f64;

  --display: 'Barlow', 'Arial Narrow', sans-serif;
  --mono: 'Courier Prime', 'Courier New', monospace;
  --gutter: clamp(16px, 4.2vw, 64px);
  --max: 1280px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-deal: cubic-bezier(0.22, 1.25, 0.36, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--void);
  color: var(--ink);
  font: 300 1.125rem/1.55 var(--display);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
::selection { background: var(--green); color: #000; }
:focus-visible { outline: 2px solid var(--mint); outline-offset: 3px; border-radius: 6px; }
html { scrollbar-color: #2a2f2c var(--void); scrollbar-width: thin; }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--void); }
::-webkit-scrollbar-thumb { background: #2a2f2c; border-radius: 10px; border: 2px solid var(--void); }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 16px; border-radius: 24px; background: var(--green); color: #000; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------------- type ---------------- */
.display, .h1, .h2 { font-family: var(--display); font-weight: 300; letter-spacing: -0.04em; margin: 0; text-wrap: balance; }
.display { font-size: clamp(3.1rem, 7.4vw, 6rem); line-height: 0.98; }
.h1 { font-size: clamp(2.6rem, 6vw, 5rem); line-height: 1; }
.h2 { font-size: clamp(2.2rem, 4.6vw, 4rem); line-height: 1.02; }
.h3 { font: 700 1.4rem/1.25 var(--display); letter-spacing: -0.01em; margin: 0; }
.lede { font-size: clamp(1.125rem, 1.5vw, 1.3rem); line-height: 1.5; color: var(--ink); max-width: 34ch; margin: 0; }
.body { max-width: 62ch; color: var(--grey); font-weight: 400; }
.body p { margin: 0 0 0.9em; }
.label { font: 400 0.8125rem/1.35 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; }
/* the launch film's payoff word: the FlexNa green gradient with its glow */
.pay {
  background: linear-gradient(100deg, var(--mint-pale) 0%, var(--mint) 45%, var(--green) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 22px rgba(23, 163, 74, 0.45));
  padding-right: 0.04em;
}
.pay-red { background-image: linear-gradient(100deg, var(--red-pale) 0%, var(--red-mid) 45%, var(--red) 100%); filter: drop-shadow(0 0 22px rgba(255, 70, 60, 0.45)); }
.num { font-family: var(--display); font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

/* word-by-word rise, from an already-visible default */
.js [data-words] .w { display: inline-block; opacity: 0; transform: translateY(0.35em); filter: blur(6px); transition: opacity 0.7s var(--ease-out), transform 0.9s var(--ease-out), filter 0.7s var(--ease-out); transition-delay: calc(var(--i) * 90ms); }
.js [data-words].in .w { opacity: 1; transform: none; filter: none; }
.js [data-fade] { opacity: 0; transform: translateY(14px); transition: opacity 0.8s var(--ease-out) var(--d, 0.25s), transform 0.9s var(--ease-out) var(--d, 0.25s); }
.js [data-fade].in { opacity: 1; transform: none; }

/* ---------------- controls ---------------- */
.pill {
  display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px 0 18px;
  border: 0; border-radius: 24px; background: var(--green); color: #000;
  font: 700 0.9rem/1 var(--display); letter-spacing: 0.05em; text-transform: uppercase; text-decoration: none; cursor: pointer;
  box-shadow: 0 10px 30px -8px rgba(23, 163, 74, 0.6);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), background-color 0.2s;
}
.pill:hover { background: #1fb956; transform: translateY(-1px); box-shadow: 0 14px 36px -8px rgba(23, 163, 74, 0.75); }
.pill:active { transform: translateY(1px) scale(0.98); }
.pill svg { width: 18px; height: 18px; }
.ghost { display: inline-flex; align-items: center; gap: 8px; color: var(--grey); font: 400 0.95rem/1.4 var(--display); text-decoration: none; }
a.ghost:hover { color: var(--ink); }
.ghost svg { width: 16px; height: 16px; }
.textlink { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font: 700 0.9rem/1 var(--display); letter-spacing: 0.05em; text-transform: uppercase; text-decoration: none; }
.textlink svg { width: 18px; height: 18px; transition: transform 0.3s var(--ease-out); }
.textlink:hover svg { transform: translateX(4px); }

/* ---------------- nav ---------------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; transition: background-color 0.4s, backdrop-filter 0.4s; }
.nav.solid { background: rgba(5, 6, 5, 0.82); -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.nav-logo img { height: 38px; width: auto; }
.nav-links { display: flex; align-items: center; gap: clamp(14px, 2.4vw, 30px); margin: 0; padding: 0; list-style: none; }
.nav-links a { color: var(--grey); font: 700 0.8125rem/1 var(--display); letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none; transition: color 0.2s; }
.nav-links a:hover, .nav-links a[aria-current='page'] { color: var(--ink); }
.nav-film { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px 0 12px; border: 0; border-radius: 18px; background: rgba(255, 255, 255, 0.1); color: var(--ink); font: 700 0.8125rem/1 var(--display); letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; transition: background-color 0.2s; }
.nav-film:hover { background: rgba(255, 255, 255, 0.18); }
.nav-film svg { width: 13px; height: 13px; }
@media (max-width: 560px) {
  .nav-logo img { height: 32px; }
  .nav-links .hide-s { display: none; }
}

/* ---------------- the slab case (slab.tsx): 200 x 265 design units, 1 unit = 0.5cqw ---------------- */
.slab { --w: 200px; --ink: var(--label-ink); position: relative; width: var(--w); aspect-ratio: 200 / 265; transform-style: preserve-3d; margin: 0; }
.slab[data-cat='drop'] { --ink: #dc2626; }
.slab[data-cat='raffle'] { --ink: var(--green-deep); }
.slab-face { position: absolute; inset: 0; container-type: inline-size; border-radius: 5cqw; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.slab-front {
  background: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 0 0 1cqw rgba(255, 255, 255, 0.42), inset 0 0 6cqw rgba(255, 255, 255, 0.06), 0 2.5cqw 8cqw rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
}
.slab-label {
  position: absolute; left: 4cqw; top: 4cqw; width: 92cqw; height: 29.5cqw; border-radius: 2cqw; overflow: hidden;
  background: var(--label); color: var(--label-ink); box-shadow: inset 0 1.5cqw 0 var(--ink);
  display: flex; justify-content: space-between; padding: 6.5cqw 3.5cqw 0 3.5cqw;
  font-family: var(--mono); text-transform: uppercase;
}
.slab-l { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.slab-type, .slab-meta { font-size: 4.5cqw; line-height: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slab-title { font-weight: 700; font-size: 5cqw; line-height: 1.15; margin: 1.6cqw 0 1.4cqw; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.slab-r { display: flex; flex-direction: column; align-items: flex-end; flex: none; margin-left: 3cqw; }
.slab-tag { background: var(--label-ink); color: var(--label); font-weight: 700; font-size: 4cqw; line-height: 1; padding: 0.9cqw 2cqw 0.7cqw; border-radius: 1cqw; margin-top: -1.2cqw; }
.slab-cond { font-size: 4.5cqw; line-height: 1; margin-top: 2.2cqw; }
.slab-grade { font: 800 10cqw/1 var(--display); letter-spacing: -0.02em; margin-top: 0.8cqw; }
.slab-photo { position: absolute; left: 4cqw; top: 36.5cqw; width: 92cqw; height: 92cqw; border-radius: 2cqw; object-fit: cover; background: #e9ece9; }
/* specular glare and prismatic foil, steered by --gx / --gy (0..1) */
.slab-glare { position: absolute; inset: 0; pointer-events: none; mix-blend-mode: screen; opacity: var(--glare, 0.35); transition: opacity 0.4s;
  background:
    radial-gradient(60cqw 45cqw at calc(var(--gx, 0.3) * 100%) calc(var(--gy, 0.2) * 100%), rgba(255, 255, 255, 0.38), transparent 70%),
    linear-gradient(calc(115deg + var(--gx, 0.3) * 40deg), transparent 30%, rgba(94, 224, 143, 0.16) 42%, rgba(255, 255, 255, 0.22) 48%, rgba(255, 91, 77, 0.12) 54%, transparent 66%); }
.slab-back { transform: rotateY(180deg); background: rgba(22, 24, 23, 0.94); box-shadow: inset 0 0 0 1cqw rgba(255, 255, 255, 0.42), 0 2.5cqw 8cqw rgba(0, 0, 0, 0.55); display: grid; place-items: center; }
.slab-back img { width: 65cqw; height: auto; opacity: 0.92; }
.slab.down { transform: rotateY(180deg); }

/* ---------------- the phone ---------------- */
.phone {
  position: relative; width: var(--pw, 280px); aspect-ratio: 786 / 1704; padding: calc(var(--pw, 280px) * 0.035); border-radius: calc(var(--pw, 280px) * 0.17);
  background: linear-gradient(145deg, #3a3d3c, #121413 38%, #1d201f 70%, #4a4e4c);
  box-shadow: inset 0 0 0 calc(var(--pw, 280px) * 0.006) rgba(255, 255, 255, 0.18), 0 40px 80px -20px rgba(0, 0, 0, 0.8), 0 0 0 1px #000;
  box-sizing: content-box;
}
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: calc(var(--pw, 280px) * 0.135); overflow: hidden; background: #0a0a0a; container-type: inline-size; }
.phone-screen video, .phone-screen > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.phone-status { position: absolute; inset: 0 0 auto; height: 15cqw; display: flex; align-items: center; justify-content: space-between; padding: 2cqw 8cqw 0 10cqw; color: #fff; font: 700 4.4cqw/1 -apple-system, 'Segoe UI', sans-serif; z-index: 2; }
.phone-status svg { height: 3.6cqw; width: auto; }
.phone-status span:last-child { display: flex; gap: 1.6cqw; align-items: center; }
.island { position: absolute; top: 3cqw; left: 50%; width: 30cqw; height: 8.4cqw; margin-left: -15cqw; border-radius: 6cqw; background: #000; z-index: 3; }
.glass { position: absolute; inset: 0; z-index: 4; pointer-events: none; border-radius: inherit; background: linear-gradient(120deg, rgba(255, 255, 255, 0.10) 0%, rgba(255, 255, 255, 0) 34%, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, 0.05) 100%); }

/* ---------------- die-cut stickers ---------------- */
.sticker {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px 8px; border-radius: 12px;
  background: var(--green-deep); color: #fff; font: 800 1.05rem/1 var(--display); letter-spacing: 0.02em; text-transform: uppercase; white-space: nowrap;
  box-shadow: 0 0 0 4px #fff, 0 10px 18px -4px rgba(0, 0, 0, 0.55);
  transform: rotate(var(--r, -4deg));
}
.sticker.ink { background: #111; }
.sticker.red { background: #dc2626; }
.sticker.white { background: #fff; color: #111; box-shadow: 0 0 0 4px #fff, 0 0 0 5px rgba(0, 0, 0, 0.08), 0 10px 18px -4px rgba(0, 0, 0, 0.5); }
.sticker svg { width: 1.1em; height: 1.1em; }
.js .slap { opacity: 0; transform: rotate(var(--r, -4deg)) scale(1.6); }
.js .slap.in { animation: slap 0.42s var(--ease-deal) forwards; animation-delay: var(--d, 0s); }
@keyframes slap {
  0% { opacity: 0; transform: rotate(calc(var(--r, -4deg) * 2.5)) scale(1.6); }
  55% { opacity: 1; transform: rotate(var(--r, -4deg)) scale(0.94); }
  100% { opacity: 1; transform: rotate(var(--r, -4deg)) scale(1); }
}

/* ---------------- hairline callouts (anchor dot -> elbow -> label) ---------------- */
.callout { position: absolute; pointer-events: none; }
.callout svg { position: absolute; overflow: visible; }
.callout path { fill: none; stroke: var(--hair); stroke-width: 1; stroke-dasharray: var(--len, 400); stroke-dashoffset: var(--len, 400); transition: stroke-dashoffset 1.1s var(--ease-out) 0.3s; }
.callout circle { fill: var(--ink); transform-box: fill-box; transform-origin: center; transform: scale(0); transition: transform 0.4s var(--ease-deal) 0.2s; }
.callout.in path { stroke-dashoffset: 0; }
.callout.in circle { transform: scale(1); }
.callout-text { position: absolute; opacity: 0; transition: opacity 0.6s var(--ease-out) 1s; }
.callout.in .callout-text { opacity: 1; }
.no-js .callout path, .no-js .callout-text { stroke-dashoffset: 0; opacity: 1; }
.callout-text b { display: block; font: 700 0.8125rem/1.3 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink); }
.callout-text span { display: block; font: 300 1rem/1.4 var(--display); color: var(--grey); margin-top: 4px; }

/* ---------------- read pages (help, sell, legal) ---------------- */
.page-head { position: relative; padding: clamp(128px, 18vw, 200px) 0 clamp(40px, 6vw, 72px); overflow: hidden; }
.page-head::before { content: ''; position: absolute; inset: -20% 10% auto; height: 520px; background: radial-gradient(closest-side, rgba(66, 78, 72, 0.42), transparent); pointer-events: none; }
.page-head .wrap { position: relative; }
.page-head .lede { margin-top: 22px; max-width: 46ch; color: var(--grey); }
.prose { padding-bottom: clamp(64px, 10vw, 120px); }
.prose h2 { font: 300 clamp(1.7rem, 3vw, 2.3rem)/1.1 var(--display); letter-spacing: -0.03em; margin: 2.4em 0 0.6em; color: var(--ink); }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font: 700 1.35rem/1.3 var(--display); margin: 1.8em 0 0.4em; color: var(--ink); }
.prose p, .prose li { color: #c9c9ce; font-weight: 400; font-size: 1.0625rem; line-height: 1.65; max-width: 68ch; }
.prose p { margin: 0 0 1em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li { margin-bottom: 0.45em; }
.prose li::marker { color: var(--mint); }
.prose a { color: var(--mint); }
.prose .stamp { font: 400 0.8125rem/1.4 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--grey); margin-bottom: 2.4em; }
.toc { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 3em; padding: 0; list-style: none; }
.toc a { color: var(--grey); text-decoration: none; font: 400 0.9rem/1.4 var(--display); }
.toc a:hover { color: var(--ink); }

/* questions */
.qa { border-top: 1px solid rgba(255, 255, 255, 0.1); max-width: 820px; }
.qa details { border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
.qa summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 0; font: 400 1.25rem/1.3 var(--display); color: var(--ink); }
.qa summary::-webkit-details-marker { display: none; }
.qa summary svg { width: 20px; height: 20px; flex: none; color: var(--mint); transition: transform 0.35s var(--ease-out); }
.qa details[open] summary svg { transform: rotate(45deg); }
.qa .a { padding: 0 0 22px; }
.qa .a p { color: #c9c9ce; font-weight: 400; max-width: 64ch; margin: 0 0 0.8em; line-height: 1.6; }

/* the slab label as an information sheet */
.sheet { background: var(--label); color: var(--label-ink); border-radius: 10px; box-shadow: inset 0 5px 0 var(--green-deep), 0 30px 60px -20px rgba(0, 0, 0, 0.7); padding: 26px clamp(18px, 3vw, 30px) 10px; font-family: var(--mono); text-transform: uppercase; }
.sheet-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px dashed rgba(17, 17, 17, 0.25); }
.sheet-row:last-child { border-bottom: 0; }
.sheet-row span { font-size: 0.8125rem; letter-spacing: 0.04em; }
.sheet-row b { font: 800 clamp(1.15rem, 2.4vw, 1.6rem)/1.1 var(--display); text-transform: none; letter-spacing: -0.01em; text-align: right; }
.sheet-top { display: flex; justify-content: space-between; font-size: 0.8125rem; letter-spacing: 0.04em; padding-bottom: 10px; }

/* ---------------- white stage + footer ---------------- */
.paper { background: var(--paper); color: var(--paper-ink); color-scheme: light; }
.foot { background: var(--paper); color: var(--paper-ink); padding: 56px 0 40px; }
.foot-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 32px; }
.foot-logo img { width: 150px; height: auto; }
.foot p { margin: 14px 0 0; color: var(--paper-grey); font: 400 0.95rem/1.5 var(--display); max-width: 34ch; }
.foot h2 { font: 400 0.8125rem/1.3 var(--mono); letter-spacing: 0.04em; text-transform: uppercase; color: var(--paper-grey); margin: 6px 0 14px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.foot a { color: var(--paper-ink); text-decoration: none; font: 400 1rem/1.3 var(--display); }
.foot a:hover { text-decoration: underline; }
.foot-base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 48px; padding-top: 20px; border-top: 1px solid rgba(0, 0, 0, 0.1); color: var(--paper-grey); font: 400 0.875rem/1.4 var(--display); }
.foot ::selection, .paper ::selection { background: var(--green); color: #fff; }
.paper :focus-visible, .foot :focus-visible { outline-color: var(--green-deep); }
@media (max-width: 820px) {
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-grid > :first-child { grid-column: 1 / -1; }
}

/* ---------------- film lightbox ---------------- */
.film { width: min(100vw - 32px, 1180px); padding: 0; border: 0; background: transparent; color: var(--ink); overflow: visible; }
.film::backdrop { background: rgba(0, 0, 0, 0.86); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.film video { width: 100%; aspect-ratio: 16 / 9; border-radius: 14px; background: #000; box-shadow: 0 40px 120px -20px rgba(0, 0, 0, 0.9); }
.film-close { position: absolute; top: -54px; right: 0; display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px; border: 0; border-radius: 21px; background: rgba(255, 255, 255, 0.12); color: var(--ink); font: 700 0.8125rem/1 var(--display); letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; }
.film-close:hover { background: rgba(255, 255, 255, 0.2); }
.film-close svg { width: 14px; height: 14px; }
.film[open] { animation: filmIn 0.5s var(--ease-out); }
@keyframes filmIn { from { opacity: 0; transform: translateY(20px) scale(0.97); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .js [data-words] .w, .js [data-fade], .js .slap { opacity: 1; transform: none; filter: none; }
}
