/* ============================================================================
   Toploadr — marketing site
   Refined dark minimalism. Collector-credible, value-forward.
   Palette mirrors the app; green/red reserved strictly for value / P&L.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Audiowide&display=swap');

:root {
  --bg:           #0A0E14;
  --bg-2:         #0C1119;
  --surface:      #12171F;
  --surface-2:    #171D27;
  --muted:        #1B222C;
  --border:       #262E3A;
  --border-soft:  rgba(255, 255, 255, 0.07);
  --ink:          #F1F5F9;
  --text:         #C7D0DC;
  --text-sec:     #94A3B8;
  --text-mut:     #6E7B8C;

  --brand:        #3B82F6;   /* blue — the only brand accent */
  --brand-2:      #60A5FA;
  --brand-ink:    #FFFFFF;

  --gain:         #34D399;   /* green — value/profit ONLY */
  --loss:         #FB7185;   /* red — loss ONLY */

  --maxw: 1140px;
  --r: 4px;
  --r-lg: 10px;

  --f-display: 'Clash Display', 'Hanken Grotesk', sans-serif;
  --f-body:    'Hanken Grotesk', system-ui, sans-serif;
  --f-mono:    'JetBrains Mono', ui-monospace, monospace;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Atmospheric backdrop: faint brand glow + hairline grid */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(60rem 40rem at 78% -8%, rgba(59, 130, 246, 0.13), transparent 60%),
    radial-gradient(48rem 36rem at 8% 8%, rgba(52, 211, 153, 0.05), transparent 55%);
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background-image:
    linear-gradient(var(--border-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-soft) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(closest-side at 50% 30%, #000 30%, transparent 90%);
          mask-image: radial-gradient(closest-side at 50% 30%, #000 30%, transparent 90%);
  opacity: 0.5;
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

::selection { background: rgba(59, 130, 246, 0.35); color: #fff; }

:focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: 3px;
  border-radius: 2px;
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.skip {
  position: absolute; left: -999px; top: 0;
  background: var(--brand); color: #fff; padding: 10px 16px; z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }

/* ---- Typography ---------------------------------------------------------- */
h1, h2, h3 { font-family: var(--f-display); font-weight: 600; color: var(--ink); line-height: 1.05; letter-spacing: -0.02em; }
.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.eyebrow {
  font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--brand-2); font-weight: 500;
}

/* ---- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--f-body); font-weight: 600; font-size: 15px;
  padding: 13px 22px; border-radius: var(--r); border: 1px solid transparent;
  cursor: pointer; transition: transform .18s var(--ease), background .18s, border-color .18s, box-shadow .18s;
  white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset; }
.btn-primary:hover { background: var(--brand-2); transform: translateY(-2px); box-shadow: 0 10px 30px -10px rgba(59,130,246,0.6); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { border-color: var(--text-mut); transform: translateY(-2px); }

/* ---- Header -------------------------------------------------------------- */
header.site {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 14, 20, 0.72);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-soft);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: 'Audiowide', var(--f-display); font-weight: 400; font-size: 21px; color: var(--ink); letter-spacing: 0; }
.brand .glyph {
  width: 30px; height: 30px; flex: none;
  background: url("logo-mark.svg") no-repeat center / contain;
}
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { color: var(--text-sec); font-size: 15px; font-weight: 500; transition: color .15s; }
.nav-links a:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: 14px; }
.menu-btn { display: none; background: none; border: 0; color: var(--ink); cursor: pointer; padding: 6px; }

/* ---- Hero ---------------------------------------------------------------- */
.hero { position: relative; padding: clamp(56px, 9vw, 116px) 0 clamp(48px, 7vw, 92px); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(40px, 6.4vw, 76px); font-weight: 700; }
.hero h1 .accent { color: var(--brand-2); }
.hero .lede { margin-top: 22px; font-size: clamp(17px, 2vw, 20px); color: var(--text-sec); max-width: 36ch; }
.hero .actions { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; }
.hero .micro { margin-top: 18px; font-family: var(--f-mono); font-size: 12.5px; color: var(--text-mut); letter-spacing: 0.02em; }
.hero .micro b { color: var(--gain); font-weight: 500; }

/* staggered entrance */
.reveal { opacity: 0; transform: translateY(16px); }
.in .reveal { opacity: 1; transform: none; transition: opacity .7s var(--ease), transform .7s var(--ease); }
.in .reveal:nth-child(2) { transition-delay: .07s; }
.in .reveal:nth-child(3) { transition-delay: .14s; }
.in .reveal:nth-child(4) { transition-delay: .21s; }

/* ---- The card showcase (real card image + floating value chips) --------- */
.showcase { position: relative; width: fit-content; margin-inline: auto; perspective: 1200px; padding: 6px 0; }
.cardframe {
  position: relative; width: clamp(230px, 64vw, 300px); border-radius: 13px; overflow: hidden;
  transform: rotateY(-15deg) rotateX(6deg) rotate(-2deg); transform-style: preserve-3d;
  transition: transform .5s var(--ease);
  box-shadow: 0 40px 80px -28px rgba(0,0,0,0.85), 0 0 0 1px rgba(255,255,255,0.06);
}
.showcase:hover .cardframe { transform: rotateY(-7deg) rotateX(3deg) rotate(-1deg); }
.card-img { display: block; width: 100%; height: auto; }
/* subtle holo sheen sweeping the card */
.cardframe::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(118deg, transparent 36%, rgba(255,255,255,0.16) 48%, rgba(96,165,250,0.13) 53%, transparent 64%);
  background-size: 250% 250%; mix-blend-mode: screen; opacity: .6;
  animation: foil 7s var(--ease) infinite;
}
@keyframes foil { 0% { background-position: 130% 0; } 55%, 100% { background-position: -30% 0; } }

