/* Night of Glory · Port Harcourt
   Everything is taken from Gatsby's lockup: the night-black ground, brushed silver,
   gold foil (used only as the real texture, never as a CSS gradient), and the
   yellow PORT HARCOURT tag with navy type, which becomes the one action colour. */

:root {
  --night: #08080a;
  --panel: #131317;
  --panel-2: #1b1b20;
  --ink: #f3f3f1;
  --soft: #a3a3a9;
  --gold: #f0c419;          /* flat fallback for the foil */
  --tag: #ffe600;
  --tag-hover: #fff15c;
  --navy: #0c1d4a;
  --ok: #1f9d5b;
  --warn: #c98a00;
  --bad: #c4343a;

  --m: 20px;                /* the page's one outer margin */
  --s-1: 14px;              /* small notes */
  --s0: 17px;               /* text */
  --s1: clamp(22px, 2.1vw, 30px);   /* statements, facts */
  --s2: clamp(30px, 3.4vw, 48px);   /* section headings */

  --ease: cubic-bezier(.2, .7, .1, 1);
  color-scheme: dark;
}
@media (min-width: 768px) { :root { --m: 32px; } }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: var(--s0);
  line-height: 1.5;
  font-variation-settings: 'wdth' 100;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
::selection { background: var(--tag); color: var(--navy); }
:focus-visible { outline: 3px solid var(--tag); outline-offset: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }

