/* ============================================================================
   THE UNMADE — v3
   Dark, quiet, numbers-forward. The design's job is to make the economics
   legible, so the type is monospace where it counts and the colour is used
   only to encode the three-way split.
   ========================================================================= */

:root {
  --bg:        #08080a;
  --bg-2:      #0d0d10;
  --bg-3:      #131317;
  --line:      #212128;
  --line-2:    #2e2e37;

  --ink:       #e9e9ec;
  --ink-2:     #b4b4be;
  --ink-3:     #8a8a95;
  --ink-4:     #6b6b76;

  --stake:     #4ade9b;   /* 70% */
  --jackpot:   #e0b341;   /* 15% */
  --treasury:  #5b8dd6;   /* 15% */
  --alert:     #d9534f;

  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "Fira Code", Menlo, Consolas, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --pad: clamp(1.25rem, 5vw, 5rem);
  --maxw: 1180px;
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f5f3ee;
  --bg-2: #fffefa;
  --bg-3: #ece9e1;
  --line: #dedbd2;
  --line-2: #c8c4b9;
  --ink: #17181b;
  --ink-2: #41434a;
  --ink-3: #656873;
  --ink-4: #787b85;
  --stake: #17794c;
  --jackpot: #916300;
  --treasury: #285ba4;
  --alert: #b53232;
}

html[data-theme="dark"] { color-scheme: dark; }

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* film grain + vignette: the old site's signature, kept very quiet */
.grain {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
}
.vignette {
  position: fixed; inset: 0; z-index: 9998; pointer-events: none;
  background: radial-gradient(ellipse at 50% 40%, transparent 55%, rgba(0,0,0,.55) 100%);
}

/* ------------------------------------------------------------------ nav -- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 1.5rem;
  padding: .85rem var(--pad);
  background: rgba(8,8,10,.82);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.brand {
  font-family: var(--mono); font-size: .95rem; font-weight: 600;
  letter-spacing: .16em; color: var(--ink); text-decoration: none; white-space: nowrap;
}
.nav { display: flex; gap: 1.35rem; margin-left: auto; flex-wrap: wrap; }
.nav a {
  font-family: var(--mono); font-size: .74rem; letter-spacing: .1em;
  color: var(--ink-3); text-decoration: none; text-transform: uppercase;
  transition: color .18s;
}
.nav a:hover { color: var(--ink); }
.site-options { display: flex; align-items: center; gap: .35rem; }
.locale-switch { display: flex; gap: .25rem; }
.option-btn { cursor: pointer; border: 1px solid var(--line-2); background: transparent; color: var(--ink-2); border-radius: 3px; padding: .35rem .55rem; font: 600 .66rem var(--mono); white-space: nowrap; }
.option-btn:hover, .option-btn[aria-pressed="true"] { color: var(--ink); border-color: var(--ink-3); }
html[data-theme="light"] .topbar { background: rgba(245,243,238,.9); }
html[data-theme="light"] .grain { opacity: .012; }
html[data-theme="light"] .vignette { background: radial-gradient(ellipse at 50% 40%, transparent 62%, rgba(30,30,30,.08) 100%); }
html[data-theme="light"] .title { background-image: linear-gradient(180deg, #17181b 0%, #777983 100%); }
html[data-theme="light"] .btn-primary:hover { background: var(--bg-2); color: var(--ink); }
html[data-theme="light"] .chart .bar.is-now .stake { background: var(--stake); }

.status {
  display: flex; align-items: center; gap: .5rem;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .1em;
  padding: .34rem .7rem; border: 1px solid var(--line-2); border-radius: 999px;
  color: var(--ink-3); white-space: nowrap;
}
.status .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--jackpot); }
.status[data-state="live"] { color: var(--stake); border-color: rgba(74,222,155,.35); }
.status[data-state="live"] .dot { background: var(--stake); animation: pulse 2.4s infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }

/* ----------------------------------------------------------------- hero -- */
.hero {
  max-width: var(--maxw); margin: 0 auto;
  padding: clamp(3.5rem, 11vh, 8rem) var(--pad) clamp(3rem, 8vh, 5.5rem);
}
.kicker {
  font-family: var(--mono); font-size: .7rem; letter-spacing: .22em;
  color: var(--ink-4); text-transform: uppercase; margin: 0 0 1.1rem;
}
.title {
  font-family: var(--mono); font-size: clamp(2.6rem, 9vw, 5.5rem);
  font-weight: 700; letter-spacing: -.02em; line-height: .95;
  margin: 0 0 1.6rem;
  background: linear-gradient(180deg, #fff 0%, #8a8a95 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { font-size: clamp(1.02rem, 2.1vw, 1.22rem); color: var(--ink-2); max-width: 60ch; margin: 0 0 2.2rem; }
.lede b { color: var(--ink); font-weight: 600; }

.hero-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line);
  margin-bottom: 2.4rem;
}
.hero-stats .hs { background: var(--bg); padding: 1.1rem 1.15rem; }
.hs .v {
  font-family: var(--mono); font-size: 1.32rem; font-weight: 600;
  color: var(--ink); letter-spacing: -.01em; display: block; line-height: 1.2;
}
.hs .l {
  font-family: var(--mono); font-size: .64rem; letter-spacing: .12em;
  color: var(--ink-4); text-transform: uppercase; margin-top: .3rem; display: block;
}
.hs.is-stake .v { color: var(--stake); }
.hs.is-jack .v  { color: var(--jackpot); }
.hs.is-treas .v { color: var(--treasury); }

