/* Palette & Foundations */
:root {
  --bg: #0b0b0f;
  --bg-2: #141019;
  --text: #f6f3ea;
  --muted: #d8c286;
  --accent: #ff9e00;
  --accent-2: #ffd166;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.18);
  --border: rgba(255, 255, 255, 0.25);
  --focus: #ffd166;
  --shadow: 0 8px 28px rgba(0,0,0,.5);
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f5ea;
    --bg-2: #efecc9;
    --text: #1b1b1b;
    --muted: #5a5500;
    --accent: #b56a00;
    --accent-2: #e4b100;
    --panel: rgba(255, 255, 255, 0.92);
    --panel-strong: rgba(255, 255, 255, 1);
    --border: rgba(0, 0, 0, 0.15);
  }
}

html, body { height: 100%; }
* { box-sizing: border-box; }
html { font-size: 100%; }
body {
  margin: 0;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  line-height: 1.5;
  background-color: var(--bg);
  /* Layered background: gradient + subtle gold glow + scanlines */
  background-image:
    linear-gradient(135deg, rgba(20,20,20,.92), rgba(10,10,10,.92)),
    linear-gradient(135deg, rgba(255, 170, 0, .18), rgba(255, 214, 0, .12)),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  background-blend-mode: normal, screen, overlay;
  min-height: 100vh;
  isolation: isolate;
  position: relative;
}
body::before {
  /* Pure CSS noise/scanline overlay for depth */
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(255,255,255,.04) 0 2px, transparent 2px),
    radial-gradient(circle at 70% 60%, rgba(255,255,255,.04) 0 2px, transparent 2px);
  background-size: 24px 24px, 48px 48px;
  opacity: .28;
  mix-blend-mode: overlay;
  filter: saturate(.9);
}
:focus { outline: none; }

/* Layout primitives */
.container {
  width: 100%;
  max-width: clamp(320px, 92vw, 1100px);
  margin-inline: auto;
  padding: 0 1rem;
}
.header, .main, .footer { position: relative; z-index: 1; }

/* Section structure */
header {
  padding: 1.75rem 0 0.5rem;
  text-align: center;
}
header h1 {
  font-size: clamp(1.75rem, 4vw + 0.5rem, 3rem);
  line-height: 1.05;
  margin: 0;
  letter-spacing: .2px;
  color: var(--text);
  text-shadow: 0 0 16px rgba(255, 153, 0, 0.25);
}
main {
  display: grid;
  place-items: center;
  padding: 1rem 0 2rem;
}
article { width: min(900px, 92%); }

/* Image frame with aspect ratio and glow */
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(10,10,10,.25);
  box-shadow: 0 8px 26px rgba(0,0,0,.5);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
}
.image-frame:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Glass panels (fallback friendly) */
.card, .content, .product-ad, .sponsored-page {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px) saturate(1.15);
  -webkit-backdrop-filter: blur(12px) saturate(1.15);
}
.card { padding: 1rem; }

/* Fallback for non-supporting backdrop-filter */
@supports not (backdrop-filter: blur(12px)) {
  .card, .content, .product-ad, .sponsored-page {
    background: rgba(0,0,0,.18);
  }
}
.content { padding: 0.75rem 1rem; color: var(--text); }

/* Utility & components */
a, button, .btn, .cta {
  color: var(--accent-2);
  text-decoration: none;
  cursor: pointer;
  transition: color .2s ease, transform .2s ease, background .2s ease;
}
a:hover, a:focus { text-decoration: underline; outline: none; }
a:focus-visible, button:focus-visible, .cta:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}
.btn, .cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .75rem 1.125rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 214, 0, .8);
  background: linear-gradient(135deg, rgba(255,170,0,.95), rgba(255,140,0,.85));
  color: #1b1b1b;
  font-weight: 600;
  text-shadow: 0 1px 0 rgba(255,255,255,.25);
}
.btn:hover, .cta:hover {
  transform: translateY(-1px);
}
.btn:active, .cta:active {
  transform: translateY(0);
}
.btn.secondary, .cta.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.6);
}
.btn.outline, .cta.outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 214, 0, .8);
}
.tag {
  display: inline-block;
  padding: .25em .6em;
  font-size: 12px;
  border-radius: 999px;
  background: rgba(255, 214, 0, .18);
  color: var(--text);
  border: 1px solid rgba(255, 210, 0, .4);
  line-height: 1;
}
ul, li { margin: 0; padding: 0; list-style: none; }

/* Layout helpers */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.container--tight { padding-inline: 0.5rem; }

/* Footer sections as glass panels */
footer {
  padding: 1.75rem 0 2rem;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: start;
}
.product-ad, .sponsored-page { text-align: center; }
.footer p { text-align: center; margin: 0.75rem 0 0; color: var(--muted); }

/* Shared typography */
h1, h2, h3, h4 { line-height: 1.15; margin: .25rem 0; color: var(--text); }
p { color: var(--muted); }

/* Reduce motion respect */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
@media print {
  html, body { background: #fff; color: #000; }
  header, main, footer { page-break-inside: avoid; }
  a, button { color: #000; text-decoration: underline; }
}