/* ---------- display type ---------- */
.display {
  font-weight: 900;
  font-variation-settings: 'wdth' 125;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: .9;
}
.foil-gold, .foil-silver {
  /* taste-skill-ignore: not a gradient — the letters are filled with the real foil photographed from the event lockup */
  -webkit-background-clip: text; background-clip: text; /* taste-skill-ignore */
  -webkit-text-fill-color: transparent;
  background-size: 160px auto; background-repeat: repeat;
}
.foil-gold { background-image: url('/img/gold.jpg'); color: var(--gold); }
.foil-silver { background-image: url('/img/silver.jpg'); color: #e6e6e3; background-size: 90px auto; }

/* ---------- action ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 56px; padding: 0 28px;
  border: 0; border-radius: 0;
  background: var(--tag); color: var(--navy);
  font: inherit; font-size: 16px; font-weight: 800; font-variation-settings: 'wdth' 112;
  text-transform: uppercase; letter-spacing: .02em; text-decoration: none;
  cursor: pointer;
  transition: background-color .2s var(--ease), transform .15s var(--ease);
}
.btn:hover { background: var(--tag-hover); }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .65; cursor: progress; }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn.quiet { background: var(--panel-2); color: var(--ink); }
.btn.quiet:hover { background: #26262c; }

.textlink { color: var(--ink); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--tag); }
.textlink:hover { color: var(--tag); }

/* ---------- top bar ---------- */
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--m);
  font-size: 15px;
}
.bar .place { font-weight: 700; font-variation-settings: 'wdth' 112; text-transform: uppercase; letter-spacing: .02em; }
.bar nav { display: flex; align-items: center; gap: 24px; }
.bar nav a:not(.btn) { text-decoration: none; color: var(--soft); transition: color .2s; }
.bar nav a:not(.btn):hover { color: var(--ink); }
.bar .btn { min-height: 44px; padding: 0 18px; font-size: 14px; }
.bar nav a { white-space: nowrap; }
@media (max-width: 560px) {
  .bar .hide-sm { display: none; }
  .bar:has(#nav-pass:not(.hidden)) .place { display: none; }   /* the lockup below already says it */
  .bar:has(#nav-pass:not(.hidden)) { justify-content: flex-end; }
}

/* ---------- hero: the lockup as a monument ---------- */
.hero {
  display: grid; grid-template-rows: auto 1fr auto;
  padding: 0 var(--m) 28px;
}
@media (min-width: 960px) { .hero { min-height: calc(100svh - 80px); } }
.hero-copy {
  display: grid; gap: 24px; align-content: start;
  padding: 24px 0 32px;
}
@media (min-width: 960px) {
  .hero-copy { justify-content: end; padding: 40px 0 56px; }
}
@media (max-width: 959px) { .hero-copy .btn { width: 100%; } }

.lockup { margin: 0; display: grid; justify-items: center; gap: clamp(6px, 1.2vw, 18px); }
.lockup .lk-tag   { width: 35%; }
.lockup .lk-night { width: 78.2%; }
.lockup .lk-glory { width: 100%; }
@media (max-width: 959px) {
  /* on a phone the monument comes first, then the words */
  .lockup-wrap { order: -1; padding: 28px 0 8px; }
  .hero { display: flex; flex-direction: column; }
}

/* load sequence: tag, then NIGHT OF, then GLORY lands heaviest */
.js .lockup img { opacity: 0; transform: translateY(28px); animation: rise .9s var(--ease) forwards; }
.js .lockup .lk-night { animation-delay: .12s; }
.js .lockup .lk-glory { transform: translateY(40px) scale(.96); animation-delay: .24s; animation-duration: 1.1s; }
.js .hero-copy > * { opacity: 0; transform: translateY(18px); animation: rise .8s var(--ease) forwards; animation-delay: .5s; }
.js .hero-copy > * + * { animation-delay: .6s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* signature move: the monument settles as you scroll away from it */
@supports (animation-timeline: view()) {
  .lockup-wrap { animation: settle linear both; animation-timeline: view(); animation-range: exit 0% exit 100%; }
  @keyframes settle { to { transform: scale(.93); opacity: .35; } }
}

/* ---------- register: the live pass ---------- */
.register { padding: 72px var(--m) 120px; }
.register-grid { display: grid; gap: 32px; max-width: 1280px; margin: 0 auto; }
@media (min-width: 960px) {
  .register { padding-top: 160px; padding-bottom: 200px; }
  .register-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
    grid-template-areas: "head ticket" "form ticket";
    grid-template-rows: auto 1fr;
    column-gap: 8vw; row-gap: 0; align-items: start;
  }
  .reg-head { grid-area: head; }
  .reg-form { grid-area: form; }
  .register-grid .ticket-col { grid-area: ticket; position: sticky; top: 40px; }
}
.register h2, .night h2 {
  margin: 0 0 14px;
  font-size: var(--s2); font-weight: 900; font-variation-settings: 'wdth' 118;
  text-transform: uppercase; letter-spacing: -0.015em; line-height: .95;
}
.register .intro { margin: 0; max-width: 42ch; }
.reg-head .have-pass { margin: 24px 0 0; }
/* on a phone the preview is just the top of the pass, so the name stays in view above the fields */
@media (max-width: 959px) {
  .register .t-tear, .register .t-body { display: none; }
  .register .t-head { padding: 22px 20px 20px; }
  .register .t-head .t-glory { width: 70%; }
  .register .t-head .t-night { width: 54%; }
  .register .t-head .t-tag { width: 28%; }
}
@media (min-width: 960px) { .reg-head { padding-bottom: 40px; } }

.field { display: grid; gap: 8px; margin-bottom: 22px; }
.field label { font-weight: 700; font-size: 15px; }
.field label span { color: var(--soft); font-weight: 400; }
.field input {
  width: 100%; min-height: 58px; padding: 0 18px;
  background: var(--panel); color: var(--ink);
  border: 0; border-bottom: 3px solid transparent; border-radius: 0; outline: 0;
  font: inherit; font-size: 18px;
  transition: background-color .2s, border-color .2s;
}
.field input::placeholder { color: #66666d; }
.field input:hover { background: var(--panel-2); }
.field input:focus { background: var(--panel-2); border-bottom-color: var(--tag); }
.field input[aria-invalid="true"] { border-bottom-color: var(--bad); }
.form .btn { width: 100%; margin-top: 10px; }
.error { color: #ff8f93; min-height: 1.5em; margin: 4px 0 0; font-size: 15px; }
.fine { color: var(--soft); font-size: var(--s-1); margin: 18px 0 0; }

.have-pass {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px;
  background: var(--panel); padding: 18px 20px; margin-bottom: 36px;
}
.have-pass p { margin: 0; }
.have-pass .btn { min-height: 46px; padding: 0 18px; font-size: 14px; }

/* ---------- the ticket ---------- */
.ticket-col { perspective: 1200px; }
.ticket {
  position: relative; width: 100%; max-width: 460px; margin: 0 auto;
  transform-style: preserve-3d;
  transition: transform .5s var(--ease);
  will-change: transform;
}
.t-head { background: var(--panel); padding: 28px 24px 26px; text-align: center; }
.t-head .t-tag { width: 34%; margin: 0 auto 10px; }
.t-head .t-night { width: 66%; margin: 0 auto 6px; }
.t-head .t-glory { width: 86%; margin: 0 auto; }
.t-guest { margin-top: 26px; }
.t-guest .label { color: var(--soft); font-size: var(--s-1); margin-top: 6px; }
.t-name {
  margin: 0;
  font-size: clamp(26px, 7.4vw, 38px);
  overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 1.8em;
}
.t-name.empty { -webkit-text-fill-color: #3a3a41; background: none; }

/* tear line: two notches and a step in tone, no drawn rule */
.t-tear { position: relative; height: 0; }
.t-tear::before, .t-tear::after {
  content: ''; position: absolute; top: -14px; width: 28px; height: 28px; border-radius: 50%;
  background: var(--night); z-index: 1;
}
.t-tear::before { left: -14px; }
.t-tear::after { right: -14px; }

.t-body { background: var(--panel-2); padding: 30px 24px 26px; text-align: center; }
.t-qr {
  width: 216px; max-width: 70%; aspect-ratio: 1; margin: 0 auto;
  background: #fff; padding: 12px;
  display: grid; place-items: center;
}
.t-qr img { width: 100%; height: 100%; image-rendering: pixelated; }
.t-qr.placeholder { background: var(--panel); color: var(--soft); font-size: var(--s-1); padding: 24px; text-align: center; }
.t-code {
  margin-top: 16px;
  font-size: 30px; font-weight: 800; font-variation-settings: 'wdth' 118;
  letter-spacing: .1em; font-variant-numeric: tabular-nums;
}
.t-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 22px 0 0; text-align: left; }
.t-facts div { background: var(--panel); padding: 12px 14px; }
.t-facts dt { color: var(--soft); font-size: var(--s-1); }
.t-facts dd { margin: 2px 0 0; font-weight: 700; font-size: 15px; line-height: 1.3; }
.t-status {
  display: none; padding: 12px 16px; text-align: center;
  background: var(--ok); color: #fff; font-weight: 800; font-variation-settings: 'wdth' 112;
  text-transform: uppercase; letter-spacing: .02em;
}
.ticket.used .t-status { display: block; }
.ticket.used .t-qr { opacity: .35; }

/* ---------- the night: facts as a printed programme line ---------- */
.night { background: var(--panel); padding: 96px var(--m) 104px; }
.night-inner { max-width: 1280px; margin: 0 auto; }
@media (min-width: 960px) {
  .night { padding: 160px var(--m) 170px; }
  .night-top { display: grid; grid-template-columns: 1fr 1fr; gap: 8vw; align-items: end; }
}
.night-top p { margin: 0; max-width: 46ch; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 36px 24px; margin: 64px 0 0; }
@media (min-width: 960px) { .facts { grid-template-columns: repeat(4, 1fr); margin-top: 110px; } }
.facts dt { color: var(--soft); font-size: var(--s-1); order: 2; }
.facts div { display: flex; flex-direction: column; gap: 6px; }
.facts dd { margin: 0; order: 1; font-size: var(--s1); font-weight: 800; font-variation-settings: 'wdth' 115; line-height: 1.1; }

/* ---------- close: the PORT HARCOURT tag becomes the field ---------- */
.close {
  background: var(--tag); color: var(--navy);
  padding: 96px var(--m) 0; overflow: hidden;
}
.close-row { display: grid; gap: 28px; max-width: 1280px; margin: 0 auto; }
@media (min-width: 960px) { .close-row { grid-template-columns: 1fr auto; align-items: end; } }
.close h2 {
  margin: 0; font-size: clamp(40px, 6vw, 88px); font-weight: 900; font-variation-settings: 'wdth' 125;
  text-transform: uppercase; letter-spacing: -0.02em; line-height: .9; max-width: 12ch;
}
.close p { margin: 0; max-width: 40ch; }
.close .btn { background: var(--navy); color: var(--tag); }
.close .btn:hover { background: #142a66; }
.close .links { display: flex; flex-wrap: wrap; gap: 8px 28px; margin-top: 26px; font-size: 15px; }
.close .links a { color: var(--navy); }
.close-name {
  margin: 72px calc(var(--m) * -1) 0;
  font-size: 23.6vw; font-weight: 900; font-variation-settings: 'wdth' 125;
  text-transform: uppercase; letter-spacing: -0.035em; line-height: .74;
  text-align: center; white-space: nowrap;
  height: .62em; overflow: hidden;           /* cropped by the page's bottom edge */
}

/* ---------- entrances for sections (content stays visible without script) ---------- */
.js .reveal > * { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in > * { opacity: 1; transform: none; }
.js .reveal.in > *:nth-child(2) { transition-delay: .08s; }
.js .reveal.in > *:nth-child(3) { transition-delay: .16s; }
.js .reveal.in > *:nth-child(4) { transition-delay: .24s; }

/* ---------- pass page ---------- */
.pass-page { padding: 8px var(--m) 96px; }
.pass-page .ticket { margin-top: 8px; }
.pass-notes { max-width: 460px; margin: 28px auto 0; display: grid; gap: 14px; }
.pass-notes p { margin: 0; }
.pass-notes .soft { color: var(--soft); font-size: var(--s-1); }
.state { max-width: 460px; margin: 18vh auto 0; }
.state h1 { font-size: var(--s2); font-weight: 900; font-variation-settings: 'wdth' 118; text-transform: uppercase; line-height: .95; margin: 0 0 14px; }
.state p { margin: 0 0 28px; }

/* ---------- staff gate (an app screen: quiet, fast, thumb-sized) ---------- */
.gate { max-width: 520px; margin: 0 auto; padding: 0 var(--m) 48px; }
.gate h1 { font-size: var(--s2); font-weight: 900; font-variation-settings: 'wdth' 118; text-transform: uppercase; line-height: .95; margin: 8px 0 12px; }
.gate .intro { margin: 0 0 28px; color: var(--soft); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 8px 0 16px; }
.stat { background: var(--panel); padding: 14px 16px; }
.stat b { display: block; font-size: 34px; font-weight: 900; font-variation-settings: 'wdth' 118; line-height: 1.05; font-variant-numeric: tabular-nums; }
.stat span { color: var(--soft); font-size: var(--s-1); }
.scanner { position: relative; aspect-ratio: 1; background: #000; overflow: hidden; }
.scanner video { width: 100%; height: 100%; object-fit: cover; display: block; }
.scanner .frame { position: absolute; inset: 16%; box-shadow: 0 0 0 999px rgba(0, 0, 0, .5); outline: 4px solid var(--tag); } /* taste-skill-ignore: camera aiming mask over live video */
.scanner .idle { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 28px; background: var(--panel); }
.scanner .idle p { margin: 0 0 20px; color: var(--soft); }
.manual { display: grid; grid-template-columns: 1fr auto; gap: 4px; margin-top: 4px; }
.manual input {
  min-height: 58px; padding: 0 16px; border: 0; border-radius: 0; outline: 0;
  background: var(--panel); color: var(--ink); font: inherit; font-size: 20px; font-weight: 700;
  font-variation-settings: 'wdth' 118; letter-spacing: .08em; text-transform: uppercase;
}
.manual input::placeholder { letter-spacing: 0; text-transform: none; font-weight: 400; color: #66666d; font-size: 16px; }
.manual input { border-bottom: 3px solid transparent; min-width: 0; width: 100%; }
.manual .btn { padding: 0 22px; }
.manual input:focus { border-bottom-color: var(--tag); }
.gate .note { color: var(--soft); font-size: var(--s-1); margin: 14px 0 0; }
.small-btn { background: var(--panel); border: 0; color: var(--ink); padding: 10px 14px; font: inherit; font-size: 14px; cursor: pointer; }
.small-btn:hover { background: var(--panel-2); }

.result { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 28px; text-align: center; color: #fff; animation: pop .2s var(--ease); }
.result.admitted { background: var(--ok); }
.result.already_in { background: var(--warn); color: #1a1200; }
.result.not_found, .result.invalid { background: var(--bad); }
.result .icon { font-size: 88px; font-weight: 900; line-height: 1; }
.result .title { margin-top: 14px; font-size: clamp(38px, 11vw, 64px); font-weight: 900; font-variation-settings: 'wdth' 125; text-transform: uppercase; line-height: .9; letter-spacing: -0.02em; }
.result .who { margin-top: 18px; font-size: 26px; font-weight: 700; overflow-wrap: anywhere; }
.result .sub { margin-top: 6px; opacity: .9; }
.result .tap { margin-top: 36px; opacity: .8; font-size: 15px; }
@keyframes pop { from { opacity: 0; transform: scale(.98); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .lockup img, .js .hero-copy > *, .js .reveal > * { opacity: 1 !important; transform: none !important; }
}
