/* ═══════════════════════════════════════════════════════════════════════════
   Z500® — THE ACTUAL Z500 INDEX
   A living fund document maintained by a machine. ansem.io-native system:
   #07080C ground · #4ADE50 phosphor · Literata serif · Geist Mono · sharp.
   Custom components: notch-cut buttons, perforation + guilloche dividers,
   stamped section numerals, ledger seats, banknote microprint.
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
  --bg: #07080C;
  --panel: #0C0E14;
  --panel-2: #10131B;
  --ink: #E8ECF2;
  --muted: #8D94A3;
  --rule: #1A1E28;
  --green: #4ADE50;
  --green-soft: rgba(74, 222, 80, 0.55);
  --green-dim: #1E5A24;
  --red: #E5766D;
  --gold: #C9A227;
  --mono: 'Geist Mono', ui-monospace, Menlo, monospace;
  --serif: 'Literata', Georgia, serif;
  --notch: 9px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 55% 28% at 12% 0%, rgba(74, 222, 80, 0.055), transparent 65%),
    radial-gradient(ellipse 40% 22% at 95% 8%, rgba(74, 222, 80, 0.03), transparent 60%);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.6;
  padding-bottom: 34px; /* room for the fixed bottom tape */
}
::selection { background: var(--green); color: #04140A; }

/* ═══ NAV ═══ */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 26px;
  padding: 0 26px; height: 58px;
  background: rgba(7, 8, 12, 0.88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-bull { height: 34px; }
.brand-word { font-family: var(--serif); font-weight: 700; font-size: 21px; letter-spacing: 0.01em; }
.brand .reg { font-size: 10px; vertical-align: super; color: var(--green); }
.brand-tag { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.28em; color: var(--muted); border-left: 1px solid var(--rule); padding-left: 10px; }
.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  position: relative; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em;
  color: var(--muted); text-decoration: none; padding: 8px 13px;
}
.nav-links a .n-no { color: var(--green-dim); margin-right: 6px; font-size: 9px; }
.nav-links a::after {
  content: ''; position: absolute; left: 13px; right: 13px; bottom: 2px; height: 1px;
  background: var(--green); transform: scaleX(0); transform-origin: left; transition: transform 0.22s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a:hover .n-no { color: var(--green); }
.nav-right { display: flex; align-items: center; gap: 14px; }
.mode-flag { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 9.5px; font-weight: 700; letter-spacing: 0.2em; padding: 4px 10px; border: 1px solid; }
.mode-flag .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.mode-flag.paper { color: var(--gold); border-color: rgba(201, 162, 39, 0.5); }
.mode-flag.live { color: var(--green); border-color: rgba(74, 222, 80, 0.5); background: rgba(74, 222, 80, 0.07); }
.burger { display: none; }

/* ═══ NOTCH BUTTONS (certificate corner-cut) ═══ */
.nbtn {
  position: relative; display: inline-block;
  font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: 0.14em;
  color: var(--ink); text-decoration: none; cursor: pointer;
  padding: 9px 20px; background: var(--panel);
  clip-path: polygon(var(--notch) 0, 100% 0, 100% calc(100% - var(--notch)), calc(100% - var(--notch)) 100%, 0 100%, 0 var(--notch));
  border: none; overflow: hidden; transition: color 0.2s ease;
  box-shadow: inset 0 0 0 1px var(--rule);
}
.nbtn::before {
  content: ''; position: absolute; inset: 0; background: rgba(74, 222, 80, 0.12);
  transform: translateX(-101%); transition: transform 0.24s ease; z-index: -1;
}
.nbtn:hover { color: var(--green); box-shadow: inset 0 0 0 1px var(--green-dim); }
.nbtn:hover::before { transform: translateX(0); }
.nbtn.solid { background: var(--green); color: #04140A; box-shadow: none; }
.nbtn.solid::before { background: rgba(255, 255, 255, 0.25); }
.nbtn.solid:hover { color: #04140A; box-shadow: 0 0 22px rgba(74, 222, 80, 0.35); }
.nbtn.lg { padding: 13px 28px; font-size: 12px; }

/* ═══ HERO ═══ */
.hero { position: relative; padding: 74px 26px 0; overflow: hidden; }
.hero > .hero-grid, .hero > .stats-band { max-width: 1108px; margin-left: auto; margin-right: auto; }
/* full-bleed painted key art as the hero's own background */
.hero-art-bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 74% 38%;
  z-index: 0; opacity: 0.95;
}
/* shade: melts the art into the page and keeps the left text column readable */
.hero-shade {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(90deg, var(--bg) 8%, rgba(7, 8, 12, 0.9) 32%, rgba(7, 8, 12, 0.35) 58%, rgba(7, 8, 12, 0.08) 82%),
    linear-gradient(0deg, var(--bg) 2%, transparent 26%),
    linear-gradient(180deg, rgba(7, 8, 12, 0.75) 0%, transparent 20%);
}
.hero-chart { position: absolute; inset: auto 0 0 0; width: 100%; height: 78%; z-index: 1; opacity: 0.4; }
#chart-path { stroke-dasharray: 2600; stroke-dashoffset: 2600; animation: draw 2.8s ease-out 0.3s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 30px; align-items: end; min-height: 480px; }
.fund-no { font-family: var(--mono); font-size: 10px; letter-spacing: 0.26em; color: var(--muted); }
.hero-name { font-family: var(--serif); font-weight: 700; font-size: clamp(84px, 13vw, 168px); line-height: 0.92; margin: 10px 0 0; letter-spacing: -0.015em; }
.hero-name .reg { font-size: 0.2em; vertical-align: super; font-weight: 400; color: var(--green); }
.hero-sub { font-family: var(--mono); font-size: 13px; letter-spacing: 0.4em; margin-top: 12px; color: var(--green); }
.hero-tag { margin: 30px 0 0; }
.hero-tag .t-line { display: block; font-family: var(--mono); font-size: 13px; letter-spacing: 0.12em; color: var(--muted); margin-bottom: 12px; }
.hero-tag .t-stamp {
  display: inline-block; font-family: var(--serif); font-weight: 700; font-style: italic;
  font-size: clamp(22px, 3vw, 34px); line-height: 1.15; color: var(--green);
  border: 2px solid var(--green); padding: 10px 18px; transform: rotate(-2deg);
  box-shadow: 0 0 30px rgba(74, 222, 80, 0.12), inset 0 0 18px rgba(74, 222, 80, 0.06);
  animation: stamp 0.5s cubic-bezier(0.2, 2.4, 0.4, 1) 1.1s backwards;
}
@keyframes stamp { from { transform: rotate(-9deg) scale(2.1); opacity: 0; } to { transform: rotate(-2deg) scale(1); opacity: 1; } }
.hero-ctas { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.ca-chip { display: inline-flex; align-items: center; gap: 0; margin-top: 22px; font-family: var(--mono); border: 1px solid var(--rule); background: var(--panel); }
.ca-chip .ca-k { font-size: 9.5px; letter-spacing: 0.2em; color: #04140A; background: var(--green); padding: 7px 10px; font-weight: 700; }
.ca-chip code { font-size: 11.5px; color: var(--muted); padding: 7px 12px; word-break: break-all; }
.ca-chip .ca-btn { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.14em; background: none; border: none; border-left: 1px solid var(--rule); color: var(--green); padding: 7px 12px; cursor: pointer; }
.ca-chip .ca-btn:hover { background: rgba(74, 222, 80, 0.1); }
.hero-right { position: relative; text-align: right; align-self: end; padding-bottom: 8px; }
.bull-caption { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.26em; color: var(--muted); margin-top: 8px; }

/* stats band */
.stats-band { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(5, 1fr); margin-top: 58px; border: 1px solid var(--rule); background: rgba(10, 12, 17, 0.82); backdrop-filter: blur(5px); }
.stat { padding: 18px 18px 14px; border-right: 1px solid var(--rule); position: relative; }
.stat:last-child { border-right: none; }
.stat::before { content: ''; position: absolute; top: 0; left: 0; width: 22px; height: 1px; background: var(--green); }
.s-value { font-family: var(--mono); font-size: 24px; font-weight: 700; color: var(--green); text-shadow: 0 0 16px rgba(74, 222, 80, 0.35); }
.s-label { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.22em; color: var(--muted); margin-top: 6px; }

/* ═══ DIVIDERS ═══ */
.perf { display: flex; align-items: center; gap: 14px; max-width: 1160px; margin: 64px auto 0; padding: 0 26px; }
.perf::before, .perf::after { content: ''; flex: 1; border-top: 2px dashed var(--rule); }
.perf-cut { color: var(--muted); font-size: 13px; transform: scaleX(-1); }
.perf-no { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.22em; color: var(--muted); white-space: nowrap; }
.guilloche { max-width: 1160px; margin: 64px auto 0; padding: 0 26px; }
.guilloche svg { display: block; width: 100%; height: 36px; }

/* ═══ SECTIONS ═══ */
main { max-width: 1160px; margin: 0 auto; padding: 0 26px; }
.sec { padding-top: 64px; }
.sec-head { position: relative; display: flex; align-items: baseline; gap: 18px; border-bottom: 1px solid var(--green-dim); padding-bottom: 10px; margin-bottom: 26px; }
.ghost-no {
  position: absolute; right: 0; top: -46px; font-family: var(--serif); font-weight: 700; font-size: 120px;
  line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(74, 222, 80, 0.14); pointer-events: none; user-select: none;
}
.sec-head h2 { font-family: var(--mono); font-size: 15px; font-weight: 700; letter-spacing: 0.3em; margin: 0; color: var(--ink); }
.sec-head h2::before { content: '§ '; color: var(--green); }
.sec-note { font-family: var(--serif); font-style: italic; font-size: 13.5px; color: var(--muted); }

/* ═══ 01 THE BOARD (composition) ═══ */
.board { display: flex; flex-direction: column; }
.seat {
  display: grid; grid-template-columns: 64px 1.4fr 110px 130px 1fr 130px 120px;
  align-items: center; gap: 14px; padding: 13px 16px;
  border-bottom: 1px solid var(--rule); background: transparent; transition: background 0.18s ease;
}
.seat:hover { background: var(--panel); }
.seat.next-buy { background: linear-gradient(90deg, rgba(74, 222, 80, 0.09), rgba(74, 222, 80, 0.02) 60%, transparent); border-left: 2px solid var(--green); padding-left: 14px; }
.seat-no { font-family: var(--serif); font-weight: 700; font-size: 26px; color: var(--green); opacity: 0.85; font-variant-numeric: tabular-nums; }
.seat.open .seat-no { color: var(--rule); }
.seat-name { font-family: var(--serif); font-size: 16px; color: var(--ink); }
.seat-name small { display: block; font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.14em; color: var(--muted); margin-top: 2px; }
.seat-tick { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--green); }
.seat-mcap { font-family: var(--mono); font-size: 12.5px; color: var(--ink); text-align: right; }
.seat-weight { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 10.5px; color: var(--muted); }
.tally { flex: 1; height: 9px; background: repeating-linear-gradient(90deg, var(--rule) 0 3px, transparent 3px 6px); position: relative; }
.tally i { position: absolute; inset: 0 auto 0 0; background: repeating-linear-gradient(90deg, var(--green) 0 3px, transparent 3px 6px); box-shadow: 0 0 8px rgba(74, 222, 80, 0.4); }
.seat-owed { font-family: var(--mono); font-size: 11.5px; color: var(--muted); text-align: right; }
.seat-status { font-family: var(--mono); font-size: 9px; letter-spacing: 0.16em; color: var(--muted); text-align: right; }
.seat-status .next-tag { color: var(--green); font-weight: 700; animation: pulse 1.6s ease-in-out infinite; }
.seat.open { color: var(--muted); }
.seat-ghost { grid-column: 2 / -1; font-family: var(--serif); font-style: italic; font-size: 13.5px; color: rgba(141, 148, 163, 0.5); }
.retired-wrap { margin-top: 18px; }
.retired-head { font-family: var(--mono); font-size: 9px; letter-spacing: 0.2em; color: var(--muted); border-bottom: 1px solid var(--rule); padding-bottom: 5px; margin-bottom: 8px; }
.retired-list { font-family: var(--mono); font-size: 11.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 14px; }

/* ═══ 02 PLATES (methodology) ═══ */
.plates { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.plate {
  position: relative; background: var(--panel); padding: 26px 22px 22px; overflow: hidden;
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
  box-shadow: inset 0 0 0 1px var(--rule);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.plate:hover { box-shadow: inset 0 0 0 1px var(--green-dim); transform: translateY(-3px); }
.plate-rn { position: absolute; top: 6px; right: 14px; font-family: var(--serif); font-weight: 700; font-size: 64px; line-height: 1; color: rgba(74, 222, 80, 0.1); user-select: none; }
.plate-ic { width: 42px; height: 42px; color: var(--green); margin-bottom: 14px; }
.plate h3 { font-family: var(--mono); font-size: 13px; letter-spacing: 0.26em; margin: 0 0 10px; color: var(--ink); }
.plate p { margin: 0; font-size: 14.5px; color: var(--muted); }
.plate p em, .plate p span { color: var(--ink); font-style: normal; font-family: var(--mono); font-size: 13px; }
.method-note { border-left: 2px solid var(--green); padding: 12px 18px; font-style: italic; color: var(--muted); margin-top: 22px; font-size: 14.5px; background: linear-gradient(90deg, rgba(74, 222, 80, 0.05), transparent 70%); }

/* ═══ 03 THE RECORD ═══ */
.ledgers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.l-head { font-family: var(--mono); font-size: 10px; letter-spacing: 0.24em; color: var(--ink); border-bottom: 1px solid var(--green-dim); padding-bottom: 6px; margin-bottom: 8px; }
.l-head i { color: var(--green); font-style: normal; margin-right: 6px; }
.l-rows { font-family: var(--mono); font-size: 11px; }
.l-rows .row { display: flex; align-items: baseline; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--rule); }
.l-rows .row .when { color: var(--green-dim); min-width: 30px; font-size: 10px; }
.l-rows .row .amt { color: var(--ink); font-weight: 600; }
.l-rows .row .leader { flex: 1; border-bottom: 1px dotted var(--rule); align-self: center; }
.l-rows .row a { color: var(--green); text-decoration: none; font-size: 10px; }
.l-rows .row a:hover { text-decoration: underline; }
.l-rows .row .dry { color: var(--gold); font-size: 8px; letter-spacing: 0.12em; border: 1px solid rgba(201, 162, 39, 0.4); padding: 1px 5px; }
.empty { color: rgba(141, 148, 163, 0.55); font-family: var(--serif); font-style: italic; font-size: 13px; padding: 14px 0; }

/* ═══ 04 PROVENANCE ═══ */
.manifesto { margin: 0; position: relative; padding: 8px 0 0 34px; }
.manifesto::before { content: '“'; position: absolute; left: -6px; top: -28px; font-family: var(--serif); font-size: 110px; color: rgba(74, 222, 80, 0.18); }
.manifesto p { font-family: var(--serif); font-size: clamp(19px, 2.4vw, 25px); line-height: 1.5; color: var(--ink); margin: 0 0 18px; max-width: 860px; }
.manifesto em { color: var(--green); font-style: italic; }
.manifesto .m-sig { font-size: clamp(16px, 1.9vw, 20px); color: var(--muted); border-top: 1px solid var(--rule); padding-top: 16px; max-width: 860px; }
.smallprint { margin-top: 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.smallprint p { font-family: var(--serif); font-style: italic; font-size: 12.5px; color: var(--muted); margin: 0; border-top: 1px solid var(--rule); padding-top: 10px; }
.smallprint b { color: var(--green); font-style: normal; }

/* ═══ FOOTER ═══ */
.foot { max-width: 1160px; margin: 70px auto 0; padding: 0 26px 26px; }
.microprint { height: 14px; overflow: hidden; white-space: nowrap; font-family: var(--mono); font-size: 8px; letter-spacing: 0.32em; color: rgba(74, 222, 80, 0.22); user-select: none; }
.microprint::before { content: 'THEACTUALZ500INDEX·EVERYONEBOUGHTTHETICKER·NOBODYBUILTTHEINDEX·THEACTUALZ500INDEX·EVERYONEBOUGHTTHETICKER·NOBODYBUILTTHEINDEX·THEACTUALZ500INDEX·EVERYONEBOUGHTTHETICKER·NOBODYBUILTTHEINDEX·'; }
.microprint.flip { transform: scaleX(-1); }
.foot-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 0; flex-wrap: wrap; }
.foot-brand { display: flex; align-items: center; gap: 8px; font-family: var(--serif); font-weight: 700; font-size: 18px; }
.foot-brand img { height: 26px; }
.foot-brand .reg { font-size: 9px; vertical-align: super; color: var(--green); }
.foot-serial { font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.24em; color: var(--muted); }
.foot-links a { font-family: var(--mono); font-size: 10px; letter-spacing: 0.16em; color: var(--green); text-decoration: none; }

/* ═══ BOTTOM TAPE ═══ */
.tape { position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; background: #04050A; overflow: hidden; white-space: nowrap; border-top: 1px solid var(--rule); }
.tape-inner { display: inline-block; padding: 8px 0; font-family: var(--mono); font-size: 11px; animation: tape 45s linear infinite; }
.tape-seg { margin: 0 24px; color: var(--muted); }
.tape .up { color: var(--green); }
.tape .down { color: var(--red); }
@keyframes tape { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 960px) {
  .nav { gap: 14px; }
  .nav-links { display: none; position: fixed; inset: 58px 0 auto 0; background: rgba(7, 8, 12, 0.98); flex-direction: column; padding: 18px 26px; border-bottom: 1px solid var(--rule); }
  .nav-links.openm { display: flex; }
  .nav-links a { font-size: 14px; padding: 14px 0; border-bottom: 1px solid var(--rule); }
  .burger { display: flex; flex-direction: column; gap: 4px; background: none; border: none; cursor: pointer; padding: 8px; margin-left: 6px; }
  .burger span { width: 20px; height: 2px; background: var(--green); }
  .hero-grid { grid-template-columns: 1fr; min-height: 420px; }
  .hero-right { text-align: left; }
  .hero-art-bg { object-position: 62% 30%; opacity: 0.55; }
  .hero-shade { background: linear-gradient(180deg, rgba(7,8,12,0.82) 0%, rgba(7,8,12,0.55) 45%, var(--bg) 96%); }
  .stats-band { grid-template-columns: repeat(2, 1fr); }
  .stat { border-bottom: 1px solid var(--rule); }
  .seat { grid-template-columns: 44px 1fr 90px; }
  .seat-mcap, .seat-weight, .seat-owed { display: none; }
  .plates, .ledgers, .smallprint { grid-template-columns: 1fr; }
  .ghost-no { font-size: 72px; top: -28px; }
}
