/* Layout and component system modelled on the Coinbase homepage: white page, grey bands,
   one solid blue for primary actions, black pills and black cards for everything else. */
:root {
  --ink: #0a0b0d;
  --text: #5b616e;
  --muted: #8a919e;
  --line: #dee1e6;
  --band: #eef0f3;
  --white: #fff;
  --blue: #0052ff;
  --blue-hover: #014cec;
  --blue-soft: #e8efff;
  --card: #0a0b0d;
  --card-tab: #32353d;
  --up: #098551;
  --down: #cf202f;
  --up-dark: #27ad75;
  --down-dark: #f0616d;
  --font: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --wrap: 1280px;
  --gut: 32px;
  color-scheme: light;
}
/* The page is light by design; these keep it light even when the system theme is dark. */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { color-scheme: light; } }
:root[data-theme="dark"] { color-scheme: light; }

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--white); color: var(--ink); font: 400 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 400; letter-spacing: -.035em; color: var(--ink); text-wrap: balance; }
h1 { font-size: clamp(44px, 5.3vw, 76px); line-height: 1.02; }
h2 { font-size: clamp(34px, 3.3vw, 48px); line-height: 1.08; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; }
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gut)); margin: 0 auto; padding: 0 var(--gut); }
.up { color: var(--up); }
.down { color: var(--down); }