.cta-row { display: flex; gap: .8rem; flex-wrap: wrap; }
.mint-progress { margin: 2.2rem 0 0; max-width: 560px; }
.mp-line { display: flex; align-items: baseline; gap: .6rem; margin: 0 0 .55rem; }
.mp-line b { font-family: var(--mono); font-size: 1.06rem; font-weight: 600; color: var(--ink); letter-spacing: -.01em; }
.mp-label { font-family: var(--mono); font-size: .64rem; letter-spacing: .14em; color: var(--ink-4); text-transform: uppercase; }
.mint-progress .bar-track { margin-top: 0; height: 6px; }
.btn {
  font-family: var(--mono); font-size: .78rem; letter-spacing: .12em; text-transform: uppercase;
  padding: .85rem 1.5rem; border-radius: 3px; text-decoration: none;
  border: 1px solid var(--line-2); color: var(--ink-2); transition: all .18s;
}
.btn-primary { background: var(--ink); color: var(--bg); border-color: var(--ink); font-weight: 600; }
.btn-primary:hover { background: #fff; transform: translateY(-1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.mine-controls { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0 .75rem; }
.claim-controls { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0 .75rem; }
.mine-meter { margin: 0 0 .6rem; }
.meter-track { height: 6px; background: var(--line); overflow: hidden; }
.meter-fill { height: 100%; width: 0; background: var(--stake); transition: width .25s linear; }
.meter-meta { display: flex; justify-content: space-between; gap: 1rem; margin-top: .45rem; font-family: var(--mono); font-size: .72rem; color: var(--ink-3); }
.mine-status { color: var(--ink-3); font-family: var(--mono); font-size: .82rem; line-height: 1.6; min-height: 2.6em; overflow-wrap: anywhere; }
.mine-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: .35rem 0 .9rem; }
.mine-actions [hidden] { display: none !important; }
.lock-options { display: flex; flex-wrap: wrap; gap: .55rem; }
.lock-option { cursor: pointer; border: 1px solid var(--line-2); color: var(--ink-2); background: transparent; padding: .7rem .9rem; font: 600 .76rem var(--mono); }
.lock-option[aria-pressed="true"] { border-color: var(--stake); color: var(--stake); background: rgba(123, 185, 140, .09); }
.calc-note { color: var(--ink-3); font-size: .78rem; line-height: 1.55; margin: -.25rem 0 1rem; }
.btn-ghost:hover { border-color: var(--ink-3); color: var(--ink); }

/* ---------------------------------------------------------------- bands -- */
.band { padding: clamp(3.5rem, 9vh, 6.5rem) var(--pad); border-top: 1px solid var(--line); }
.band.alt { background: var(--bg-2); }
.band-inner { max-width: var(--maxw); margin: 0 auto; }
.band h2 {
  font-family: var(--mono); font-size: clamp(1.5rem, 4vw, 2.3rem); font-weight: 600;
  letter-spacing: -.015em; margin: 0 0 1.2rem; line-height: 1.15;
}
.band p { color: var(--ink-2); max-width: 68ch; margin: 0 0 1.1rem; }
.band p b { color: var(--ink); font-weight: 600; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 2.2rem; }
.card { background: var(--bg-2); padding: 1.5rem 1.4rem; }
.band.alt .card { background: var(--bg); }
.card h3 { font-family: var(--mono); font-size: .92rem; margin: 0 0 .7rem; letter-spacing: .02em; }
.card p { font-size: .92rem; margin: 0; color: var(--ink-3); max-width: none; }

