/* Section: Tokens */
:root {
  --bg: #03140f;
  --bg-2: #041c15;
  --text: #eafff6;
  --muted: #9af7d0;
  --accent: #39ff14;
  --accent-2: #2cff9b;

  /* Glass tokens (rgba derived for translucency) */
  --glass-bg: rgba(3, 20, 12, 0.28);
  --glass-border: rgba(120, 255, 180, 0.40);
  --glass-border-2: rgba(57, 255, 150, 0.50);
  --glass-soft: rgba(0, 0, 0, 0.25);

  --shadow: 0 8px 26px rgba(0, 0, 0, 0.28);
  --ring: 0 0 0 3px rgba(57, 255, 20, 0.70);
  --focus: 0 0 0 3px rgba(57, 255, 20, 0.75);
  --tube-glow: 0 0 20px rgba(57, 255, 20, 0.6);
  --radius: 14px;
}

/* Section: Base reset & layered background */
html, body {
  height: 100%;
}
html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  background-color: var(--bg);
  /* Layered background: iridescent + subtle noise/scanlines */
  background-image:
    /* subtle iridescent glow as a gradient */
    linear-gradient(135deg, rgba(57, 255, 140, 0.12) 0%, rgba(0, 0, 0, 0) 40%),
    /* soft glow bands */
    radial-gradient(circle at 20% -10%, rgba(0, 255, 120, 0.20), transparent 25%),
    radial-gradient(circle at 90% 10%, rgba(0, 255, 120, 0.28), transparent 25%),
    /* faint scanlines for cyberpunk texture */
    repeating-linear-gradient(to bottom,
      rgba(255,255,255,0.03) 0px, rgba(255,255,255,0.03) 1px,
      transparent 1px, transparent 2px);
  background-blend-mode: screen, normal, normal, overlay;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

@media (prefers-color-scheme: light) {
  html, body {
    color: #0a0a0a;
  }
  /* Lighter text for accessibility on light schemes if user prefers */
  :root { --text: #0a0a0a; --muted: #555; }
}

/* Section: Layout helpers */
.container {
  width: 100%;
  max-width: clamp(320px, 90vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  gap: 1rem;
}
.card {
  background: rgba(4, 40, 20, 0.24);
  border: 1px solid rgba(120, 255, 180, 0.28);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.25em 0.5em;
  border-radius: 999px;
  background: rgba(57,255,150,0.15);
  color: var(--text);
  border: 1px solid rgba(120,255,180,0.35);
}
.grid-auto-fit {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
}
.image-frame {
  width: 100%;
  max-width: 700px;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(120, 255, 180, 0.45);
  box-shadow: 0 6px 18px rgba(0,0,0,0.35), inset 0 0 18px rgba(57,255,120,0.25);
  margin: 1rem auto;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  mix-blend-mode: normal;
}
.content {
  background: rgba(4, 40, 20, 0.28);
  border: 1px solid rgba(120, 255, 180, 0.40);
  border-radius: 12px;
  padding: 1rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
@supports not (backdrop-filter: blur(8px)) {
  .content { background: rgba(4, 40, 20, 0.72); }
}
a, button, .btn, .cta {
  cursor: pointer;
  text-decoration: none;
  color: var(--text);
  background: transparent;
  border: 0;
  padding: 0;
  font: inherit;
}
a:hover, a:focus-visible, button:hover, button:focus-visible, .btn:hover, .cta:hover {
  outline: none;
}
a:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
}
.btn, .cta {
  display: inline-block;
  padding: 0.75em 1.25em;
  border-radius: 8px;
  border: 1px solid rgba(57, 255, 150, 0.5);
  background: linear-gradient(180deg, rgba(57,255,120,0.95), rgba(57,255,120,0.75));
  color: #04140a;
  font-weight: 600;
  box-shadow: var(--tube-glow);
  transition: transform .15s ease, box-shadow .2s ease;
}
.btn:hover, .cta:hover { transform: translateY(-1px); }
.btn:active, .cta:active { transform: translateY(0); }
.btn.secondary {
  background: rgba(0,0,0,0.0);
  color: var(--text);
  border: 1px solid rgba(120, 255, 180, 0.6);
}
.btn.primary {
  background: linear-gradient(180deg, rgba(57,255,140,0.95), rgba(57,255,140,0.75));
  color: #062111;
  border: 1px solid rgba(120,255,180,0.9);
}
.btn.ghost {
  background: rgba(0,0,0,0.0);
  color: var(--text);
  border: 1px solid rgba(120, 255, 180, 0.6);
}
a.ghost-link {
  text-decoration: none;
  border-bottom: 1px dotted rgba(57,255,140,0.75);
}
a.ghost-link:hover, a.ghost-link:focus-visible { text-decoration: underline; }

/* Section: Typography */
html {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  line-height: 1.5;
  font-size: 16px;
}
main, article {
  display: block;
}
header {
  padding: 1rem;
  margin: 0 auto 1rem;
  text-align: center;
}
header h1 {
  font-size: clamp(1.75rem, 4vw + 1rem, 3rem);
  line-height: 1.15;
  margin: 0.25rem 0;
  letter-spacing: .2px;
  color: var(--text);
}
header .meta {
  font-size: clamp(0.8rem, 1.2vw, 0.95rem);
  color: var(--muted);
}
nav {
  margin-top: .5rem;
}
nav a {
  color: var(--accent);
  text-decoration: none;
  padding: .25rem .5rem;
  border-radius: 6px;
  border: 1px solid rgba(57,255,140,0.25);
}
nav a:hover { text-decoration: underline; }

/* Section: Page structure styling (semantic elements) */
html, body, header, nav, main, article, footer, aside {
  /* ensure predictable box sizing for layout fidelity */
  box-sizing: border-box;
}
*, *::before, *::after { box-sizing: inherit; }

/* Section: Content regions */
.product-ad {
  display: block;
  margin: 0.75rem;
  padding: 0.75rem;
  border-radius: 12px;
  background: rgba(4, 40, 20, 0.28);
  border: 1px solid rgba(120, 255, 180, 0.42);
  text-align: center;
  transition: transform .15s ease;
}
.product-ad:hover { transform: translateY(-1px); }

/* Section: Page layout blocks */
footer {
  padding: 1rem;
  margin-top: 1rem;
  display: grid;
  gap: 0.75rem;
  justify-items: center;
  text-align: center;
  color: var(--muted);
  background: rgba(1, 20, 12, 0.28);
  border-top: 1px solid rgba(120, 255, 180, 0.25);
}
footer .sponsored-page, footer .product-ad {
  width: 100%;
  max-width: 420px;
}
footer p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Section: Accessibility helpers for lists & links */
ul {
  padding-left: 1.25rem;
  margin: .5rem 0;
}
li { margin: .25rem 0; }

/* Section: Print (basic readability) */
@media print {
  body {
    background: #fff;
    color: #000;
  }
  a { color: #000; text-decoration: none; border-bottom: 1px solid #000; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; transform: none !important; }
}

/* Section: Responsive typography & layout tweaks */
@media (min-width: 600px) {
  .container { padding-block: 0.75rem; }
}
@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}