/* ───────── Pills ───────── */
.pill {
  display: inline-flex; align-items: center; justify-content: center;
  height: 56px; padding: 0 28px; border-radius: 999px;
  font: 600 16px/1 var(--font); text-decoration: none; white-space: nowrap;
  transition: background-color .15s;
}
.pill-sm { height: 44px; padding: 0 20px; }
.pill-blue { background: var(--blue); color: #fff; }
.pill-blue:hover { background: var(--blue-hover); }
.pill-dark { background: var(--ink); color: #fff; }
.pill-dark:hover { background: #32353d; }
.pill-grey { background: var(--band); color: var(--ink); }
.pill-grey:hover { background: #e2e5ea; }

/* ───────── Nav ───────── */
.nav { position: sticky; top: 0; z-index: 20; background: var(--white); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; gap: 40px; height: 72px; padding: 0 var(--gut); }
.brand { color: var(--ink); font-weight: 700; font-size: 19px; letter-spacing: -.01em; text-decoration: none; }
.links { display: flex; gap: 32px; }
.links a { font-size: 15px; font-weight: 600; text-decoration: none; }
.links a:hover { color: var(--blue); }
.nav-right { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.lang { display: flex; height: 44px; padding: 4px; border-radius: 999px; background: var(--band); }
.lang button { min-width: 40px; padding: 0 10px; border: 0; border-radius: 999px; background: none; cursor: pointer; font: 600 13px/1 var(--font); color: var(--text); }
.lang button:hover { color: var(--ink); }
.lang button[aria-pressed="true"] { background: var(--white); color: var(--ink); }

/* ───────── Hero ───────── */
.hero { padding: 56px 0 64px; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.panel-wrap { margin: 0; }
.panel { position: relative; aspect-ratio: 1 / 1; max-height: 640px; border-radius: 48px; background: var(--blue); overflow: hidden; display: flex; justify-content: center; }
.panel-wrap figcaption { margin-top: 12px; font-size: 13px; color: var(--text); }
.hero-text { max-width: 560px; }
.hero .sub { margin: 28px 0 32px; font-size: 18px; color: var(--ink); }
.row { display: flex; flex-wrap: wrap; gap: 12px; }

/* App screen inside the blue panel */
.app {
  position: absolute; top: 11%; width: 64%; min-width: 300px; height: 100%;
  padding: 22px 22px 0; border-radius: 44px 44px 0 0; background: var(--white);
  box-shadow: 0 0 0 12px rgba(255, 255, 255, .22);
}
.app-bar { display: flex; align-items: center; gap: 12px; }
.burger { display: grid; gap: 4px; width: 18px; }
.burger i { height: 2px; background: var(--ink); border-radius: 2px; }
.search { flex: 1; display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 999px; background: var(--band); color: var(--text); font-size: 14px; }
.search svg, .bell svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.bell { display: grid; place-items: center; width: 38px; height: 38px; color: var(--ink); }
.bell svg { width: 18px; height: 18px; }
.app-sym { margin-top: 22px; font-size: 13px; font-weight: 600; color: var(--text); }
.app-price { margin-top: 2px; font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.app-chg { font-size: 14px; font-weight: 500; }
.app-chg span { color: var(--text); }
.app-line { display: block; width: 100%; height: 118px; margin-top: 14px; overflow: visible; }
.ranges { display: flex; justify-content: space-between; margin: 14px 4px 10px; font-size: 13px; font-weight: 600; color: var(--text); }
.ranges span { padding: 7px 10px; border-radius: 999px; }
.ranges .on { background: var(--blue-soft); color: var(--blue); }
.assets { list-style: none; margin: 0; padding: 0; }
.assets li { display: flex; align-items: center; gap: 12px; padding: 9px 0; }
/* symbol icons from TradingView (s3-symbol-logo.tradingview.com) */
.ico { display: block; flex: none; width: 32px; height: 32px; border-radius: 50%; }
.assets b { flex: 1; font-size: 15px; font-weight: 600; }
.assets .val { text-align: right; font-size: 15px; font-weight: 500; }
.assets small { display: block; font-size: 12px; }

/* ───────── Bands ───────── */
.band { padding: 96px 0; }
.band.grey { background: var(--band); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.split .text { max-width: 540px; }
.media-left .text { justify-self: start; }
.band .sub { margin: 20px 0 28px; font-size: 18px; line-height: 1.55; color: var(--text); }
.mini { list-style: none; margin: -8px 0 32px; padding: 0; counter-reset: mini; }
.mini li { counter-increment: mini; display: grid; grid-template-columns: 34px minmax(0, 1fr); padding: 10px 0; font-size: 16px; color: var(--ink); }
.mini li::before { content: counter(mini); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12px; font-weight: 600; }
.grey .mini li::before { background: var(--ink); }

/* Black card with tabs and big rows */
.dark-card { border-radius: 40px; background: var(--card); color: #fff; padding: 40px; }
.tabs { display: flex; gap: 8px; margin-bottom: 28px; }
.tabs button { height: 40px; padding: 0 20px; border: 0; border-radius: 999px; background: none; cursor: pointer; color: #fff; font: 600 15px/1 var(--font); }
.tabs button:hover { background: rgba(255, 255, 255, .08); }
.tabs button[aria-pressed="true"] { background: var(--card-tab); }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 16px 0; }
.rows .k { font-size: clamp(22px, 2.2vw, 30px); letter-spacing: -.02em; }
.rows .v { font-size: clamp(20px, 1.9vw, 26px); letter-spacing: -.02em; text-align: right; white-space: nowrap; }
.rows .v.up { color: var(--up-dark); }
.rows .v.down { color: var(--down-dark); }
.card-note { margin-top: 18px; font-size: 13px; color: var(--muted); }

/* Video inside a black card */
.video-card { padding: 24px; }
.vtabs { display: flex; gap: 8px; margin-bottom: 16px; }
.screen { position: relative; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; background: #1c1e23; }
.screen iframe, .screen video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.poster { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: #fff; text-decoration: none; }
.poster i { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--white); }
.poster i::before { content: ""; margin-left: 4px; border-style: solid; border-width: 9px 0 9px 15px; border-color: transparent transparent transparent var(--ink); }
.poster span { font-size: 15px; font-weight: 600; color: #c4c8d0; }

/* Strategy cards */
.cards { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 72px 0 0; padding: 0; }
.step { display: flex; flex-direction: column; padding: 16px 16px 28px; border-radius: 32px; background: var(--white); }
.step .zoom { display: block; width: 100%; aspect-ratio: 16 / 10; padding: 0; border: 0; border-radius: 20px; overflow: hidden; background: var(--card); cursor: zoom-in; }
.step .zoom img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; }
.step-body { padding: 22px 12px 0; display: flex; flex-direction: column; flex: 1; }
.step-n { font-size: 13px; font-weight: 600; color: var(--blue); }
.step h3 { margin: 6px 0 10px; font-size: 24px; line-height: 1.15; letter-spacing: -.02em; }
.step .rule { color: var(--text); }
.step .cap { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 14px; color: var(--ink); }
.step .by { margin-top: 10px; font-size: 13px; color: var(--muted); text-decoration: none; }
.step .by:hover { color: var(--blue); }
.step.wide { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 32px; align-items: center; padding: 28px 40px; }
.step.wide .step-body { padding: 0; }
.ladder { list-style: none; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; }
.ladder li { display: grid; place-items: center; height: 64px; border-radius: 16px; background: var(--band); font-size: 18px; font-weight: 600; }
.ladder li.key { background: var(--blue); color: #fff; }
.ladder-how { grid-column: 2; margin-top: 12px; font-size: 14px; color: var(--text); }

/* Community: members' posts and the share form */
.com-head { max-width: 640px; }
.feed { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin: 8px 0 0; padding: 0; }
.post { display: flex; flex-direction: column; padding: 16px 16px 24px; border-radius: 32px; background: var(--band); }
.post .zoom { display: block; width: 100%; aspect-ratio: 4 / 5; padding: 0; border: 0; border-radius: 20px; overflow: hidden; background: var(--card); cursor: zoom-in; }
.post .zoom img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.post-body { padding: 18px 8px 0; }
.post .amt { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--white); font-size: 15px; font-weight: 700; color: var(--up); }
.post .amt.down { color: var(--down); }
.post blockquote { margin: 12px 0 0; font-size: 17px; line-height: 1.45; color: var(--ink); }
.post .who { margin-top: 12px; font-size: 14px; color: var(--text); }
.post .who b { color: var(--ink); font-weight: 600; }
.feed .empty { grid-column: 1 / -1; padding: 40px; border-radius: 32px; background: var(--band); text-align: center; font-size: 17px; color: var(--text); }
.feed-note { margin-top: 16px; font-size: 13px; color: var(--muted); }
.share { margin-top: 48px; }
.share h3 { font-size: 28px; color: #fff; letter-spacing: -.02em; margin-bottom: 24px; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.fields label { display: grid; align-content: start; gap: 8px; font-size: 14px; font-weight: 600; color: #c4c8d0; }
.fields .wide { grid-column: 1 / -1; }
.fields input, .fields textarea { width: 100%; padding: 14px 16px; border: 1px solid #32353d; border-radius: 16px; background: #16181c; color: #fff; font: 400 16px/1.4 var(--font); }
.fields textarea { resize: vertical; min-height: 96px; }
.fields input:focus, .fields textarea:focus { outline: none; border-color: var(--blue); }
.fields input[type="file"] { padding: 11px 12px; }
.fields small { font-weight: 400; color: var(--muted); }
.fields .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.check { display: flex; align-items: flex-start; gap: 12px; margin-top: 16px; font-size: 15px; color: #e3e5e8; cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--blue); }
.send-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 20px; margin-top: 24px; }
.send-row .pill { border: 0; cursor: pointer; }
.send-row .pill:disabled { opacity: .6; cursor: default; }
.form-msg { font-size: 15px; color: #c4c8d0; }
.form-msg.ok { color: var(--up-dark); }
.form-msg.err { color: var(--down-dark); }

/* Closing block */
.end { text-align: center; padding: 120px 0; }
.end .sub { max-width: 34em; margin-left: auto; margin-right: auto; }

/* ───────── Footer ───────── */
.foot { padding: 56px 0 72px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.6; color: var(--text); }
.foot-in { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: 48px; }
.foot-text { display: grid; gap: 10px; }

/* ───────── Lightbox ───────── */
.lightbox { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 64px 20px 20px; background: rgba(10, 11, 13, .92); cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 12px; }
.lb-close { position: absolute; top: 14px; right: 18px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--white); color: var(--ink); font: 400 26px/1 var(--font); cursor: pointer; }

.mbar { display: none; }

/* ───────── Responsive ───────── */
@media (max-width: 1080px) {
  .links { display: none; }
  .hero-in, .split { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero-text { order: -1; max-width: none; }
  .panel { max-height: 560px; }
  .split .text { max-width: none; }
  .media-left .text { order: -1; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .feed { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step.wide { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .ladder-how { grid-column: 1; }
}
@media (max-width: 640px) {
  :root { --gut: 16px; }
  .nav-in { gap: 12px; height: 64px; }
  .nav-right .pill-sm { display: none; }
  .hero { padding: 32px 0 48px; }
  .hero .sub { margin: 18px 0 24px; font-size: 17px; }
  .row .pill { flex: 1 1 100%; }
  .panel { border-radius: 32px; aspect-ratio: 3 / 4; max-height: none; }
  .app { width: 84%; min-width: 0; padding: 18px 16px 0; border-radius: 34px 34px 0 0; }
  .band { padding: 64px 0; }
  .band .sub { font-size: 17px; }
  .dark-card { border-radius: 28px; padding: 24px; }
  .video-card { padding: 14px; }
  .tabs button { padding: 0 14px; font-size: 14px; }
  .cards { grid-template-columns: minmax(0, 1fr); margin-top: 48px; gap: 16px; }
  .feed { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .post { border-radius: 24px; }
  .fields { grid-template-columns: minmax(0, 1fr); }
  .share h3 { font-size: 24px; }
  .send-row .pill { width: 100%; }
  .step { border-radius: 24px; }
  .step.wide { padding: 20px; }
  .ladder { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .split .pill, .end .pill { width: 100%; }
  .end { padding: 72px 0; }
  .foot { padding-bottom: 112px; }
  .foot-in { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .mbar {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 10px var(--gut) calc(10px + env(safe-area-inset-bottom));
    background: var(--white); border-top: 1px solid var(--line);
    transform: translateY(110%); transition: transform .25s ease;
  }
  .mbar.show { transform: none; }
  .mbar .pill { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