.rules { list-style: none; padding: 0; margin: 1.5rem 0 0; max-width: 74ch; }
.rules li {
  font-family: var(--mono); font-size: .82rem; color: var(--ink-3);
  padding: .85rem 0 .85rem 1.8rem; border-bottom: 1px solid var(--line); position: relative;
}
.rules li::before { content: "→"; position: absolute; left: 0; color: var(--ink-4); }
.rules li b { color: var(--ink); }

/* ------------------------------------------------------------------- faq -- */
.faq-list { border-top: 1px solid var(--line); margin-top: 2.2rem; max-width: 82ch; }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  list-style: none; display: flex; align-items: baseline; gap: .85rem;
  cursor: pointer; padding: 1.15rem .15rem;
  font-family: var(--mono); font-size: .86rem; color: var(--ink-2);
  transition: color .18s;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "+"; color: var(--ink-4); font-weight: 700; }
.faq-item[open] summary::before { content: "−"; }
.faq-item[open] summary { color: var(--ink); }
.faq-item summary:hover { color: var(--ink); }
.faq-item p { color: var(--ink-3); font-size: .93rem; line-height: 1.85; margin: 0 0 1.2rem; padding-left: 1.5rem; }

/* ---------------------------------------------------------------- ladder -- */
.ladder-now {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 2rem 0;
}
.ln { background: var(--bg-2); padding: 1.2rem 1.25rem; }
.ln .v { font-family: var(--mono); font-size: 1.5rem; font-weight: 600; color: var(--ink); display: block; line-height: 1.15; }
.ln .l { font-family: var(--mono); font-size: .64rem; letter-spacing: .12em; color: var(--ink-4); text-transform: uppercase; display: block; margin-top: .35rem; }
.ln.hero-price { background: var(--bg-3); }
.ln.hero-price .v { color: var(--stake); }

.bar-track { height: 4px; background: var(--line-2); margin-top: .8rem; overflow: hidden; }
.bar-fill { height: 100%; background: var(--stake); width: 0; transition: width .3s; min-width: 2px; }

