/* ==========================================================================
   HOODIE Launcher Launcher - dark tech, single green accent, mono numerics.
   Theme lock: dark only. Accent lock: --accent (Robinhood green) everywhere.
   Radius system: cards 14px, controls 10px, buttons full pill.
   ========================================================================== */

:root {
  --bg: #08090b;
  --bg-2: #0d0f12;
  --surface: #111419;
  --surface-2: #161a20;
  --line: #23282f;
  --line-soft: #1a1e24;
  --text: #eef1f4;
  --text-dim: #9aa4af;
  --text-faint: #626b75;
  --accent: #00c805;          /* Robinhood green */
  --accent-soft: #0b3d1c;
  --accent-ink: #04140a;
  --danger: #ff5470;
  --warn: #ffb23e;

  --r-card: 14px;
  --r-ctl: 10px;
  --maxw: 1180px;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Roboto Mono", Menlo, monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --shadow: 0 20px 60px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.4);
  --glow: 0 0 0 1px rgba(0, 200, 5, 0.25), 0 12px 40px rgba(0, 200, 5, 0.12);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
  overflow-x: hidden;
}

/* soft ambient field, pointer-events off, fixed so it never repaints on scroll */
.ambient {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60vw 40vw at 78% -8%, rgba(0, 200, 5, 0.10), transparent 60%),
    radial-gradient(50vw 40vw at 5% 10%, rgba(0, 200, 5, 0.05), transparent 55%);
}

