/* ============================================================
   AscendQ v2 — design system
   Three fonts only:
     Instrument Serif  — headlines, brand mark, big numbers
     Inter             — body, UI, buttons
     JetBrains Mono    — eyebrows, units, micro-labels
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100%;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}

:root {
  --bg: #0F1011;
  --bg-card: #1A1B1E;
  --bg-card-2: #22242A;
  --text: #EAE7E0;
  --text-dim: #B5AEA1;
  --text-sub: #7E776B;
  --text-faint: #5E5A52;
  --gold: #DDB974;
  --gold-light: #F4D796;
  --gold-deep: #B8924A;
  --green: #7DD3A8;
  --red: #F76E78;
  --border: #2A2D31;
  --border-strong: #3A3D42;

  --ff-serif: 'Instrument Serif', serif;
  --ff-sans: 'Inter', system-ui, sans-serif;
  --ff-mono: 'JetBrains Mono', monospace;
}

/* === Ambient page background === */
body {
  padding: 28px 22px 80px;
  position: relative;
}
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 900px 540px at 50% -8%, rgba(221,185,116,0.16), transparent 60%),
    radial-gradient(ellipse 600px 400px at 15% 60%, rgba(221,107,95,0.03), transparent 60%);
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(rgba(232,228,220,0.025) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(ellipse 700px 500px at 50% 30%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 700px 500px at 50% 30%, #000 0%, transparent 70%);
}
@media (max-width: 520px) { body { padding: 20px 16px 64px; } }

/* === Layout container === */
.wrap {
  position: relative;
  z-index: 1;
  max-width: 540px;
  margin: 0 auto;
}
.wrap-wide { max-width: 880px; }

/* === Top nav === */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 48px;
  gap: 14px;
}
.brand {
  font-family: var(--ff-serif);
  font-size: 20px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand em { color: var(--gold); font-style: italic; font-weight: 400; }
.nav-actions { display: flex; gap: 10px; align-items: center; }
.nav-link {
  color: var(--text-sub);
  text-decoration: none;
  font-family: var(--ff-sans);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(27,29,32,0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: color .15s, border-color .15s;
}
.nav-link:hover { color: var(--gold); border-color: var(--gold); }
@media (max-width: 520px) {
  .top-nav { margin-bottom: 32px; }
  .brand { font-size: 18px; }
  .nav-link { font-size: 12px; padding: 7px 13px; }
}

/* === Earn-with-us nav link — gold theme + coin-burst hover === */
.earn-link {
  position: relative;
  overflow: visible;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  background: linear-gradient(135deg, rgba(221,185,116,0.16) 0%, rgba(221,185,116,0.06) 100%);
  border-color: rgba(221,185,116,0.40);
  font-weight: 600;
}
.earn-link:hover {
  color: #0F1011;
  background: linear-gradient(180deg, #F4D796 0%, #DDB974 100%);
  border-color: var(--gold);
  box-shadow: 0 10px 28px -10px rgba(221,185,116,0.75);
}
.earn-coin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(180deg, #F4D796 0%, #DDB974 100%);
  color: #0F1011;
  font-family: var(--ff-serif);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 0 0 1px rgba(221,185,116,0.4), 0 0 10px rgba(221,185,116,0.5);
  animation: earnCoinSpin 4s ease-in-out infinite;
}
@keyframes earnCoinSpin {
  0%, 100% { transform: rotateY(0deg) scale(1); }
  50%      { transform: rotateY(180deg) scale(1.05); }
}
.earn-link:hover .earn-coin {
  animation: earnCoinSpinFast 0.6s ease-in-out infinite;
}
@keyframes earnCoinSpinFast {
  0%, 100% { transform: rotateY(0deg) scale(1.1); }
  50%      { transform: rotateY(360deg) scale(1.15); }
}
.earn-arrow { transition: transform .25s cubic-bezier(.2,.7,.2,1); display: inline-block; }
.earn-link:hover .earn-arrow { transform: translateX(4px); }

/* The burst: hidden until JS triggers it. Spawns 12 coins on click. */
.earn-burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: visible;
}
.earn-burst .coin {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(180deg, #F4D796 0%, #DDB974 100%);
  color: #0F1011;
  font-family: var(--ff-serif);
  font-size: 9px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  box-shadow: 0 0 0 1px rgba(221,185,116,0.4), 0 0 8px rgba(221,185,116,0.6);
  animation: coinFly 1100ms cubic-bezier(.2,.7,.2,1) forwards;
}
@keyframes coinFly {
  0%   { transform: translate(-50%, -50%) scale(0.4); opacity: 0; }
  15%  { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(0.85) rotate(var(--rot)); opacity: 0; }
}
@media (max-width: 520px) {
  .earn-coin { width: 16px; height: 16px; font-size: 10px; }
}

/* === Typography primitives === */
.eyebrow {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 600;
}
h1, h2, h3, .display { font-family: var(--ff-serif); font-weight: 400; letter-spacing: -0.01em; }

/* === Buttons (shared) === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 18px 44px;
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 100%);
  color: #0F1011;
  border: none;
  border-radius: 13px;
  font-family: var(--ff-serif);
  font-weight: 400;
  font-size: 22px;
  letter-spacing: -0.005em;
  cursor: pointer;
  text-decoration: none;
  position: relative;
  transition: transform .25s cubic-bezier(.2,.7,.2,1), box-shadow .3s ease;
  box-shadow: 0 12px 30px -10px rgba(221,185,116,0.55), 0 0 22px -4px rgba(244,215,150,0.20);
}
.btn em { font-style: italic; font-weight: 400; }
.btn:hover {
  transform: translateY(-3px) scale(1.04);
  box-shadow: 0 18px 48px -8px rgba(221,185,116,0.85), 0 0 36px 2px rgba(244,215,150,0.42);
}
.btn .btn-arrow {
  font-family: var(--ff-sans);
  font-size: 20px;
  line-height: 1;
  font-weight: 400;
  transition: transform .25s;
}
.btn:hover .btn-arrow { transform: translateX(5px); }
.btn-ghost {
  background: transparent;
  color: var(--text-sub);
  border: 1px solid var(--border);
  box-shadow: none;
  font-family: var(--ff-sans);
  font-weight: 500;
  font-size: 14px;
  padding: 11px 22px;
  letter-spacing: 0;
}
.btn-ghost:hover {
  color: var(--gold);
  border-color: var(--gold);
  transform: translateY(-1px) scale(1);
  box-shadow: none;
}

/* === Cards === */
.card {
  background: rgba(232,228,220,0.04);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
}

/* === Page footer === */
.foot {
  margin-top: 60px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--text-faint);
  text-transform: uppercase;
}
.foot a { color: var(--text-sub); text-decoration: none; transition: color .15s; }
.foot a:hover { color: var(--gold); }
.foot .foot-sep { margin: 0 8px; color: var(--text-faint); }

/* === Floating background symbols (math/science) ===
   Symbols drift around the viewport. We mask the layer so they are only
   visible in the outer ~22% of either side (left + right) and faded out
   completely through the center, where the text/content lives. This way
   the symbols add atmosphere without ever overlapping copy. */
.sym-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right,
    #000 0%,
    #000 14%,
    transparent 26%,
    transparent 74%,
    #000 86%,
    #000 100%);
  mask-image: linear-gradient(to right,
    #000 0%,
    #000 14%,
    transparent 26%,
    transparent 74%,
    #000 86%,
    #000 100%);
}
/* On narrow screens the gutters get tiny; clamp the masked area smaller so
   we still have some symbols visible behind content rather than removing
   them entirely. */
@media (max-width: 640px) {
  .sym-layer {
    -webkit-mask-image: linear-gradient(to right,
      #000 0%, #000 5%,
      transparent 16%, transparent 84%,
      #000 95%, #000 100%);
    mask-image: linear-gradient(to right,
      #000 0%, #000 5%,
      transparent 16%, transparent 84%,
      #000 95%, #000 100%);
  }
}
.sym {
  position: absolute;
  font-family: var(--ff-serif);
  font-style: italic;
  color: var(--gold);
  will-change: transform, opacity;
  user-select: none;
  -webkit-user-select: none;
  top: 0;
  left: 0;
}
@keyframes symDriftR {
  0%   { transform: translate3d(-140px, var(--sy,50vh), 0) rotate(-30deg); }
  50%  { transform: translate3d(50vw, calc(var(--sy,50vh) - 30px), 0) rotate(40deg); }
  100% { transform: translate3d(calc(100vw + 140px), calc(var(--sy,50vh) - 60px), 0) rotate(-20deg); }
}
@keyframes symDriftL {
  0%   { transform: translate3d(calc(100vw + 140px), var(--sy,50vh), 0) rotate(30deg); }
  50%  { transform: translate3d(50vw, calc(var(--sy,50vh) - 30px), 0) rotate(-40deg); }
  100% { transform: translate3d(-140px, calc(var(--sy,50vh) - 60px), 0) rotate(20deg); }
}
/* Three depth tiers for a clear parallax effect.
   FRONT — biggest, fastest, brightest, no blur. Reads almost in foreground.
   MID   — medium size + speed, ~half opacity, soft blur.
   BACK  — smallest, slowest, dim, strong blur. Reads as distant atmosphere. */
.sym.depth-front { opacity: 0.38; text-shadow: 0 0 18px rgba(221,185,116,0.40); }
.sym.depth-mid   { opacity: 0.20; text-shadow: 0 0 12px rgba(221,185,116,0.24); filter: blur(1px); }
.sym.depth-back  { opacity: 0.10; filter: blur(2.2px); }

/* === In-app WebView handoff modal (TikTok / Instagram) === */
.handoff {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15,16,17,0.96);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn .25s ease both;
}
.handoff.show { display: flex; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.handoff-card {
  max-width: 380px;
  width: 100%;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 32px 26px;
}
.handoff h2 {
  font-size: 26px;
  line-height: 1.2;
  color: var(--text);
  margin-bottom: 8px;
}
.handoff h2 em { color: var(--gold); font-style: italic; }
.handoff p {
  color: var(--text-dim);
  font-size: 14.5px;
  line-height: 1.5;
  margin-bottom: 20px;
}
.handoff-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  text-align: left;
  margin: 12px 0;
  padding: 14px;
  background: rgba(232,228,220,0.03);
  border: 1px solid rgba(232,228,220,0.08);
  border-radius: 10px;
}
.handoff-step-num {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gold);
  color: #0F1011;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-serif);
  font-weight: 700;
  font-size: 14px;
}
.handoff-step-text {
  flex: 1;
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
}
.handoff-step-text b { color: var(--gold); }
.handoff-url-label {
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--text-sub);
  text-transform: uppercase;
  margin: 18px 0 6px;
  text-align: left;
}
.handoff-url {
  padding: 11px 13px;
  background: rgba(232,228,220,0.04);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: var(--ff-mono);
  font-size: 11.5px;
  color: var(--text-dim);
  text-align: left;
  overflow-x: auto;
  white-space: nowrap;
  cursor: text;
  -webkit-user-select: all;
  user-select: all;
  margin-bottom: 14px;
}
.handoff-copy {
  display: block;
  width: 100%;
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 100%);
  color: #0F1011;
  border: none;
  border-radius: 11px;
  padding: 14px;
  font-family: inherit;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  margin-bottom: 8px;
}
.handoff-close {
  background: transparent;
  color: var(--text-sub);
  border: none;
  font-family: inherit;
  font-size: 13px;
  padding: 10px;
  cursor: pointer;
}
.handoff-close:hover { color: var(--gold); }

