/* Landing page. Builds on style.css. Motion respects prefers-reduced-motion. */

:root {
  --glow: rgba(110, 92, 255, 0.55);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

body.landing { overflow-x: hidden; }

/* Background: drifting light, a fine grid and grain */
.bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
}
.bg .orb {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.55;
  animation: drift 22s ease-in-out infinite alternate;
}
.bg .orb.a { width: 620px; height: 620px; background: #4535e0; top: -220px; left: -160px; }
.bg .orb.b { width: 520px; height: 520px; background: #8c3fff; top: 10%; right: -200px; animation-duration: 28s; opacity: 0.35; }
.bg .orb.c { width: 460px; height: 460px; background: #0aa5ff; top: 55%; left: 30%; animation-duration: 34s; opacity: 0.18; }
.bg .grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 30%, transparent 75%);
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(80px, 60px, 0) scale(1.15); }
}

/* Reveal on scroll (only when JS runs, so content is never hidden without it) */
.js [data-reveal] {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.js [data-reveal].in { opacity: 1; transform: none; }

/* Hero */
.l-hero { padding: 96px 0 56px; position: relative; }
.l-hero .wrap { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 56px; align-items: center; }
.tag {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 8px; border-radius: 999px;
  background: rgba(140, 127, 255, 0.12); border: 1px solid rgba(140, 127, 255, 0.3);
  color: #cfc9ff; font-size: 14px; font-weight: 600; margin-bottom: 22px;
}
.tag .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--positive); box-shadow: 0 0 12px var(--positive); animation: pulse 2s infinite; margin-left: 4px; }
@keyframes pulse { 50% { opacity: 0.35; } }

.l-hero h1 {
  font-size: clamp(42px, 5.6vw, 78px); line-height: 1; letter-spacing: -0.045em; margin: 0 0 24px;
}
.grad {
  background: linear-gradient(100deg, #fff 10%, #b9b1ff 45%, #8c7fff 60%, #fff 90%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 6s linear infinite;
}
@keyframes shine { to { background-position: -220% 0; } }

.l-hero .lead { font-size: 21px; max-width: 32em; }
.button.glow { box-shadow: 0 0 0 1px rgba(255,255,255,0.15) inset, 0 10px 40px var(--glow); }
.button .arrow { transition: transform 0.3s var(--ease-out); }
.button:hover .arrow { transform: translateX(4px); }

.hero-stats { display: flex; gap: 28px; margin-top: 36px; color: var(--text-3); font-size: 14px; }
.hero-stats strong { display: block; color: var(--text); font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }

/* Phone */
.device {
  position: relative; justify-self: center; width: 320px; max-width: 100%;
  transform-style: preserve-3d; transition: transform 0.4s var(--ease-out);
}
.device .phone { width: 100%; }
.device .float {
  position: absolute; z-index: 2;
  background: rgba(22, 22, 30, 0.72); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 18px; padding: 12px 14px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45); font-size: 13px; white-space: nowrap;
  animation: bob 6s ease-in-out infinite;
}
.device .float small { display: block; color: var(--text-3); font-size: 11px; }
.device .float.f1 { top: -3%; left: -64px; }
.device .float.f2 { bottom: 9%; right: -64px; animation-delay: -3s; }
@keyframes bob { 50% { transform: translateY(-10px); } }

