/* Kingpin Legacy website. Dark noir, lamp gold. No framework. */

@font-face {
  font-family: "Oswald";
  src: url("fonts/Oswald-SemiBold.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("fonts/Barlow-Medium.woff2") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --night: #0a0e1a;
  --night-2: #111727;
  --night-3: #1a2236;
  --line: #2a3450;
  --gold: #d9a648;
  --gold-hi: #f0c870;
  --gold-dim: #8f6d2c;
  --teal: #4fd1c5;
  --text: #ece6d8;
  --muted: #b3ab9b;       /* 8.4:1 on --night */
  --danger: #ff8a7a;
  --ok: #7fd99a;
  --radius: 10px;
  --wrap: 1120px;
  --head: "Oswald", "Arial Narrow", Arial, sans-serif;
  --body: "Barlow", "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }

body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font: 500 1.0625rem/1.6 var(--body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-hi); text-underline-offset: 3px; }
a:hover { color: #fff; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--head); font-weight: 600; line-height: 1.15; letter-spacing: .02em; margin: 0 0 .6em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); text-transform: uppercase; }
h2 { font-size: clamp(1.5rem, 3.4vw, 2.2rem); text-transform: uppercase; color: var(--gold); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 28px; } }
.narrow { max-width: 780px; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--gold); color: var(--night); padding: 8px 14px; z-index: 100; font-weight: 600; }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header ---------- */
.site-head { position: sticky; top: 0; z-index: 50; background: rgba(10, 14, 26, .92); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--gold); font-family: var(--head); font-size: 1.2rem; letter-spacing: .08em; text-transform: uppercase; }
.brand img { width: 36px; height: 36px; }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a { color: var(--text); text-decoration: none; font-family: var(--head); text-transform: uppercase; letter-spacing: .08em; font-size: .95rem; padding: 10px 12px; border-radius: 6px; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--gold-hi); }
.nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--gold); border-radius: 0; }
.nav .btn { margin-left: 6px; }
.nav-toggle { display: none; }
@media (max-width: 640px) {
  .nav-toggle { display: inline-flex; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 8px 12px; font: 600 .95rem var(--head); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
  .nav { display: none; position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--night-2); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 14px 8px; }
  .nav .btn { margin: 8px 0 0; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px;
  font: 600 1rem var(--head); letter-spacing: .1em; text-transform: uppercase; text-decoration: none;
  color: var(--night); background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, #b8862e);
  border: 1px solid #f6d98f; border-radius: 6px; cursor: pointer;
  box-shadow: 0 2px 0 #6b4f1d, 0 6px 22px rgba(217, 166, 72, .18);
}
.btn:hover { color: var(--night); filter: brightness(1.08); }
.btn:disabled, .btn[aria-disabled="true"] { filter: grayscale(.8) brightness(.6); cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--gold-hi); border-color: var(--gold-dim); box-shadow: none; }
.btn.ghost:hover { color: #fff; border-color: var(--gold); }
.btn.small { min-height: 40px; padding: 0 16px; font-size: .9rem; }
.linkbtn { background: none; border: 0; color: var(--gold-hi); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 4px 0; }

/* ---------- ornament ---------- */
.rule { display: flex; align-items: center; gap: 14px; color: var(--gold); margin: 0 auto 28px; max-width: 360px; }
.rule::before, .rule::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.rule::after { background: linear-gradient(90deg, var(--gold), transparent); }
.rule span { width: 10px; height: 10px; transform: rotate(45deg); border: 1px solid var(--gold); }
.eyebrow { font: 600 .85rem var(--head); letter-spacing: .25em; text-transform: uppercase; color: var(--teal); margin-bottom: .5em; }

/* ---------- hero ---------- */
.hero { position: relative; min-height: min(88vh, 820px); display: grid; place-items: center; text-align: center; overflow: hidden; isolation: isolate; }
.hero picture, .hero .hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero .hero-bg img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 50%; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(ellipse at 50% 38%, rgba(10,14,26,.55), rgba(10,14,26,.1) 60%), linear-gradient(180deg, rgba(10,14,26,.15) 60%, var(--night) 98%); }
.hero-inner { padding: 64px 16px 48px; max-width: 760px; }
.hero .logo { width: min(440px, 82vw); margin: 0 auto 8px; filter: drop-shadow(0 8px 30px rgba(0,0,0,.7)); }
.tagline { font: 600 clamp(1.15rem, 3vw, 1.6rem) var(--head); letter-spacing: .22em; text-transform: uppercase; color: var(--text); margin: 0 0 28px; text-shadow: 0 2px 12px #000; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.platforms { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 26px; list-style: none; padding: 0; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: rgba(17,23,39,.8); font-size: .92rem; color: var(--muted); }
.chip.live { border-color: var(--gold-dim); color: var(--text); }
.chip.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 8px var(--ok); }

