/* Sweepstakes by NotLuck — dark canvas (#0a0a0a), gold #ECD444 + pink #ec4899
   alternating accents, Red Hat type, the signature gold kicker bar and tracked
   mono labels. colors_and_type.css already sets the body to the dark canvas and
   white type; this file layers on the sweepstake-specific furniture. */

:root {
  --gold:    #ECD444;
  --pink:    #ec4899;
  --pink-2:  #f9a8d4;
  --ink:     #0a0a0a;
  --card:    #1a1a1a;
  --surface: #141414;
  --hair:    rgba(255, 255, 255, 0.08);
  --muted:   #888899;
  /* Per-tenant accent. Defaults to NotLuck gold; app.js overrides --accent on
     the sweep page ONLY after validating config.accent against /^#[0-9a-fA-F]{6}$/.
     The key accent furniture below reads var(--accent) so a tenant colour flows
     through without touching the pink secondary (which stays NotLuck pink). */
  --accent:  var(--gold);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-body, 'Red Hat Text', system-ui, sans-serif);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrap { width: min(1060px, 92vw); margin: 0 auto; }
.wrap.narrow { width: min(620px, 92vw); }
.centred, .actions.centred { text-align: center; }

/* ───── header ───── */
header { padding: 22px 0 14px; }
.headrow { display: flex; align-items: center; gap: 14px; }
.head-notluck { height: 15px; opacity: 0.92; }
.head-tenant {
  font-family: 'Red Hat Display', sans-serif; font-weight: 900;
  font-size: 18px; letter-spacing: -0.01em; color: #fff;
}
.head-x { color: var(--muted); font-weight: 700; font-size: 16px; }
.head-tag { margin-left: auto; }

/* ───── kicker (signature gold bar + tracked mono label) ───── */
.kicker {
  display: flex; align-items: center; gap: 12px;
  font-family: 'Red Hat Mono', monospace; font-weight: 500;
  font-size: 13px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 18px;
}
.kicker-bar {
  width: 48px; height: 3px; flex: 0 0 auto;
  background: linear-gradient(90deg, var(--accent), transparent);
}
.centre-kicker { justify-content: center; }
.label {
  font-family: 'Red Hat Mono', monospace; font-weight: 500;
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted);
}

/* ───── ticker ribbon ───── */
.ticker { background: var(--surface); border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); overflow: hidden; padding: 10px 0; }
.ticker-track {
  display: inline-block; white-space: nowrap;
  animation: ticker 24s linear infinite;
  font-family: 'Red Hat Mono', monospace; font-weight: 500;
  font-size: 12px; letter-spacing: 0.16em; color: var(--gold);
}
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ───── stages + hero ───── */
.stage { position: relative; flex: 1; display: flex; align-items: center; padding: 72px 0 96px; overflow: hidden; }
.hero { position: relative; padding: 80px 0 56px; overflow: hidden; }
.band { padding: 96px 0; }
.band-alt { background: var(--surface); border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }

/* atmosphere orbs — hero / gate only */
.orb { position: absolute; border-radius: 50%; filter: blur(110px); opacity: 0.4; pointer-events: none; animation: pulse 22s ease-in-out infinite; }
.orb-gold { width: 460px; height: 460px; background: var(--gold); top: -120px; right: -80px; }
.orb-pink { width: 420px; height: 420px; background: var(--pink); bottom: -160px; left: -120px; animation-delay: -8s; }
@keyframes pulse { 0%, 100% { opacity: 0.32; } 50% { opacity: 0.46; } }
.hero .wrap, .stage .wrap { position: relative; z-index: 1; }

h1, h2 {
  font-family: 'Red Hat Display', sans-serif;
  font-weight: 900; line-height: 1.0; letter-spacing: -0.03em;
  color: #fff; margin: 0 0 24px;
}
h1 { font-size: clamp(48px, 8.5vw, 88px); }
h2 { font-size: clamp(34px, 5.5vw, 56px); margin-bottom: 36px; }
.pinkdot { color: var(--pink); }
.highlight { color: var(--accent); }
.highlight-pink { color: var(--pink); }

