/* Epic Cash Desktop and Mobile, the coming-soon page. The wallet's own Protocol look
 * (app/lib/src/ui/theme/tokens.dart): near-black with hairlines, Montserrat for display,
 * mono only for readouts, gold as the one signal. The devices of the app's hero screens
 * (the lit backdrop, the measurement grid, corner ticks, the signal trace) frame the wallet. */

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/montserrat-latin.woff2?v=06b16db7') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'JetBrains Mono NL';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/jetbrainsmono-nl.woff2?v=e7236fed') format('woff2');
}

:root {
  --bg: #08080a;
  --surface: #0d0d10;
  --surface-hi: #1a1a21;
  --line: #24242a;
  --line-strong: #33333d;
  --text: #fff9f9;
  --dim: #a4a4ad;
  --faint: #70707a;
  --accent: #f6d471;
  --accent-deep: #c98a3e;
  --accent-ink: #08080a;
  --tick: #c98a3e;
  --ok: #8ad98a;
  --grid: rgba(255, 249, 249, 0.06);
  --glow: rgba(246, 212, 113, 0.14);
  --font-head: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono NL', ui-monospace, 'Cascadia Mono', Menlo, Consolas, monospace;
  --r: 14px;
  --r-sm: 8px;
  --ctl: 48px;
  --gutter: clamp(16px, 4vw, 72px);
  --max: 1760px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --dur: 1;
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
@media (pointer: fine) { html { overscroll-behavior: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  :root { --dur: 0; }
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.18em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
button { font: inherit; color: inherit; touch-action: manipulation; }
a { touch-action: manipulation; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p { margin: 0; }
h2, .lede { text-wrap: balance; }
#look { scroll-margin-top: 24px; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  padding: 10px 14px; border-radius: var(--r-sm);
  background: var(--accent); color: var(--accent-ink); font-weight: 600;
}
.skip:focus { top: 16px; }

/* ---- Header ---------------------------------------------------------------------------- */

.top {
  position: relative; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: var(--max); margin: 0 auto;
  padding: 22px var(--gutter) 0;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.emblem { width: 32px; height: 32px; flex: none; }
.brand-name {
  font-family: var(--font-head); font-weight: 600; font-size: 15px; letter-spacing: 0.16em;
  color: var(--text); padding-top: 1px;
}
.top-status {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 14px; color: var(--dim); white-space: nowrap;
}
.top-status .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px 1px rgba(246, 212, 113, 0.6); }

/* ---- Hero ------------------------------------------------------------------------------ */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 4.6fr) minmax(0, 7.4fr);
  align-items: center;
  gap: clamp(32px, 5vw, 96px);
  max-width: var(--max);
  min-height: calc(100svh - 72px);
  margin: 0 auto;
  padding: clamp(32px, 6vh, 80px) var(--gutter) clamp(48px, 8vh, 112px);
}
.hero::before {
  /* The measurement grid, fading out from the light. */
  content: ''; position: absolute; inset: -72px 0 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(to right, var(--grid) 1px, transparent 1px), linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(55% 70% at 70% 50%, #000 0%, transparent 100%);
  mask-image: radial-gradient(55% 70% at 70% 50%, #000 0%, transparent 100%);
}
.hero::after {
  /* The pool of accent light behind the devices. */
  content: ''; position: absolute; inset: -72px 0 0; z-index: -1; pointer-events: none;
  background: radial-gradient(42% 48% at 70% 50%, var(--glow) 0%, rgba(246, 212, 113, 0.05) 45%, transparent 72%);
  opacity: 0;
  animation: glow-in calc(1.2s * var(--dur)) var(--ease) forwards, breathe 9s ease-in-out calc(1.4s * var(--dur)) infinite;
}
@keyframes glow-in { to { opacity: 1; } }
@keyframes breathe { 0%, 100% { opacity: 1; } 50% { opacity: 0.78; } }

/* The material: a polished black glass slab lit from the upper right (Higgsfield, GPT Image),
 * under the grid and the pool of light, fading to the page black on the left and at the foot. */
.hero-bg {
  /* full-bleed: the hero is centred in a max-width box, the slab spans the viewport */
  position: absolute; top: -72px; bottom: 0; left: calc(50% - 50vw); width: 100vw; z-index: -2; overflow: hidden; pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 42%, #000 100%), linear-gradient(to bottom, transparent 0%, #000 22%, #000 68%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to right, transparent 0%, #000 42%, #000 100%), linear-gradient(to bottom, transparent 0%, #000 22%, #000 68%, transparent 100%);
  mask-composite: intersect;
}
.hero-bg img {
  position: absolute; left: -10%; top: -4%; width: 122%; height: 122%;
  object-fit: cover; object-position: 70% 50%;
  opacity: 0; animation: bg-in calc(1.6s * var(--dur)) var(--ease) forwards;
}
@keyframes bg-in { to { opacity: 0.82; } }
.hero-copy { position: relative; z-index: 1; max-width: 700px; }

/* The product wordmark, as tools/brand/wordmark.py lays it out: the name in the mark's gold
 * gradient with tight tracking, the platform word under it at half size, tracked wide, grey,
 * flush with the right edge of the name. */
.wordmark {
  display: inline-flex; flex-direction: column; align-items: flex-end;
  font-family: var(--font-head); font-weight: 600; line-height: 1;
}
.wm-name {
  font-size: clamp(56px, 6.4vw, 118px); letter-spacing: -0.02em; white-space: nowrap;
  background: linear-gradient(180deg, #f6d471 0%, #e4b85a 60%, #c98a3e 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  padding-right: 0.04em; /* the "h" overhang, so the platform line aligns to the ink */
}
.wm-platform {
  margin-top: 0.42em; font-size: clamp(14px, 1.55vw, 27px);
  letter-spacing: 0.26em; text-transform: uppercase; color: var(--dim);
  padding-right: 0.02em;
}
.lede {
  margin-top: clamp(24px, 3vh, 36px); max-width: 30em;
  font-size: clamp(18px, 1.35vw, 22px); line-height: 1.5; color: var(--dim);
}
.lede strong { color: var(--text); font-weight: 500; }

.readout {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px;
  margin-top: clamp(24px, 3vh, 36px);
  font-family: var(--font-mono); font-size: 14px; letter-spacing: 0.02em; color: var(--text);
}
.readout .bracket { color: var(--accent); margin: 0 0.45em; }
.readout .bracket:first-child { margin-left: 0; }
.readout .plat { color: var(--dim); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(24px, 3.5vh, 40px); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--ctl); padding: 0 22px; border-radius: var(--r-sm);
  font-weight: 600; font-size: 15px; line-height: 1; white-space: nowrap;
  border: 1px solid var(--line-strong); color: var(--text); background: transparent;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn:hover { text-decoration: none; background: rgba(255, 249, 249, 0.05); border-color: #4a4a56; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 1px var(--accent), 0 0 32px -6px rgba(246, 212, 113, 0.5); }
.btn-primary:hover { background: #f8dc86; border-color: #f8dc86; }
.btn[hidden] { display: none; }

/* The composite: a desktop window with the phone in front, framed by corner ticks, the
 * signal trace resting under them. */
.hero-art { position: relative; z-index: 1; min-width: 0; }
.stage {
  position: relative;
  padding: 3.5% 4% 0 0;
  perspective: 1800px;
}
.devices {
  position: relative; z-index: 1;
  padding-bottom: 12%;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
  transition: transform 0.6s var(--ease);
}
.win {
  position: relative; width: 86%;
  border-radius: 10px; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  box-shadow: 0 1px 0 rgba(255, 249, 249, 0.08) inset, 0 0 0 1px #000, 0 50px 90px -30px rgba(0, 0, 0, 0.9), 0 0 120px -20px rgba(246, 212, 113, 0.12);
  opacity: 0; transform: translateY(18px);
  animation: rise calc(0.9s * var(--dur)) var(--ease) calc(0.15s * var(--dur)) forwards;
}
.win img { width: 100%; }
.phone {
  position: absolute; right: 0; bottom: 0; width: 27.5%;
  padding: 2.4%; border-radius: 14.5% / 7%;
  background: linear-gradient(160deg, #35353f 0%, #15151a 35%, #0b0b0e 100%);
  box-shadow: 0 0 0 1px #000, 0 1px 0 rgba(255, 249, 249, 0.14) inset, 0 60px 90px -30px rgba(0, 0, 0, 0.95), 0 0 80px -16px rgba(246, 212, 113, 0.18);
  transform: translateY(18px) translateZ(60px);
  opacity: 0;
  animation: rise-phone calc(0.9s * var(--dur)) var(--ease) calc(0.35s * var(--dur)) forwards;
}
.phone::after {
  /* the rim highlight */
  content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 0 1px rgba(255, 249, 249, 0.06) inset;
}
.phone .screen, .phone > picture { border-radius: 11.5% / 5.3%; overflow: hidden; background: var(--bg); }
.phone img { width: 100%; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }
@keyframes rise-phone { to { opacity: 1; transform: translateY(0) translateZ(60px); } }

.tick { position: absolute; width: 12px; height: 12px; border: 0 solid var(--tick); pointer-events: none; }
.tick.tl { top: 0; left: 0; border-top-width: 2px; border-left-width: 2px; }
.tick.tr { top: 0; right: 0; border-top-width: 2px; border-right-width: 2px; }
.tick.bl { bottom: 0; left: 0; border-bottom-width: 2px; border-left-width: 2px; }
.tick.br { bottom: 0; right: 0; border-bottom-width: 2px; border-right-width: 2px; }

.trace {
  position: absolute; left: 4%; width: 58%; bottom: 3.5%; height: 32px; overflow: visible; z-index: 0;
  filter: drop-shadow(0 0 6px rgba(246, 212, 113, 0.5));
}
.trace path {
  fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 100; stroke-dashoffset: 100;
  animation: draw calc(1.4s * var(--dur)) var(--ease) calc(0.7s * var(--dur)) forwards;
}
@keyframes draw { to { stroke-dashoffset: 0; } }

/* ---- Take a look: one device, five views ---------------------------------------------- */

.look {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(40px, 7vh, 96px) var(--gutter) clamp(56px, 9vh, 128px);
  border-top: 1px solid var(--line);
}
.look-head, .look-body { max-width: 1480px; margin-inline: auto; }
.look-head {
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  margin-bottom: clamp(28px, 4vh, 48px);
}
h2 {
  font-family: var(--font-head); font-weight: 600; letter-spacing: -0.022em;
}
.look-head h2 { font-size: clamp(26px, 2.4vw, 36px); }
.look-head h2::before {
  content: ''; display: inline-block; width: 18px; height: 2px; margin: 0 12px 0.22em 0;
  vertical-align: middle; background: var(--accent);
}

.seg {
  display: inline-flex; padding: 3px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--surface);
}
.seg [role='tab'] {
  min-height: 40px; min-width: 100px; padding: 0 18px; border: 0; border-radius: 6px;
  background: transparent; color: var(--dim); font-weight: 600; font-size: 15px; cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.seg [role='tab']:hover { color: var(--text); }
.seg [role='tab'][aria-selected='true'] { background: var(--surface-hi); color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }

.look-body {
  display: grid; grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
  gap: clamp(32px, 4vw, 72px); align-items: center;
}
.view-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.view-list[hidden] { display: none; }
.view {
  position: relative; display: block; width: 100%; text-align: left;
  padding: 14px 16px 14px 34px; border: 0; border-radius: var(--r-sm);
  background: transparent; cursor: pointer;
  transition: background-color 0.2s var(--ease);
}
.view:hover { background: rgba(255, 249, 249, 0.04); }
.view::before {
  /* the section-head rule, lit on the current view */
  content: ''; position: absolute; left: 16px; top: 22px; width: 10px; height: 2px;
  background: var(--line-strong); transition: background-color 0.3s var(--ease), width 0.3s var(--ease);
}
.view[aria-current='true']::before { background: var(--accent); width: 12px; }
.view-name {
  display: block; font-family: var(--font-head); font-weight: 600; font-size: 18px; letter-spacing: -0.015em;
  color: var(--dim); transition: color 0.3s var(--ease);
}
.view[aria-current='true'] .view-name { color: var(--text); }
.view-cap {
  display: block; margin-top: 4px; font-size: 15px; line-height: 1.45; color: var(--dim);
  max-height: 0; overflow: hidden; opacity: 0;
  transition: max-height 0.45s var(--ease), opacity 0.35s var(--ease), margin-top 0.35s var(--ease);
}
.view[aria-current='true'] .view-cap { max-height: 4.5em; opacity: 1; }
.view-bar { position: absolute; left: 16px; right: 16px; bottom: 6px; height: 1px; background: transparent; }
.view-bar i { display: block; height: 100%; width: 0; background: var(--accent); opacity: 0.7; }
.view[aria-current='true'] .view-bar { background: var(--line); }
.look.is-playing .view[aria-current='true'] .view-bar i { animation: fill var(--interval, 6s) linear forwards; }
.look.is-paused .view-bar i { animation-play-state: paused; }
@keyframes fill { from { width: 0; } to { width: 100%; } }

.view-nav { display: flex; align-items: center; gap: 6px; margin-top: 18px; padding-left: 10px; }
.nav-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: transparent; color: var(--dim); cursor: pointer;
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.nav-btn:hover { color: var(--text); border-color: var(--line-strong); background: rgba(255, 249, 249, 0.04); }
.nav-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-btn.play svg.i-play { display: none; fill: currentColor; stroke: none; }
.nav-btn.play[aria-pressed='false'] svg.i-play { display: block; }
.nav-btn.play[aria-pressed='false'] svg.i-pause { display: none; }
.nav-btn.play { margin-left: 10px; }
.view-count { min-width: 64px; text-align: center; font-family: var(--font-mono); font-size: 13px; color: var(--dim); letter-spacing: 0.02em; }
.vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.look-stage {
  position: relative; min-width: 0;
  display: flex; align-items: center; justify-content: center;
  min-height: min(760px, 78vh);
}
.look-stage::before {
  content: ''; position: absolute; inset: -10% -6%; z-index: -1; pointer-events: none;
  background: radial-gradient(45% 50% at 50% 55%, rgba(246, 212, 113, 0.1) 0%, transparent 70%);
}
.panel[hidden] { display: none; }
.panel.phone {
  position: relative; right: auto; bottom: auto; opacity: 1; transform: none; animation: none;
  width: min(380px, 72vw); padding: 10px; border-radius: 46px;
}
.panel.phone .screen { border-radius: 34px; }
.panel.win { width: 100%; max-width: 1180px; opacity: 1; transform: none; animation: none; }
.screen { position: relative; display: grid; }
.screen picture {
  grid-area: 1 / 1; opacity: 0; transform: scale(1.012);
  transition: opacity calc(0.55s * var(--dur)) var(--ease), transform calc(0.7s * var(--dur)) var(--ease);
}
.screen picture.is-on { opacity: 1; transform: none; }
.screen img { width: 100%; }

/* ---- In short ------------------------------------------------------------------------- */

.three {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 64px);
  max-width: var(--max); margin: 0 auto;
  padding: clamp(40px, 7vh, 88px) var(--gutter);
  border-top: 1px solid var(--line);
}
.three h2 { font-size: clamp(19px, 1.5vw, 23px); }
.three h2::before {
  content: ''; display: inline-block; width: 14px; height: 2px; margin: 0 10px 0.2em 0;
  vertical-align: middle; background: var(--accent);
}
.three p { margin-top: 8px; padding-left: 24px; color: var(--dim); font-size: 16px; }

/* ---- Footer --------------------------------------------------------------------------- */

.foot {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 10px 32px;
  max-width: var(--max); margin: 0 auto;
  padding: 28px var(--gutter) 40px;
  border-top: 1px solid var(--line);
  font-size: 14px; color: var(--dim);
}
.foot a { color: var(--text); text-decoration: underline; text-underline-offset: 0.18em; text-decoration-color: var(--line-strong); }
.foot a:hover { text-decoration-color: currentColor; }
.foot a:hover { color: var(--accent); }
.foot-by, .foot-status, .foot-legal { margin: 0; }
.foot-status a { color: var(--accent); }
.foot .sep { color: var(--faint); margin: 0 2px; }

/* ---- Widths --------------------------------------------------------------------------- */

@media (min-width: 1900px) {
  body { font-size: 18px; }
  .hero { gap: 112px; }
  .panel.phone { width: 420px; }
}

@media (max-width: 1100px) {
  .hero {
    grid-template-columns: 1fr; align-items: start; min-height: 0;
    gap: clamp(40px, 7vh, 72px);
    padding-bottom: clamp(48px, 8vh, 80px);
  }
  .hero::before { -webkit-mask-image: radial-gradient(70% 55% at 50% 72%, #000 0%, transparent 100%); mask-image: radial-gradient(70% 55% at 50% 72%, #000 0%, transparent 100%); }
  .hero::after { background: radial-gradient(60% 40% at 50% 72%, var(--glow) 0%, rgba(246, 212, 113, 0.05) 45%, transparent 72%); }
  .hero-copy { max-width: 720px; }
  .hero-art { max-width: 920px; }
  .hero-bg { display: none; } /* stacked layout: the slab's horizon would cross the copy; the CSS light alone */
  .wm-name { font-size: clamp(56px, 11vw, 112px); }
  .wm-platform { font-size: clamp(13px, 2.6vw, 26px); }
  .look-body { grid-template-columns: 1fr; gap: 28px; }
  .look-stage { order: -1; min-height: 0; }
  .view-list { gap: 0; }
  .view:not([aria-current='true']) { display: none; }
  .view[aria-current='true'] { padding-left: 30px; }
  .view::before { left: 12px; }
  .view-nav { margin-top: 10px; padding-left: 8px; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .top { padding-top: 18px; }
  .top-status { font-size: 13px; }
  .hero { padding-top: 40px; }
  .lede { font-size: 17px; }
  .readout { font-size: 13px; }
  .actions .btn { flex: 1 1 auto; }
  .stage { padding: 4% 0 0; }
  .devices { padding-bottom: 20%; }
  .win { width: 92%; }
  .phone { width: 33%; bottom: 0; }
  .trace { left: 0; width: 62%; bottom: 8%; height: 24px; }
  .look-head { gap: 16px; }
  .seg { width: 100%; }
  .seg [role='tab'] { flex: 1; min-width: 0; }
  .panel.phone { width: min(300px, 76vw); padding: 8px; border-radius: 38px; }
  .panel.phone .screen { border-radius: 30px; }
  .three { grid-template-columns: 1fr; gap: 24px; }
  .foot { flex-direction: column; align-items: flex-start; gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero::after { animation: none; opacity: 1; }
  .hero-bg img { animation: none; opacity: 0.82; }
  .win, .phone { animation: none; opacity: 1; transform: none; }
  .trace path { animation: none; stroke-dashoffset: 0; }
  .devices { transform: none !important; transition: none; }
  .view-bar i { animation: none !important; width: 0 !important; }
  .screen picture { transition: none; transform: none; }
  .btn, .view, .nav-btn, .seg [role='tab'], .view-cap, .view::before { transition: none; }
}