.chart-wrap { margin: 2.5rem 0 1.2rem; }
.chart { display: flex; align-items: stretch; gap: 3px; height: 190px; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.chart .bar {
  flex: 1; display: flex; flex-direction: column; justify-content: flex-end;
  gap: 1px; min-width: 0; height: 100%; position: relative; cursor: default;
}
.chart .bar i {
  position: absolute; left: 0; right: 0; bottom: 0; display: block;
  border-radius: 1px 1px 0 0;
}
.chart .bar .stake { background: var(--stake); }
.chart .bar.is-now .stake { background: #fff; }

/* ---------------------------------------------------------------- tables -- */
.table-wrap { overflow-x: auto; margin: 2rem 0; border: 1px solid var(--line); }
.tbl { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: .8rem; }
.tbl th, .tbl td { padding: .62rem .9rem; text-align: right; white-space: nowrap; }
.tbl th:first-child, .tbl td:first-child,
.tbl th:nth-child(2), .tbl td:nth-child(2) { text-align: left; }
.tbl thead th {
  color: var(--ink-4); font-weight: 500; font-size: .66rem;
  letter-spacing: .11em; text-transform: uppercase;
  background: var(--bg-3); border-bottom: 1px solid var(--line); position: sticky; top: 0;
}
.tbl tbody tr { border-bottom: 1px solid var(--line); }
.tbl tbody tr:hover { background: var(--bg-3); }
.tbl tbody tr.is-current { background: rgba(74,222,155,.07); box-shadow: inset 2px 0 0 var(--stake); }
.tbl td { color: var(--ink-2); }

/* ----------------------------------------------------------------- split -- */
.splitbar { display: flex; height: 74px; margin: 2.2rem 0 1rem; border: 1px solid var(--line); }
.seg { display: flex; flex-direction: column; justify-content: center; padding: 0 1.1rem; overflow: hidden; }
.seg span { font-family: var(--mono); font-size: 1.5rem; font-weight: 700; line-height: 1; }
.seg em { font-family: var(--mono); font-size: .62rem; letter-spacing: .13em; text-transform: uppercase; font-style: normal; margin-top: .35rem; opacity: .82; }
.seg-stake  { width: 70%; background: rgba(74,222,155,.14); color: var(--stake); border-right: 1px solid var(--line); }
.seg-jack   { width: 15%; background: rgba(224,179,65,.14); color: var(--jackpot); border-right: 1px solid var(--line); }
.seg-treas  { width: 15%; background: rgba(91,141,214,.14); color: var(--treasury); }

.statgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.sg { background: var(--bg-2); padding: 1.3rem 1.3rem; }
.band.alt .sg { background: var(--bg); }
.sg .v { font-family: var(--mono); font-size: 1.28rem; font-weight: 600; color: var(--ink); display: block; line-height: 1.2; letter-spacing: -.01em; }
.sg .l { font-family: var(--mono); font-size: .64rem; letter-spacing: .11em; text-transform: uppercase; color: var(--ink-4); display: block; margin-top: .35rem; line-height: 1.5; }
.sg.stake .v { color: var(--stake); }

/* ----------------------------------------------------------------- calc -- */
.calc { border: 1px solid var(--line); background: var(--bg-2); padding: 1.6rem; margin: 2.2rem 0; }
.band.alt .calc { background: var(--bg); }
.calc-row { margin-bottom: 1.4rem; }
.calc-row label { display: block; font-family: var(--mono); font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-4); margin-bottom: .6rem; }
.input-wrap { display: flex; align-items: center; gap: 1rem; }
input[type=range] { flex: 1; -webkit-appearance: none; appearance: none; height: 3px; background: var(--line-2); border-radius: 2px; outline: none; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; border-radius: 50%; background: var(--ink); cursor: pointer; border: 2px solid var(--bg-2); }
input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--ink); cursor: pointer; border: 2px solid var(--bg-2); }
output { font-family: var(--mono); font-size: .88rem; color: var(--ink); min-width: 108px; text-align: right; font-weight: 600; }
.calc-out { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: 1.6rem; }

/* ---------------------------------------------------------------- vault -- */
.vault { border: 1px solid var(--line); background: var(--bg-3); padding: 1.6rem; margin: 2.2rem 0; }
.band.alt .vault { background: var(--bg); }
.vault-top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: .9rem; }
.vault-amt { font-family: var(--mono); font-size: 2rem; font-weight: 700; color: var(--jackpot); letter-spacing: -.02em; }
.vault-goal { font-family: var(--mono); font-size: .74rem; color: var(--ink-4); }

/* ----------------------------------------------------------------- foot -- */
.foot { padding: 3rem var(--pad); border-top: 1px solid var(--line); background: var(--bg-2); }
.foot-row { max-width: var(--maxw); margin: 0 auto; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: baseline; }
.brand-sm { font-family: var(--mono); font-size: .82rem; letter-spacing: .16em; color: var(--ink-3); }
.foot-meta { font-family: var(--mono); font-size: .72rem; color: var(--ink-4); letter-spacing: .05em; }
.foot-meta b { color: var(--ink-3); font-weight: 500; }

/* -------------------------------------------------------------- responsive */
@media (max-width: 860px) {
  body { font-size: 16px; }
  .nav { display: none; }
  .status { margin-left: auto; }
  .splitbar { height: auto; flex-direction: column; }
  .seg { width: 100% !important; padding: 1rem 1.1rem; }
  .seg span { font-size: 1.25rem; }
  .chart { height: 130px; gap: 2px; }
  .tbl th, .tbl td { padding: .55rem .6rem; font-size: .72rem; }
}

@media (max-width: 520px) {
  .topbar { gap: .45rem; }
  .brand { font-size: .78rem; letter-spacing: .1em; }
  .site-options { gap: .2rem; }
  .option-btn { padding: .3rem .38rem; font-size: .58rem; }
  .status { padding: .28rem .42rem; font-size: .56rem; letter-spacing: .04em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
