/* Section: Global Theme */
:root {
  --bg: #0a0f0a;              /* deep black-green base */
  --bg-2: #0a1f14;            /* forest green hue for layers */
  --text: #eafff5;             /* high-contrast text over dark backgrounds */
  --muted: #a8f2c2;            /* subtle, readable muted tone */
  --accent: #2bd6a1;           /* vivid cyber-green accent */
  --accent-2: #1bd68f;          /* secondary accent for contrast */
  --surface: rgba(0, 0, 0, 0.28);       /* glass panel base (rgba) */
  --glass: rgba(8, 18, 12, 0.28);       /* primary frosted panel tint */
  --glass-border: rgba(60, 180, 120, 0.45); /* glass border color */
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  --radius: 12px;
}

html, body { height: 100%; }
* { box-sizing: border-box; }

html, body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color: var(--text);
  margin: 0;
  line-height: 1.5;
  background: 
    radial-gradient(circle at 20% -10%, rgba(43,214,161,.25), transparent 40%),
    linear-gradient(135deg, rgba(0,0,0,.88) 0%, rgba(6,20,12,.98) 60%, rgba(0,0,0,.97) 100%),
    #000;
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body::before {
  /* Subtle scanline/noise texture (pure CSS) */
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    repeating-linear-gradient(to bottom,
      rgba(0,0,0,.15) 0 1px,
      transparent 1px 2px);
  mix-blend-mode: overlay;
  opacity: 0.65;
  transform: translateZ(0);
}

*,:before,:after { box-sizing: inherit; }

a, button, .btn, .cta {
  -webkit-tap-highlight-color: transparent;
}

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

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

.card {
  background: var(--surface);
  border: 1px solid rgba(0,0,0,.25);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}

.card:hover { transform: translateY(-2px); }

.tag {
  display: inline-block;
  padding: .25em .6em;
  font-size: .75rem;
  border-radius: 999px;
  background: rgba(43,214,161,.18);
  color: var(--text);
  border: 1px solid rgba(43,214,161,.45);
}

/* Section: Typography & Core Elements */
h1, h2, h3 {
  margin: .25rem 0 .75rem;
  line-height: 1.15;
  font-weight: 700;
  color: var(--text);
}

h1 { font-size: clamp(1.75rem, 4vw + 0.5rem, 3.25rem); letter-spacing: .2px; }
h2 { font-size: clamp(1.25rem, 2.5vw + 0.5rem, 2rem); }
h3 { font-size: clamp(1.1rem, 2vw + 0.4rem, 1.5rem); }

p { margin: .75rem 0; color: var(--text); opacity: .95; }

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

/* Section: Media & Imagery */
.image-frame {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(120,240,180,.55);
  box-shadow: 0 6px 28px rgba(0,0,0,.4);
  background: #000;
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
  transform: translateZ(0);
  transition: transform .6s ease;
}
.image-frame:hover img { transform: scale(1.03); }

/* Section: Glass Panels (primary UI blocks) */
.glass, header, main, footer {
  /* apply frosted glass feel; actual elements are styled with per-element tweaks below */
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: calc(var(--radius) + 2px);
  box-shadow: var(--shadow);
  padding: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  z-index: 1;
}
@supports not (backdrop-filter: blur(12px)) {
  .glass, header, main, footer {
    background: rgba(8,18,12,.55);
  }
}
header {
  display: grid;
  gap: .25rem;
  padding: 1.25rem;
  margin: 1rem auto;
}
header nav {
  display: flex; gap: .5rem; align-items: center; justify-content: flex-start;
}
header a { color: var(--text); text-decoration: none; padding: .25rem .5rem; border-radius: 6px; }
header a:hover { text-decoration: underline; }

/* Section: Content Areas */
.main-content, article { /* shared content area */ }
main { padding: 1rem 0; }

.article { padding: 0; }

/* Section: Links & Buttons (Interactivity) */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid rgba(60,180,120,.5);
  padding: .6em 1em;
  background: rgba(60,180,120,.22);
  transition: transform .15s ease, background .2s ease, border-color .2s;
  cursor: pointer;
}
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 2px solid #9fffda;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(0,0,0,.15);
}
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  background: rgba(43,214,161,.32); border: 1px solid rgba(43,214,161,.6);
}
.btn:hover { transform: translateY(-1px); background: rgba(43,214,161,.46); }
.btn.primary { background: linear-gradient(135deg, #1bd68f 0%, #2bd6a1 100%); color: #002e1a; border: none; }
.btn.outline { background: transparent; border: 1px solid rgba(60,180,120,.6); color: var(--text); }
.ghost { background: transparent; border: none; }

/* Section: Structural HTML elements to style explicitly */
html, body, header, nav, main, article, footer, aside {
  /* already covered; ensure they render with glass look where applicable */
}
aside { padding: .5rem; }

/* Section: Footer & Ad Blocks */
.product-ad, .sponsored-page {
  margin: .5rem 0;
  display: block;
  text-align: left;
  text-decoration: none;
  color: var(--text);
}
footer { padding: 1rem; }

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

/* Section: Responsiveness & Accessibility */
@media (min-width: 768px) {
  .container { padding-inline: 0; }
  header { padding: 1.5rem 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
@media (min-width: 900px) {
  h1 { font-size: clamp(2rem, 3.5vw + 1rem, 4rem); }
  .grid { gap: 1.25rem; }
}
