/* Fortunest — product site. Pure white, light airy type (Outfit,
   self-hosted variable font), thin display titles, one accent (#2a78d6 —
   the app's --series-1), hairline grids. Hero centerpiece: the app's
   CSS-3D CRT logo, scaled up via the --s factor. */

@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/outfit-latin.woff2') format('woff2');
}

:root {
  --ink: #63625e;
  --body: #8d8c87;
  --muted: #a3a29d;
  --accent: #2a78d6;
  --hairline: rgba(11, 11, 11, 0.08);
  --wash: rgba(11, 11, 11, 0.03);
  --grey-line: #c9c8c3;
  --font: 'Outfit', -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: #fff;
  color: var(--body);
  font-family: var(--font);
  font-size: 16.5px;
  font-weight: 250;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--ink); font-weight: 350; letter-spacing: -0.01em; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; background: var(--wash); padding: 1px 5px; border-radius: 4px; font-weight: 400; }
strong { font-weight: 450; }

.accent { color: var(--accent); }

/* Display titles: large, feather-light, tracked slightly tight. */
.display-t {
  color: #6c6b67;
  font-weight: 175;
  letter-spacing: -0.015em;
  line-height: 1.04;
}

.section-inner { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner {
  max-width: 1080px; margin: 0 auto; padding: 0 24px;
  height: 62px; display: flex; align-items: center; gap: 24px;
}
.brand { display: inline-flex; align-items: baseline; gap: 0; font-size: 17px; font-weight: 450; color: var(--ink); letter-spacing: -0.02em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand.small { font-size: 15px; }
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a { color: var(--body); font-size: 13.5px; font-weight: 300; }
.nav-links a:hover { color: var(--ink); text-decoration: none; }
/* The nav's two right-aligned CTAs: create-account / buy-Pro next to Open the
   app. Whichever sits first still gets pushed right by .nav-links' auto margin. */
.nav-cta { display: flex; align-items: center; gap: 10px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block; border-radius: 999px; font-size: 15px; font-weight: 550;
  padding: 11px 26px; line-height: 1.2; transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #2265b8; }
.btn-ghost { color: var(--ink); border: 1px solid var(--grey-line); font-weight: 450; }
.btn-ghost:hover { border-color: var(--ink); }
.btn-small { padding: 7px 16px; font-size: 13.5px; }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 96px 24px 0; }
.hero-copy { max-width: 980px; margin: 0 auto; }
.hero h1 { font-size: clamp(46px, 7.4vw, 92px); }
.hero .sub { margin: 26px auto 0; max-width: 640px; font-size: 18.5px; font-weight: 300; color: var(--body); }
.cta-row { margin-top: 36px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.fineprint { margin-top: 16px; font-size: 13px; font-weight: 300; color: var(--muted); }

/* the app's 3D logo, right below the CTAs */
.hero-logo { display: flex; justify-content: center; padding: 40px 0 8px; overflow: hidden; }
.hero-logo .lg { --s: 4.2; }
@media (max-width: 900px) { .hero-logo .lg { --s: 3.5; } .hero-logo { padding: 34px 0 6px; } }
@media (max-width: 640px) { .hero-logo .lg { --s: 2.6; } .hero-logo { padding: 28px 0 4px; } }

/* ---------- product mock ---------- */
.product { padding: 8px 0 48px; }
.browser-frame {
  border: 1px solid var(--hairline); border-radius: 12px; overflow: hidden;
  box-shadow: 0 24px 60px -30px rgba(11, 11, 11, 0.25);
  background: #fff;
}
.bf-chrome {
  display: flex; align-items: center; gap: 6px; padding: 10px 14px;
  border-bottom: 1px solid var(--hairline); background: #fafaf9;
}
.bf-dot { width: 10px; height: 10px; border-radius: 50%; background: #e0dfdb; display: inline-block; }
.bf-url {
  margin: 0 auto; font-size: 12px; color: var(--muted);
  background: #fff; border: 1px solid var(--hairline); border-radius: 6px; padding: 3px 40px;
}
.bf-body { display: flex; }
.bf-main { flex: 1 1 auto; padding: 18px 20px 20px; min-width: 0; }
.bf-topbar { display: flex; align-items: baseline; gap: 22px; padding-bottom: 14px; }
.bf-brand { font-weight: 700; font-size: 14px; color: var(--ink); }
.bf-tabs { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); }
.bf-tabs .on { color: var(--ink); font-weight: 600; border-bottom: 2px solid var(--accent); padding-bottom: 2px; }
.bf-tiles { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 10px; }
.bf-tile {
  border: 1px solid var(--hairline); border-radius: 10px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 3px; background: #fff;
}
.bf-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.bf-big { font-size: 22px; font-weight: 700; color: var(--ink); letter-spacing: -0.02em; }
.bf-delta { font-size: 12px; color: var(--muted); }
.bf-delta.up { color: #0a7a3c; }
.bf-donut { width: 40px; height: 40px; }
.bf-chart { margin-top: 10px; border: 1px solid var(--hairline); border-radius: 10px; padding: 12px 14px 10px; }
.bf-chart svg { display: block; width: 100%; height: 150px; margin-top: 8px; }
.bf-grid { stroke: rgba(11, 11, 11, 0.05); stroke-width: 1; }
.bf-line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.bf-bench { fill: none; stroke: var(--grey-line); stroke-width: 1.8; stroke-dasharray: 5 4; stroke-linejoin: round; }
.bf-fill { fill: rgba(42, 120, 214, 0.06); stroke: none; }
.bf-legend { display: flex; gap: 16px; align-items: center; font-size: 12px; color: var(--muted); margin-top: 8px; }
.sw { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.sw-acc { background: var(--accent); }
.sw-grey { background: var(--grey-line); }
.bf-ranges { margin-left: auto; }

.bf-chat {
  flex: 0 0 240px; border-left: 1px solid var(--hairline); background: #fbfbfa;
  padding: 14px; display: flex; flex-direction: column; gap: 10px;
}
.bf-chat-head { font-size: 12px; font-weight: 650; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: #17a854; display: inline-block; }
.bf-msg { font-size: 12px; line-height: 1.5; border-radius: 10px; padding: 8px 10px; }
.bf-msg.user { background: rgba(42, 120, 214, 0.09); color: var(--ink); align-self: flex-end; max-width: 92%; }
.bf-msg.ai { background: #fff; border: 1px solid var(--hairline); color: var(--body); }
.chip {
  display: inline-block; font-size: 11px; font-weight: 650; color: var(--accent);
  background: rgba(42, 120, 214, 0.09); border-radius: 5px; padding: 0 5px;
}
.bf-suggest { font-size: 11.5px; color: var(--muted); margin-top: auto; }
.product-note { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 14px; }

/* ---------- sections ---------- */
.section { padding: 96px 0; border-top: 1px solid var(--hairline); }
.section h2 { font-size: clamp(38px, 5.5vw, 64px); }
.section-sub { margin-top: 18px; max-width: 640px; font-size: 17px; font-weight: 300; }

.group-title {
  margin: 64px 0 0; display: flex; align-items: baseline; gap: 16px;
  scroll-margin-top: 80px;
}
.gt-num {
  font-size: clamp(40px, 5vw, 56px); font-weight: 150; line-height: 1;
  color: #b3b2ae; letter-spacing: 0;
}
.gt-label {
  font-size: 13px; font-weight: 400; text-transform: uppercase;
  letter-spacing: 0.16em; color: var(--muted);
}

/* hairline feature grid — 1px rules, no boxes */
.grid {
  margin-top: 22px; display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 1px; background: var(--hairline); border: 1px solid var(--hairline);
}
.card { background: #fff; padding: 24px 26px; }
.card h4 { font-size: 15px; font-weight: 450; color: #757470; margin-bottom: 7px; }
.card p { font-size: 13.5px; font-weight: 250; line-height: 1.6; }

/* ---------- scenarios carousel ----------
   Three level tabs, each a horizontally scrollable, snap-aligned track of
   scenario cards. Every card opens with a small imagined-GUI vignette built
   from the same mock vocabulary as the product illustration above (hairline
   tiles, the accent line chart, ticker chips) — stylized, not screenshots. */
.sc-head { margin-top: 40px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.sc-tabs { display: flex; gap: 4px; border: 1px solid var(--hairline); border-radius: 999px; padding: 4px; background: #fbfbfa; }
.sc-tab {
  border: none; background: none; font: 400 13.5px var(--font); color: var(--body);
  padding: 7px 18px; border-radius: 999px; cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.sc-tab:hover { color: var(--ink); }
.sc-tab.on { background: #fff; color: var(--ink); font-weight: 500; box-shadow: 0 1px 4px rgba(11, 11, 11, 0.08); }
.sc-arrows { margin-left: auto; display: flex; gap: 8px; }
.sc-arrow {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--grey-line);
  background: #fff; color: var(--ink); font-size: 15px; line-height: 1; cursor: pointer;
  transition: border-color 0.15s, opacity 0.15s;
}
.sc-arrow:hover { border-color: var(--ink); }
.sc-arrow:disabled { opacity: 0.35; cursor: default; border-color: var(--grey-line); }

.sc-panel { display: none; margin-top: 22px; }
.sc-panel.on { display: block; }
.sc-track {
  display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 14px;
  scroll-snap-type: x mandatory; scrollbar-width: thin;
}
.sc-card {
  flex: 0 0 300px; scroll-snap-align: start;
  border: 1px solid var(--hairline); border-radius: 12px; background: #fff;
  overflow: hidden; display: flex; flex-direction: column;
}
.sc-card h4 { font-size: 14px; font-weight: 450; color: #757470; margin: 0 0 6px; line-height: 1.45; }
.sc-card .sc-copy { padding: 16px 18px 18px; }
.sc-card p { font-size: 12.5px; font-weight: 250; line-height: 1.6; }

/* vignette canvas + primitives */
.sc-fig {
  height: 132px; flex: none; border-bottom: 1px solid var(--hairline); background: #fbfbfa;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 6px;
  justify-content: center; overflow: hidden; font-size: 11px; color: var(--muted);
}
.sc-fig svg { display: block; width: 100%; }
.sc-frow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sc-file {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10.5px;
  color: var(--ink); background: #fff; border: 1px solid var(--hairline);
  border-radius: 6px; padding: 2px 7px;
}
.sc-arrowglyph { color: var(--grey-line); font-size: 13px; }
.sc-tile {
  background: #fff; border: 1px solid var(--hairline); border-radius: 8px;
  padding: 7px 10px; display: flex; flex-direction: column; gap: 1px; min-width: 0;
}
.sc-tile .l { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); white-space: nowrap; }
.sc-tile .v { font-size: 14.5px; font-weight: 650; color: var(--ink); letter-spacing: -0.01em; white-space: nowrap; }
.sc-tile .v.up { color: #0a7a3c; }
.sc-pill {
  display: inline-flex; align-items: center; gap: 5px; background: #fff;
  border: 1px solid var(--hairline); border-radius: 999px; padding: 3px 9px;
  font-size: 10.5px; color: var(--body); white-space: nowrap;
}
.sc-pill .up { color: #0a7a3c; font-weight: 600; }
.sc-pill .dn { color: #b0433a; font-weight: 600; }
.sc-row {
  display: flex; align-items: center; gap: 7px; background: #fff;
  border: 1px solid var(--hairline); border-radius: 7px; padding: 4px 9px;
  font-size: 10.5px; color: var(--body); white-space: nowrap; overflow: hidden;
}
.sc-row .tick { color: #0a7a3c; font-weight: 700; }
.sc-row .r { margin-left: auto; color: var(--muted); }
.sc-row .strong { color: var(--ink); font-weight: 550; }
.sc-gauge { height: 6px; border-radius: 3px; background: var(--wash); overflow: hidden; }
.sc-gauge i { display: block; height: 100%; border-radius: 3px; background: var(--accent); }
.sc-bars { display: flex; align-items: flex-end; gap: 4px; height: 52px; }
.sc-bars i { flex: 1; background: rgba(42, 120, 214, 0.35); border-radius: 3px 3px 0 0; }
.sc-bars i.hi { background: var(--accent); }
.sc-seg { display: inline-flex; border: 1px solid var(--hairline); border-radius: 7px; overflow: hidden; background: #fff; }
.sc-seg span { padding: 3px 10px; font-size: 10.5px; color: var(--muted); }
.sc-seg span.on { background: rgba(42, 120, 214, 0.09); color: var(--accent); font-weight: 600; }
.sc-msg { font-size: 10.5px; line-height: 1.45; border-radius: 9px; padding: 6px 9px; max-width: 95%; }
.sc-msg.user { background: rgba(42, 120, 214, 0.09); color: var(--ink); align-self: flex-end; }
.sc-msg.ai { background: #fff; border: 1px solid var(--hairline); color: var(--body); align-self: flex-start; }
.sc-term {
  background: #fbfbfa; border: 1px solid var(--hairline); border-radius: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 10.5px;
  line-height: 1.7; padding: 8px 11px; color: var(--ink);
}
.sc-mark { fill: #0a7a3c; }
.sc-mark.sell { fill: #b0433a; }
.sc-avg { stroke: var(--grey-line); stroke-width: 1.2; stroke-dasharray: 3 3; }
.sc-goal { stroke: #0a7a3c; stroke-width: 1.2; stroke-dasharray: 5 3; }
.sc-under { fill: rgba(176, 67, 58, 0.12); stroke: none; }
.sc-dd { fill: none; stroke: #b0433a; stroke-width: 1.8; }
.sc-line2 { fill: none; stroke: #9db8d6; stroke-width: 1.8; }
.sc-line3 { fill: none; stroke: var(--grey-line); stroke-width: 1.6; }
.sc-svg-label { font: 500 8.5px var(--font); fill: var(--muted); }
.sc-note { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 6px; }

@media (max-width: 640px) {
  .sc-card { flex-basis: min(280px, 82vw); }
  .sc-arrows { display: none; }
  .sc-head { margin-top: 28px; }
}

/* ---------- privacy ---------- */
.section-privacy { background: #fbfbfa; }
.privacy-grid { margin-top: 40px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.p-item h4 { font-size: 15px; font-weight: 450; color: #757470; margin-bottom: 8px; padding-top: 14px; border-top: 2px solid var(--accent); }
.p-item p { font-size: 13.5px; font-weight: 250; }

/* ---------- comparison table ---------- */
.table-wrap { margin-top: 36px; overflow-x: auto; }
.compare { border-collapse: collapse; width: 100%; min-width: 640px; font-size: 14px; font-weight: 250; }
.compare th, .compare td { padding: 12px 14px; text-align: center; border-bottom: 1px solid var(--hairline); }
.compare td:first-child, .compare th:first-child { text-align: left; color: #757470; font-weight: 350; }
.compare thead th { font-size: 13px; color: var(--muted); font-weight: 400; vertical-align: bottom; }
.compare thead th.pd-col { color: var(--ink); font-weight: 550; }
.compare td.pd-col { background: rgba(42, 120, 214, 0.05); }
.yes { color: var(--accent); font-weight: 700; }
.no { color: #b9b8b5; }
.part { color: var(--muted); font-size: 12.5px; }
.footnote { margin-top: 14px; font-size: 12.5px; font-weight: 350; color: var(--muted); max-width: 640px; }

/* ---------- local ---------- */
.badge-soon {
  display: inline-block; vertical-align: middle; margin-left: 14px;
  font-size: 12px; font-weight: 650; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--accent); background: rgba(42, 120, 214, 0.1);
  border: 1px solid rgba(42, 120, 214, 0.35); border-radius: 999px; padding: 4px 12px;
}
.local-grid { margin-top: 36px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; }
.ticks { list-style: none; }
.ticks li { padding: 8px 0 8px 28px; position: relative; font-size: 15px; font-weight: 250; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.terminal { border: 1px solid var(--hairline); border-radius: 12px; overflow: hidden; background: #fbfbfa; }
.term-chrome { display: flex; gap: 6px; padding: 10px 14px; border-bottom: 1px solid var(--hairline); }
.terminal pre {
  padding: 16px 18px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12.5px; line-height: 1.7; color: var(--ink); overflow-x: auto;
}
.t-dim { color: var(--muted); }
.t-prompt { color: var(--accent); font-weight: 700; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--hairline); padding: 44px 0 28px; }
.footer-inner { display: flex; justify-content: space-between; gap: 32px; padding-bottom: 24px; }
.footer-inner .fineprint { max-width: 420px; margin-top: 8px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: var(--body); font-size: 14px; font-weight: 300; }
.footer-links a:hover { color: var(--ink); }

/* ---------- scroll reveal ---------- */
[data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 0.55s ease, transform 0.55s ease; }
[data-reveal].on { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .privacy-grid { grid-template-columns: repeat(2, 1fr); }
  .local-grid { grid-template-columns: 1fr; gap: 24px; }
  .bf-chat { display: none; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .nav-inner { gap: 12px; justify-content: space-between; }
  /* Keep only "Open the app" in the crowded mobile nav bar — the create-account
     / Get-Pro CTA still rides the hero and footer. */
  .nav-cta .btn-ghost { display: none; }
  .grid { grid-template-columns: 1fr; }
  .privacy-grid { grid-template-columns: 1fr; gap: 20px; }
  .bf-tiles { grid-template-columns: 1fr 1fr; }
  .bf-tile:first-child { grid-column: 1 / -1; }
  .hero { padding-top: 64px; }
  .section { padding: 64px 0; }
  .badge-soon { margin-left: 0; margin-top: 10px; display: inline-block; }
}

/* =====================================================================
   The Fortunest logo, ported from the app (frontend theme.css):
   a nest egg in the literal sense — a bird's nest (a shallow bowl of
   interwoven wireframe strands) cradling a thick spinning coin cycling
   the currencies it might hold ($ → € → ₿ → gold), through a soft CRT
   filter. Every length is multiplied by the --s scale factor so the
   same markup renders from nav size (0.62) to hero size (5.6+).
   ===================================================================== */
.lg {
  --s: 1;
  width: calc(var(--s) * 74px); height: calc(var(--s) * 58px);
  position: relative; perspective: calc(var(--s) * 250px);
  display: inline-block; flex: none;
}
.lg .obj { position: absolute; inset: 0; transform-style: preserve-3d; }
.lg .coin, .lg .face, .lg .cl, .lg .nest, .lg .ns, .lg .sym { position: absolute; }

/* the whole arrangement seen from an angle */
.lg .obj { animation: lg-sway 5s ease-in-out infinite alternate; }
@keyframes lg-sway {
  from { transform: rotateX(22deg) rotateY(-34deg); }
  to   { transform: rotateX(16deg) rotateY(-16deg); }
}
/* The bird's nest: a shallow bowl of interwoven strands, each strand one
   elliptical wireframe loop laid (near-)flat in the object's 3D space.
   The two lip loops are complete ellipses (the nest's opening; the second
   wobbles off level so the lip reads woven); every lower coil hides its
   REAR arc by blanking border-top — a border-radius:50% ring is four
   quadrant arcs, one per border side, and after rotateX(90°) the top
   quadrant faces away. (Not clip-path: that is a grouping property, and
   Chromium flattening a 3D-transformed stroke shreds it into dashes.)
   The coin sits in the z≈0 plane through the middle, so preserve-3d
   slices each loop at the coin: front arcs paint over the coin's lower
   half, rear arcs behind it — the "nested" read is real 3D sorting. */
.lg .nest {
  left: calc(var(--s) * 9px); top: calc(var(--s) * 22px);
  width: calc(var(--s) * 54px); height: calc(var(--s) * 24px);
  transform-style: preserve-3d;
}
.lg .ns {
  left: 50%; top: 50%;
  border: calc(var(--s) * 0.75px) solid rgba(25, 25, 30, 0.85);
  border-radius: 50%;
  /* strands sit back a step from the coin's full ink, so the coin (the
     nest egg) stays the focal point inside the weave */
  opacity: 0.85;
}
.lg .n1 { width: calc(var(--s) * 48px); height: calc(var(--s) * 46px); transform: translate(-50%, -50%) translateY(calc(var(--s) * -9.5px)) rotateX(90deg); }
.lg .n2 { width: calc(var(--s) * 44px); height: calc(var(--s) * 41px); transform: translate(-50%, -50%) translateY(calc(var(--s) * -7px)) rotateZ(18deg) rotateX(93deg); }
.lg .n3 { width: calc(var(--s) * 41px); height: calc(var(--s) * 39px); transform: translate(-50%, -50%) translateY(calc(var(--s) * -3.5px)) rotateZ(-10deg) rotateX(88.5deg); }
.lg .n4 { width: calc(var(--s) * 34px); height: calc(var(--s) * 32px); transform: translate(-50%, -50%) translateY(calc(var(--s) * 1.5px)) rotateZ(15deg) rotateX(92deg); }
.lg .n5 { width: calc(var(--s) * 25px); height: calc(var(--s) * 23px); transform: translate(-50%, -50%) translateY(calc(var(--s) * 5px)) rotateZ(-8deg) rotateX(89deg); }
.lg .n6 { width: calc(var(--s) * 13px); height: calc(var(--s) * 11px); transform: translate(-50%, -50%) translateY(calc(var(--s) * 7.5px)) rotateX(90deg); }
/* staggered coil ends: each lower arc also loses one side quadrant, so
   neighbouring arcs overlap brick-fashion instead of stacking their
   upturned C-hooks in the same spot */
.lg .n3, .lg .n4, .lg .n5, .lg .n6 { border-top-color: transparent; }
.lg .n4 { border-left-color: transparent; }
.lg .n5 { border-right-color: transparent; }
.lg .n6 { border-left-color: transparent; border-right-color: transparent; }

/* Twigs: straight stray ends poking out of the weave at the rim — same
   transform chain as a loop (height, azimuth, lie flat), then translateX
   pushes each out along its own radius; a final rotateZ knocks it
   off-radial. The ::after fork flattens into the twig's plane. */
.lg .tw {
  position: absolute; left: 50%; top: 50%;
  width: calc(var(--s) * 9px); height: 0;
  border-top: calc(var(--s) * 0.65px) solid rgba(25, 25, 30, 0.85);
  opacity: 0.85;
}
.lg .tw::after {
  content: ''; position: absolute; left: 55%; top: calc(var(--s) * -0.65px);
  width: calc(var(--s) * 5px); height: 0;
  border-top: calc(var(--s) * 0.55px) solid rgba(25, 25, 30, 0.85);
  transform: rotateZ(-32deg); transform-origin: left center;
}
.lg .t1 { transform: translate(-50%, -50%) translateY(calc(var(--s) * -7.5px)) rotateZ(18deg)  rotateX(88deg) translateX(calc(var(--s) * 21px)) rotateZ(10deg); }
.lg .t2 { transform: translate(-50%, -50%) translateY(calc(var(--s) * -8px))   rotateZ(75deg)  rotateX(91deg) translateX(calc(var(--s) * 20px)) rotateZ(-14deg); width: calc(var(--s) * 11px); }
.lg .t3 { transform: translate(-50%, -50%) translateY(calc(var(--s) * -8px))   rotateZ(142deg) rotateX(89deg) translateX(calc(var(--s) * 22px)) rotateZ(6deg); }
.lg .t4 { transform: translate(-50%, -50%) translateY(calc(var(--s) * -7.5px)) rotateZ(198deg) rotateX(92deg) translateX(calc(var(--s) * 19px)) rotateZ(-9deg); width: calc(var(--s) * 8px); }
.lg .t5 { transform: translate(-50%, -50%) translateY(calc(var(--s) * -6.5px)) rotateZ(251deg) rotateX(88deg) translateX(calc(var(--s) * 21px)) rotateZ(12deg); width: calc(var(--s) * 10px); }
.lg .t6 { transform: translate(-50%, -50%) translateY(calc(var(--s) * -7px))   rotateZ(311deg) rotateX(90deg) translateX(calc(var(--s) * 22px)) rotateZ(-7deg); }
.lg .t2::after { transform: rotateZ(28deg); }
.lg .t5::after { transform: rotateZ(30deg); left: 45%; }

/* thick spinning coin, nestled: lowered so its lower edge dips inside the
   nest's rim plane (rim at object-y 26; coin bottom at -1 + 34 = 33) */
.lg .coin {
  width: calc(var(--s) * 34px); height: calc(var(--s) * 34px);
  top: calc(var(--s) * 1.5px); left: calc(var(--s) * 19px);
  transform-style: preserve-3d;
  animation: lg-coin 4s linear infinite;
}
@keyframes lg-coin {
  from { transform: rotateY(0deg); }
  to   { transform: rotateY(360deg); }
}
/* the coin's cylindrical edge — segments injected by main.js, each
   rotateZ(θ) translateY(-R) rotateX(90°), shaded by angle */
.lg .rim {
  position: absolute; left: 50%; top: 50%;
  width: calc(var(--s) * 4.4px); height: calc(var(--s) * 4px);
  margin-left: calc(var(--s) * -2.2px); margin-top: calc(var(--s) * -2px);
  background: linear-gradient(180deg, #d3d4d9, #b4b5bc 55%, #a6a7af);
  border-top: calc(var(--s) * 0.5px) solid rgba(25, 25, 30, 0.8);
  border-bottom: calc(var(--s) * 0.5px) solid rgba(25, 25, 30, 0.8);
}
.lg .face {
  inset: 0; border-radius: 50%; backface-visibility: hidden;
  display: flex; align-items: center; justify-content: center;
  font: 350 calc(var(--s) * 18px)/1 var(--font);
  background: radial-gradient(circle at 35% 30%, #dddee2, #bcbdc5);
  border: calc(var(--s) * 0.5px) solid rgba(25, 25, 30, 0.85);
  box-shadow: 0 0 calc(var(--s) * 2.5px) rgba(20, 20, 25, 0.12),
    inset 0 0 0 calc(var(--s) * 1.6px) rgba(255, 255, 255, 0.55),
    inset 0 0 calc(var(--s) * 3px) rgba(20, 20, 25, 0.1);
}
.lg .fa { transform: translateZ(calc(var(--s) * 2px)); }
.lg .fb { transform: rotateY(180deg) translateZ(calc(var(--s) * 2px)); }
/* Coin spins in 4s; symbols swap while the face is edge-on, giving an 8s
   $ → € → ₿ → gold cycle. Front face is edge-on at t=1,3,5,7; back at t=0,4. */
.lg .sym {
  inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.lg .fa .s1 { animation: lg-symA 8s linear infinite; }
.lg .fa .s2 { animation: lg-symB 8s linear infinite; }
.lg .fb .s1 { animation: lg-symC 8s linear infinite; }
.lg .fb .s2 { animation: lg-symD 8s linear infinite; }
@keyframes lg-symA { 0%, 24.9% { opacity: 1; } 25%, 74.9% { opacity: 0; } 75%, 100% { opacity: 1; } }
@keyframes lg-symB { 0%, 24.9% { opacity: 0; } 25%, 74.9% { opacity: 1; } 75%, 100% { opacity: 0; } }
@keyframes lg-symC { 0%, 49.9% { opacity: 1; } 50%, 99.9% { opacity: 0; } 100% { opacity: 1; } }
@keyframes lg-symD { 0%, 49.9% { opacity: 0; } 50%, 99.9% { opacity: 1; } 100% { opacity: 0; } }
.lg .s-usd, .lg .s-eur, .lg .s-btc { color: #3c3c42; }
.lg .ingot {
  width: calc(var(--s) * 17px); height: calc(var(--s) * 8.5px);
  clip-path: polygon(18% 0, 82% 0, 100% 100%, 0 100%);
  background: linear-gradient(180deg, #d8d9dd, #b6b7bf);
  filter: drop-shadow(0 0 calc(var(--s) * 0.4px) rgba(25, 25, 30, 0.9));
}
/* Soft CRT treatment, desaturated for the site: greyscale, light
   soft-focus, subtle (now grey) fringing, faint scanlines fading out
   toward the edges, occasional gentle brightness flicker. */
.lg {
  filter: blur(calc(var(--s) * 0.1px))
    drop-shadow(calc(var(--s) * 0.22px) 0 rgba(255, 60, 130, 0.32))
    drop-shadow(calc(var(--s) * -0.22px) 0 rgba(0, 229, 255, 0.32))
    grayscale(1) brightness(1.25) opacity(0.45);
  animation: lg-crt 4.6s steps(1, end) infinite;
}
/* specular glint sweeping across the coin once per revolution */
.lg::before {
  content: ''; position: absolute; z-index: 4; pointer-events: none;
  width: calc(var(--s) * 34px); height: calc(var(--s) * 34px);
  left: calc(var(--s) * 19px); top: calc(var(--s) * -1px); border-radius: 50%;
  background: linear-gradient(295deg,
    transparent 34%, rgba(255, 255, 255, 0.65) 50%, transparent 66%);
  background-size: 320% 320%;
  background-position: -30% -30%;
  opacity: 0;
  /* half the coin's 4s spin → one pass per face, bottom-right to top-left */
  animation: lg-glint 2s linear infinite;
}
@keyframes lg-glint {
  0%, 12% { opacity: 0; background-position: -30% -30%; }
  20% { opacity: 0.5; }
  32% { opacity: 0.55; background-position: 70% 70%; }
  44% { opacity: 0; background-position: 130% 130%; }
  100% { opacity: 0; background-position: 130% 130%; }
}
.lg::after {
  content: ''; position: absolute; inset: calc(var(--s) * -4px);
  z-index: 3; pointer-events: none;
  background: repeating-linear-gradient(0deg,
    rgba(12, 8, 32, 0.12) 0 calc(var(--s) * 0.4px),
    transparent calc(var(--s) * 0.4px) calc(var(--s) * 1.2px));
  -webkit-mask-image: radial-gradient(ellipse 62% 62% at 50% 50%,
    rgba(0, 0, 0, 1) 35%, rgba(0, 0, 0, 0) 100%);
  mask-image: radial-gradient(ellipse 62% 62% at 50% 50%,
    rgba(0, 0, 0, 1) 35%, rgba(0, 0, 0, 0) 100%);
}
@keyframes lg-crt {
  0% { opacity: 1; } 11% { opacity: 0.86; } 13% { opacity: 1; }
  47% { opacity: 0.93; } 49% { opacity: 1; }
  73% { opacity: 0.82; } 75% { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .lg, .lg .obj, .lg .coin, .lg .sym, .lg::before { animation: none; }
  .lg .s2, .lg::before { opacity: 0; }
  .lg .obj { transform: rotateX(20deg) rotateY(-26deg); }
}

