/* Section: Palette & Tokens */
:root {
  --bg: #0b0f14;
  --bg-2: #0a1b26;
  --surface: rgba(255, 255, 255, 0.12);
  --surface-2: rgba(255, 255, 255, 0.22);
  --text: #e8fffb;
  --muted: #a6b8c8;
  --accent: #ffb3d9;      /* pastel pink */
  --accent-2: #39ff14;    /* glowstick green */
  --border: rgba(255, 255, 255, 0.28);
  --shadow: 0 8px 28px rgba(0,0,0,.44);
  --radius: 14px;
  --radius-sm: 10px;
  --focus: 2px solid var(--accent-2);
}

/* Section: Base & Layout Reset */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-font-smoothing: antialiased; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
               Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, #0b0f14 0%, #0a1b26 40%, #0b0f14 100%);
  min-height: 100%;
  line-height: 1.55;
  position: relative;
}
.light-overlay { /* utility for potential overlays */ }

/* Section: Background Layer (gradient + scanlines/noise) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 85% 15%, rgba(57,255,20,0.08) 0, transparent 30%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0 1px, transparent 1px 2px);
  background-blend-mode: overlay;
  filter: saturate(110%);
  opacity: 0.95;
}
@media (prefers-reduced-motion: reduce) {
  body::before { display: none; }
}

/* Section: Layout Helpers & Utilities */
.container {
  width: 100%;
  max-width: clamp(720px, 86vw, 1120px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  gap: 1rem;
}
.card {
  padding: 1rem;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.28);
  box-shadow: var(--shadow);
}
.tag {
  display: inline-block;
  padding: 0.15em 0.5em;
  border-radius: 999px;
  font-size: 0.75rem;
  background: rgba(57,255,20,0.25);
  color: #eaffef;
  border: 1px solid rgba(57,255,20,0.5);
}

/* Section: Typography & Content */
html, body, header, nav, main, article, aside, footer {
  scroll-behavior: smooth;
}
h1, h2, h3 {
  color: var(--text);
  margin: 0.25rem 0 0.5rem;
}
p { margin: 0.5rem 0; color: var(--text); opacity: 0.95; }
ul { padding-left: 1.4rem; margin: 0.5rem 0 1rem; color: var(--text); }
li { margin: 0.25rem 0; }

/* Section: Glass Panels (Frosted Glass) */
header, article, footer, .card, .image-frame {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 28px rgba(0,0,0,.40);
  color: var(--text);
}
@supports not(backdrop-filter) {
  header, article, footer, .card, .image-frame {
    background: rgba(255,255,255,0.88);
    border-color: rgba(0,0,0,0.15);
    color: #0b0f14;
  }
}
header { text-align: center; padding: 1.75rem 1rem; margin: 1rem auto; }
header h1 { font-size: clamp(1.6rem, 2.8vw + 1rem, 2.8rem); line-height: 1.04; font-weight: 700; letter-spacing: .2px; margin-bottom: .25rem; }
header .meta { color: var(--muted); font-size: 0.95rem; margin-bottom: .25rem; }

/* Section: Header & Nav Layout */
nav { margin-top: .5rem; }
nav a {
  color: var(--text);
  text-decoration: none;
  padding: .4rem .6rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.28);
}
nav a:hover, nav a:focus-visible { text-decoration: underline; outline: none; }

/* Section: Main Content & Media */
main { padding: 1rem 0 2rem; }
.article {
  display: block;
}
.featured-image {
  margin: 1rem auto;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.28);
  box-shadow: 0 6px 20px rgba(0,0,0,0.45);
}
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  display: block;
  overflow: hidden;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
  transform: translateZ(0);
  transition: transform 0.25s ease;
}
.image-frame:hover img { transform: scale(1.03); }

/* Section: Images (fallback for .featured-image as .image-frame analogue) */
.featured-image img { width: 100%; height: auto; display: block; }

/* Section: Content Structure */
.content { padding: 0.25rem 0 0.75rem; }

/* Section: Product Ad / CTAs in Footer */
.product-ad, .sponsored-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .75rem;
  width: calc(50% - 1rem);
  min-width: 240px;
}
footer { padding: 1rem; display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; align-items: center; }

/* Section: Buttons & Links */
button, .btn {
  font: inherit;
  padding: 0.65em 1.15em;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(0,0,0,0.25);
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease;
  text-align: center;
}
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; }
.btn--solid {
  background: linear-gradient(135deg, rgba(0,0,0,0.0), rgba(57,255,20,0.8));
  border: 1px solid rgba(57,255,20,0.9);
  box-shadow: 0 6px 14px rgba(57,255,20,0.5);
  color: #041a0b;
}
.btn--outline {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.45);
  color: var(--text);
}
a.btn { text-decoration: none; }

/* Focus & accessibility for controls */
button:focus-visible,
a:focus-visible,
.input:focus-visible,
[tabindex]:focus-visible {
  outline: var(--focus);
  outline-offset: 3px;
  border-color: rgba(57,255,20,0.9);
}

/* Section: Links & Interaction Styling */
a {
  color: var(--accent);
  text-decoration: none;
}
a:hover, a:focus-visible {
  text-decoration: underline;
  color: var(--accent-2);
}

/* Section: Accessibility & Motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  body::before { display: none; }
}

/* Section: Print Styles */
@media print {
  body { background: white; color: black; }
  header, main, footer { background: transparent; border: none; box-shadow: none; }
  a { text-decoration: underline; }
}
