/* Section: Tokens */
:root {
  --bg: #0b0f14;
  --bg-emerald: #0a2e1a;
  --bg-ink: #041010;
  --text: #eafff7;
  --muted: #95f0d7;
  --accent: #2bd45a;       /* emerald-green */
  --accent-2: #66d4ff;     /* sky blue */
  --panel: rgba(8, 18, 18, 0.22);
  --panel-solid: rgba(8, 18, 18, 0.32);
  --border: rgba(56, 224, 214, 0.55);
  --shadow: 0 8px 28px rgba(0,0,0,.45);
  --radius: 12px;
  --focus: 3px solid rgba(102, 209, 255, 0.75);
}

/* Section: Base + resets */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-size: 16px; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  min-height: 100%;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
}

/* Section: Layered background (gradient + scanlines) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  /* layered gradient with emerald/sky tones */
  background: 
    radial-gradient(circle at 75% 20%, rgba(0, 210, 200, .20), transparent 28%),
    linear-gradient(135deg, rgba(2, 15, 12, .8) 0%, rgba(2, 8, 8, .0) 40%),
    linear-gradient(#09140f, #04140d);
  mix-blend-mode: normal;
  /* keeps GPU-friendly rendering */
  background-attachment: fixed;
  filter: saturate(1.05);
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  /* subtle scanlines via CSS gradients (pure CSS) */
  background-image:
    repeating-linear-gradient(to bottom, rgba(0,0,0,.04) 0 1px, transparent 1px 2px),
    linear-gradient(to bottom, rgba(0,0,0,.0), rgba(0,0,0,.0));
  opacity: .25;
  pointer-events: none;
}

/* Section: Layout helpers */
.container {
  width: 100%;
  max-width: clamp(680px, 90vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  .card { background: rgba(8, 18, 18, 0.72); backdrop-filter: none; }
}
.tag {
  display: inline-block;
  padding: .25rem .6rem;
  font-size: .75rem;
  border-radius: 999px;
  border: 1px solid rgba(102, 212, 255, .5);
  color: var(--text);
  background: rgba(0,0,0,.25);
}

/* Section: Typography & content structure */
header, main, article, footer, aside, nav {
  display: block;
}
h1, h2 {
  letter-spacing: .2px;
}
h1 {
  font-size: clamp(2rem, 4vw + 1rem, 4rem);
  line-height: 1.04;
  margin: 0 0 .25rem;
  color: #eafff7;
}
h2 {
  font-size: clamp(1.4rem, 2.6vw + .5rem, 2.2rem);
  margin: .75rem 0 0.25rem;
  color: #eaffff;
}
p { color: rgba(234, 255, 247, 0.92); margin: .9rem 0; }
blockquote {
  margin: .75rem 0;
  padding: .75rem 1rem;
  border-left: 3px solid var(--accent-2);
  color: #d6fffb;
  background: rgba(8, 24, 20, 0.28);
  border-radius: 6px;
}
ul { padding-left: 1.1rem; margin: .6rem 0; color: #d2fff0; }
li { margin: .25rem 0; }

/* Section: Media */
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(56, 232, 214, .5);
  background: rgba(0,0,0,.25);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Section: Hero/content polish (supporting image without exact .image-frame container) */
.featured-image { margin: 0 auto; max-width: 960px; width: 100%; }
.featured-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
  border: 1px solid rgba(56, 232, 214, .5);
  box-shadow: 0 6px 18px rgba(0,0,0,.3);
}

/* Section: Content area variants */
.content { padding: 1rem; }

/* Section: Links & buttons (interactive) */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  border-radius: 999px;
  padding: .65em 1.1em;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  display: inline-block;
  transition: transform .15s ease, background-color .15s ease, color .15s ease;
}
a:hover, button:hover, .btn:hover, .cta:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: none;
  outline: var(--focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 2px rgba(102, 212, 255, 0.4);
}
.btn { border-radius: 999px; }
.btn--solid {
  background: linear-gradient(135deg, var(--accent-2), #4fb7ff);
  color: #041b22;
  border: 1px solid rgba(102, 212, 255, .6);
}
.btn--outline {
  background: transparent;
  border: 1px solid rgba(102, 212, 255, .6);
  color: var(--text);
}
.btn:active, .cta:active, .btn--solid:active {
  transform: translateY(1px);
}
a, .cta { text-decoration-skip-ink: auto; }

/* Section: Navigational primitives (basic fallbacks) */
nav { display: flex; gap: .5rem; justify-content: center; padding: .5rem 1rem; }

/* Section: Product ad / sponsorship blocks (glass panels) */
.product-ad, .sponsored-page {
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  text-align: center;
  border-radius: var(--radius);
}
.product-ad { background: var(--panel); border: 1px solid var(--border); }
.sponsored-page { background: var(--panel); border: 1px solid var(--border); }

/* Section: Footer layout */
footer { padding: 2rem 1rem; }

/* Section: Utilities (dark mode + prefers-color-scheme) */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6fbf9;
    --bg-emerald: #0a8a57;
    --text: #0a1b15;
    --muted: #5a7a6b;
    --panel: rgba(255, 255, 255, 0.75);
    --panel-solid: rgba(255, 255, 255, 0.9);
    --border: rgba(3, 94, 87, 0.6);
  }
  body {
    background: #f4fbf9;
    color: var(--text);
  }
  .card { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
  a { color: #0b5e75; }
}
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; color: #000; }
  .card { background: #fff; border: 1px solid #000; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}