/* Base reset & root tokens */
* { box-sizing: border-box; }
html, body { height: 100%; }
:root {
  /* Palette: brown base with green accents (dark cyber theme) */
  --bg: #1b140f;
  --bg-2: #2b1e0a;
  --text: #e8f7e6;
  --muted: #a6caa6;
  --accent: #2bd36d;
  --accent-2: #9bd28a;

  /* Glass surface tokens */
  --glass-bg: rgba(15, 23, 20, 0.22);
  --glass-border: rgba(255, 255, 255, 0.28);
  --glass-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
  --radius: 12px;

  /* Misc helpers */
  --max: 1100px;
  --focus-outline: 2px solid #8aff8a;
  --focus-offset: 3px;
}

/* Section: Layout helpers */
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif; }
body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  background:
    linear-gradient(135deg, #3a2511 0%, #1b0f05 60%, #2b1e0a 100%),
    rgba(0,0,0,0.0);
  background-attachment: fixed;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}
header, nav, main, article, aside, footer { display: block; }

/* Subtle layered background: scanlines / noise (pure CSS) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, rgba(0,0,0,0.08) 0 1px, transparent 1px 2px),
    linear-gradient(transparent 0 60%, rgba(0,0,0,0.15) 60% 100%);
  mix-blend-mode: overlay;
  opacity: 0.25;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 20% 20%, rgba(0,255,120,0.04), transparent 40%),
              radial-gradient(circle at 80% 40%, rgba(0,255,80,0.04), transparent 40%);
  mix-blend-mode: overlay;
  opacity: 0.3;
}
main { padding: clamp(1rem, 2vw, 2rem) 0; }

/* Section: Global helpers */
.container {
  width: 100%;
  max-width: clamp(720px, 90vw, var(--max));
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: rgba(10, 14, 12, 0.28);
  border: 1px solid rgba(255,255,255,0.26);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--glass-shadow);
}

/* Section: Glass panels (fallback included) */
.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: calc(var(--radius) - 2px);
  padding: 1rem;
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass { background: rgba(15, 23, 20, 0.60); }
}

/* Section: Header / hero styling */
header {
  padding: 3rem 0 2rem;
  text-align: center;
}
header h1 {
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 1.04;
  margin-bottom: 0.25rem;
  color: var(--text);
  letter-spacing: 0.4px;
}
header .meta {
  color: var(--muted);
  font-size: clamp(0.8rem, 1.6vw, 1rem);
}

/* Section: Image frame & media */
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.28);
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.01);
  transition: transform .4s ease;
}
.image-frame:hover img {
  transform: scale(1.04);
}

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

/* Section: Typography helpers */
h2 { font-size: clamp(1.25rem, 3vw, 2rem); margin: 1rem 0 0.5rem; color: var(--text); }
p { color: var(--muted); margin: 0.75rem 0; font-size: clamp(0.95rem, 2.2vw, 1.05rem); }
ul { margin: 0.75rem 0 0.75rem 1.25rem; color: var(--muted); }
li { margin: 0.25rem 0; }

/* Section: Links & CTAs */
a, button, .btn, .cta {
  text-decoration: none;
  color: var(--text);
  outline: none;
}
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: var(--focus-outline);
  outline-offset: var(--focus-offset);
}
a:hover, a:focus { text-decoration: underline; color: var(--accent); }

/* Button variants */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.72rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(43,211,109,0.9);
  background: linear-gradient(#0e1a0f, #1b2a13);
  color: #eafff1;
  cursor: pointer;
  font-weight: 600;
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(0,0,0,0.25); }
.btn:active { transform: translateY(0); }
.btn.secondary {
  background: transparent;
  border: 1px solid rgba(43,211,109,0.9);
  color: var(--text);
}
.btn:focus-visible { outline: var(--focus-outline); outline-offset: var(--focus-offset); }

/* Section: Utility helpers */
.tag {
  display: inline-block;
  padding: 0.25em 0.5em;
  font-size: 0.75rem;
  border-radius: 999px;
  background: rgba(43,211,109,0.25);
  border: 1px solid rgba(43,211,109,0.55);
  color: #eafff0;
}
.container + .container { margin-top: 1rem; }

/* Section: Layout primitives (nav/aside) */
nav { display: block; }

/* Section: Media & image framing for potential aside/content areas */
.aside, aside { display: block; }

/* Section: Product ad / content panels in footer area */
.product-ad, .sponsored-page {
  display: block;
  margin: 0.5rem 0;
}
.product-ad a, .sponsored-page a {
  display: block;
  text-align: center;
  padding: 1rem;
}
.product-ad a { background: rgba(43,211,109,0.25); border: 1px solid rgba(43,211,109,0.6); border-radius: 10px; }

/* Section: Print styles (basic readability) */
@media print {
  body { background: white; color: #000; }
  a { text-decoration: underline; }
  header, nav { display: none; }
  .card { background: none; border: none; padding: 0; }
  ul { margin-left: 1rem; }
}

/* Section: Dark mode variant (default dark cyber) */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f1e7;
    --bg-2: #e6ded5;
    --text: #0e200f;
    --muted: #425d2a;
    --accent: #1a7a2d;
    --accent-2: #5a9a50;
    --glass-bg: rgba(255,255,255,0.88);
    --glass-border: rgba(0,0,0,0.15);
    --glass-shadow: 0 6px 14px rgba(0,0,0,0.12);
  }
  body {
    background: linear-gradient(135deg, #f6efe3 0%, #e8e4d4 60%, #f5efe0 100%);
    color: var(--text);
  }
  .glass { backdrop-filter: saturate(105%) blur(8px); -webkit-backdrop-filter: saturate(105%) blur(8px); }
}