.ticker { color: var(--positive); font-weight: 700; }
.spark { height: 46px; margin-top: 6px; }
.spark path.line { fill: none; stroke: #fff; stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: 400; stroke-dashoffset: 400; animation: draw 2.4s 0.6s var(--ease-out) forwards; }
.spark path.area { fill: url(#sparkFill); opacity: 0; animation: fade 1.2s 1.6s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade { to { opacity: 1; } }

/* Marquee */
.marquee {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  overflow: hidden; padding: 18px 0; background: rgba(255, 255, 255, 0.015);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee .track { display: flex; gap: 48px; width: max-content; animation: marquee 32s linear infinite; }
.marquee span { color: var(--text-2); font-weight: 600; font-size: 16px; display: inline-flex; align-items: center; gap: 12px; }
.marquee span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* The account balance is not your wealth */
.contrast { display: grid; grid-template-columns: 1fr auto 1fr; gap: 20px; align-items: stretch; margin-bottom: 24px; }
.c-card { border-radius: var(--radius); padding: 30px; border: 1px solid var(--line); }
.c-card small { display: block; color: var(--text-2); font-size: 15px; font-weight: 600; }
.c-card p { margin: 6px 0 0; color: var(--text-2); }
.c-big { font-size: clamp(44px, 6vw, 72px); font-weight: 900; letter-spacing: -0.04em; line-height: 1.05; margin-top: 10px; font-family: ui-rounded, "SF Pro Rounded", -apple-system, sans-serif; }
.c-card.bank { background: #101016; }
.c-card.bank .c-big { color: var(--negative); }
.c-card.equity {
  background: linear-gradient(135deg, var(--hero-start), var(--hero-end));
  border-color: rgba(140, 127, 255, 0.5); box-shadow: 0 30px 90px rgba(69, 53, 224, 0.35);
}
.c-card.equity .c-big { color: var(--positive); text-shadow: 0 0 40px rgba(61, 220, 132, 0.35); }
.c-card.equity p { color: rgba(255, 255, 255, 0.85); }
.c-arrow { align-self: center; font-size: 36px; color: var(--accent); }

.explain { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 28px; }
.e-row { display: flex; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
.e-row:last-child { border-bottom: 0; }
.e-row.total { font-weight: 800; font-size: 19px; }
.e-row span:last-child { white-space: nowrap; flex-shrink: 0; }
.c-arrow span { display: inline-block; }
.js .explain .e-row { opacity: 0; transform: translateX(-16px); transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out); }
.js .explain.in .e-row { opacity: 1; transform: none; }
.explain.in .e-row:nth-child(2) { transition-delay: 0.15s; }
.explain.in .e-row:nth-child(3) { transition-delay: 0.3s; }
.explain.in .e-row:nth-child(4) { transition-delay: 0.45s; }
.explain.in .e-row:nth-child(5) { transition-delay: 0.75s; }
.truth-note { color: var(--text-3); margin: 18px 0 0; }

/* Versus */
.versus { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.vs-card { border-radius: var(--radius); padding: 30px; border: 1px solid var(--line); background: var(--card); }
.vs-card.them { opacity: 0.75; }
.vs-card.us {
  background: linear-gradient(160deg, rgba(69, 53, 224, 0.35), rgba(21, 13, 82, 0.4)), var(--card);
  border-color: rgba(140, 127, 255, 0.45);
  box-shadow: 0 30px 80px rgba(69, 53, 224, 0.25);
}
.vs-card h3 { margin: 0 0 18px; font-size: 20px; }
.vs-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.vs-card li { display: flex; gap: 12px; color: var(--text-2); }
.vs-card.them li::before { content: "✕"; color: var(--text-3); font-weight: 800; }
.vs-card.us li { color: var(--text); }
.vs-card.us li::before { content: "✓"; color: var(--positive); font-weight: 800; }

/* Story: sticky phone, steps scroll past */
.story { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 64px; }
.story .sticky { position: sticky; top: 110px; height: fit-content; display: grid; place-items: center; }
.steps-list { display: grid; gap: 28vh; padding: 12vh 0 24vh; }
.story-step { opacity: 0.28; transition: opacity 0.5s; }
.story-step.active { opacity: 1; }
.story-step .num {
  font-size: 13px; font-weight: 800; letter-spacing: 0.12em; color: var(--accent); margin-bottom: 10px; font-variant-numeric: tabular-nums;
}
.story-step h3 { font-size: clamp(26px, 3vw, 36px); line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 12px; }
.story-step p { color: var(--text-2); font-size: 18px; margin: 0; max-width: 28em; }

.screens { position: relative; flex: 1; }
.scr {
  position: absolute; inset: 46px 14px 14px; display: flex; flex-direction: column; gap: 10px;
  opacity: 0; transform: scale(0.97) translateY(10px);
  transition: opacity 0.55s var(--ease-out), transform 0.55s var(--ease-out);
}
.scr.on { opacity: 1; transform: none; }

/* Screen pieces */
.q { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin: 8px 4px 6px; line-height: 1.15; }
.opt { background: var(--card); border-radius: 16px; padding: 14px; font-size: 14px; display: flex; justify-content: space-between; border: 1px solid transparent; }
.opt.sel { border-color: var(--accent); background: rgba(140, 127, 255, 0.12); }
.progress { height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.1); overflow: hidden; margin: 2px 4px 6px; }
.progress i { display: block; height: 100%; width: 25%; background: var(--accent); border-radius: 6px; transition: width 1.4s var(--ease-out); }
.scr.on .progress i { width: 100%; background: var(--positive); }
.acct { background: var(--card); border-radius: 16px; padding: 12px 14px; font-size: 13px; }
.acct .top { display: flex; justify-content: space-between; font-weight: 600; }
.acct .sub { display: flex; justify-content: space-between; color: var(--text-3); font-size: 11px; margin-top: 6px; }
.check { color: var(--text-3); transition: color 0.3s; }
.scr.on .acct .check { color: var(--positive); }
.scr.on .acct:nth-child(3) .check { transition-delay: 0.5s; }
.scr.on .acct:nth-child(4) .check { transition-delay: 1s; }
.scr.on .acct:nth-child(5) .check { transition-delay: 1.5s; }

.wf { display: flex; gap: 8px; height: 180px; padding: 12px 8px 8px; background: var(--card); border-radius: 16px; }
.wf .col, .big-wf .col { flex: 1; display: flex; flex-direction: column; }
.wf .area, .big-wf .area { flex: 1; position: relative; }
.wf .b, .big-wf .b {
  position: absolute; left: 0; right: 0; bottom: var(--y, 0%); height: var(--h);
  border-radius: 5px; transform-origin: bottom; transform: scaleY(0); transition: transform 0.8s var(--ease-out);
}
.wf .lbl { text-align: center; font-size: 9px; color: var(--text-3); margin-top: 6px; }
.scr.on .wf .b { transform: scaleY(1); }
.wf .col:nth-child(2) .b { transition-delay: 0.15s; }
.wf .col:nth-child(3) .b { transition-delay: 0.3s; }
.wf .col:nth-child(4) .b { transition-delay: 0.45s; }

.wrapped {
  flex: 1; border-radius: 20px; padding: 22px 18px;
  background: linear-gradient(150deg, #f25a74, #b23bd6 60%, #6b2bd9);
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
}
.wrapped small { color: rgba(255, 255, 255, 0.8); font-weight: 700; }
.wrapped .big { font-size: 40px; font-weight: 900; letter-spacing: -0.03em; line-height: 1; }
.wrapped p { margin: 0; color: rgba(255, 255, 255, 0.85); font-size: 13px; }

/* Bridge showcase */
.bridge-show { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: center; }
.big-wf {
  display: flex; gap: 14px; height: 360px; padding: 44px 24px 20px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
}
.big-wf .b { border-radius: 10px; transition-duration: 1s; }
.big-wf.in .b { transform: scaleY(1); }
.big-wf .col:nth-child(2) .b { transition-delay: 0.25s; }
.big-wf .col:nth-child(3) .b { transition-delay: 0.5s; }
.big-wf .col:nth-child(4) .b { transition-delay: 0.75s; }
.big-wf .lbl { text-align: center; font-size: 13px; color: var(--text-3); margin-top: 12px; }
.big-wf .val {
  position: absolute; left: 0; right: 0; bottom: calc(var(--y, 0%) + var(--h) + 8px);
  text-align: center; font-size: 15px; font-weight: 800; opacity: 0; transition: opacity 0.6s 1.1s;
}
.big-wf.in .val { opacity: 1; }
.big-wf .total .b { background: linear-gradient(180deg, #8c7fff, #4535e0); box-shadow: 0 0 40px rgba(140, 127, 255, 0.45); }
.pos-c { color: var(--positive); }
.neg-c { color: var(--negative); }

/* Face ID */
.privacy-l { display: grid; grid-template-columns: auto 1fr; gap: 56px; align-items: center; }
.faceid { width: 180px; height: 180px; }
.faceid path, .faceid rect {
  fill: none; stroke: #fff; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 300; stroke-dashoffset: 300; transition: stroke-dashoffset 1.6s var(--ease-out), stroke 0.4s 1.6s;
}
.faceid.in path, .faceid.in rect { stroke-dashoffset: 0; stroke: var(--positive); }
.faceid .eye { transition-delay: 0.4s, 1.6s; }
.faceid .mouth { transition-delay: 0.7s, 1.6s; }

.js .checks li { opacity: 0; transform: translateX(-12px); transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out); }
.js .privacy.in .checks li { opacity: 1; transform: none; }
.privacy.in .checks li:nth-child(2) { transition-delay: 0.1s; }
.privacy.in .checks li:nth-child(3) { transition-delay: 0.2s; }
.privacy.in .checks li:nth-child(4) { transition-delay: 0.3s; }
.privacy.in .checks li:nth-child(5) { transition-delay: 0.4s; }
.privacy.in .checks li:nth-child(6) { transition-delay: 0.5s; }

/* Pricing highlight */
.plan.plus { position: relative; overflow: hidden; }
.plan.plus::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px;
  background: conic-gradient(from var(--angle, 0deg), transparent 0 70%, #8c7fff 80%, transparent 90%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spin 5s linear infinite;
}
@property --angle { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes spin { to { --angle: 360deg; } }

/* Final CTA */
.final { text-align: center; padding: 120px 0 140px; position: relative; }
.final h2 { font-size: clamp(40px, 6vw, 72px); letter-spacing: -0.04em; line-height: 1; margin: 0 0 20px; }
.final p { color: var(--text-2); font-size: 20px; margin: 0 auto 34px; max-width: 30em; }
.final .ctas { justify-content: center; }

@media (max-width: 900px) {
  .l-hero { padding-top: 48px; }
  .l-hero .wrap, .story, .bridge-show, .versus, .privacy-l, .contrast { grid-template-columns: 1fr; }
  .c-arrow { justify-self: center; }
  .c-arrow span { transform: rotate(90deg); }
  .device .float.f1 { left: -8px; top: -4%; }
  .device .float.f2 { right: -12px; }
  .story .sticky { position: relative; top: 0; }
  .steps-list { gap: 48px; padding: 32px 0; }
  .story-step { opacity: 1; }
  .faceid { width: 120px; height: 120px; }
  .big-wf { height: 280px; gap: 8px; padding: 36px 10px 14px; }
  .big-wf .val { font-size: 12px; }
  .big-wf .lbl { font-size: 11px; }
  .hero-stats { gap: 20px; flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js [data-reveal], .js .checks li, .js .explain .e-row { opacity: 1; transform: none; }
  .wf .b, .big-wf .b { transform: none !important; }
  .big-wf .val { opacity: 1; }
  .spark path.line { stroke-dashoffset: 0; }
  .spark path.area { opacity: 1; }
  .faceid path, .faceid rect { stroke-dashoffset: 0; stroke: var(--positive); }
  .scr { transition: none; }
}
