/* Base tokens & background palette */
:root {
  --bg: #0f0a04;
  --bg-2: #2a1b0c;
  --text: #eafff0;
  --muted: #cbd8b2;
  --accent: #39ff14;
  --accent-2: #6b4f2d;
  --glass: rgba(18, 40, 18, 0.28);
  --glass-fallback: rgba(18, 40, 18, 0.42);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

/* Layered background: gradient + subtle scanlines + parchment tint (neon-green accent) */
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  line-height: 1.5;
  color: var(--text);
  background:
    /* subtle scanlines */
    repeating-linear-gradient(to bottom, rgba(0,0,0,.04) 0 1px, transparent 1px 2px),
    /* neon-green wash overlay for parchment look */
    linear-gradient(135deg, rgba(0, 255, 24, 0.05), rgba(0,0,0,0.05) 60%, rgba(0,0,0,0.08) 100%),
    /* warm parchment base with brown undertone */
    linear-gradient(#f5e6c9 0%, #e6d1a8 60%, #d0b077 100%);
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

/* 3. Glass panels (fallback included) */
header, main, footer, aside {
  background: var(--glass);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 12px;
  padding: 1rem;
  margin: .75rem auto;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 22px rgba(0,0,0,.25);
}
@supports not (backdrop-filter: blur(10px)) {
  header, main, footer, aside { background: var(--glass-fallback); }
}

/* 4. Typography (fluid) */
html { font-size: 16px; }
h1 { font-size: clamp(1.75rem, 5vw, 3rem); line-height: 1.15; margin: .2rem 0 0.25rem; color: var(--text); }
h2 { font-size: clamp(1.4rem, 3.5vw, 2.25rem); margin: .75rem 0 .5rem; color: var(--text); }
h3 { font-size: clamp(1.1rem, 2.4vw, 1.5rem); margin: .5rem 0; color: var(--text); }
p { color: var(--muted); margin: .5rem 0; }
ul, ol { color: var(--muted); padding-left: 1.25rem; margin: .5rem 0; }
li { margin: .25rem 0; }

/* 5. Image frame (also targets .featured-image for compatibility) */
.featured-image, .image-frame {
  width: 100%; display: block; border-radius: 12px; overflow: hidden;
  aspect-ratio: 16/9; border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.image-frame:hover img { transform: scale(1.02); }

/* 6. Content & cards */
.content { padding: 0; }
.card { background: rgba(9, 32, 9, 0.28); border: 1px solid rgba(255,255,255,.25); border-radius: 12px; padding: 1rem; box-shadow: 0 6px 18px rgba(0,0,0,.25); backdrop-filter: blur(8px); }
@supports not (backdrop-filter: blur(8px)) { .card { background: rgba(9,32,9,.42); } }

.tag { display: inline-block; padding: 0.15rem 0.6rem; border-radius: 999px; font-size: .75rem; background: rgba(57,255,20,.15); color: #d9ffd9; border: 1px solid rgba(57,255,20,.5); }

/* 7. Product ad & links */
.product-ad { margin: .5rem 0; padding: .3rem; text-align: center; }
.product-ad a { display: inline-block; padding: .75rem 1rem; border-radius: 8px; color: var(--text); background: rgba(20,60,20,.28); border: 1px solid rgba(255,255,255,.25); text-decoration: none; }
.product-ad a:hover, .product-ad a:focus { text-decoration: underline; }

/* 8. Link & button treatments */
a { color: var(--accent); text-decoration: none; border-bottom: 1px dotted rgba(57,255,20,.25); }
a:hover, a:focus { text-decoration: underline; color: #aaff8f; }
a:focus-visible, button:focus-visible { outline: 3px solid rgba(57,255,20,.95); outline-offset: 2px; border-radius: 6px; }

/* 9. Button variants */
.btn { display: inline-block; padding: .5rem .95rem; border-radius: 6px; border: 1px solid rgba(255,255,255,.36); background: rgba(0,0,0,.25); color: var(--text); cursor: pointer; text-align: center; text-decoration: none; transition: transform .15s ease, background .2s ease; }
.btn:hover { background: rgba(0,0,0,.32); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.primary { background: linear-gradient(#22f14a, #12c312); border-color: rgba(22, 255, 60, .8); color: #06260a; }

/* 10. Utilities: grid layouts and cards */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }

/* 11. Print styles */
@media print {
  body { background: #fff; color: #000; }
  header, main, footer { background: #fff; border: none; box-shadow: none; }
  a { text-decoration: underline; color: #000; }
}

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