/* ==========================================================================
   AURIX — components.css
   Buttons, cards, 3D stages, stats, tables, forms, loader, story rail.
   ========================================================================== */

/* ============================================================== BUTTONS == */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-size: 0.97rem;
  font-weight: 650;
  letter-spacing: -0.012em;
  cursor: pointer;
  text-align: center;
  transition: transform var(--t-fast) var(--ease),
              background-color var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease),
              opacity var(--t-fast) var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; flex: none; }

/* Primary — ocean blue. The one action colour in the whole design. */
.btn--primary {
  background: var(--ocean);
  color: var(--accent-ink);
  box-shadow: var(--shadow-ocean);
}
.btn--primary:hover { box-shadow: 0 18px 38px -12px rgba(47, 107, 246, 0.60); }

/* Secondary — a frosted glass pill, the same material as the cards. */
.btn--ghost {
  background: var(--glass);
  border-color: var(--glass-border);
  color: var(--text);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow-sm);
}
.btn--ghost:hover { border-color: var(--ocean); color: var(--accent-text); }

/* Gradient — used sparingly for the biggest CTA */
.btn--gradient {
  background: var(--gradient);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.btn--lg { padding: 16px 30px; font-size: 1.03rem; }
.btn--block { width: 100%; }
.btn--sm { padding: 9px 16px; font-size: 0.88rem; }

/* ================================================================ CARDS == */
/* Every card is a frosted panel: a translucent white fill, a bright inner
   edge, a blur so the pastel sky behind it shows through softened, and a
   blue-tinted shadow. --card is translucent, so the backdrop-filter here
   is not decoration — without it the panel looks like weak tinted paper. */
.card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  padding: clamp(22px, 3vw, 30px);
  box-shadow: var(--shadow-sm);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  transition: transform var(--t-med) var(--ease),
              border-color var(--t-med) var(--ease),
              box-shadow var(--t-med) var(--ease);
}
.card--hover:hover {
  transform: translateY(-4px);
  border-color: #FFFFFF;
  box-shadow: var(--shadow-md);
}
html[data-theme="dark"] .card--hover:hover { border-color: var(--border-strong); }
.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }

/* A heavier pane, for cards that sit directly over a 3D canvas or an
   aurora and need more separation from it. */
.card--glass {
  background: var(--glass);
  border-color: var(--glass-border);
  box-shadow: var(--shadow-md);
}

/* Small square icon tile at the top of a card */
.card__icon {
  width: 46px; height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: 15px;
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 10px 20px -10px rgba(47, 107, 246, 0.55);
}
.card__icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; }
.card__icon--accent {
  background: var(--ocean);
  color: var(--accent-ink);
}

/* Numbered step badge */
.step-num {
  display: inline-grid;
  place-items: center;
  width: 34px; height: 34px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 1px solid var(--border);
  color: var(--accent-text);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
}

/* ================================================================ CHIPS == */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: var(--r-pill);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow-sm);
  font-size: 0.82rem;
  color: var(--muted);
}
.chip--accent { border-color: rgba(47,107,246,.3); color: var(--accent-text); background: var(--accent-soft); }
.chip__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ocean); flex: none; }

.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* Bulleted "check" lists */
.ticks { display: grid; gap: 11px; margin: 18px 0 0; }
.ticks li {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  color: var(--muted);
}
.ticks li::before {
  content: '';
  width: 18px; height: 18px;
  margin-top: 4px;
  border-radius: 50%;
  background: rgba(43, 196, 138, 0.14);
  border: 1px solid rgba(43, 196, 138, 0.45);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232BC48A' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 11px 11px;
}

/* ============================================================ 3D STAGES == */
/* The wrapper that holds a <canvas> plus its hint + glow. */
.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 68svh;
  margin-inline: auto;
}
.stage--wide { aspect-ratio: 4 / 3; }
.stage--short { aspect-ratio: 16 / 10; max-height: 46svh; }

