/* ==========================================================================
   ULY'S FANTASY S2 — base.css
   Reset, body defaults, a11y states, shared broadcast components.
   Requires tokens.css loaded first.
   ========================================================================== */

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--navy);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  line-height: 1.5;
}

h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

img, svg { display: block; max-width: 100%; }
img { height: auto; }

input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }

a { color: var(--pink); }
a:hover { color: var(--cyan); }

/* ---- Selection ---- */
::selection { background: var(--pink); color: #fff; }

/* ---- Focus (keyboard) ---- */
:focus { outline: none; }
:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

/* ---- Utilities ---- */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Space Mono letterspaced caps label */
.label {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--muted);
}
.label--wide { letter-spacing: var(--ls-label-wide); }
.label--cyan { color: var(--cyan); }
/* NOTE: --faint (#565B85, 2.9:1 on navy) is NON-TEXT only — borders,
   dividers, decorative marks. Never use it as a text color. */

/* Instrument Serif editorial voice */
.editorial {
  font-family: var(--font-editorial);
  font-style: italic;
  color: var(--bubblegum);
  line-height: 1.35; /* landing hero value. Board card quotes are 1.4 —
                        board.css must set line-height: 1.4 on card quotes. */
}

/* ==========================================================================
   DISPLAY HEADINGS — Anton, always uppercase
   ========================================================================== */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: var(--lh-display);
  /* No tracking by default — the references set none on Anton headings. */
}
.display--tight { line-height: var(--lh-display-tight); }
/* Board-card prospect NAME only (26px, per board reference) — the single
   Anton heading the reference tracks at 0.02em. Do not use elsewhere. */
.display--name { letter-spacing: 0.02em; }
/* Pink display with cyan offset shadow (hero variant) */
.display--shadow {
  color: var(--pink);
  text-shadow: var(--shadow-display);
}
/* Gold gradient text — №1 / Uly / reward moments ONLY */
.display--gold {
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ==========================================================================
   TICKER — pink broadcast crawl, seamless infinite scroll.
   Markup (author exactly this — ONE group, no duplicate in the HTML):
   <div class="ticker" role="marquee" aria-label="...">
     <div class="ticker__track">
       <div class="ticker__group"> <span class="ticker__item">★ …</span>… </div>
     </div>
   </div>
   js/ticker.js pads the group with aria-hidden clones until it is wider
   than the viewport, then appends the aria-hidden duplicate group itself.
   Screen readers hear each phrase exactly once.
   ========================================================================== */
.ticker {
  background: var(--pink);
  overflow: hidden;
  white-space: nowrap;
  padding: 8px 0;
}
.ticker__track {
  display: inline-flex;
  animation: uf-ticker var(--ticker-speed) linear infinite;
  will-change: transform;
}
.ticker__group {
  display: inline-flex;
  flex-shrink: 0;
}
.ticker__item {
  display: inline-block;
  padding: 0 24px;
  font-family: var(--font-display);
  font-size: var(--fs-ticker);
  letter-spacing: var(--ls-ticker);
  text-transform: uppercase;
  color: #fff;
}
@keyframes uf-ticker {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ==========================================================================
   BUTTONS / CTAs — clean broadcast chrome, Anton, square, no decoration
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4em;
  min-height: var(--tap-min);
  padding: 14px 26px;
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: var(--ls-display);
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease);
}
.btn--pink {
  background: var(--pink);
  color: #fff;
}
.btn--pink:hover { background: var(--pink-deep); color: #fff; }
.btn--pink:active { background: var(--pink-deep); color: #fff; transform: translateY(2px); }
.btn--outline {
  background: transparent;
  border-color: var(--line-btn);
  color: var(--text);
}
.btn--outline:hover { border-color: var(--cyan); color: var(--cyan); }
.btn--outline:active { border-color: var(--cyan); color: var(--cyan); transform: translateY(2px); }
/* Board-header size: visual box stays ~32px per reference, but a ::before
   overlay extends the hit area to >=44px for the touch-target rule. */
.btn--sm { font-size: 13px; padding: 6px 14px; min-height: 32px; position: relative; }
.btn--sm.btn--outline { border-color: var(--line-btn-strong); } /* board header only */
.btn--sm::before { content: ""; position: absolute; inset: -6px; }

/* Inline text link with a >=44px tap target: same invisible-overlay pattern
   as .btn--sm. Apply to any small text link (e.g. "See the board →"). */
.link-tap { position: relative; }
.link-tap::before { content: ""; position: absolute; inset: -12px -8px; }
.btn:disabled,
.btn[aria-disabled="true"] {
  background: #3A3F6B;
  color: var(--muted);
  border-color: transparent;
  cursor: not-allowed;
  transform: none;
}

/* ==========================================================================
   LIVE BADGE — cyan outline chip with blinking dot
   ========================================================================== */
.badge-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--cyan);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 7px 14px;
  white-space: nowrap;
}
.badge-live__dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  background: var(--cyan);
  border-radius: 50%;
  animation: uf-blink 1.6s infinite;
}
/* pink variant of the blinking dot (empty board slots) */
.badge-live__dot--pink {
  background: var(--pink);
  box-shadow: var(--glow-pink);
}
@keyframes uf-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

