/* Root Palette & Tokens */
:root{
  --bg: #041b14;
  --bg-2: #0b2a1e;
  --text: #e8fff5;
  --muted: #b7f0d0;
  --accent: #1f8a5a;       /* forest green / acccent */
  --accent-2: #2bd4a0;      /* teal-green accent */
  --panel: rgba(4, 26, 13, 0.28);
  --panel-2: rgba(4, 26, 13, 0.18);
  --glass-border: rgba(255,255,255,.28);
  --shadow: 0 8px 20px rgba(0,0,0,.25);
  --focus: 0 0 0 3px rgba(0, 255, 210, .6);
}

/* Base & Layout */
*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }
html { font-size: 16px; }
body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(135deg, rgba(4,26,13,1) 0%, rgba(6,46,28,0.95) 60%, rgba(3,36,19,1) 100%);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  line-height: 1.5;
  min-height: 100dvh;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html, body { scroll-behavior: smooth; }

/* Subtle layered background: gradient + scanlines/noise (pure CSS) */
body::before {
  content:"";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  /* layered pattern: teal/cyan traces + scanlines */
  background-image:
    radial-gradient(circle at 15% 15%, rgba(0,255,210,.08), transparent 40%),
    radial-gradient(circle at 85% 40%, rgba(43,212,160,.08), transparent 40%),
    repeating-linear-gradient(to bottom, rgba(0,0,0,.04) 0 2px, transparent 2px 4px),
    repeating-linear-gradient(to right, rgba(0,0,0,.04) 0 2px, transparent 2px 4px);
  background-size: 700px 700px, 700px 700px, 6px 6px, 6px 6px;
  mix-blend-mode: overlay;
  opacity: .28;
  filter: saturate(1.15);
}

/* Global container & helpers */
header, main, article, footer, aside { display: block; }

/* Sections use glass panels where present; fallbacks for no-backdrop-filter */
@supports ((backdrop-filter: blur(8px)) or ( -webkit-backdrop-filter: blur(8px))) {
  .glass {
    background: var(--panel);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px) saturate(1.15);
  }
}
@supports not ((backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px))) {
  .glass {
    background: rgba(4, 26, 13, 0.28);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 14px;
    box-shadow: var(--shadow);
  }
}

.container {
  width: min(100%, 1100px);
  padding: 0 1rem;
  margin-inline: auto;
}

/* Layout primitives */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.card {
  border-radius: 12px;
  padding: 1rem;
  background: rgba(4,16,12,0.28);
  border: 1px solid rgba(0,0,0,.25);
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
}

.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, .25);
  background: #0b1a12;
  display: block;
  box-shadow: 0 6px 14px rgba(0,0,0,.25);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
  transform: scale(1.01);
  transition: transform .25s ease;
}
.image-frame:hover img {
  transform: scale(1.04);
}

/* Typography & content */
h1, h2, h3, h4 { margin: .25rem 0; font-weight: 700; color: var(--text); }
p { margin: .5rem 0; color: var(--text); }
.subtle { color: var(--muted); }

/* Content area (optional) */
.content {
  padding: 1rem;
  border-radius: 12px;
  background: rgba(4, 22, 12, 0.28);
  border: 1px solid rgba(0,0,0,.25);
  box-shadow: 0 6px 14px rgba(0,0,0,.2);
}

/* Product ad / CTA sections (glass panels) */
.product-ad, .sponsored-page {
  padding: .9rem;
  border-radius: 12px;
  background: rgba(0,0,0,.22);
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 8px 20px rgba(0,0,0,.25);
  margin: .75rem 0;
  text-align: center;
}
.product-ad a, .sponsored-page a {
  text-decoration: none;
  color: var(--text);
  display: inline-block;
  padding: .5rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.25);
  transition: transform .15s ease, background .2s ease;
}
.product-ad a:hover, .sponsored-page a:hover {
  transform: translateY(-1px);
  background: rgba(0,0,0,.35);
}
.product-ad a:focus-visible, .sponsored-page a:focus-visible,
a:focus-visible, button:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}
.product-ad p, .sponsored-page p { margin: 0; }

/* Link & button treatments */
a {
  color: var(--accent-2);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
a:hover, a:focus-visible {
  color: #a8ffe8;
  text-decoration: underline;
  outline: none;
}
button, .btn, .cta {
  font: inherit;
  font-weight: 600;
  padding: .65rem .95rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(0,0,0,.25);
  color: var(--text);
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
button:hover, .btn:hover, .cta:hover { transform: translateY(-1px); }
button:active, .btn:active, .cta:active { transform: translateY(0); }

/* Focus visibility for keyboard users */
:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  outline-offset: 0;
  border-radius: 8px;
}

/* Specific elements to satisfy selector requirements */
html, body, header, nav, main, article, footer, aside {
  /* structural defaults kept lightweight; specific styling elsewhere */
}
nav { display: none; } /* not present in this markup, reserved for layout consistency */

main { padding: 1rem 0; }
article { margin: 0 auto; max-width: 960px; }

header {
  padding: 1.25rem;
  text-align: center;
}
header h1 {
  font-size: clamp(1.4rem, 4vw + 0.5rem, 2.6rem);
  line-height: 1.1;
  margin: 0.25rem 0 0.5rem;
  letter-spacing: .02em;
  color: var(--text);
  text-shadow: 0 1px 0 rgba(0,0,0,.25);
}
footer {
  padding: 1rem;
  text-align: center;
  color: var(--muted);
}
aside { display: none; }

/* Print-friendly (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
