/* TICKETS brand system v2.0
   Colour ratio 60 paper / 25 blue / 10 ink / 5 punch.
   Ubuntu for copy, Source Code Pro for draw data. One-colour mark, no orbit. */
:root {
  --ticket-blue: #2f46af;
  --draw-blue: #24358e;
  --paper: #f7f6f0;
  --ink: #111629;
  --punch: #ff5c35;
  --mist: #dadde7;

  --radius: 14px;
  --maxw: 1080px;
  --font: "Ubuntu", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --mono: "Source Code Pro", ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* beats .gate/.launch display rules */
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-weight: 700; letter-spacing: -0.01em; line-height: 1.1; }
h1 { font-size: clamp(2.75rem, 8vw, 6rem); margin: 0.1em 0 0.15em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); margin: 0 0 1.25rem; }
h3 { font-size: 1.15rem; margin: 0 0 0.4rem; }
p { margin: 0 0 1rem; }
a { color: var(--ticket-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* Notched container: brand "ticket notch" cue without drawing a ticket box. */
.notch {
  --n: 14px;
  clip-path: polygon(
    var(--n) 0, 100% 0, 100% calc(100% - var(--n)),
    calc(100% - var(--n)) 100%, 0 100%, 0 var(--n)
  );
}

/* ---- Header ------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--mist);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; flex: none; display: block; object-fit: contain; }
.footer-brand .brand-mark { width: 22px; height: 22px; }
.gate-card .brand-mark { width: 44px; height: 44px; margin: 0 auto 10px; }
.brand-word { font-weight: 700; font-size: 1.35rem; letter-spacing: 0.02em; color: var(--ink); }
.brand-word.small { font-size: 1rem; }
.header-right { display: flex; align-items: center; gap: 14px; }
.on-solana {
  font-family: var(--mono); font-size: 0.7rem; letter-spacing: 0.18em;
  color: var(--draw-blue); border: 1px solid var(--mist); padding: 3px 8px; border-radius: 6px;
}

.pill {
  font-family: var(--mono); font-size: 0.78rem;
  background: var(--ink); color: var(--paper);
  border: 0; border-radius: 8px; padding: 7px 12px; cursor: pointer;
  max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pill:hover { background: var(--draw-blue); }

/* ---- Hero ------------------------------------------------------------- */
.hero { padding: clamp(2.5rem, 7vw, 5rem) 20px 2.5rem; }
.eyebrow, .step-tag, .pot-label {
  font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--draw-blue);
}
.lede { font-size: 1.2rem; color: var(--ticket-blue); font-weight: 500; margin-bottom: 2rem; }

.draw-card {
  background: var(--ticket-blue); color: var(--paper);
  padding: 28px; border-radius: var(--radius);
  --n: 20px;
}
.draw-meta { display: flex; align-items: center; gap: 12px; font-family: var(--mono); font-size: 0.85rem; letter-spacing: 0.1em; }
.status {
  background: var(--punch); color: var(--ink);
  padding: 2px 8px; border-radius: 5px; font-weight: 600; font-size: 0.72rem; letter-spacing: 0.12em;
}
.countdown {
  font-family: var(--mono); font-weight: 600;
  font-size: clamp(2.5rem, 9vw, 4.5rem); line-height: 1; margin-top: 14px;
  font-variant-numeric: tabular-nums;
}
.countdown-caption { font-size: 0.9rem; opacity: 0.85; margin-top: 6px; }
.draw-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  margin-top: 26px; padding-top: 22px; border-top: 1px solid rgba(247, 246, 240, 0.25);
}
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-value { font-family: var(--mono); font-size: 1.6rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.stat-value.punch { color: var(--punch); }
.stat-label { font-size: 0.8rem; opacity: 0.85; }

/* ---- Launch ------------------------------------------------------- */
.launch { padding: 2.5rem 20px 0; }
.launch-card {
  background: #fff; border: 1px solid var(--mist); border-radius: var(--radius);
  padding: 24px; --n: 18px;
}
.launch-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.launch-links a {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.08em;
  margin-left: 12px;
}
.curve-bar {
  position: relative; height: 34px; margin: 16px 0 8px;
  background: var(--mist); border-radius: 8px; overflow: hidden;
}
.curve-fill {
  position: absolute; inset: 0 auto 0 0; width: 0;
  background: var(--ticket-blue); transition: width 0.6s ease;
}
.curve-fill.graduated { background: var(--punch); }
.curve-label {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 0.85rem; font-weight: 600; color: var(--ink);
  mix-blend-mode: normal;
}
.curve-caption { font-size: 0.85rem; color: #5b6376; margin: 0 0 18px; font-family: var(--mono); }
.launch-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.launch-stats .stat-value { font-family: var(--mono); font-size: 1.4rem; font-weight: 600; color: var(--draw-blue); }
.launch-stats .stat-label { font-size: 0.8rem; color: #5b6376; }

/* ---- How it works --------------------------------------------------- */
.how { padding: 3rem 20px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
.step { background: #fff; border: 1px solid var(--mist); padding: 22px; border-radius: var(--radius); }
.step h3 { margin-top: 8px; }
.step p { margin: 0; color: #333a4d; }

/* ---- Pot ----------------------------------------------------------- */
.pot { padding: 3rem 20px; }
.pot-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pot-figure {
  background: #fff; border: 1px solid var(--mist); border-radius: var(--radius);
  padding: 22px; display: flex; flex-direction: column; gap: 6px;
}
.pot-figure.total { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.pot-figure.total .pot-label { color: var(--mist); }
.pot-value { font-family: var(--mono); font-size: 1.9rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.pot-value.punch { color: var(--punch); }
.pot-sub { font-size: 0.82rem; color: #5b6376; }
.pot-figure.total .pot-sub { color: var(--mist); }

.split { margin-top: 22px; }
.split-bar { display: flex; gap: 3px; height: 44px; font-family: var(--mono); font-size: 0.78rem; }
.seg { display: flex; align-items: center; justify-content: center; color: var(--paper); padding: 0 4px; overflow: hidden; white-space: nowrap; }
.seg-1 { background: var(--ticket-blue); }
.seg-2 { background: var(--draw-blue); }
.seg-3 { background: #1b2a74; }
.seg-4 { background: var(--punch); color: var(--ink); }

.send-hint { margin-top: 20px; font-size: 0.95rem; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---- Winners ----------------------------------------------------- */
.winners { padding: 3rem 20px 4rem; }
.table-scroll { overflow-x: auto; border: 1px solid var(--mist); border-radius: var(--radius); }
.winners-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 640px; }
.winners-table th, .winners-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--mist); }
.winners-table th { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--draw-blue); background: #fff; }
.winners-table td { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.winners-table .num, .winners-table td.num { text-align: right; }
.winners-table tr:last-child td { border-bottom: 0; }
.place-1 { color: var(--ticket-blue); font-weight: 600; }
.place-2 { color: var(--draw-blue); }
.place-3 { color: #444; }
.empty { text-align: center; color: #5b6376; font-family: var(--font); }
.rollover td { color: #8a90a0; font-style: italic; }

/* ---- Footer ---------------------------------------------------- */
.site-footer { border-top: 1px solid var(--mist); background: #fff; margin-top: auto; }
.footer-inner { padding: 26px 20px; display: grid; gap: 12px; }
.footer-brand { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.footer-socials { display: inline-flex; gap: 12px; }
.footer-socials a {
  font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--draw-blue);
}
.disclaimer { font-size: 0.8rem; color: #5b6376; max-width: 64ch; margin: 0; }
.net-tag { font-family: var(--mono); font-size: 0.75rem; color: var(--draw-blue); margin: 0; }

/* ---- Toast --------------------------------------------------- */
.toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(20px);
  background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: 10px;
  font-family: var(--mono); font-size: 0.85rem; opacity: 0; pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- Optional entry gate --------------------------------------- */
.gate {
  position: fixed; inset: 0; z-index: 50;
  background: color-mix(in srgb, var(--ink) 82%, transparent);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.gate-card {
  background: var(--paper); border-radius: var(--radius); padding: 32px;
  max-width: 420px; text-align: center; --n: 18px;
}
.gate-card .brand-word { display: block; margin-bottom: 12px; }
.gate-card p { color: #333a4d; }
.gate-card .pill { margin-top: 8px; }
.gate-blocked { color: var(--punch); font-weight: 600; margin-top: 14px; }

@media (max-width: 720px) {
  .steps, .pot-grid { grid-template-columns: 1fr; }
  .draw-stats { grid-template-columns: 1fr; gap: 12px; }
  .pill { max-width: 62vw; }

  /* Header: keep the logo whole on phones. iOS Safari half-paints content
     inside a position:sticky element that also carries backdrop-filter, and
     the far-left mark is exactly where that artifact lands - so drop the
     blur here and make sure nothing competes with the mark for width. */
  .site-header { background: var(--paper); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .header-inner { gap: 10px; }
  .brand, .brand-mark { flex: none; }
  .header-right { gap: 8px; min-width: 0; }
  .header-right .on-solana { display: none; }
}
