/* ==========================================================================
   components.css - the actual 90s chrome.
   Loaded after base.css so era-specific overrides win on equal specificity.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Bevel: the outset border that made every 90s page look like a dialog box.
   -------------------------------------------------------------------------- */

.bevel,
.panel,
.hero,
.theme-btn,
.mode-btn,
.callout,
.site-header,
.theme-bar,
.site-footer {
  border-width: var(--border-width);
  border-style: solid;
  border-color: var(--bevel-light) var(--bevel-dark) var(--bevel-dark) var(--bevel-light);
  border-radius: var(--radius);
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  background: var(--surface);
  padding: var(--space-5) var(--space-4);
  text-align: center;
}

.site-header__kicker {
  margin: 0 0 var(--space-2);
  max-width: none;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.site-header__turkey {
  display: block;
  margin: 0 auto var(--space-3);
  width: 96px;
  height: 96px;
}

.wordmark {
  margin: 0;
  max-width: none;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 8.5vw, 4rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
}

.wordmark__a { color: var(--accent); }
.wordmark__b { color: var(--accent-2); }
.wordmark__c { color: var(--text-muted); }

[data-theme="geocities"] .wordmark {
  text-shadow: 3px 3px 0 var(--decor);
}

/* Courier needs the extra tracking to hold together at display size. The
   three-color split stays: navy, rust and teal are a genuine web-safe
   tricolor, and flattening it to one color would lose the era, not refine it. */
[data-theme="websafe"] .wordmark {
  letter-spacing: 0.02em;
}

.site-header__sub {
  margin: var(--space-3) auto 0;
  max-width: 40ch;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* The blink tag, rebuilt responsibly: ~0.8 Hz, well under the 3 Hz
   flash threshold in WCAG 2.3.1, and off entirely under reduced motion. */
.blinkie {
  display: var(--gag-display);
  color: var(--accent);
  font-weight: 700;
  animation: blink 1.2s steps(1, end) infinite;
}

@keyframes blink {
  0%, 55%   { opacity: 1; }
  56%, 100% { opacity: 0; }
}

/* --------------------------------------------------------------------------
   Era picker
   -------------------------------------------------------------------------- */

.theme-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding: var(--space-3);
  background: var(--surface-2);
}

.theme-bar__label {
  margin: 0;
  max-width: none;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.theme-bar__group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.theme-btn,
.mode-btn {
  padding: var(--space-2) var(--space-3);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}

.theme-btn:hover,
.mode-btn:hover {
  background: var(--surface-2);
  color: var(--accent);
}

.theme-btn:active,
.mode-btn:active,
.theme-btn[aria-pressed="true"] {
  border-color: var(--bevel-dark) var(--bevel-light) var(--bevel-light) var(--bevel-dark);
}

/* Border shading alone is a weak "selected" signal, and it varies in strength
   between eras. The accent bar carries the state identically in all three. */
.theme-btn[aria-pressed="true"] {
  background: var(--surface-2);
  box-shadow: inset 0 -3px 0 var(--accent);
  font-weight: 700;
}

.theme-btn[aria-pressed="true"] .theme-btn__name {
  color: var(--accent);
}

.theme-btn__name {
  display: block;
}

.theme-btn__note {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.mode-btn {
  margin-left: auto;
  white-space: nowrap;
}

/* --------------------------------------------------------------------------
   Scrolling announcement bar (a <marquee> that respects the user)
   -------------------------------------------------------------------------- */

.scroller {
  overflow: hidden;
  margin-top: var(--space-3);
  padding: var(--space-2) 0;
  background: var(--scroller-bg);
  color: var(--scroller-text);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.scroller__track {
  display: inline-block;
  margin: 0;
  max-width: none;
  padding-left: 100%;
  white-space: nowrap;
  will-change: transform;
  animation: scroll-left 38s linear infinite;
}

.scroller__item + .scroller__item::before {
  content: "  \2022\2022\2022  ";
  color: var(--scroller-text);
  opacity: 0.7;
}

@keyframes scroll-left {
  from { transform: translateX(0); }
  to   { transform: translateX(-100%); }
}

/* Reduced motion: stop the scroll and let the bar be read or hand-scrolled.
   Freezing the animation mid-travel would leave the text off-screen, so the
   animation is removed outright rather than merely slowed. */
@media (prefers-reduced-motion: reduce) {
  .scroller {
    overflow-x: auto;
  }

  .scroller__track {
    animation: none;
    padding-left: var(--space-3);
  }
}

/* --------------------------------------------------------------------------
   Hero + countdown
   -------------------------------------------------------------------------- */

/* The hero is a panel, not bare text on the page background. Period-correct
   (everything in 1997 lived inside a table cell with a bgcolor) and it keeps
   headings off the Netscape era's teal desktop, which no text can sit on
   legibly. See tools/check-contrast.mjs. */
.hero {
  margin-top: var(--space-6);
  padding: var(--space-6) var(--space-4);
  background: var(--surface);
  text-align: center;
}

.hero h1 {
  margin-bottom: var(--space-2);
}

[data-theme="geocities"] .hero h1 {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-shadow: 2px 2px 0 var(--decor);
}

.tagline {
  margin: 0 auto var(--space-5);
  max-width: 46ch;
  font-size: 1.05rem;
  color: var(--text-muted);
}

.countdown {
  display: inline-block;
  padding: var(--space-3) var(--space-5);
  background: var(--surface-2);
  border-width: var(--border-width);
  border-style: solid;
  border-color: var(--bevel-dark) var(--bevel-light) var(--bevel-light) var(--bevel-dark);
}

.countdown__label {
  margin: 0 0 var(--space-1);
  max-width: none;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.countdown__digits {
  margin: 0;
  max-width: none;
  font-family: var(--font-mono);
  font-size: clamp(1.1rem, 4vw, 1.6rem);
  font-weight: 700;
  color: var(--accent);
}

.countdown__unit {
  color: var(--text-muted);
  font-size: 0.6em;
  font-weight: 400;
  text-transform: uppercase;
}

.countdown__fallback {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--text);
}

.hero__date {
  margin: var(--space-4) auto 0;
  max-width: none;
  font-family: var(--font-ui);
  font-size: 1rem;
  font-weight: 700;
}

.inline-gif {
  display: var(--gag-display);
  vertical-align: middle;
}

/* --------------------------------------------------------------------------
   Content panels
   -------------------------------------------------------------------------- */

.panel {
  padding: var(--space-5) var(--space-4);
  background: var(--surface);
}

.panel--quiet {
  background: var(--surface-2);
}

/* The prose measure applies to running text, not to this two-column table -
   capping it there leaves the row rules stopping short of the panel edge. */
.vitals {
  margin: 0;
  max-width: none;
}

.vitals__row {
  display: grid;
  grid-template-columns: 9rem 1fr;
  gap: var(--space-2) var(--space-4);
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--decor);
}

.vitals__row:last-child {
  border-bottom: 0;
}

.vitals dt {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.vitals dd {
  margin: 0;
}

.venue {
  font-size: 1.1rem;
}

.ext {
  font-size: 0.85em;
  color: var(--text-muted);
}

.bullets,
.rules {
  padding-left: 1.4em;
}

.bullets li,
.rules li {
  margin-bottom: var(--space-2);
}

[data-theme="geocities"] .bullets {
  list-style: square;
}

.callout {
  margin-top: var(--space-5);
  padding: var(--space-4);
  max-width: none;
  background: var(--surface-2);
}

/* --------------------------------------------------------------------------
   FAQ
   -------------------------------------------------------------------------- */

.faq {
  margin-bottom: var(--space-3);
  padding: var(--space-2) var(--space-3);
  background: var(--surface-2);
  border-left: var(--border-width) solid var(--accent);
}

.faq > summary {
  font-family: var(--font-ui);
  font-weight: 700;
  cursor: pointer;
  padding: var(--space-1) 0;
}

.faq > summary:hover {
  color: var(--accent);
}

.faq > p {
  margin: var(--space-2) 0 var(--space-2);
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  margin-top: var(--space-7);
  padding: var(--space-5) var(--space-4);
  background: var(--surface);
  text-align: center;
  font-family: var(--font-ui);
  font-size: 0.85rem;
}

.site-footer p {
  max-width: none;
}

.webring {
  display: var(--gag-display);
  margin: 0 auto var(--space-4);
  padding: var(--space-2) var(--space-4);
  background: var(--surface-2);
  border: var(--border-width) var(--border-style) var(--decor);
}

/* Styled to look like the links they are imitating, without being links. */
.webring__arrow {
  color: var(--link);
  text-decoration: underline;
}

.webring__sep {
  margin: 0 var(--space-2);
  color: var(--text-muted);
}

.webring__name {
  font-style: italic;
}

.counter-line {
  margin: 0 0 var(--space-1);
}

.counter {
  display: inline-block;
  margin-left: var(--space-2);
  padding: 2px 4px;
  background: var(--scroller-bg);
  border: 2px inset var(--bevel-dark);
}

.counter__digit {
  display: inline-block;
  min-width: 0.75em;
  padding: 0 1px;
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--scroller-text);
  text-align: center;
}

.counter-disclaimer {
  margin: 0 0 var(--space-4);
  color: var(--text-muted);
}

.badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  margin: 0 0 var(--space-4);
}

[data-theme="websafe"] .badges {
  display: none;
}

.badges img {
  border: 1px solid var(--decor);
}

.footer-meta {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
}

/* --------------------------------------------------------------------------
   Narrow screens. The 90s did not have these, but we do.
   -------------------------------------------------------------------------- */

@media (max-width: 34rem) {
  .vitals__row {
    grid-template-columns: 1fr;
    gap: var(--space-1);
  }

  .mode-btn {
    margin-left: 0;
  }

  .theme-bar__group {
    width: 100%;
  }

  .theme-btn {
    flex: 1 1 8rem;
  }
}
