/* Base Tokens */
:root{
  --bg: #0b0026;
  --bg-2: #2a0050;
  --text: #e6fffb;
  --muted: #a6ffd9;
  --accent: #00e676;       /* emerald green */
  --accent-2: #8a5cff;     /* violet sparkle */
  --card: rgba(255,255,255,.08);
  --card-border: rgba(255,255,255,.25);
  --ring: 0 0 0 3px rgba(0,230,118,.65);
  --shadow: 0 10px 28px rgba(0,0,0,.25);
  --radius: 14px;
}

/* Section: Base + Layout (Mobile-First) */
html, body, header, nav, main, article, footer, aside { display: block; }
html, body { height: 100%; }
html { font-size: 16px; }
body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  font-size: clamp(14px, 1vw + 12px, 18px);
  line-height: 1.5;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 15% 10%, rgba(0,230,118,.15) 0 40px, transparent 40px),
    radial-gradient(circle at 80% 100%, rgba(138,92,246,.15) 0 40px, transparent 40px),
    linear-gradient(135deg, rgba(28,0,60,.95) 0%, rgba(6,0,46,.95) 60%, rgba(0,0,0,.95) 100%),
    #090018;
  background-blend-mode: screen, overlay, overlay, normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  isolation: isolate;
}
body::before { /* subtle scanlines overlay (pure CSS) */
  content:"";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 100% 2px, 2px 100%;
  mix-blend-mode: overlay;
  opacity: .9;
}

/* Layout helpers */
.container { width: min(92vw, 1100px); margin-inline: auto; padding-inline: 1rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* Section: Glass panels (fallback + backdrop-filter) */
header, main, footer, aside, .card, .image-frame, .product-ad, .sponsored-page {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1rem;
}

/* Header styling with clear hierarchy */
header {
  text-align: center;
  padding: 1.75rem 1rem;
  margin: 1rem auto;
  max-width: min(900px, 92%);
  border-radius: 16px;
  background: rgba(20,0,60,.60);
  border: 1px solid rgba(170,120,255,.35);
}
header h1 {
  margin: 0 0 .25rem;
  font-size: clamp(1.8rem, 3vw + 1rem, 3rem);
  line-height: 1.12;
  /* violet-to-emerald sheen on title with fallbacks */
  background: linear-gradient(90deg, #e5e5ff 0%, #9ffbd3 60%, #e5e5ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
header .meta {
  margin: .25rem 0 0;
  color: #d0ffd8;
  font-size: .9rem;
  opacity:.95;
}
nav { margin-top: .75rem; }

/* Main content area */
main { display: block; padding: 0 1rem 2rem; }

/* Article content styling */
article {
  max-width: min(860px, 100%);
  margin: 1rem auto;
  padding: 1rem;
}
.featured-image { border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.25); margin-bottom: .75rem; }
.featured-image img { width: 100%; height: auto; display: block; object-fit: cover; }

/* Headings + text rhythm within article for readability */
article h2, article h3 { color: #eafff0; }
article h2 { font-size: clamp(1.6rem, 1.2rem + 2.2vw, 2.6rem); margin: .4rem 0 0.4rem; }
article h3 { font-size: clamp(1.2rem, .9rem + 1.6vw, 1.6rem); margin: .4rem 0; }
article p { color: #eafff5; margin: .5rem 0; }
blockquote { margin: .75rem 0; padding: .5rem 1rem; border-left: 4px solid var(--accent-2); background: rgba(0,0,0,.15); border-radius: 6px; }

/* Lists */
ul, li { margin: .25rem 0; padding: 0; }
li { padding-left: 1.1rem; text-indent: -0.6rem; }

/* Content helper class (even if not in markup) */
.content { color: var(--text); }

/* Product ads in footer as glass panels */
.product-ad, .sponsored-page {
  display: block;
  text-align: center;
  padding: .75rem;
  min-width: 180px;
}
.product-ad a, .sponsored-page a { color: var(--text); text-decoration: none; display: inline-block; width: 100%; }

/* Footer styling */
footer { padding: 1rem; text-align: center; color: var(--muted); }
footer p { margin: .25rem 0; }

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

/* Inline utility components */
.tag {
  display: inline-block;
  padding: .15em .45em;
  font-size: .75rem;
  border-radius: 999px;
  border: 1px solid rgba(0,230,118,.5);
  background: rgba(0,230,118,.15);
  color: #e9fff4;
}

/* Buttons & links (interactive states) */
a, button, .btn, .cta {
  text-decoration: none;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,.15);
  transition: transform .2s ease, background .2s ease, color .2s ease, border-color .2s;
}
a { color: var(--accent); }
a:hover, a:focus { text-decoration: underline; color: #aaf6d6; }

/* Primary solid button variant */
.btn {
  display: inline-block;
  padding: .65rem 1rem;
  background: var(--accent);
  color: #041b0f;
  border: 1px solid rgba(0,230,118,.7);
  text-align: center;
  cursor: pointer;
}
.btn:hover { background: #0ae28a; }
.btn:active { transform: translateY(1px) scale(.995); }

/* Outline variant */
.btn.outline, .cta.outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(0,230,118,.75);
}
.btn.outline:hover, .cta.outline:hover { background: rgba(0,230,118,.15); }

/* Focus treatment (focus-visible for accessibility) */
:focus-visible {
  outline: none;
  box-shadow: var(--ring);
  outline-offset: 2px;
  border-color: rgba(0,230,118,.9);
}
button:focus-visible { outline: none; box-shadow: var(--ring); }

/* Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  header, main, footer { background: none; box-shadow: none; border: none; }
  a { text-decoration: underline; color: #000; }
}

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