/* ============================================================
   Open-in-browser manual (shown only inside TikTok / IG / FB
   WebViews on the landing page). One job: point a big curved
   gold arrow at the ••• menu in the top-right corner.
   ============================================================ */
.om {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  padding: 0;
  background: rgba(8,9,10,0.92);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  overflow: hidden;
  animation: omFade .3s ease both;
}
.om.show { display: block; }
@keyframes omFade { from { opacity: 0; } to { opacity: 1; } }

/* Short curved arrow bending out toward the top-right corner. The arrow
   tip sits near the viewport edge and points past it — the user reads
   "look up there" without us drawing a target inside our content area. */
.om-arrow {
  position: absolute;
  top: 18px;
  right: 0;
  width: min(220px, 55vw);
  height: auto;
  pointer-events: none;
  animation: omArrowDraw 1.2s ease-out .15s both;
}
.om-arrow-path {
  stroke-dasharray: 6 9;
  animation: omArrowFlow 1.4s linear infinite;
}
@keyframes omArrowFlow {
  to { stroke-dashoffset: -30; }
}
@keyframes omArrowDraw {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.om-arrow-head {
  filter: drop-shadow(0 0 6px rgba(221,185,116,0.6));
}

/* Copy block — vertically centered, kept minimal. */
.om-copy-block {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  max-width: 380px;
  padding: 0 22px;
  text-align: center;
  animation: omCopyIn .5s cubic-bezier(.2,.7,.2,1) .25s both;
}
@keyframes omCopyIn {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 12px)); }
  to   { opacity: 1; transform: translate(-50%, -50%);              }
}
.om-tag {
  display: inline-block;
  font-family: var(--ff-mono);
  font-size: 10.5px;
  letter-spacing: 0.24em;
  color: var(--gold);
  text-transform: uppercase;
  background: rgba(221,185,116,0.10);
  border: 1px solid rgba(221,185,116,0.30);
  padding: 6px 13px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.om-copy-block h2 {
  font-family: var(--ff-serif);
  font-size: 28px;
  line-height: 1.18;
  color: var(--text);
  letter-spacing: -0.015em;
  margin-bottom: 18px;
}
.om-copy-block h2 em { color: var(--gold); font-style: italic; }

/* Step rows — number on the far left, label + icon flow right.
   Used twice (••• icon then Safari icon + "Open in browser"). */
.om-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin: 10px auto;
  padding: 12px 16px;
  background: rgba(232,228,220,0.04);
  border: 1px solid rgba(232,228,220,0.09);
  border-radius: 14px;
  max-width: 320px;
  text-align: left;
}
.om-row-num {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 100%);
  color: #0F1011;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--ff-serif);
  font-weight: 800;
  font-size: 13.5px;
}
.om-row-text {
  color: var(--text);
  font-size: 15.5px;
  font-weight: 500;
  white-space: nowrap;
}

