:root {
  /* Palette per feral_fever_requirements.docx:
   * near-black (plum-tinted) bg, deep aubergine raised surfaces,
   * antique gold as primary accent, warm cream foreground — never pure white.
   * Variable names preserved so existing per-page CSS keeps working:
   *   --accent is now the antique gold (was rose/pink)
   *   --gold is kept as an alias to --accent for backwards compatibility
   */
  --bg: #14090d;           /* near-black, plum undertone */
  --bg-raised: #2a1530;    /* deep aubergine — cards, nav, raised surfaces */
  --fg: #f5ecd9;           /* warm cream, never pure white */
  --fg-dim: #d8c9b3;       /* dimmer cream for secondary text */
  --muted: #9d8a96;        /* muted plum-gray for tertiary / footer text */
  --accent: #c9a15b;       /* antique gold — primary accent, replaces rose */
  --accent-bright: #e0b96d; /* brighter gold for hover states */
  --gold: #c9a15b;         /* alias to --accent; retained for existing refs */
  --plum: #6b2b5f;         /* mid-plum for decorative moments if needed */
  --border: #3a1f3d;       /* deep aubergine border */
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  --radius: 6px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  line-height: 1.6;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-bright); }

h1, h2, h3, h4 {
  font-family: "Playfair Display", Didot, "Bodoni 72", Georgia, serif;
  font-weight: 400;
  letter-spacing: 0.01em;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.5rem, 6vw, 4rem); font-style: italic; }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: 1.25rem; }

.muted { color: var(--muted); }
.dim { color: var(--fg-dim); }

/* ── Nav ─────────────────────────────────────────────────────────────────── */
.site-nav {
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: rgba(20, 9, 13, 0.92);
  backdrop-filter: blur(8px);
  z-index: 10;
}

.site-nav .brand {
  /* Wordmark — background image swaps in for the "Feral Fever" text.
   * The original text is kept in the DOM for screen readers and indent-
   * hidden (Kellum method) so assistive tech still announces the brand.
   * Width is fluid with the viewport so the phone layout gets the same
   * prominence as desktop — shrinking only on very narrow screens. */
  display: inline-block;
  width: min(213px, 70vw);
  aspect-ratio: 213 / 62;
  height: auto;
  background: url('/assets/logo-header.png') center / contain no-repeat;
  text-indent: 100%;
  white-space: nowrap;
  overflow: hidden;
  font-size: 0;
  color: transparent;
  flex-shrink: 0;
}
.site-nav .brand:hover { opacity: 0.85; }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.75rem;
}

.site-nav ul a {
  color: var(--fg);
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.site-nav ul a:hover { color: var(--gold); }

/* Account dropdown (signed-in user menu) */
.site-nav .nav-account { position: relative; }
.site-nav .nav-account-trigger {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: var(--fg);
  font: inherit;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
}
.site-nav .nav-account-trigger:hover,
.site-nav .nav-account-trigger[aria-expanded="true"] { color: var(--gold); }
.site-nav .nav-account-caret {
  font-size: 0.7em;
  transition: transform 0.15s ease;
  line-height: 1;
}
.site-nav .nav-account-trigger[aria-expanded="true"] .nav-account-caret {
  transform: rotate(180deg);
}
.site-nav .nav-account-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 11rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 0.35rem 0;
  margin: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  z-index: 20;
}
.site-nav .nav-account-menu[hidden] { display: none; }
.site-nav .nav-account-menu li { margin: 0; }
.site-nav .nav-account-menu a {
  display: block;
  padding: 0.55rem 1rem;
  color: var(--fg);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.site-nav .nav-account-menu a:hover,
.site-nav .nav-account-menu a:focus-visible {
  background: rgba(201, 161, 91, 0.1);
  color: var(--gold);
  outline: none;
}
.site-nav .nav-account-cart-count {
  color: var(--fg-dim);
  font-size: 0.85em;
}

/* ── Layout ──────────────────────────────────────────────────────────────── */
main {
  max-width: 72rem;
  margin: 0 auto;
  padding: 3rem 2rem 6rem;
}

.page-title {
  text-align: center;
  margin-bottom: 3rem;
}
.page-title h1 { margin-bottom: 0.25rem; }
.page-title .tagline {
  color: var(--muted);
  font-style: italic;
  font-size: 1.05rem;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}
footer a { color: var(--muted); text-decoration: underline; }
footer a:hover { color: var(--accent); }
footer .legal-links { margin-top: 0.5rem; font-size: 0.8rem; letter-spacing: 0.05em; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn:hover {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--accent-bright);
  color: var(--bg);
}

/* ── Cards (shared across shows + performers) ────────────────────────────── */
.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease;
}
.card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}
.card a { color: inherit; display: block; }

/* ── Empty state ─────────────────────────────────────────────────────────── */
.empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--muted);
  font-style: italic;
}

/* Responsive */
@media (max-width: 640px) {
  .site-nav { padding: 1rem; flex-direction: column; gap: 0.75rem; }
  .site-nav ul { gap: 1rem; flex-wrap: wrap; justify-content: center; }
  .site-nav .nav-account-menu { right: auto; left: 50%; transform: translateX(-50%); }
  main { padding: 2rem 1rem 4rem; }
}

/* ── Accessibility primitives ─────────────────────────────────────────────
 * Skip link, focus-visible, reduced-motion, sr-only. WCAG 2.2 AA.
 * WCAG 2.2 is ISO/IEC 40500:2025; 4.6k+ ADA e-commerce filings in 2024.
 */

