:root {
  /* Tokenized Olive Palette */
  --bg: #0b0f0a;
  --bg-2: #111a10;
  --surface: rgba(34, 54, 20, 0.18);
  --surface-2: rgba(54, 84, 28, 0.24);
  --text: #e8f0d7;
  --muted: #b8c8a2;
  --accent: #6b8e23;
  --accent-2: #9bcf6a;
  --border: rgba(120, 170, 90, 0.4);
  --shadow: 0 8px 24px rgba(0,0,0,.38);
  --radius: 14px;
  --focus: 0 0 0 3px rgba(107,142,23,.65);
}

html, body, header, nav, main, article, footer, aside {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

html {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  font-size: clamp(14px, 1vw + 12px, 18px);
  color: var(--text);
}

/* Layered background: gradient + subtle scanlines/noise */
body {
  margin: 0;
  background:
    linear-gradient(135deg, rgba(86,107,47,.25) 0%, rgba(14,20,0,.25) 100%),
    repeating-linear-gradient(to bottom, rgba(0,0,0,.08) 0 2px, transparent 2px 4px),
    var(--bg);
  background-attachment: fixed;
  background-blend-mode: overlay;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Light mode tweaks for legibility */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f7f0;
    --bg-2: #eef6e6;
    --surface: rgba(120, 160, 60, 0.25);
    --surface-2: rgba(100, 140, 40, 0.28);
    --text: #0a180a;
    --muted: #324c2b;
    --border: rgba(0,0,0,.15);
  }
  body {
    background:
      linear-gradient(135deg, rgba(120,160,60,.25) 0%, rgba(120,160,60,.15) 100%),
      repeating-linear-gradient(to bottom, rgba(0,0,0,.04) 0 2px, transparent 2px 4px),
      var(--bg);
  }
}

/* Layout primitives */
.container {
  width: min(92%, 1120px);
  margin-inline: auto;
  padding: 0 1rem;
}

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

.card {
  background: rgba(0,0,0,.0);
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(120,170,90,.35);
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
}

/* Glass panels (frosted) with fallback */
.glass {
  background: rgba(22, 32, 14, 0.18);
  border: 1px solid rgba(120,170,90,.4);
  border-radius: 12px;
  padding: 1rem;
  backdrop-filter: blur(12px) saturate(1.05);
  -webkit-backdrop-filter: blur(12px) saturate(1.05);
  box-shadow: 0 8px 22px rgba(0,0,0,.35);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass {
    background: rgba(22, 32, 14, 0.28);
  }
}

/* Helper utility: content area */
.content {
  padding: 0.75rem 0.5rem;
  color: var(--text);
}

/* Image frame styling */
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(120,170,90,.4);
  box-shadow: 0 6px 16px rgba(0,0,0,.4);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.image-frame:hover img {
  transform: scale(1.02);
}

/* Typography and hero emphasis */
header {
  padding: 1.25rem 0;
}
header h1 {
  font-size: clamp(1.75rem, 2.5vw + 1rem, 3rem);
  line-height: 1.15;
  margin: 0;
  letter-spacing: .2px;
  text-shadow: 0 1px 0 rgba(0,0,0,.25);
}

main {
  padding: 1rem 0;
}

footer {
  padding: 1.25rem 0;
  display: grid;
  gap: 0.75rem;
}
.product-ad p, .sponsored-page p {
  margin: 0;
  font-weight: 600;
  display: inline-block;
  padding: .5rem 0.75rem;
}
.product-ad a, .sponsored-page a {
  text-decoration: none;
  color: var(--text);
}
.product-ad {
  display: inline-block;
}
.sponsored-page {
  display: inline-block;
  margin-left: .75rem;
}
footer p {
  margin: 0;
  color: var(--muted);
  font-size: .875rem;
}

/* Interaction primitives: buttons and links */
a, button, .btn, .cta {
  cursor: pointer;
  text-decoration: none;
  color: #fff;
  border-radius: 999px;
  border: 1px solid rgba(120,170,90,.8);
  padding: .75rem 1.25rem;
  display: inline-block;
  font-weight: 600;
  background: linear-gradient(to bottom, rgba(107,142,23,.95), rgba(87,114,20,.95));
  transition: transform .2s ease, opacity .2s ease;
}
a:hover, button:hover, .btn:hover, .cta:hover {
  transform: translateY(-1px);
}
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  z-index: 1;
}
a:focus-visible { text-decoration: underline; text-decoration-color: rgba(155, 200, 120, 0.9); }

/* Button variants */
.btn { padding: .75rem 1.25rem; border-radius: 999px; }
.btn.primary { background: linear-gradient(#7ba54a, #5e7d22); border: 1px solid rgba(120,170,90,.9); }
.btn.outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(120,170,90,.8);
}
.btn.ghost {
  background: rgba(0,0,0,0.15);
  border: 1px dashed rgba(120,170,90,.6);
  color: var(--text);
}
.cta { display: inline-block; margin-left: .5rem; }

ul, li {
  margin: 0;
  padding: 0;
  list-style: none;
}
li { margin: .25rem 0; }

/* Content helpers */
.tag {
  display: inline-block;
  padding: .15em .5em;
  font-size: .8rem;
  border-radius: 999px;
  background: rgba(107,142,23,.25);
  border: 1px solid rgba(107,142,23,.5);
  color: var(--text);
}
.tag + .tag { margin-left: .25rem; }

/* Layout helpers for responsive sections */
@media (min-width: 768px) {
  .container { padding: 0 0.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  .glass { background: #fff; border: 1px solid #ccc; box-shadow: none; backdrop-filter: none; }
  a, button { color: #000; text-decoration: none; }
}