a { color: inherit; text-decoration: none; }
code, .mono { font-family: var(--mono); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* ------------------------------- nav ----------------------------------- */
header.nav {
  position: sticky; top: 0; z-index: 40;
  height: 66px; display: flex; align-items: center;
  background: rgba(8, 9, 11, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav .wrap { display: flex; align-items: center; gap: 20px; width: 100%; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.02em; }
.brand .mark {
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  overflow: hidden; box-shadow: var(--glow);
}
.brand .mark img { width: 100%; height: 100%; display: block; }
.brand small { color: var(--text-faint); font-weight: 500; font-size: 12px; }
.nav nav { display: flex; gap: 4px; margin-left: 12px; }
.nav nav button {
  background: none; border: 0; color: var(--text-dim); font: inherit; font-size: 14px;
  padding: 8px 12px; border-radius: var(--r-ctl); cursor: pointer; transition: color .15s, background .15s;
}
.nav nav button:hover { color: var(--text); background: var(--surface); }
.nav nav button.active { color: var(--accent); }
.nav .spacer { flex: 1; }

/* ------------------------------ buttons -------------------------------- */
.btn {
  font: inherit; font-weight: 600; font-size: 14px; cursor: pointer;
  border-radius: 999px; padding: 11px 20px; border: 1px solid transparent;
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  transition: transform .08s ease, background .15s, border-color .15s, opacity .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: #16dd2b; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-block { width: 100%; }

.pill {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600;
  padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line);
  color: var(--text-dim); background: var(--surface);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); }

/* ------------------------------- hero ---------------------------------- */
.hero { padding: 74px 0 40px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.eyebrow { color: var(--accent); font-size: 13px; font-weight: 600; letter-spacing: 0.02em; margin-bottom: 18px; }
h1.title {
  font-size: clamp(38px, 5.4vw, 66px); line-height: 1.02; letter-spacing: -0.035em; font-weight: 800;
}
h1.title .thin { color: var(--text-dim); font-weight: 700; }
.hero p.lede { color: var(--text-dim); font-size: 18px; max-width: 52ch; margin: 22px 0 30px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-meta { display: flex; gap: 26px; margin-top: 34px; }
.hero-meta .m { }
.hero-meta .m b { font-family: var(--mono); font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.hero-meta .m span { display: block; color: var(--text-faint); font-size: 12.5px; margin-top: 2px; }

/* recursion diagram (real system schematic, not a screenshot) */
.stack { display: grid; gap: 12px; }
.node {
  border: 1px solid var(--line); border-radius: var(--r-card); padding: 16px 18px;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  position: relative;
}
.node.l0 { margin-right: 0; box-shadow: var(--glow); border-color: rgba(0,200,5,0.35); }
.node.l1 { margin: 0 16px; }
.node.l2 { margin: 0 32px; }
.node.l3 {
  margin: 0 48px; display: flex; align-items: center; gap: 10px; justify-content: center;
  color: var(--accent-ink); background: var(--accent); border-color: var(--accent); font-weight: 700;
}
.node .k { font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-faint); }
.node .v { font-weight: 700; letter-spacing: -0.01em; margin-top: 3px; }
.node .v small { color: var(--text-dim); font-weight: 500; font-family: var(--mono); font-size: 12px; }
.connector { height: 14px; width: 2px; background: linear-gradient(var(--accent), transparent); margin: -6px auto; opacity: 0.6; }

/* ------------------------------ sections ------------------------------- */
.section { padding: 34px 0; }
.section-head { margin-bottom: 22px; }
.section-head h2 { font-size: 28px; letter-spacing: -0.03em; font-weight: 700; }
.section-head p { color: var(--text-dim); margin-top: 6px; max-width: 60ch; }

.view { display: none; }
.view.active { display: block; animation: fade .35s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* --------------------------- cards / panels ---------------------------- */
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card);
  padding: 24px;
}
.panel-lg { padding: 28px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.form-col { display: grid; gap: 6px; }

label.field { display: grid; gap: 7px; margin-bottom: 16px; }
label.field .lab { font-size: 13px; font-weight: 600; color: var(--text); }
label.field .hint { font-size: 12px; color: var(--text-faint); font-weight: 400; }
input, select {
  font: inherit; font-size: 14px; color: var(--text); background: var(--bg-2);
  border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 11px 13px; width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,200,5,0.15); }
input::placeholder { color: var(--text-faint); }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.err-text { color: var(--danger); font-size: 12.5px; min-height: 16px; }

.toggle { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.toggle input { width: auto; }
.switch { position: relative; width: 42px; height: 24px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; }
.switch .track { position: absolute; inset: 0; background: var(--line); border-radius: 999px; transition: background .15s; }
.switch .knob { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: transform .15s; }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track + .knob { transform: translateX(18px); }

/* summary side panel */
.summary { display: grid; gap: 0; }
.summary .li { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.summary .li:last-child { border-bottom: 0; }
.summary .li span { color: var(--text-dim); }
.summary .li b { font-family: var(--mono); font-weight: 600; letter-spacing: -0.01em; text-align: right; }
.callout {
  border: 1px solid var(--accent-soft); background: rgba(0,200,5,0.06); border-radius: var(--r-ctl);
  padding: 13px 15px; font-size: 13px; color: var(--text-dim); display: flex; gap: 10px; align-items: flex-start;
}
.callout .ic { color: var(--accent); flex: 0 0 auto; }
.callout b { color: var(--text); }

/* explore grid */
.grid-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.lcard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px; transition: border-color .15s, transform .12s; }
.lcard:hover { border-color: rgba(0,200,5,0.4); transform: translateY(-2px); }
.lcard .top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.lcard h3 { font-size: 18px; letter-spacing: -0.02em; }
.lcard .meta-row { display: flex; gap: 6px 18px; flex-wrap: wrap; margin: 12px 0; }
.lcard .stat { }
.lcard .stat b { font-family: var(--mono); font-size: 15px; font-weight: 600; }
.lcard .stat span { display: block; color: var(--text-faint); font-size: 11.5px; }
.addr { font-family: var(--mono); font-size: 12px; color: var(--text-faint); }
.addr a:hover { color: var(--accent); }

.token-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line-soft); }
.token-row:last-child { border-bottom: 0; }
.token-id { display: flex; align-items: center; gap: 11px; }
.token-id .sym { width: 34px; height: 34px; border-radius: 9px; background: var(--surface-2); border: 1px solid var(--line); display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--accent); overflow: hidden; }
.token-id .sym.has-img, .detail-head .sym-lg.has-img { padding: 0; }
.token-id .sym img, .detail-head .sym-lg img { width: 100%; height: 100%; object-fit: cover; display: block; }
.token-id .nm b { font-size: 14px; }
.token-id .nm span { display: block; color: var(--text-faint); font-size: 12px; font-family: var(--mono); }
.token-px { text-align: right; font-family: var(--mono); font-size: 13px; }
.token-px b { color: var(--text); } .token-px span { color: var(--text-faint); font-size: 11.5px; display: block; }

/* how it works strip */
.how { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.how .step { border-top: 2px solid var(--accent); padding-top: 16px; }
.how .step .n { font-family: var(--mono); color: var(--accent); font-size: 13px; }
.how .step h4 { font-size: 17px; margin: 6px 0 8px; letter-spacing: -0.02em; }
.how .step p { color: var(--text-dim); font-size: 14px; }

/* toast */
#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(30px);
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 13px 18px;
  box-shadow: var(--shadow); z-index: 80; opacity: 0; transition: opacity .25s, transform .25s;
  display: flex; align-items: center; gap: 11px; max-width: 90vw; font-size: 14px; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.ok { border-color: rgba(0,200,5,0.45); } #toast.bad { border-color: rgba(255,84,112,0.5); }
#toast .ti { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
#toast.ok .ti { background: var(--accent); } #toast.bad .ti { background: var(--danger); }
#toast a { color: var(--accent); font-family: var(--mono); font-size: 12.5px; }

/* skeleton + empty */
.skel { background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 37%, var(--surface) 63%); background-size: 400% 100%; animation: sh 1.4s infinite; border-radius: 8px; }
@keyframes sh { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.empty { text-align: center; padding: 48px 20px; color: var(--text-faint); border: 1px dashed var(--line); border-radius: var(--r-card); }
.empty h4 { color: var(--text-dim); font-size: 16px; margin-bottom: 6px; }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s cubic-bezier(.16,1,.3,1), transform .6s cubic-bezier(.16,1,.3,1); }
.reveal.in { opacity: 1; transform: none; }

footer.foot { border-top: 1px solid var(--line-soft); margin-top: 56px; padding: 30px 0; color: var(--text-faint); font-size: 13px; }
footer.foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer.foot a:hover { color: var(--accent); }

.divider-note { color: var(--text-faint); font-size: 12.5px; margin-top: 10px; }
.rule-lock { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; color: var(--accent); font-weight: 600; }

@media (max-width: 900px) {
  .hero-grid, .two-col, .grid-cards, .how { grid-template-columns: 1fr; }
  .hero { padding: 44px 0 20px; }
  .hero-meta { flex-wrap: wrap; gap: 18px; }
  /* keep the nav usable on mobile: a horizontally-scrollable strip, not hidden */
  .nav .wrap { gap: 10px; }
  .nav nav {
    margin-left: 4px; overflow-x: auto; flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch; scrollbar-width: none;
  }
  .nav nav::-webkit-scrollbar { display: none; }
  .nav nav button { padding: 8px 10px; font-size: 13px; white-space: nowrap; }
  .brand small { display: none; }         /* save room; keep the wordmark */
  #connect { flex: 0 0 auto; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  .brand div { font-size: 15px; }
  .brand .mark { width: 24px; height: 24px; }
  header.nav { height: 60px; }
  .panel, .panel-lg { padding: 18px; }
  h1.title { font-size: clamp(30px, 8vw, 44px); }
  .hero p.lede { font-size: 16px; }
  .grid-cards { gap: 12px; }
  /* trade rows: drop the trader column so amounts stay readable */
  .trade-row { grid-template-columns: auto 1fr 1fr; }
  .trade-row .who { display: none; }
  .tk-stats { grid-template-columns: repeat(2, 1fr); }
  .brg-row { grid-template-columns: 1fr; }
  .feed-item { padding: 11px 13px; }
  #toast { left: 12px; right: 12px; transform: translateY(30px); max-width: none; }
  #toast.show { transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, .view.active { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}
