:root {
  --bg: #0b0b0c;
  --panel: #161618;
  --raised: #1f1f22;
  --sep: #2b2b2f;
  --tone: #34333a;
  --text: #f4f2ef;
  --text-2: #a9a6ad;
  --accent: #ff8f4d;
  --accent-ink: #2a1205;
  --ok: #8fcfa4;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --margin: clamp(16px, 4vw, 32px);
  --gap-section: clamp(96px, 14vw, 200px);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
a { color: inherit; text-underline-offset: 0.2em; }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }

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

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--sep);
}
.top-inner { display: flex; align-items: center; gap: 32px; height: 64px; }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.02em; text-decoration: none; font-size: 19px; }
.wordmark svg { width: 26px; height: 26px; color: var(--accent); }
.wordmark.small { font-size: 17px; }
.top nav { display: flex; gap: 28px; margin-left: auto; font-size: 16px; }
.top nav a { text-decoration: none; color: var(--text-2); transition: color 150ms ease; }
@media (hover: hover) and (pointer: fine) { .top nav a:hover { color: var(--text); } }

.login { white-space: nowrap; font-size: 16px; font-weight: 600; text-decoration: none; color: var(--text); }
@media (hover: hover) and (pointer: fine) { .login:hover { text-decoration: underline; text-decoration-color: var(--accent); } }
.top nav + .login { margin-left: 4px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  background: var(--accent); color: var(--accent-ink);
  border-radius: 999px; font-weight: 700; font-size: 17px; text-decoration: none; white-space: nowrap;
  transition: transform 120ms var(--ease-out), background-color 150ms ease;
}
.btn:active { transform: scale(0.97); }
@media (hover: hover) and (pointer: fine) { .btn:hover { background: #ffa06a; } }
.btn-small { min-height: 40px; padding: 0 18px; font-size: 15px; }
.btn-large { min-height: 56px; padding: 0 32px; font-size: 19px; }
.link-arrow { color: var(--text); font-weight: 600; text-decoration: underline; text-decoration-color: var(--sep); text-decoration-thickness: 2px; }
@media (hover: hover) and (pointer: fine) { .link-arrow:hover { text-decoration-color: var(--accent); } }

/* Hero */
.hero { padding: clamp(56px, 9vw, 120px) 0 clamp(72px, 10vw, 140px); }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
h1 {
  margin: 0;
  font-size: clamp(44px, 6.6vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  font-weight: 700;
  max-width: 13ch;
}
.lead { margin: 28px 0 0; font-size: clamp(18px, 1.6vw, 21px); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 36px; }

/* Phone */
.phone-block { margin: 0; display: grid; justify-items: center; gap: 16px; }
.phone {
  width: 100%; max-width: 360px;
  background: var(--panel);
  border-radius: 36px;
  padding: 28px 20px 22px;
  box-shadow: 0 0 0 10px var(--raised), 0 40px 80px rgba(0, 0, 0, 0.5);
  font-size: 15px;
}
.phone.swap .phone-facts, .phone.swap .steps, .phone.swap .phone-list { animation: fade 220ms var(--ease-out); }
@keyframes fade { from { opacity: 0.35; } to { opacity: 1; } }
.phone-bar { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; }
.phone-title { font-size: 30px; font-weight: 700; letter-spacing: -0.02em; margin: 4px 0 16px; }
.phone-facts { margin: 0; display: grid; gap: 1px; background: var(--sep); border-radius: 14px; overflow: hidden; }
.phone-facts div { background: var(--raised); padding: 10px 14px; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.phone-facts dt { color: var(--text-2); font-size: 13px; }
.phone-facts dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.steps { list-style: none; margin: 18px 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.steps li {
  font-size: 11px; line-height: 1.2; color: var(--text-2);
  padding-top: 10px; border-top: 4px solid var(--tone);
  overflow-wrap: anywhere; hyphens: auto;
}
.steps li.done { border-top-color: var(--ok); color: var(--text); }
.steps li.now { border-top-color: var(--accent); color: var(--text); font-weight: 700; }
.phone-list { list-style: none; margin: 0; padding: 0; background: var(--raised); border-radius: 14px; }
.phone-list li { display: flex; justify-content: space-between; gap: 12px; padding: 13px 14px; }
.phone-list li + li { border-top: 1px solid var(--sep); }
.lang { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; background: var(--panel); padding: 4px; border-radius: 999px; }
.lang button {
  font: inherit; font-size: 14px; color: var(--text-2);
  background: transparent; border: 0; border-radius: 999px;
  min-height: 40px; padding: 0 14px; cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease, transform 120ms var(--ease-out);
}
.lang button:active { transform: scale(0.97); }
.lang button[aria-pressed="true"] { background: var(--tone); color: var(--text); font-weight: 600; }
.phone-block figcaption { font-size: 14px; color: var(--text-2); text-align: center; max-width: 30em; }

/* Sections */
.section { padding: var(--gap-section) 0; }
.section-raised { background: var(--panel); }
.h2 {
  margin: 0; font-size: clamp(34px, 4.4vw, 60px); line-height: 1.02; letter-spacing: -0.03em; font-weight: 700; max-width: 18ch;
}
.h2.narrow { max-width: 22ch; }
.sub { margin: 20px 0 0; max-width: 36em; font-size: clamp(18px, 1.5vw, 20px); }

/* Flow */
.flow { list-style: none; margin: clamp(48px, 7vw, 88px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; }
.flow li { padding: 0 24px 0 0; position: relative; }
.flow li::before { content: ""; display: block; height: 4px; background: var(--ok); margin-bottom: 22px; }
.flow li:nth-child(3)::before { background: var(--accent); }
.flow li:nth-child(n+4)::before { background: var(--tone); }
.flow-state { display: block; font-size: clamp(22px, 2.2vw, 30px); font-weight: 700; letter-spacing: -0.02em; }
.flow p { margin: 10px 0 0; font-size: 17px; }

/* Split with rows */
.split { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: grid; grid-template-columns: 13em 1fr; gap: 8px 24px; padding: 22px 0; border-top: 1px solid var(--sep); }
.rows li:last-child { border-bottom: 1px solid var(--sep); }
.rows strong { font-weight: 700; }
.rows li.note strong, .rows li.note span { color: var(--text-2); font-weight: 600; }

/* Terms table */
.table-scroll { margin-top: clamp(48px, 6vw, 72px); overflow-x: auto; }
.terms { width: 100%; border-collapse: collapse; min-width: 880px; font-size: 17px; }
.terms th { text-align: left; font-size: 15px; color: var(--text-2); font-weight: 600; padding: 0 16px 14px 0; border-bottom: 1px solid var(--sep); }
.terms td { padding: 16px 16px 16px 0; border-bottom: 1px solid var(--sep); vertical-align: top; }
.terms td:first-child { font-weight: 700; }

/* Facts */
.facts { margin-top: clamp(48px, 6vw, 72px); display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--sep); }
.facts > div { background: var(--bg); padding: 4px 28px 4px 0; }
.facts > div + div { padding-left: 28px; }
.fact-k { display: block; font-weight: 700; font-size: 20px; letter-spacing: -0.01em; }
.facts p { margin: 10px 0 0; font-size: 17px; }

/* CTA */
.cta { background: var(--accent); color: var(--accent-ink); }
.cta .h2 { max-width: 16ch; }
.cta .sub { color: var(--accent-ink); }
.cta-inner { display: grid; justify-items: start; }
.cta .btn { margin-top: 36px; background: var(--accent-ink); color: var(--accent); }
@media (hover: hover) and (pointer: fine) { .cta .btn:hover { background: #000; } }
.cta :focus-visible { outline-color: var(--accent-ink); }
.contact-line { margin: 20px 0 0; font-size: 16px; }

/* Footer */
.foot { padding: 48px 0 56px; }
.foot-inner { display: flex; flex-wrap: wrap; gap: 16px 40px; align-items: baseline; justify-content: space-between; }
.foot p { margin: 0; color: var(--text-2); font-size: 15px; max-width: 40em; }

/* Responsive */
@media (max-width: 1080px) {
  .flow { grid-template-columns: 1fr; gap: 28px; }
  .flow li { display: grid; grid-template-columns: 10em 1fr; gap: 6px 24px; padding: 0; }
  .flow li::before { grid-column: 1 / -1; margin-bottom: 8px; }
  .flow p { margin: 0; }
  .facts { grid-template-columns: 1fr 1fr; background: none; gap: 40px 32px; }
  .facts > div, .facts > div + div { padding: 20px 0 0; border-top: 1px solid var(--sep); }
}
@media (max-width: 900px) {
  .top nav { display: none; }
  .top .login { margin-left: auto; }
  .top-inner { gap: 20px; }
  .hero-grid, .split { grid-template-columns: 1fr; }
  .rows li { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 17px; }
  .lang { display: grid; grid-template-columns: repeat(5, auto); width: 100%; max-width: 380px; }
  .lang button { font-size: 13px; padding: 0 6px; }
  .flow li { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; gap: 28px; }
  .phone { border-radius: 30px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .phone.swap .phone-facts, .phone.swap .steps, .phone.swap .phone-list { animation: none; }
  .btn, .lang button { transition: background-color 150ms ease, color 150ms ease; }
  .btn:active, .lang button:active { transform: none; }
}