.lede { font-size: 19px; line-height: 1.6; color: #c8c8d0; margin: 0 0 32px; }

.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* scrolling flag wall under the gate headline */
.flagwall {
  white-space: nowrap; overflow: hidden;
  font-size: 32px; line-height: 1.3; margin: 0 0 26px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.flagwall span { display: inline-block; animation: ticker 60s linear infinite; }

/* ───── how-it-works steps ───── */
.steps { display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }
.step { background: var(--card); border: 1px solid var(--hair); border-radius: 20px; padding: 30px 28px; transition: transform 0.25s var(--ease-smooth), border-color 0.25s; }
.step:hover { transform: translateY(-4px); border-color: rgba(236, 212, 68, 0.3); }
.step-no { font-family: 'Red Hat Mono', monospace; font-weight: 700; font-size: 14px; letter-spacing: 0.14em; color: var(--gold); }
.step h3 { font-family: 'Red Hat Display', sans-serif; font-weight: 700; font-size: 22px; margin: 14px 0 10px; color: #fff; }
.step p { font-size: 15px; line-height: 1.6; color: #b8b8c2; margin: 0; }

/* ───── forms ───── */
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: block; margin-bottom: 22px; }
.field span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; color: #fff; }
.field span em { color: var(--muted); font-style: normal; font-weight: 400; }
.field input, .field select {
  width: 100%; padding: 15px 16px;
  background: var(--ink); color: #fff;
  border: 1px solid var(--hair); border-radius: 12px;
  font: inherit; font-size: 16px;
}
.field input:focus, .field select:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }
.field input::placeholder { color: #6a6a78; }

.optin { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 24px; font-size: 14px; line-height: 1.5; color: #b8b8c2; cursor: pointer; }
.optin input { width: 18px; height: 18px; margin-top: 1px; flex: 0 0 auto; accent-color: var(--gold); }

.btn {
  display: inline-block; padding: 15px 30px;
  background: var(--accent); color: var(--ink);
  border: none; border-radius: 12px; cursor: pointer;
  font-family: 'Red Hat Display', sans-serif; font-weight: 800; font-size: 16px;
  transition: transform 0.2s var(--ease-smooth), box-shadow 0.2s;
  text-decoration: none;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(236, 212, 68, 0.25); }
.btn.ghost { background: transparent; color: #fff; border: 1px solid var(--hair); }
.btn.ghost:hover { border-color: var(--accent); color: var(--accent); box-shadow: none; }
.btn:disabled { opacity: 0.5; cursor: wait; transform: none; box-shadow: none; }

.error { color: #ef4444; font-size: 14px; font-weight: 600; margin-top: 12px; }
.smallprint { font-size: 13px; color: var(--muted); line-height: 1.55; margin: 16px 0 24px; }
.enquiry { font-size: 14px; color: var(--muted); margin: 28px 0 0; }
.enquiry a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }

/* ───── create success panel ───── */
.success-tick {
  display: inline-flex; align-items: center; justify-content: center;
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(74, 154, 138, 0.18); color: var(--notgreen, #4a9a8a);
  font-size: 32px; font-weight: 900; margin: 0 auto 20px;
}
.link-box {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: center;
  background: var(--card); border: 1px solid var(--hair); border-radius: 14px;
  padding: 16px; margin: 24px auto; max-width: 560px;
}
.link-box code {
  flex: 1; min-width: 220px; text-align: left;
  font-family: 'Red Hat Mono', monospace; font-size: 15px; color: var(--gold);
  word-break: break-all;
}
.cred-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 560px; margin: 0 auto 8px; text-align: left; }
.cred { background: var(--card); border: 1px solid var(--hair); border-radius: 14px; padding: 16px 18px; }
.cred .label { display: block; margin-bottom: 6px; }
.cred strong { font-family: 'Red Hat Mono', monospace; font-size: 18px; color: #fff; }
.cred a { color: var(--gold); text-decoration: none; font-weight: 700; }

/* ───── reveal ───── */
.reveal-label {
  font-family: 'Red Hat Mono', monospace; font-weight: 500;
  font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 8px;
}
.spinner { font-size: 120px; margin: 40px 0; min-height: 150px; }
#spin-flag { display: inline-block; }
.spinning #spin-flag { animation: flick 0.09s linear infinite; }
@keyframes flick { from { transform: translateY(0) rotate(-2deg); } to { transform: translateY(-5px) rotate(2deg); } }

#card {
  width: min(430px, 86vw); height: auto;
  border: 1px solid var(--hair); border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.5);
  margin: 8px 0 28px;
}
.actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* confetti */
.confetto {
  position: fixed; top: -20px; z-index: 50;
  width: 10px; height: 16px; pointer-events: none;
  animation: fall linear forwards;
}
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); opacity: 0.9; } }

/* ───── tracker group grid ───── */
.groups {
  display: grid; gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
  margin: 36px 0;
}
.group { background: var(--card); border: 1px solid var(--hair); border-radius: 16px; padding: 18px; }
.group h3 {
  font-family: 'Red Hat Display', sans-serif; font-weight: 900; font-size: 13px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink); background: var(--gold); display: inline-block; padding: 3px 8px; border-radius: 6px;
  margin: 0 0 12px;
}
.team { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 15px; font-weight: 500; color: #e8e8ee; }
.team.out { opacity: 0.4; }
.team.out .tname { text-decoration: line-through; text-decoration-color: var(--pink); text-decoration-thickness: 2px; }
.team .taken {
  margin-left: auto; font-family: 'Red Hat Mono', monospace;
  font-size: 10px; font-weight: 700; letter-spacing: 0.08em;
  background: var(--pink); color: #fff; padding: 2px 6px; border-radius: 4px;
}

/* ───── day strip ───── */
.daystrip { border-bottom: 1px solid var(--hair); background: var(--surface); padding: 26px 0 28px; }
.day-head {
  font-family: 'Red Hat Display', sans-serif; font-weight: 900;
  text-transform: uppercase; letter-spacing: -0.01em;
  font-size: clamp(22px, 4.5vw, 32px); margin: 0 0 16px; color: #fff;
}
.day-badge {
  display: inline-block; background: var(--gold); color: var(--ink);
  padding: 1px 12px 3px; margin-right: 8px; border-radius: 6px;
}
.day-next {
  display: inline-block; background: rgba(236, 212, 68, 0.12); color: #fff;
  border: 1px solid rgba(236, 212, 68, 0.35); border-radius: 10px;
  padding: 12px 16px; margin: 0 0 20px;
  font-family: 'Red Hat Display', sans-serif; font-weight: 800;
  font-size: 15px; text-transform: uppercase; letter-spacing: 0.02em;
}
.day-next strong { color: var(--gold); }
.day-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 28px; }
.day-col h4 {
  font-family: 'Red Hat Mono', monospace; font-weight: 700; font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 8px;
}
.day-match { display: flex; align-items: center; gap: 9px; margin: 0 0 7px; font-size: 14px; font-weight: 600; color: #e8e8ee; }
.dm-score {
  background: var(--gold); color: var(--ink); padding: 1px 8px 2px; border-radius: 4px;
  font-family: 'Red Hat Mono', monospace; font-weight: 700; font-size: 13px;
}
.dm-v { color: var(--muted); font-family: 'Red Hat Mono', monospace; font-size: 12px; }
.dm-ko { margin-left: auto; font-family: 'Red Hat Mono', monospace; font-weight: 700; font-size: 12px; color: var(--muted); }
.day-highlights { margin-top: 14px; border-top: 1px solid var(--hair); padding-top: 12px; }
.day-highlights p { margin: 0 0 6px; font-size: 14px; line-height: 1.5; color: #b8b8c2; }
.day-highlights p::before { content: '▸ '; color: var(--gold); font-weight: 800; }

/* cheater's parting gift */
.smallprint.shame-note {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.4); border-radius: 12px;
  color: #fff;
  font-family: 'Red Hat Display', sans-serif;
  font-weight: 700; font-size: 16px; line-height: 1.55;
  padding: 16px 20px; margin: 20px auto 8px;
  max-width: 520px; text-align: center;
}

/* ───── leaderboards ───── */
.hub { display: grid; gap: 28px; margin: 12px 0 48px; }
.hub-intro { margin-top: 8px; }
.hub-kicker {
  font-family: 'Red Hat Mono', monospace; font-weight: 500; font-size: 12px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--gold); margin: 0 0 6px;
}
.hub-title {
  font-family: 'Red Hat Display', sans-serif; font-weight: 900;
  text-transform: uppercase; letter-spacing: -0.02em; line-height: 0.95;
  font-size: clamp(32px, 5.5vw, 48px); margin: 0; color: #fff;
}