.stage canvas {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: var(--r-lg);
  /* KEY TOUCH RULE: vertical swipes scroll the page, horizontal ones reach
     our pointer handlers. Without this the 3D object would eat page scroll. */
  touch-action: pan-y;
  cursor: grab;
  outline-offset: 4px;
}
.stage canvas:active { cursor: grabbing; }

/* Hint pill under / over the canvas */
.stage__hint {
  position: absolute;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 13px;
  border-radius: var(--r-pill);
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-sm);
  font-size: 0.74rem;
  color: var(--muted);
  white-space: nowrap;
  pointer-events: none;
  transition: opacity var(--t-med) var(--ease);
}
.stage.is-engaged .stage__hint { opacity: 0; }
.stage__hint svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ============================================================= TICKER ==== */
.ticker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 26px;
}
.ticker__item {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow-sm);
  font-size: 0.84rem;
}
.ticker__sym { font-weight: 700; letter-spacing: -0.01em; }
/* Amounts are always mono, so the row does not jiggle as prices tick. */
.ticker__item .ticker__price,
.ticker__item .up,
.ticker__item .down { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.ticker__price { color: var(--muted); }
.up { color: var(--up); }
.down { color: var(--down); }

/* ============================================================== STATS ==== */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, 1fr); } }

.stat {
  padding: 26px 22px;
  border-radius: var(--r-lg);
  border: 1px solid var(--glass-border);
  background: var(--card);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow-sm);
  text-align: center;
}
/* Ultra-light mono, the way the balance is set in the app. */
.stat__num {
  display: block;
  font-family: var(--font-mono);
  font-size: clamp(1.9rem, 5vw, 2.7rem);
  font-weight: 250;
  letter-spacing: -0.04em;
  line-height: 1.08;
  font-variant-numeric: tabular-nums;
}
.stat__label { font-size: 0.85rem; color: var(--muted); }

/* ========================================================= LOGO STRIP ==== */
.chain-strip {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 12px;
}
.chain-pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 18px;
  border-radius: var(--r-pill);
  border: 1px solid var(--glass-border);
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow-sm);
  font-size: 0.9rem;
  font-weight: 600;
  transition: transform var(--t-fast) var(--ease),
              border-color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
}
.chain-pill:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.chain-pill__dot {
  width: 20px; height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.56rem;
  font-weight: 800;
  /* Deliberately a fixed near-black: these discs are the chain's own brand
     colour in both themes, so the text on them must not follow the theme. */
  color: #0B1020;
  flex: none;
}