/* ---------- sections ---------- */
.section { padding: 72px 0; }
.section.alt { background: linear-gradient(180deg, var(--night), var(--night-2) 20%, var(--night-2) 80%, var(--night)); }
.center { text-align: center; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 620px; margin: 0 auto 1.2em; }
.quote { font: 600 clamp(1.2rem, 2.6vw, 1.6rem)/1.4 var(--head); color: var(--gold-hi); letter-spacing: .03em; max-width: 680px; margin: 0 auto; }
.quote cite { display: block; margin-top: 10px; font: 500 1rem var(--body); color: var(--muted); font-style: normal; }

.pillars { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-top: 32px; }
.pillar { background: var(--night-2); border: 1px solid var(--line); border-top: 2px solid var(--gold); border-radius: var(--radius); padding: 20px; }
.pillar h3 { color: var(--gold-hi); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .3em; }
.pillar p { margin: 0; color: var(--muted); }

/* gallery */
.gallery { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); margin-top: 32px; }
@media (min-width: 760px) { .gallery { grid-template-columns: repeat(4, 1fr); } }
.gallery figure { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--night-2); position: relative; }
.gallery img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; transition: transform .4s ease; }
.gallery figure:hover img { transform: scale(1.03); }
.gallery figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 12px 10px; font: 600 .9rem var(--head); letter-spacing: .12em; text-transform: uppercase; background: linear-gradient(transparent, rgba(10,14,26,.92)); }
.gallery .wide { grid-column: 1 / -1; }
.gallery .wide img { aspect-ratio: 16 / 9; }
.note-small { font-size: .9rem; color: var(--muted); }

