/* Secret Cup — dark-only cinematic theme, Avengers tone.
   Authority: design-system/secret-cup/MASTER.md (Project Adaptations override).
   Palette: cold steel-black w/ blue cast, Avengers red CTAs (#E62429, white text ≥4.5:1),
   gold (#D4AF37) as secondary premium accent, per-character --char-accent. */

:root {
  --bg: #0A0C10;
  --surface: #12161D;
  --fg: #F5F7FA;
  --muted-fg: #98A2B3;
  --accent: #E62429;      /* Avengers red — CTAs, brand, active states */
  --accent-fg: #FFFFFF;
  --gold: #D4AF37;        /* secondary premium accent — eyebrows, highlights */
  --border: #232A35;
  --destructive: #EF4444;
  --char-accent: var(--accent);

  --space-xs: 4px; --space-sm: 8px; --space-md: 16px; --space-lg: 24px;
  --space-xl: 32px; --space-2xl: 48px; --space-3xl: 64px;

  --shadow-md: 0 4px 6px rgba(0,0,0,.4);
  --shadow-lg: 0 10px 24px rgba(0,0,0,.5);

  --font-display: "Bebas Neue", "Arial Narrow", sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 var(--space-md); }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: .02em;
  text-transform: uppercase;
  line-height: 1.05;
}
h1 { font-size: clamp(2.6rem, 8vw, 5rem); }
h2 { font-size: clamp(1.8rem, 5vw, 2.8rem); }
h3 { font-size: 1.4rem; }
.eyebrow {
  color: var(--gold);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
}
.muted { color: var(--muted-fg); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(10,12,16,.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 60px;
}
.brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  letter-spacing: .06em;
  text-decoration: none;
}
.brand span { color: var(--accent); }
.cart-btn {
  display: flex; align-items: center; gap: var(--space-sm);
  background: none; border: 1px solid var(--border); border-radius: 8px;
  color: var(--fg); padding: 10px 14px; min-height: 44px;
  text-decoration: none;
  transition: border-color .2s ease;
}
.cart-btn:hover { border-color: var(--accent); }
.cart-count {
  background: var(--accent); color: var(--accent-fg);
  border-radius: 999px; font-size: .75rem; font-weight: 700;
  min-width: 20px; height: 20px; display: grid; place-items: center;
  padding: 0 5px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--space-sm);
  border: none; border-radius: 8px;
  padding: 14px 28px; min-height: 48px;
  font-weight: 600; text-decoration: none;
  transition: transform .2s ease, opacity .2s ease, border-color .2s ease;
}
.btn-primary { background: var(--accent); color: var(--accent-fg); }
.btn-primary:hover { opacity: .9; transform: translateY(-1px); }
.btn-ghost { background: none; color: var(--fg); border: 1px solid var(--border); }
.btn-ghost:hover { border-color: var(--accent); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.btn-block { width: 100%; }

/* ---------- hero ---------- */
.hero { padding: var(--space-3xl) 0; text-align: center; position: relative; overflow: hidden; }
.hero-glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 55% 40% at 50% 36%, rgba(230,36,41,.16), transparent 70%),
    radial-gradient(ellipse 70% 50% at 50% 42%, rgba(212,175,55,.06), transparent 75%);
}
.hero .container { position: relative; }
.hero-cup { display: block; width: min(400px, 80vw); margin: var(--space-xl) auto; filter: drop-shadow(0 24px 48px rgba(0,0,0,.6)); transition: transform .2s ease; }
.hero-cup:hover { transform: translateY(-2px); }
.hero-cup img { width: 100%; border-radius: 16px; }
.hero p.lead { max-width: 34rem; margin: var(--space-md) auto var(--space-lg); color: var(--muted-fg); }

/* ---------- roster grid ---------- */
.section { padding: var(--space-3xl) 0; }
.section-head { text-align: center; margin-bottom: var(--space-2xl); }
.roster-grid {
  display: grid; gap: var(--space-lg);
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}
.roster-grid.single {
  grid-template-columns: min(440px, 100%);
  justify-content: center;
}
.char-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.char-card:hover { border-color: var(--char-accent); box-shadow: var(--shadow-lg); }
.char-card .art-link { text-decoration: none; display: block; }
.char-card .art {
  aspect-ratio: 1; display: grid; place-items: center;
  background:
    radial-gradient(ellipse 70% 55% at 50% 60%, color-mix(in srgb, var(--char-accent) 16%, transparent), transparent 75%),
    var(--surface);
}
.char-card .art svg { width: 62%; }
.char-card .art img { width: 100%; height: 100%; object-fit: cover; }
.char-card .meta {
  padding: var(--space-md) var(--space-lg) var(--space-lg);
  display: flex; flex-direction: column; flex: 1;
}
.char-card .name { font-family: var(--font-display); font-size: 1.5rem; letter-spacing: .04em; text-transform: uppercase; }
.char-card .name a { text-decoration: none; }
.char-card .name a:hover { color: var(--char-accent); }
.char-card .tagline { color: var(--muted-fg); font-size: .9rem; flex: 1; }
.char-card .row {
  display: flex; align-items: center; justify-content: space-between;
  margin: var(--space-md) 0;
}
.price { font-weight: 600; }
.compare { color: var(--muted-fg); text-decoration: line-through; font-weight: 400; font-size: .9rem; margin-left: var(--space-sm); }