/* Three thick floating dots — mimics the host app's ••• menu icon. */
.om-icon-dots {
  display: inline-flex;
  align-items: center;
  gap: 4.5px;
  padding: 2px 6px;
  transform: translateY(-1px);
}
.om-icon-dots > span {
  width: 6.5px;
  height: 6.5px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 8px rgba(221,185,116,0.55);
}

/* Simplified Safari-style icon — black circle with a symmetrical
   compass needle (no specific "front"), pointing NE-SW. */
.om-icon-safari {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}
.om-icon-safari svg {
  width: 28px;
  height: 28px;
  display: block;
  filter: drop-shadow(0 0 6px rgba(221,185,116,0.25));
}

/* Discreet close button at the bottom. */
.om-close {
  position: absolute;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  background: rgba(232,228,220,0.06);
  color: var(--text-dim);
  border: 1px solid rgba(232,228,220,0.10);
  font-family: inherit;
  font-size: 13px;
  padding: 10px 22px;
  border-radius: 999px;
  cursor: pointer;
  animation: omCopyIn .5s cubic-bezier(.2,.7,.2,1) .4s both;
}
.om-close:hover { color: var(--gold); border-color: rgba(221,185,116,0.30); }

@media (max-width: 520px) {
  .om-arrow { top: 14px; width: 50vw; }
  .om-copy-block h2 { font-size: 24px; margin-bottom: 14px; }
  .om-row { padding: 11px 14px; }
  .om-row-text { font-size: 15px; }
}
@media (max-height: 640px) {
  .om-arrow { width: 44vw; top: 10px; }
  .om-copy-block h2 { font-size: 22px; margin-bottom: 12px; }
}
