/* fambeta front page. Single dark theme: black / ash / gray, steel accent. */
:root {
  color-scheme: dark;
  --bg: #0a0b0d; --surface: #131517; --ash: #1b1e22; --ash-2: #23272c; --ash-3: #2b3036;
  --line: #2a2e34; --line-soft: #1e2226;
  --fg: #eceef0; --fg-2: #b6bbc3; --muted: #7f8791;
  --accent: #a4c0ea; --accent-ink: #0a0b0d;
  --series-1: #4f8fe0; --series-1b: #7fb7ff;
  --good: #199e70; --good-fg: #6fd3a8; --good-bg: rgba(25,158,112,.14);
  --bad-fg: #f08b8b; --bad-bg: rgba(230,103,103,.14);
  --font-ui: "Instrument Sans", "Segoe UI", system-ui, sans-serif;
  --font-data: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(.2,.7,.2,1); --spring: cubic-bezier(.34,1.4,.4,1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg); font: 15px/1.55 var(--font-ui);
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px);
  background-image:
    radial-gradient(1100px 500px at 8% -12%, rgba(111,159,230,.12), transparent 60%),
    radial-gradient(800px 420px at 100% 0%, rgba(79,143,224,.06), transparent 60%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.012) 0 1px, transparent 1px 48px),
    repeating-linear-gradient(90deg, rgba(255,255,255,.012) 0 1px, transparent 1px 48px);
  background-attachment: fixed;
}
.defs { position: absolute; }
.wrap { max-width: 1520px; margin: 0 auto; padding-inline: 16px; }
main.wrap { padding-block: 0 24px; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
button { font: inherit; }
[hidden] { display: none !important; }

/* top bar */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; margin-bottom: 22px;
  background: linear-gradient(to bottom, rgba(13,14,17,.98), rgba(10,11,13,.9));
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft); box-shadow: 0 10px 30px -24px rgba(0,0,0,1); }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: linear-gradient(90deg, transparent, rgba(164,192,234,.35), transparent); }
.top { max-width: 1520px; margin: 0 auto; padding-inline: 16px; padding-block: 10px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; color: inherit; text-decoration: none; }
.logo { width: 40px; height: 40px; flex: none; filter: drop-shadow(0 6px 14px rgba(111,159,230,.25)); transition: transform .5s var(--spring); }
.brand:hover .logo { transform: rotate(-6deg) scale(1.04); }
.wordmark { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.wordmark .fam { font-size: .66rem; letter-spacing: .24em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.wordmark .h1 { font-size: 1.02rem; font-weight: 600; white-space: nowrap; letter-spacing: -.005em; }
.right { display: flex; align-items: center; gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 500; min-height: 40px; padding: 0 16px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line-soft); background: var(--ash); color: var(--fg-2); text-decoration: none;
  transition: background .2s var(--ease), color .2s var(--ease), transform .15s var(--ease), border-color .2s, box-shadow .2s; }
.btn:hover { background: var(--ash-2); color: var(--fg); border-color: var(--line); }
.btn:active { transform: translateY(1px) scale(.98); }
.btn.primary { background: linear-gradient(180deg, #b5cdf3, var(--accent)); color: var(--accent-ink); border-color: transparent; box-shadow: 0 8px 20px -10px rgba(164,192,234,.6); }
.btn.primary:hover { background: linear-gradient(180deg, #c8dbf7, #b2caf0); color: var(--accent-ink); }
.btn[disabled] { opacity: .6; pointer-events: none; }
.lang { display: inline-flex; border: 1px solid var(--line-soft); border-radius: 10px; overflow: hidden; background: var(--ash); }
.lang button { background: none; border: 0; color: var(--muted); padding: 0 10px; min-height: 40px; cursor: pointer; font-weight: 600; font-size: .78rem; letter-spacing: .06em; transition: color .2s, background .2s; }
.lang button[aria-pressed="true"] { color: var(--fg); background: var(--ash-3); }

/* motion in */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.hero, .step, .card { animation: rise .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 60ms); }

/* hero */
.hero { position: relative; overflow: hidden; border-radius: 22px; border: 1px solid var(--line-soft); padding: clamp(28px, 6vw, 72px) clamp(20px, 5vw, 64px); margin-bottom: 16px;
  background: linear-gradient(135deg, #14171b 0%, #0e1013 60%, #0b0c0e 100%); }
.hero::before { content: ""; position: absolute; inset: -40% -20% auto auto; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgba(111,159,230,.22), transparent 70%); filter: blur(10px); animation: drift 14s ease-in-out infinite alternate; }
@keyframes drift { from { transform: translate(0,0); } to { transform: translate(-6%, 8%); } }
.hero .in { position: relative; display: grid; gap: 28px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 900px) { .hero .in { grid-template-columns: 1.2fr 1fr; } }
.hero .eyebrow { font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin-bottom: 14px; }
.hero h1 { font-size: clamp(1.7rem, 4.2vw, 3rem); line-height: 1.08; margin: 0 0 14px; font-weight: 600; letter-spacing: -.02em; text-wrap: balance; }
.hero p.lead { font-size: 1.02rem; color: var(--fg-2); max-width: 56ch; margin: 0 0 20px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; }
.fact { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-soft); background: rgba(255,255,255,.03); border-radius: 999px; padding: 6px 12px; font-size: .84rem; color: var(--fg-2); }
.fact b { color: var(--fg); font-weight: 600; }
.hero .art { position: relative; min-height: 220px; display: grid; place-items: center; }
.hero .art svg { width: min(100%, 420px); height: auto; overflow: visible; }
.hero .art .ring { fill: none; stroke: var(--line); stroke-width: 1; }
.hero .art .orbit { fill: none; stroke: rgba(164,192,234,.35); stroke-width: 1; stroke-dasharray: 4 6; transform-box: fill-box; transform-origin: center; animation: spin 40s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.hero .art .trend { fill: none; stroke: var(--series-1b); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 8px rgba(127,183,255,.45)); }
.hero .art .trend-fill { fill: url(#areafill); }
.hero .art .mark-dot { fill: var(--series-1b); }
.hero .art .end-halo { fill: var(--series-1b); opacity: .25; animation: halo 2.2s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes halo { 0% { transform: scale(.6); opacity: .45; } 100% { transform: scale(2.6); opacity: 0; } }
.hero .art .tick text { font-family: var(--font-data); font-size: 11px; fill: var(--muted); }

/* steps and cards */
.steps { display: grid; gap: 12px; grid-template-columns: 1fr; margin-bottom: 16px; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 14px; padding: 16px; transition: border-color .25s, transform .3s var(--spring); }
.step:hover { border-color: var(--line); transform: translateY(-2px); }
.step .n { font-family: var(--font-data); color: var(--accent); font-size: .78rem; margin-bottom: 8px; }
.step h2 { margin: 0 0 6px; font-size: .98rem; }
.step p { margin: 0; color: var(--muted); font-size: .86rem; }
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 720px) { .grid.two { grid-template-columns: 1fr 1fr; } }
.card { position: relative; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 16px; padding: 18px; min-width: 0;
  box-shadow: 0 1px 0 rgba(255,255,255,.025) inset, 0 14px 36px -26px rgba(0,0,0,.95); transition: border-color .25s var(--ease); }
.card:hover { border-color: var(--line); }
.card h2 { font-size: .98rem; font-weight: 600; margin: 0 0 12px; }
@media (min-width: 1200px) { body { font-size: 15.5px; } .card { padding: 20px 22px; } }
.note { color: var(--muted); font-size: .82rem; margin: 12px 0 0; max-width: 72ch; }
.muted { color: var(--muted); margin: 0; font-size: .9rem; }
.sample { color: #e5b65a; }
.actions { margin-top: 14px; }

/* form */
form.req { display: grid; gap: 2px; }
label { display: block; font-size: .8rem; color: var(--fg-2); margin: 10px 0 6px; }
input[type=text], input[type=email], textarea { width: 100%; font: inherit; color: var(--fg); background: var(--ash); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; transition: border-color .2s, box-shadow .2s; }
textarea { min-height: 90px; resize: vertical; }
input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(164,192,234,.18); }
.hp { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }
.err { margin: 10px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--bad-bg); color: var(--bad-fg); border: 1px solid rgba(230,103,103,.3); font-size: .88rem; }
.ok-box { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: 12px; background: var(--good-bg); border: 1px solid rgba(25,158,112,.3); color: var(--good-fg); animation: rise .4s var(--ease) both; }
.ok-box svg { flex: none; width: 22px; height: 22px; }
.ok-box .check { stroke: currentColor; stroke-width: 2.4; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .6s .15s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

/* tiles */
.tiles { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0,1fr)); margin-bottom: 12px; }
.tile { position: relative; overflow: hidden; background: var(--ash); border: 1px solid var(--line-soft); border-radius: 14px; padding: 15px 15px 13px; display: flex; flex-direction: column; gap: 2px; min-width: 0;
  transition: transform .3s var(--spring), border-color .25s var(--ease), background .25s var(--ease); }
.tile:hover { transform: translateY(-3px); border-color: var(--line); background: var(--ash-2); }
.tile::before { content: ""; position: absolute; left: 0; top: 13px; bottom: 13px; width: 2px; border-radius: 2px; background: var(--line); }
.tile.good::before { background: var(--good); } .tile.acc::before { background: var(--series-1); }
.tile .label { font-size: .72rem; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.tile .value { font-family: var(--font-data); font-size: 1.45rem; font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1.2; }
.pos { color: var(--good-fg); }
.tile .spark { position: absolute; right: 10px; bottom: 8px; width: 84px; height: 28px; }
.tile .spark path { fill: none; stroke: var(--series-1b); stroke-width: 1.5; stroke-linecap: round; }
.tile .spark .fill { fill: url(#sparkfill); stroke: none; }
.tile.good .spark path { stroke: var(--good-fg); }

footer.foot { margin-top: 10px; padding-block: 18px 32px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: .82rem; display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; }
footer strong { color: var(--fg-2); }

@media (max-width: 719px) {
  .topbar { margin-bottom: 16px; }
  .wordmark .h1 { font-size: .95rem; }
  .card { padding: 14px; }
  .hero { border-radius: 18px; }
  .tile .spark { width: 64px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