/* floating value chip beside the card */
.chip {
  position: absolute; right: -14px; bottom: 34px; z-index: 3;
  background: rgba(18,23,31,0.94); border: 1px solid var(--border);
  border-left: 3px solid var(--gain);
  border-radius: var(--r); padding: 11px 14px; backdrop-filter: blur(6px);
  box-shadow: 0 24px 50px -20px rgba(0,0,0,0.85);
}
.chip .k { font-family: var(--f-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-mut); }
.chip .v { font-family: var(--f-mono); font-weight: 700; font-size: 18px; color: var(--gain); margin-top: 2px; }
.chip.invest { left: -14px; top: 28px; right: auto; bottom: auto; border-left-color: var(--brand); }
.chip.invest .v { color: var(--brand-2); }

/* ---- Section scaffolding ------------------------------------------------- */
section { padding: clamp(60px, 8vw, 104px) 0; }
.sec-head { max-width: 60ch; margin-bottom: 52px; }
.sec-head h2 { font-size: clamp(28px, 4vw, 46px); margin-top: 14px; }
.sec-head p { margin-top: 16px; color: var(--text-sec); font-size: 18px; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 28px; position: relative; transition: border-color .2s, transform .2s var(--ease); }
.step:hover { border-color: #33405a; transform: translateY(-4px); }
.step .n { font-family: var(--f-mono); font-size: 12px; color: var(--brand-2); letter-spacing: .1em; }
.step .ic { width: 42px; height: 42px; border-radius: 9px; display: grid; place-items: center; margin: 16px 0 18px; background: rgba(59,130,246,0.1); border: 1px solid rgba(59,130,246,0.28); color: var(--brand-2); }
.step .ic svg { width: 22px; height: 22px; }
.step h3 { font-size: 21px; }
.step p { margin-top: 10px; color: var(--text-sec); font-size: 15.5px; line-height: 1.6; }

/* contrast / differentiator band */
.band { background: linear-gradient(180deg, var(--bg-2), var(--bg)); border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft); }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.compare .col { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 30px; }
.compare .them { background: var(--surface); }
.compare .us { background: linear-gradient(180deg, rgba(59,130,246,0.07), transparent); border-color: rgba(59,130,246,0.35); }
.compare h3 { font-size: 15px; font-family: var(--f-mono); font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--text-mut); }
.compare .us h3 { color: var(--brand-2); }
.compare ul { list-style: none; margin-top: 18px; display: grid; gap: 14px; }
.compare li { position: relative; padding-left: 31px; font-size: 16px; color: var(--text); line-height: 1.55; }
.compare li svg { position: absolute; left: 0; top: 3px; width: 19px; height: 19px; }
.compare .them li { color: var(--text-sec); }
.mark-x { color: var(--loss); }
.mark-c { color: var(--gain); }