/* ====================================================== PRICE TABLE ====== */
.table-wrap {
  border: 1px solid var(--glass-border);
  border-radius: var(--r-lg);
  background: var(--card);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.price-table {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}
.price-table caption {
  padding: 16px 18px;
  text-align: left;
  font-size: 0.82rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.price-table th,
.price-table td {
  padding: 15px 18px;
  text-align: right;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}
/* Only the two numeric columns go mono — the network name is prose. */
.price-table td:nth-child(2),
.price-table td:nth-child(3) { font-family: var(--font-mono); font-weight: 350; }
.price-table th:first-child,
.price-table td:first-child { text-align: left; }
.price-table thead th {
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.price-table tbody tr:last-child th,
.price-table tbody tr:last-child td { border-bottom: 0; }
.price-table tbody tr { transition: background-color var(--t-fast) var(--ease); }
.price-table tbody tr:hover { background: rgba(47, 107, 246, 0.05); }

.asset-cell { display: flex; align-items: center; gap: 11px; }
.asset-cell__name { font-weight: 600; }
.asset-cell__sym { font-size: 0.78rem; color: var(--muted); }

/* Loading skeleton bars */
.skeleton {
  display: inline-block;
  height: 11px;
  width: 64px;
  border-radius: 6px;
  background: linear-gradient(90deg, rgba(47,107,246,.07) 25%, rgba(47,107,246,.18) 37%, rgba(47,107,246,.07) 63%);
  background-size: 400% 100%;
  animation: skeleton 1.3s ease-in-out infinite;
}
.skeleton--wide { width: 96px; }
@keyframes skeleton {
  0%   { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* Fallback / error note */
.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 16px 18px;
  border-radius: var(--r-md);
  /* Peach is the attention colour in this design, so notices wear it. */
  border: 1px solid rgba(255, 159, 122, 0.45);
  background: rgba(255, 159, 122, 0.12);
  font-size: 0.9rem;
  color: var(--muted);
}
.notice[hidden] { display: none; }
.notice svg { width: 18px; height: 18px; flex: none; margin-top: 2px; stroke: var(--peach); fill: none; stroke-width: 2; }
.notice button { background: none; border: 0; padding: 0; color: var(--accent-text); font-weight: 600; cursor: pointer; text-decoration: underline; }

.prices-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  justify-content: space-between;
  align-items: center;
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ============================================= HORIZONTAL STORY RAIL ===== */
/* Pinned sideways-scrolling section (features.html). On touch / reduced
   motion it degrades to a normal swipeable row — see js/scroll.js.        */
.story { position: relative; overflow: hidden; }
.story__viewport { overflow: hidden; }
.story__rail {
  display: flex;
  gap: 18px;
  will-change: transform;
}
.story__panel {
  flex: 0 0 86%;
  max-width: 420px;
  min-height: 330px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(22px, 3vw, 32px);
  border-radius: var(--r-lg);
  border: 1px solid var(--glass-border);
  background: var(--card);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow-sm);
}
@media (min-width: 900px) { .story__panel { flex-basis: 420px; min-height: 380px; } }

.story__panel .step-num { background: var(--gradient); color: #fff; border-color: transparent; }
.story__art {
  display: block;
  height: 84px;
  margin-bottom: 18px;
  border-radius: var(--r-md);
  background: var(--gradient);
  opacity: 0.9;
}

/* Fallback mode: native horizontal swipe with snap */
.story--fallback .story__viewport {
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 12px;
}
.story--fallback .story__rail { transform: none !important; }
.story--fallback .story__panel { scroll-snap-align: center; }

/* =============================================================== FORM ==== */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 7px; }
.field label { font-size: 0.86rem; font-weight: 600; }
.field input,
.field textarea {
  width: 100%;
  padding: 13px 15px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-strong);
  background: var(--card-2);
  color: var(--text);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  transition: border-color var(--t-fast) var(--ease),
              background-color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--muted); }
.field input:focus,
.field textarea:focus {
  border-color: var(--ocean);
  background: var(--card-solid);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.field textarea { min-height: 148px; resize: vertical; }
.field__error { font-size: 0.8rem; color: var(--down); min-height: 1.1em; }

.form__status {
  padding: 14px 16px;
  border-radius: var(--r-md);
  /* Mint: this only ever shows on success. */
  border: 1px solid rgba(43, 196, 138, 0.45);
  background: rgba(43, 196, 138, 0.13);
  font-size: 0.9rem;
}
.form__status[hidden] { display: none; }

/* ========================================================== DOWNLOAD ==== */
.dl-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: center;
  align-items: center;
}
.dl-card__meta {
  display: flex;
  gap: 8px 14px;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--muted);
}
.dl-card .btn { width: 100%; }

/* ============================================================== LOADER == */
.loader {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  place-items: center;
  /* Solid, and the same pale blue as the page, so the splash does not
     flash a different colour before the sky fades in behind it. */
  background: var(--bg);
  transition: opacity 0.6s var(--ease), visibility 0.6s;
}
.loader.is-done { opacity: 0; visibility: hidden; pointer-events: none; }

