/* Base & Palette (tokenized) */
:root{
  --bg: #1b0b12;
  --bg-2: #2a0b12;
  --text: #e8f0f5;
  --muted: #b8c7d4;
  --accent: #5cff7a;      /* glowstick green */
  --accent-2: #28e07a;
  --card: rgba(255,255,255,0.12);
  --card-2: rgba(255,255,255,0.18);
  --radius: 14px;
  --shadow: 0 8px 28px rgba(0,0,0,.38);
  --shadow-soft: 0 6px 20px rgba(0,0,0,.25);
  --focus: 0 0 0 3px rgba(40, 224, 122, 0.6);
  --focus-offset: 2px;
}

/* Global reset & typography (mobile-first) */
* { box-sizing: border-box; }
html { font-size: clamp(14px, 1.6vw, 18px); }
body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans";
  line-height: 1.5;
  min-height: 100%;
  background: 
    linear-gradient(135deg, rgba(27,6,14,.95), rgba(8,2,6,.95) 60%, rgba(27,6,14,.95)),
    /* subtle scanlines */
    repeating-linear-gradient(to bottom, rgba(0,0,0,.05) 0 1px, transparent 1px 2px),
    /* soft noise-like texture via layered gradients */
    radial-gradient(circle at 20px 20px, rgba(0,0,0,.08), transparent 40px);
  background-blend-mode: normal, overlay, overlay;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layout helpers */
.container { max-width: clamp(640px, 82vw, 1100px); margin-inline: auto; padding-block: 1rem; padding-inline: 1rem; }

/* Glass panel (with backdrop-filter, plus graceful fallback) */
.glass {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) and not (-webkit-backdrop-filter: blur(12px)) {
  .glass { background: rgba(255,255,255,0.22); border-color: rgba(255,255,255,0.5); }
}

/* Image frame styling */
.image-frame {
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: inset 0 0 16px rgba(0,255,120,.15);
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

/* Core structural selectors (must style) */
html, body, header, nav, main, article, footer, aside { }
header, nav { display: block; }

/* Header & hero typography */
header { padding-block: 1rem; }
header h1 {
  font-size: clamp(1.6rem, 2.8vw + 1rem, 3rem);
  line-height: 1.15;
  margin: 0 0 .25rem;
}
header .meta {
  color: var(--muted);
  font-size: clamp(.9rem, 1vw, 1.05rem);
  margin: 0 0 .75rem;
}
nav { margin-top: .25rem; }

/* Navigation links (high contrast focus) */
nav a {
  color: var(--text);
  text-decoration: none;
  padding: .35rem .6rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.25);
}
nav a:hover, nav a:focus-visible {
  text-decoration: underline;
  outline: 0;
  box-shadow: 0 0 0 3px rgba(88, 255, 160, 0.25);
}
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px rgba(88,255,160,.75);
  outline-offset: var(--focus-offset);
  border-radius: 6px;
}

/* Main content & typography strategy */
main { padding: 1rem 0; }
article { display: grid; gap: 1rem; }

/* Featured image wrapper in article */
.featured-image { width: 100%; display: block; }
.featured-image img { width: 100%; height: auto; display: block; border-radius: 12px; }

/* Content sections & lists */
h2, h3, p { margin: .5rem 0; }
ul { padding-left: 1.15rem; margin: .25rem 0; }
li { margin: .25rem 0; }

/* Lists styling: ensure contrast on glass backgrounds */
li { line-height: 1.5; }

/* Utilities & components */
.container.grid { display: grid; gap: 1rem; }

/* Card & tag utilities */
.card {
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08);
}
.tag {
  display: inline-block;
  padding: .15em .6em;
  font-size: .75rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.15);
  color: var(--text);
}

/* Product ad / sponsor panels (footer) */
footer { padding: 1rem 0 2rem; display: grid; gap: 1rem; grid-template-columns: 1fr; align-items: start; }
.product-ad a { display: block; padding: 0.75rem; text-align: center; color: inherit; text-decoration: none; }
.product-ad { padding: .5rem; }
.sponsored-page { padding: .5rem; }
footer p { margin: .5rem 0 0; color: var(--muted); text-align: center; }

@media (min-width: 700px) {
  footer { grid-template-columns: 1fr 1fr; }
  .content { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; }
}