/* feature rows */
.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.feature { display: flex; gap: 16px; padding: 24px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.feature .ic { color: var(--brand-2); flex: none; }
.feature .ic svg { width: 24px; height: 24px; }
.feature h3 { font-size: 18px; }
.feature p { margin-top: 7px; color: var(--text-sec); font-size: 15px; }

/* final CTA */
.cta-final { text-align: center; }
.cta-final .panel { border: 1px solid var(--border); border-top: 2px solid var(--brand); border-radius: var(--r-lg); background: radial-gradient(80% 120% at 50% 0%, rgba(59,130,246,0.12), var(--surface) 70%); padding: clamp(40px, 6vw, 72px) 24px; }
.cta-final h2 { font-size: clamp(30px, 4.5vw, 52px); }
.cta-final p { margin: 16px auto 30px; color: var(--text-sec); max-width: 46ch; font-size: 18px; }

/* ---- Footer -------------------------------------------------------------- */
footer.site { border-top: 1px solid var(--border); padding: 56px 0 40px; }
.foot { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.foot .brand { margin-bottom: 14px; }
.foot .tag { color: var(--text-mut); font-size: 14px; max-width: 30ch; }
.foot-cols { display: flex; gap: 64px; flex-wrap: wrap; }
.foot-col h4 { font-family: var(--f-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-mut); font-weight: 500; margin-bottom: 14px; }
.foot-col a { display: block; color: var(--text-sec); font-size: 15px; padding: 5px 0; transition: color .15s; }
.foot-col a:hover { color: var(--ink); }
.legal { margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--border-soft); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; color: var(--text-mut); font-size: 13px; font-family: var(--f-mono); }

/* ---- Long-form (privacy / support) -------------------------------------- */
.doc { padding: clamp(48px, 7vw, 88px) 0 80px; }
.doc-head { border-bottom: 1px solid var(--border); padding-bottom: 28px; margin-bottom: 40px; }
.doc-head h1 { font-size: clamp(34px, 5vw, 54px); }
.doc-head .updated { margin-top: 14px; font-family: var(--f-mono); font-size: 13px; color: var(--text-mut); }
.prose { max-width: 760px; }
.prose h2 { font-size: 24px; margin: 40px 0 12px; }
.prose h3 { font-size: 18px; margin: 26px 0 8px; color: var(--text); font-family: var(--f-display); }
.prose p, .prose li { color: var(--text-sec); font-size: 16.5px; line-height: 1.72; }
.prose p { margin-bottom: 14px; }
.prose ul { margin: 0 0 16px 22px; display: grid; gap: 8px; }
.prose a { color: var(--brand-2); text-decoration: underline; text-underline-offset: 3px; }
.prose strong { color: var(--ink); font-weight: 600; }
.callout { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--brand); border-radius: var(--r); padding: 16px 18px; margin: 22px 0; font-size: 15px; color: var(--text-sec); }

/* FAQ */
.faq { max-width: 800px; display: grid; gap: 0; }
.faq details { border-bottom: 1px solid var(--border); padding: 6px 0; }
.faq summary { cursor: pointer; list-style: none; padding: 20px 4px; font-family: var(--f-display); font-weight: 600; font-size: 18px; color: var(--ink); display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--f-mono); color: var(--brand-2); font-size: 22px; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .ans { padding: 0 4px 22px; color: var(--text-sec); font-size: 16px; line-height: 1.7; }
.faq .ans a { color: var(--brand-2); text-decoration: underline; text-underline-offset: 3px; }

.contact-card { margin-top: 40px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 30px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.contact-card h3 { font-size: 20px; }
.contact-card p { color: var(--text-sec); margin-top: 6px; font-size: 15px; }

/* ---- Responsive ---------------------------------------------------------- */
@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero { padding-top: clamp(36px, 8vw, 56px); }
  .showcase { margin: 8px auto 0; }
  .cardframe { transform: rotate(-1.5deg); }   /* flatten 3D on small screens */
  .steps { grid-template-columns: 1fr; }
  .compare, .features { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  header.site .nav-cta .btn { display: none; }  /* hero already has the CTA */
  .menu-btn { display: inline-flex; }
  .nav-links.open { display: flex; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0; background: var(--bg-2); border-bottom: 1px solid var(--border); padding: 8px 24px 18px; }
  .nav-links.open a { padding: 14px 0; border-bottom: 1px solid var(--border-soft); }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .hero .actions { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
  .foot-cols { gap: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .card { transition: none; }
}