.board {
  background: var(--card); border: 1px solid var(--hair); border-radius: 20px;
  padding: 24px 22px 16px;
  border-top: 3px solid var(--acc, var(--gold));
}
.acc-red    { --acc: #ef4444; }
.acc-pink   { --acc: var(--pink); }
.acc-gold   { --acc: var(--gold); }
.acc-white  { --acc: #fff; }
.acc-pink2  { --acc: var(--pink-2); }
.board-head h3 {
  display: inline-block;
  font-family: 'Red Hat Display', sans-serif; font-weight: 900;
  text-transform: uppercase; letter-spacing: -0.01em;
  font-size: clamp(22px, 4.5vw, 30px); margin: 0 0 8px; color: #fff;
}
.board-head p { margin: 0 0 14px; font-size: 14px; line-height: 1.5; color: var(--muted); }

.var-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.var-img { width: 88px; flex: 0 0 auto; border: 1px solid var(--hair); border-radius: 14px; background: var(--surface); }
.var-empty { margin: 4px 0 0; font-size: 14px; color: var(--muted); font-family: 'Red Hat Mono', monospace; }
.var-board .brow-stat b { color: #ef4444; }

.brows { list-style: none; margin: 0; padding: 0; counter-reset: pos; }
.brow {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 0; border-top: 1px solid var(--hair);
  counter-increment: pos;
}
.brows > .brow:first-child { border-top: 0; }
.brow::before {
  content: counter(pos, decimal-leading-zero);
  font-family: 'Red Hat Mono', monospace; font-weight: 700; font-size: 11px;
  color: var(--muted); min-width: 22px;
}
.brow-flag { font-size: 25px; line-height: 1; }
.brow-main { flex: 1; min-width: 0; }
.brow-team {
  display: block;
  font-family: 'Red Hat Display', sans-serif; font-weight: 800;
  text-transform: uppercase; font-size: 15px; line-height: 1.2; color: #fff;
}
.brow-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: 'Red Hat Mono', monospace; font-weight: 600; font-size: 10px;
  background: rgba(255, 255, 255, 0.05); border: 1px solid var(--hair); border-radius: 5px;
  padding: 2px 6px; white-space: nowrap; color: #d8d8e0;
}
.chip i { font-style: normal; font-size: 9px; background: var(--gold); color: var(--ink); padding: 0 4px 1px; border-radius: 3px; }
.chip--free { opacity: 0.55; border-style: dashed; }
.brow-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.4; }
.brow-stat { text-align: right; font-family: 'Red Hat Mono', monospace; white-space: nowrap; color: #fff; }
.brow-stat b { display: block; font-size: 16px; font-weight: 800; }
.brow-stat i { font-style: normal; font-size: 11px; color: var(--muted); }
.brow--lead { background: rgba(236, 212, 68, 0.1); border-radius: 8px; margin: 0 -10px; padding-left: 10px; padding-right: 10px; }
.brow--lead + .brow { border-top-color: transparent; }

.board-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }

.grid-title {
  font-family: 'Red Hat Display', sans-serif; font-weight: 900;
  text-transform: uppercase; letter-spacing: -0.01em;
  font-size: clamp(24px, 4.5vw, 32px); margin: 0; color: #fff;
}

/* ───── recall link ───── */
.recall-link { margin-top: 18px; font-size: 14px; color: var(--muted); }
.recall-link button {
  background: none; border: none; padding: 0; cursor: pointer;
  font: inherit; font-weight: 700; color: var(--gold);
  text-decoration: underline; text-underline-offset: 2px;
}
#recall-form { margin-top: 16px; }

/* ───── footer ───── */
footer { border-top: 1px solid var(--hair); padding: 22px 0; }
.footrow { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.foot-tenant { font-family: 'Red Hat Display', sans-serif; font-weight: 800; font-size: 15px; color: #fff; }
.foot-note { font-size: 13px; color: var(--muted); }
.foot-notluck { height: 13px; opacity: 0.92; }
.foot-tag { width: 100%; text-align: center; margin-top: 4px; }

@media (max-width: 680px) {
  .steps { grid-template-columns: 1fr; }
  .day-cols { grid-template-columns: 1fr; }
  .board-pair { grid-template-columns: 1fr; }
  .cred-grid { grid-template-columns: 1fr; }
  .field-pair { grid-template-columns: 1fr; }
  .day-badge { display: block; width: max-content; margin: 0 0 10px; }
}

/* ───── per-tenant logo in the sweep header ───── */
.head-logo {
  height: 26px; width: auto; max-width: 160px;
  object-fit: contain; border-radius: 4px;
  margin-right: 2px;
}

/* ───── create page: light branding + import controls ───── */
.brand-row { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; }
.brand-row .field { margin-bottom: 0; }

/* native colour input, styled to sit on the dark canvas */
input[type="color"] {
  -webkit-appearance: none; appearance: none;
  width: 56px; height: 48px; padding: 4px;
  background: var(--ink); border: 1px solid var(--hair); border-radius: 12px;
  cursor: pointer;
}
input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
input[type="color"]::-webkit-color-swatch { border: none; border-radius: 8px; }
input[type="color"]::-moz-color-swatch { border: none; border-radius: 8px; }

/* file inputs (logo + CSV) */
input[type="file"] {
  width: 100%; font: inherit; font-size: 14px; color: #b8b8c2;
}
input[type="file"]::file-selector-button {
  margin-right: 12px; padding: 10px 16px;
  background: var(--card); color: #fff;
  border: 1px solid var(--hair); border-radius: 10px; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 14px;
}
input[type="file"]::file-selector-button:hover { border-color: var(--accent); color: var(--accent); }

.brand-note { font-size: 13px; color: var(--muted); margin: 8px 0 0; line-height: 1.5; }
.brand-note a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }

/* collapsible "already have a list?" import block */
.import-block {
  background: var(--card); border: 1px solid var(--hair); border-radius: 16px;
  padding: 22px 22px 6px; margin: 8px 0 24px;
}
.import-block > summary {
  cursor: pointer; list-style: none; font-weight: 700; font-size: 15px; color: #fff;
  display: flex; align-items: center; gap: 8px;
}
.import-block > summary::-webkit-details-marker { display: none; }
.import-block > summary::before { content: '+'; color: var(--accent); font-weight: 900; font-size: 18px; line-height: 1; }
.import-block[open] > summary::before { content: '−'; }
.import-block > summary .sub { font-weight: 400; color: var(--muted); font-size: 13px; }
.import-block .import-body { padding-top: 16px; }

.import-result { margin: 14px 0 8px; font-size: 14px; line-height: 1.6; }
.import-result .ir-line { display: flex; gap: 8px; align-items: baseline; }
.import-result .ir-num { font-family: 'Red Hat Mono', monospace; font-weight: 700; color: var(--accent); min-width: 2.5em; text-align: right; }
.import-result .ir-bad { color: #ef4444; }
.import-result .ir-warn { color: var(--pink-2); }