.loader__inner { display: grid; justify-items: center; gap: 14px; width: min(240px, 72vw); }
.loader__logo {
  width: 62px; height: 62px;
  animation: loaderFloat 2.6s var(--ease) infinite;
}
@keyframes loaderFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-8px) rotate(6deg); }
}
.loader__word {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.loader__bar {
  width: 100%;
  height: 4px;
  border-radius: 4px;
  background: var(--border-strong);
  overflow: hidden;
}
.loader__bar i {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: 4px;
  background: var(--gradient);
  transition: width 0.25s var(--ease);
}
.loader__msg { margin: 0; font-size: 0.78rem; color: var(--muted); }

/* ============================================================== MISC ==== */
.divider { height: 1px; background: var(--border); border: 0; margin-block: clamp(32px, 5vw, 56px); }

.callout {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: var(--gradient);
  box-shadow: 0 30px 60px -26px rgba(47, 107, 246, 0.55);
  color: #fff;
  padding: clamp(28px, 5vw, 56px);
  text-align: center;
}
.callout h2 { color: #fff; }
.callout p { color: rgba(255, 255, 255, 0.85); margin-inline: auto; max-width: 52ch; }
/* On the gradient panel the ocean button would disappear, so the primary
   CTA inverts: white pill, ocean text. */
.callout .btn--primary {
  background: #FFFFFF;
  color: var(--ocean-deep);
  box-shadow: 0 14px 30px -10px rgba(10, 25, 60, 0.38);
}
.callout .btn--ghost {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.42);
  color: #fff;
}
.callout .btn--ghost:hover { border-color: #fff; color: #fff; }
.callout__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 24px; }

/* Side-by-side comparison panels (custodial vs self-custody) */
.compare { display: grid; gap: 18px; }
@media (min-width: 820px) { .compare { grid-template-columns: repeat(2, 1fr); } }
.compare .card { display: flex; flex-direction: column; }
.compare .card header { margin-bottom: 6px; }
.compare__tag {
  align-self: flex-start;
  margin-bottom: 14px;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--accent-soft);
  border: 1px solid rgba(47, 107, 246, 0.26);
  color: var(--accent-text);
}

/* FAQ / details */
.faq { display: grid; gap: 10px; }
.faq details {
  border: 1px solid var(--glass-border);
  border-radius: var(--r-md);
  background: var(--card);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: var(--shadow-sm);
  padding: 2px 20px;
}
.faq summary {
  padding: 16px 0;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  color: var(--accent-text);
  font-size: 1.3rem;
  line-height: 1;
}
.faq details[open] summary::after { content: '–'; }
.faq details p { color: var(--muted); margin: 0 0 16px; }

/* ------------------------------------------------- WebGL-less fallback ---
   If a device cannot give us a WebGL context, three/core.js adds .no-webgl
   to the stage. We hide the canvas and show a gradient orb instead, so the
   layout never collapses.                                                */
.stage.no-webgl canvas { display: none; }
.stage.no-webgl { display: grid; place-items: center; }
.stage.no-webgl::after {
  content: '';
  width: 72%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--gradient);
  filter: blur(2px);
  box-shadow: 0 40px 80px -30px rgba(47, 107, 246, 0.6);
  opacity: 0.92;
}
.stage.no-webgl .stage__hint { display: none; }

.loader[hidden] { display: none; }

/* After dark the mint needs lifting or it sinks into the navy. */
html[data-theme="dark"] .ticks li::before {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2343D39B' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>");
  border-color: rgba(67, 211, 155, 0.5);
}

/* Two-up price pills on phones; a single wrapping row from 560px up. */
.ticker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ticker__item { justify-content: space-between; }
@media (min-width: 560px) {
  .ticker { display: flex; flex-wrap: wrap; }
  .ticker__item { justify-content: flex-start; }
}

/* Private test notice, fixed to the bottom of every page (added by js/include.js). */
.test-banner {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 900;
  margin: 0;
  padding: 8px 16px;
  text-align: center;
  font-size: .8rem;
  line-height: 1.35;
  font-weight: 600;
  color: #3D1E10;
  background: #FFD9C7;
  border-top: 1px solid #F2B79B;
}
.has-test-banner { padding-bottom: 56px; }