/* ==========================================================================
   DATE BADGES — Anton chip + mono date; gold = draft day, pink = deadline
   ========================================================================== */
.date-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}
.date-badge__tag {
  font-family: var(--font-display);
  font-size: 15px;
  padding: 6px 12px;
  text-transform: uppercase;
  white-space: nowrap;
}
.date-badge--gold .date-badge__tag { background: var(--gold); color: var(--gold-ink); }
.date-badge--pink .date-badge__tag { background: var(--pink); color: #fff; }
.date-badge__when { font-size: 14px; }

/* ==========================================================================
   LOWER THIRD — broadcast name bar (light chrome on navy, no decoration)
   ========================================================================== */
.lower-third {
  display: inline-block;
  background: linear-gradient(90deg, #F4F2F7, #D9DEE8);
  color: var(--navy);
  padding: 10px 18px;
}
.lower-third__name {
  font-family: var(--font-display);
  font-size: 20px;
  text-transform: uppercase;
  line-height: 1.15;
}
.lower-third__meta {
  font-family: var(--font-mono);
  font-size: var(--fs-label-sm);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #7A2154;
}

/* ==========================================================================
   COUNTDOWN — digit boxes ("07 16 43 29")
   ========================================================================== */
.cd {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(10px, 2vw, 20px);
}
.cd__unit { text-align: center; }
.cd__num {
  font-family: var(--font-display);
  font-size: var(--fs-cd-digit);
  /* No line-height override — the reference leaves Anton at its natural
     (inherited ~1.5) height; the box is meant to be tall (~157x122 @1440). */
  background: var(--card);
  border: 1px solid var(--line-cyan);
  padding: 6px clamp(10px, 2vw, 20px);
  /* Reference is content-box: its 1.6em min-width sits BESIDE the padding.
     Under the global border-box reset, add the padding back explicitly. */
  min-width: calc(1.6em + 2 * clamp(10px, 2vw, 20px) + 2px);
  font-variant-numeric: tabular-nums;
}
.cd__num--pink { color: var(--pink); }
.cd__label {
  font-family: var(--font-mono);
  font-size: var(--fs-label-sm);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 8px;
}

/* Below ~430px the reference's content-box math cannot fit four boxes on one
   row (its mobile PNG was captured at 420px where the row barely fits). The
   approved truth is a single row of four, so we deviate from reference math
   here: smaller digit + tighter padding keeps DAYS/HRS/MIN/SEC on one line. */
@media (max-width: 440px) {
  .cd { gap: 10px; }
  .cd__num { font-size: 34px; padding: 6px 8px; min-width: calc(1.6em + 18px); }
}
@media (max-width: 359px) {
  .cd { gap: 8px; }
  .cd__num { font-size: 28px; padding: 5px 6px; min-width: calc(1.6em + 14px); }
}

/* ==========================================================================
   REDUCED MOTION — kill ticker scroll, blink, transitions
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .ticker__track { animation: none !important; transform: none !important; }
  .badge-live__dot { animation: none !important; opacity: 1 !important; }
}