/* Visually-hidden but accessible to AT. Standard a11y pattern. */
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Skip-to-content: invisible until keyboard-focused, then pops above
 * the sticky nav. First focusable element on every page (see base layout).
 */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 1000;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
  text-decoration: none;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus,
.skip-link:focus-visible {
  left: 0;
  outline: none;
}

/* Visible focus ring — WCAG 2.2 SC 2.4.11 (focus not obscured) + SC 2.4.7.
 * We intentionally drop the default browser ring only on :focus (mouse)
 * and keep a bold one for :focus-visible (keyboard / screen-reader).
 */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Honor user motion preferences — WCAG 2.2 SC 2.3.3. Baymard notes
 * reduced-motion + vestibular-disorder users experience animation as
 * physically disorienting; default *all* transitions off when requested.
 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Consent banner ───────────────────────────────────────────────────────
 * Legal: CCPA/CPRA + state privacy law bundle. Sephora CA 2022 is the
 * enforcement precedent. Three equal buttons by design — dark-pattern
 * case law penalizes visually-weighted "Accept" vs. hidden "Reject".
 */
.ff-consent {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: var(--bg-raised);
  border-top: 1px solid var(--border);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.5);
  padding: 1rem 1.25rem;
  z-index: 900;
  transform: translateY(110%);
  transition: transform 0.25s ease-out;
  max-height: 90vh;
  overflow-y: auto;
}
.ff-consent.is-visible { transform: translateY(0); }
.ff-consent__inner {
  max-width: 64rem;
  margin: 0 auto;
}
.ff-consent__title {
  font-family: "Playfair Display", serif;
  font-size: 1.15rem;
  margin: 0 0 0.25rem;
  color: var(--fg);
}
.ff-consent__copy p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--fg-dim);
  line-height: 1.5;
}
.ff-consent__copy a { color: var(--accent); text-decoration: underline; }
.ff-consent__categories {
  margin: 1rem 0 0.5rem;
  display: grid;
  gap: 0.75rem;
}
.ff-consent__row {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  cursor: pointer;
}
.ff-consent__row strong { color: var(--fg); }
.ff-consent__row span { color: var(--fg-dim); font-size: 0.85rem; }
.ff-consent__actions {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
/* Equal visual weight on the three choice buttons — CCPA dark-pattern rule. */
.ff-consent__accept,
.ff-consent__reject,
.ff-consent__customize {
  background: transparent;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 0.55rem 1.1rem;
  cursor: pointer;
  font: inherit;
  border-radius: var(--radius);
}
.ff-consent__accept:hover,
.ff-consent__reject:hover,
.ff-consent__customize:hover {
  color: var(--bg);
  background: var(--accent);
}
.ff-consent__save {
  padding: 0.55rem 1.1rem;
  cursor: pointer;
  font: inherit;
  border-radius: var(--radius);
}

.ff-dnsmpi-link,
.ff-consent-prefs-link {
  color: var(--muted);
  text-decoration: underline;
  font-size: inherit;
}
.ff-dnsmpi-link:hover,
.ff-consent-prefs-link:hover { color: var(--accent); }
.ff-dnsmpi-ack {
  color: var(--accent);
  font-size: 0.8em;
}
.ff-footer-auto {
  margin-top: 3rem;
}

@media (max-width: 640px) {
  .ff-consent__row { grid-template-columns: auto 1fr; }
  .ff-consent__row strong { grid-column: 2; }
  .ff-consent__row input[type="checkbox"] { grid-row: 1 / 3; }
  .ff-consent__row span { grid-column: 2; }
  .ff-consent__actions .btn { flex: 1 1 45%; }
}

/* ── Toast stack + confirm modal (ui.js) ────────────────────────────────── */
.ui-toasts {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1100;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.ui-toast {
  pointer-events: auto;
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  background: var(--bg-raised);
  color: var(--fg);
  border-left: 3px solid var(--accent);
  box-shadow: var(--shadow);
  font-size: 0.92rem;
  max-width: 22rem;
  cursor: pointer;
  opacity: 0;
  transform: translateX(1rem);
  animation: ui-toast-in 0.18s ease-out forwards;
}
.ui-toast--leaving {
  animation: ui-toast-out 0.25s ease-in forwards;
}
@keyframes ui-toast-in  { to { opacity: 1; transform: translateX(0);      } }
@keyframes ui-toast-out { to { opacity: 0; transform: translateX(1rem);   } }
.ui-toast--success { border-left-color: #8ac48a; }
.ui-toast--error   { border-left-color: #e88; }
.ui-toast--warn    { border-left-color: #d89645; }
.ui-toast--info    { border-left-color: var(--accent); }

.ui-confirm {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: grid;
  place-items: center;
}
.ui-confirm__scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}
.ui-confirm__panel {
  position: relative;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  max-width: min(24rem, 92vw);
  box-shadow: var(--shadow);
  outline: none;
}
.ui-confirm__message {
  margin: 0 0 1rem;
  color: var(--fg);
  line-height: 1.5;
}
.ui-confirm__actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}
.ui-confirm__cancel {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg);
  padding: 0.5rem 1.1rem;
  cursor: pointer;
  font: inherit;
  border-radius: var(--radius);
}
.ui-confirm__cancel:hover { border-color: var(--accent); }
.ui-confirm__ok {
  background: var(--accent);
  border: 1px solid var(--accent);
  color: var(--bg);
  padding: 0.5rem 1.1rem;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  border-radius: var(--radius);
}
.ui-confirm__ok:hover { background: var(--accent-bright); border-color: var(--accent-bright); }
.ui-confirm__ok--danger {
  background: #c85050;
  border-color: #c85050;
  color: white;
}
.ui-confirm__ok--danger:hover { background: #d86060; border-color: #d86060; }
