/* Section: Base tokens */
:root {
  --bg: #04160f;
  --bg-2: #0a2f12;
  --text: #eafff4;
  --muted: #a7f0bf;
  --accent: #39ff14;
  --accent-2: #2be067;
  --card: rgba(255,255,255,.08);
  --card-2: rgba(0,0,0,.28);
  --border: rgba(57,255,114,.45);
  --shadow: 0 4px 16px rgba(0,0,0,.25);
}

/* Section: Global reset & background primitives */
*, *:before, *:after { box-sizing: border-box; }
html, body { height: 100%; }
html, body {
  margin: 0;
  padding: 0;
  color: var(--text);
  background-color: var(--bg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Helvetica Neue", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  isolation: isolate;
  /* Layered background: gradient + green checkerboard + subtle noise/scanlines */
  background-image:
    linear-gradient(135deg, rgba(4, 31, 15, 0.85), rgba(4, 31, 15, 0.85)),
    linear-gradient(to bottom right, rgba(0,0,0,.25), rgba(0,0,0,.35)),
    repeating-linear-gradient(45deg, rgba(0,255,15,.08) 0 20px, rgba(0,0,0,0) 20px 40px),
    linear-gradient(180deg, rgba(0,0,0,.15), rgba(0,0,0,.25)),
    linear-gradient(45deg, rgba(12,31,12,.75) 0 24px, rgba(0,0,0,0) 24px 48px);
  background-blend-mode: normal, overlay, overlay, normal, normal;
  background-size: auto, auto, 22px 22px, auto, 22px 22px;
  background-position: 0 0, 0 0, 0 0, 0 0, 0 0;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  /* subtle scanlines */
  background-image: repeating-linear-gradient(to bottom, rgba(0,0,0,.04) 0 1px, transparent 1px 2px);
  mix-blend-mode: overlay;
  opacity: .25;
  z-index: 0;
}

/* Section: Layout primitives */
.container { max-width: clamp(320px, 88vw, 1100px); padding: 0 1rem; margin: 0 auto; }

/* Section: Glass panels (fallbacks included) */
@supports ((backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px))) {
  .glass, .card, .content, header, main, footer, aside, .product-ad {
    backdrop-filter: blur(8px) saturate(1.1);
    -webkit-backdrop-filter: blur(8px) saturate(1.1);
  }
  .glass { background: rgba(8, 18, 14, 0.22); border: 1px solid rgba(57,255,114,.35); box-shadow: 0 6px 28px rgba(0,0,0,.25); }
}
@supports not ((backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px))) {
  .glass, .card, .content, header, main, footer, aside, .product-ad {
    background: rgba(8,18,14,0.76);
    border: 1px solid rgba(57,255,114,.65);
  }
}
.card, .content, .glass, header, main, footer, aside, .product-ad {
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,.25);
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
  background: rgba(8,16,12,.22);
}

/* Section: Header */
header { padding: 1.5rem 0; text-align: center; position: relative; z-index: 1; }
header h1 { margin: 0 0 .25rem; font-size: clamp(1.6rem, 2.5vw + 1rem, 2.6rem); line-height: 1.08; color: var(--text); letter-spacing: .2px; }
header .meta { font-size: .85rem; color: var(--muted); margin-top: .25rem; }

/* Section: Navigation */
nav { margin-top: .5rem; }
nav a { color: var(--text); text-decoration: none; padding: .25rem .5rem; border-radius: 6px; display: inline-block; }
nav a:hover, nav a:focus-visible { text-decoration: underline; }

/* Section: Main content area */
main { padding: 1rem 0; }
article { padding: 0; }

/* Section: Image framing */
.image-frame { width: 100%; aspect-ratio: 16/9; overflow: hidden; border-radius: 12px; border: 1px solid rgba(0,255,120,.5); box-shadow: 0 6px 20px rgba(0,255,120,.25); margin: 1rem 0; }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Section: Content area */
.content { padding: 0 0.25rem; color: var(--text); }

/* Headings and text inside article */
article h2 { font-size: clamp(1.25rem, 2vw + 1rem, 1.6rem); color: var(--text); margin: .75rem 0 .4rem; }
article p { color: #eafff1; margin: .5rem 0; }

/* Blockquotes */
blockquote { margin: .75rem 0; padding: .5rem 1rem; border-left: 3px solid var(--accent); color: #dfffe4; background: rgba(0,0,0,.15); border-radius: 6px; }

/* Lists */
ul { padding-left: 1.25rem; margin: .5rem 0; }
li { margin: .25rem 0; }

/* Section: Tag / badges */
.tag { display:inline-block; padding:.15rem .5rem; border-radius:999px; font-size: .75rem; border:1px solid rgba(57,255,114,.5); color: var(--text); background: rgba(0,0,0,.25); }

/* Section: Footer promos (product-ad) */
.footer, .product-ad, .sponsored-page { margin: .75rem 0; padding: .75rem; }
.product-ad a, .sponsored-page a { display:block; text-decoration: none; color: var(--text); padding: .5rem; border-radius: 8px; background: rgba(0,0,0,.25); border: 1px solid rgba(57,255,114,.4); }
.product-ad a:hover, .sponsored-page a:hover { background: rgba(0,0,0,.35); text-decoration: underline; }

/* Footer content tweaks */
footer { padding: 1rem 0; text-align: center; color: #bfe8c9; }

/* Section: Link and button styling across theme */
a, button, .btn, .cta { color: var(--text); text-decoration: none; border-radius: 6px; }
a { outline: none; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; text-decoration: underline; }

/* Buttons (solid and outline variants) */
.btn, .cta {
  display: inline-block;
  padding: .5rem 1rem;
  border: 1px solid rgba(57,255,114,.6);
  background: rgba(0,0,0,.25);
  color: var(--text);
  border-radius: 6px;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease;
}
.btn:hover, .cta:hover { transform: translateY(-1px); background: rgba(0,0,0,.34); }
.btn.primary {
  background: linear-gradient(135deg, rgba(8,40,8,0.95), rgba(20,80,20,0.95));
  border-color: rgba(57,255,114,.8);
  color: #eafff1;
}
.btn.outline {
  background: transparent;
  border: 1px solid rgba(57,255,114,.8);
}
.btn:focus-visible, .cta:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Section: Forms (basic) */
input, textarea, select {
  font: inherit;
  color: var(--text);
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(57,255,114,.5);
  border-radius: 6px;
  padding: .5rem .75rem;
  outline: none;
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(57,255,114,.25);
}

/* Section: Utilities / grid helpers */
.grid { display: grid; gap: .75rem; }
.grid.auto { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* Section: Motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; transform: none !important; }
}

/* Section: Print (basic readability) */
@media print {
  body { background: white; color: black; }
  a, a:link { text-decoration: underline; }
}