/* ---------- cards, steps ---------- */
.card { background: var(--night-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card + .card { margin-top: 16px; }
.card.gold { border-color: var(--gold-dim); box-shadow: inset 0 0 0 1px rgba(217,166,72,.15); }
.steps { list-style: none; counter-reset: step; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.steps li { counter-increment: step; background: var(--night-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px 20px; position: relative; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold-hi); font: 600 1.2rem var(--head); margin-bottom: 12px; }
.steps h3 { margin-bottom: .3em; }
.steps p { margin: 0; color: var(--muted); }
.twocol { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { padding-left: 28px; position: relative; margin-bottom: 8px; }
.ticks li::before { content: ""; position: absolute; left: 4px; top: .55em; width: 10px; height: 10px; transform: rotate(45deg); background: var(--gold); }
.ticks.cross li::before { background: none; border: 1px solid var(--muted); }
.big-x2 { font: 600 3.2rem/1 var(--head); color: var(--gold-hi); }

/* ---------- page header ---------- */
.page-head { padding: 56px 0 24px; border-bottom: 1px solid var(--line); background: radial-gradient(ellipse at 50% 0, rgba(217,166,72,.12), transparent 65%); }
.page-head p { color: var(--muted); max-width: 680px; }

/* ---------- legal / prose ---------- */
.prose { padding: 32px 0 64px; }
.prose h2 { font-size: 1.4rem; margin-top: 2em; }
.prose h3 { color: var(--gold-hi); margin-top: 1.4em; }
.prose li { margin-bottom: .4em; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.2em; font-size: .98rem; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px; border-bottom: 1px solid var(--line); }
.prose th { color: var(--gold-hi); font-family: var(--head); font-weight: 600; letter-spacing: .04em; }
.table-scroll { overflow-x: auto; }
.draft { border: 1px dashed var(--gold); background: rgba(217,166,72,.08); color: var(--text); border-radius: var(--radius); padding: 14px 16px; margin: 24px 0 8px; }
.draft strong { color: var(--gold-hi); text-transform: uppercase; letter-spacing: .08em; font-family: var(--head); }
.fill { background: rgba(79,209,197,.14); outline: 1px dashed var(--teal); padding: 0 4px; border-radius: 3px; }
.updated { color: var(--muted); font-size: .95rem; }

/* ---------- shop ---------- */
.banner { padding: 12px 16px; border-radius: var(--radius); margin: 20px 0 0; border: 1px solid; }
.banner.demo { border-color: var(--teal); background: rgba(79,209,197,.1); }
.banner.warn { border-color: var(--danger); background: rgba(255,138,122,.08); }
.shop-grid { display: grid; gap: 24px; padding: 32px 0 64px; }
.form-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 6px; flex: 1 1 240px; }
label { font-weight: 600; }
input[type="email"], input[type="text"] {
  min-height: 48px; padding: 0 14px; font: 500 1.05rem var(--body); color: var(--text);
  background: var(--night); border: 1px solid #44506e; border-radius: 6px; width: 100%;
}
input:focus-visible { border-color: var(--teal); }
input.code { letter-spacing: .35em; font-family: var(--head); font-size: 1.3rem; max-width: 220px; }
.hint { color: var(--muted); font-size: .95rem; margin: 6px 0 0; }
.status { min-height: 1.6em; margin-top: 10px; }
.status.err { color: var(--danger); }
.status.ok { color: var(--ok); }
.whoami { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.packs { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); margin-top: 8px; }
.pack { display: flex; flex-direction: column; background: linear-gradient(180deg, var(--night-3), var(--night-2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.pack.featured { border-color: var(--gold); }
.pack h3 { color: var(--gold-hi); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .2em; }
.pack .tag { align-self: flex-start; font: 600 .75rem var(--head); letter-spacing: .14em; text-transform: uppercase; color: var(--night); background: var(--gold); padding: 3px 8px; border-radius: 4px; margin-bottom: 10px; }
.pack ul { padding-left: 18px; margin: 6px 0 12px; color: var(--muted); }
.random-label { font: 600 .85rem var(--head); letter-spacing: .08em; text-transform: uppercase; color: var(--gold-hi); border: 1px solid var(--gold); border-radius: 4px; padding: 2px 8px; align-self: flex-start; margin: 0 0 8px; }
.pack .odds { margin: 0 0 12px; }
.pack .odds summary { cursor: pointer; color: var(--gold-hi); font-weight: 600; }
.pack .odds h4 { margin: 10px 0 2px; font-size: 1rem; }
.pack .odds .hint { font-size: .85rem; margin: 4px 0; }
.odds-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.odds-table th, .odds-table td { text-align: left; padding: 3px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.odds-table td:first-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pack .price { font: 600 1.8rem var(--head); margin: auto 0 4px; }
.pack .x2 { color: var(--teal); font-size: .92rem; margin-bottom: 14px; }
.history { width: 100%; border-collapse: collapse; }
.history th, .history td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
.history th { font: 600 .9rem var(--head); letter-spacing: .08em; text-transform: uppercase; color: var(--gold-hi); }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .85rem; border: 1px solid var(--line); }
.pill.paid { color: var(--ok); border-color: rgba(127,217,154,.5); }
.pill.pending { color: var(--gold-hi); border-color: var(--gold-dim); }
.pill.refunded, .pill.chargeback, .pill.failed { color: var(--danger); border-color: rgba(255,138,122,.5); }
@media (max-width: 560px) {
  .history thead { display: none; }
  .history tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .history td { display: flex; justify-content: space-between; border: 0; padding: 4px 0; }
  .history td::before { content: attr(data-label); color: var(--muted); padding-right: 12px; }
}

dialog { width: min(600px, calc(100vw - 24px)); max-height: calc(100vh - 24px); padding: 0; color: var(--text); background: var(--night-2); border: 1px solid var(--gold-dim); border-radius: var(--radius); }
dialog::backdrop { background: rgba(0,0,0,.75); }
.dlg { padding: 22px; }
.dlg h2 { font-size: 1.4rem; }
.consent { list-style: none; padding: 0; margin: 16px 0; display: grid; gap: 12px; }
.consent label { display: grid; grid-template-columns: 26px 1fr; gap: 10px; font-weight: 500; cursor: pointer; }
.consent input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--gold); }
.dlg-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; margin-top: 18px; }
.summary { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--night); }
.summary strong { font: 600 1.3rem var(--head); color: var(--gold-hi); }

/* ---------- footer ---------- */
.site-foot { border-top: 1px solid var(--line); background: #070a13; padding: 40px 0 28px; font-size: .95rem; color: var(--muted); }
.foot-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.site-foot h2 { font-size: 1rem; letter-spacing: .14em; margin-bottom: .6em; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin-bottom: 6px; }
.site-foot a { color: var(--text); }
.site-foot a:hover { color: var(--gold-hi); }
.foot-small { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
[hidden] { display: none !important; }

/* small utilities (no inline styles: the CSP blocks them) */
.m0 { margin: 0; }
.mt0 { margin-top: 0; }
.mt-s { margin-top: 12px; }
.mt-m { margin-top: 24px; }
.m-b0 { margin-bottom: 0; }
.pt-s { padding-top: 40px; }
.plain { list-style: none; padding: 0; }
.field-code { flex: 0 1 240px; }
@media (max-width: 480px) { .tagline { letter-spacing: .1em; } }
.pack.blocked { opacity: .6; }
.blocked-why { color: var(--muted); font-size: .95rem; margin: 0; }
.consent-text { font-size: .95rem; color: var(--muted); border-left: 2px solid var(--gold-dim); padding-left: 12px; }
.payout { display: flex; gap: 16px; align-items: center; margin-bottom: 12px; }
.payout .big-x2 { font-size: 2.4rem; }