/* coming-soon teaser cards */
.char-card.soon .art { opacity: .45; filter: saturate(.6); }
.char-card.soon:hover { border-color: var(--border); box-shadow: none; }
.soon-badge {
  display: inline-block; align-self: flex-start;
  margin-top: var(--space-sm);
  padding: 4px 10px;
  border: 1px solid var(--border); border-radius: 999px;
  color: var(--muted-fg); font-size: .75rem; font-weight: 600;
  letter-spacing: .08em; text-transform: uppercase;
}

/* ---------- set strip ---------- */
.set-strip {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.set-strip .inner { padding: var(--space-2xl) var(--space-md); }
.set-strip .accent { color: var(--gold); }

/* ---------- trust ---------- */
.trust-grid {
  display: grid; gap: var(--space-lg);
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.trust-item { display: flex; gap: var(--space-md); align-items: flex-start; }
.trust-item svg { flex: none; width: 24px; height: 24px; color: var(--gold); margin-top: 2px; }
.trust-item .t { font-weight: 600; }
.trust-item .d { color: var(--muted-fg); font-size: .92rem; }

/* ---------- FAQ ---------- */
.faq { max-width: 720px; margin: 0 auto; }
.faq details {
  border-bottom: 1px solid var(--border);
  padding: var(--space-md) 0;
}
.faq summary {
  font-weight: 600; cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
  min-height: 44px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font-size: 1.3rem; }
.faq details[open] summary::after { content: "\2212"; }
.faq .a { color: var(--muted-fg); padding-top: var(--space-sm); }

/* ---------- PDP ---------- */
.pdp { display: grid; gap: var(--space-2xl); padding: var(--space-2xl) 0; }
@media (min-width: 860px) { .pdp { grid-template-columns: 1fr 1fr; align-items: start; } }
.pdp-art {
  border-radius: 12px; border: 1px solid var(--border);
  background:
    radial-gradient(ellipse 70% 55% at 50% 60%, color-mix(in srgb, var(--char-accent) 18%, transparent), transparent 75%),
    var(--surface);
  aspect-ratio: 1; display: grid; place-items: center;
}
.pdp-art svg { width: 64%; }
.pdp-art { overflow: hidden; }
.pdp-art img { width: 100%; height: 100%; object-fit: cover; }
.pdp-art video { width: 100%; height: 100%; object-fit: cover; background: #000; }
.pdp-thumb.video { display: grid; place-items: center; color: var(--fg); background: #000; }
.pdp-thumb .thumb-play svg { width: 26px; height: 26px; }
.pdp-thumbs { display: flex; gap: var(--space-sm); margin-top: var(--space-md); flex-wrap: wrap; }
.pdp-thumb {
  width: 64px; height: 64px; padding: 0;
  border: 2px solid var(--border); border-radius: 8px;
  background: var(--surface); overflow: hidden;
  transition: border-color .2s ease;
}
.pdp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pdp-thumb.sel, .pdp-thumb:hover { border-color: var(--char-accent); }
.pdp-info .eyebrow { display: block; margin-bottom: var(--space-sm); }
.pdp-info h1 { font-size: clamp(2.2rem, 6vw, 3.4rem); }
.pdp-info .lore { color: var(--muted-fg); margin: var(--space-md) 0 var(--space-lg); }
.pdp-price { font-size: 1.5rem; font-weight: 600; margin-bottom: var(--space-sm); }
.pdp-nudge { color: var(--gold); font-size: .92rem; margin-bottom: var(--space-lg); }
.pdp-facts { list-style: none; margin: var(--space-lg) 0; color: var(--muted-fg); font-size: .95rem; }
.pdp-facts li { padding: var(--space-sm) 0; border-bottom: 1px solid var(--border); display: flex; gap: var(--space-sm); }
.pdp-facts svg { flex: none; width: 18px; height: 18px; color: var(--gold); margin-top: 4px; }

.set-row { margin-top: var(--space-2xl); padding-bottom: var(--space-2xl); }
.set-row h2 { font-size: 1.6rem; margin-bottom: var(--space-lg); }
.set-row .roster-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: var(--space-md); }
.set-row .char-card .tagline { display: none; }
.set-row .char-card .name { font-size: 1.1rem; }
.set-row .char-card .btn { padding: 10px 16px; min-height: 44px; font-size: .9rem; }

/* sticky mobile add-to-cart (PDP) */
.sticky-atc {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: rgba(10,12,16,.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  padding: var(--space-sm) var(--space-md) calc(var(--space-sm) + env(safe-area-inset-bottom));
  display: flex; gap: var(--space-md); align-items: center;
  transform: translateY(110%);
  transition: transform .25s ease;
}
.sticky-atc.visible { transform: none; }
.sticky-atc .p { font-weight: 600; white-space: nowrap; }
.sticky-atc .btn { flex: 1; }
@media (min-width: 860px) { .sticky-atc { display: none; } }

/* ---------- cart page ---------- */
.cart-page { max-width: 760px; margin: 0 auto; padding: var(--space-2xl) var(--space-md); }
.cart-page h1 { font-size: clamp(2rem, 6vw, 3rem); margin-bottom: var(--space-lg); }
.cart-page .cart-line { border-bottom: 1px solid var(--border); }
.cart-page .cart-line .thumb { width: 84px; height: 84px; }
.cart-summary {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: var(--space-lg);
  margin-top: var(--space-lg);
}
.cart-summary .sub { display: flex; justify-content: space-between; font-weight: 600; font-size: 1.1rem; }
.cart-summary .note { color: var(--muted-fg); font-size: .88rem; margin: var(--space-sm) 0; }
.cart-summary .nudge { color: var(--gold); font-size: .92rem; margin-bottom: var(--space-md); }
.cart-page .cart-empty { text-align: center; padding: var(--space-3xl) 0; color: var(--muted-fg); }
.cart-page .cart-empty .btn { margin-top: var(--space-lg); }

/* ---------- cart popup (drawer) ---------- */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none;
  transition: opacity .25s ease;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 201;
  width: min(420px, 92vw);
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  transform: translateX(105%);
  transition: transform .28s ease;
}
.drawer.open { transform: none; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--space-md) var(--space-lg);
  border-bottom: 1px solid var(--border);
}
.drawer-close {
  background: none; border: none; color: var(--fg);
  width: 44px; height: 44px; display: grid; place-items: center;
}
.drawer-items { flex: 1; overflow-y: auto; padding: var(--space-md) var(--space-lg); }
.cart-line {
  display: flex; gap: var(--space-md); align-items: center;
  padding: var(--space-md) 0; border-bottom: 1px solid var(--border);
}
.cart-line .thumb {
  width: 64px; height: 64px; flex: none; border-radius: 8px;
  background: var(--bg); display: grid; place-items: center;
}
.cart-line .thumb svg { width: 70%; }
.cart-line .thumb { overflow: hidden; }
.cart-line .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cart-line .info { flex: 1; }
.cart-line .nm { font-weight: 600; }
.cart-line .nm a { text-decoration: none; }
.cart-line .nm a:hover { color: var(--accent); }
.qty {
  display: inline-flex; align-items: center; gap: 2px;
  border: 1px solid var(--border); border-radius: 8px; margin-top: var(--space-xs);
}
.qty button {
  background: none; border: none; color: var(--fg);
  width: 34px; height: 34px;
}
.qty span { min-width: 24px; text-align: center; font-size: .95rem; }

/* PDP buy row: qty stepper + checkout */
.buy-row { display: flex; gap: var(--space-md); align-items: stretch; }
.buy-row .btn { flex: 1; }
.qty-lg { margin-top: 0; }
.qty-lg button { width: 48px; height: 48px; font-size: 1.2rem; }
.qty-lg span { min-width: 32px; font-size: 1.05rem; font-weight: 600; }

.header-cta { padding: 8px 16px; min-height: 40px; font-size: .9rem; }
.cart-line .rm {
  background: none; border: none; color: var(--muted-fg);
  font-size: .8rem; text-decoration: underline; padding: var(--space-sm);
}
.drawer-foot { padding: var(--space-lg); border-top: 1px solid var(--border); }
.drawer-foot .sub { display: flex; justify-content: space-between; font-weight: 600; margin-bottom: var(--space-sm); }
.drawer-foot .note { color: var(--muted-fg); font-size: .85rem; margin-bottom: var(--space-md); }
.drawer-foot .nudge { color: var(--gold); font-size: .9rem; margin-bottom: var(--space-md); }
.drawer-foot .btn-ghost { margin-top: var(--space-sm); }
.cart-empty { text-align: center; color: var(--muted-fg); padding: var(--space-2xl) 0; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-2xl) 0;
  margin-top: var(--space-3xl);
  font-size: .9rem; color: var(--muted-fg);
}
.footer-cols { display: flex; flex-wrap: wrap; gap: var(--space-2xl); justify-content: space-between; }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--space-md) var(--space-lg); list-style: none; }
.footer-links a { color: var(--muted-fg); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.footer-links a:hover { color: var(--fg); }
.disclaimer { margin-top: var(--space-lg); max-width: 46rem; font-size: .82rem; }

/* ---------- legal pages ---------- */
.legal { max-width: 720px; margin: 0 auto; padding: var(--space-2xl) var(--space-md); }
.legal h1 { font-size: 2.2rem; margin-bottom: var(--space-lg); }
.legal h2 { font-size: 1.3rem; margin: var(--space-xl) 0 var(--space-sm); }
.legal p, .legal li { color: var(--muted-fg); }
.legal ul { padding-left: 1.2rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
