/* Base tokens (palette) */
:root{
  --bg: #0b2312;          /* deep forest */
  --bg-2: #174e2a;         /* mid forest */
  --text: #eaf5e0;          /* high-contrast text over glass */
  --muted: #cbd9c3;         /* secondary text */
  --accent: #e6d4ba;        /* beige accent (light) */
  --accent-2: #c9b089;      /* beige accent (darker) */
  --card: rgba(255,255,255,.10); /* frosted panel base */
  --ring: 2px solid rgba(201,176,137,0.9);
}
html, body { height: 100%; }
* { box-sizing: border-box; }
html { line-height: 1.4; }
body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  /* Layered background: forest green dawn gradient + subtle scanlines/noise */
  background: linear-gradient(to bottom, #0b2312 0%, #174e2a 40%, #f0e2cc 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  /* subtle scanlines texture (pure CSS) */
  background-image:
    linear-gradient(to bottom, rgba(0,0,0,.0), rgba(0,0,0,.0)),
    repeating-linear-gradient(to bottom,
      rgba(255,255,255,.04) 0 1px,
      rgba(0,0,0,0) 1px 2px);
  mix-blend-mode: overlay;
  opacity: .25;
}

/* Layout helpers (utilities) */
.container { max-width: clamp(280px, 78vw, 1100px); margin-inline: auto; padding-inline: 1rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.card { background: var(--card); border: 1px solid rgba(255,255,255,.25); border-radius: 12px; padding: .75rem; }

/* Core structural selectors (required) */
html, body, header, nav, main, article, footer, aside {
  /* ensure predictable rendering space */
  box-sizing: border-box;
}
header { text-align: center; padding: 1.25rem 1rem 0.75rem; }
header h1 { font-size: clamp(1.75rem, 2.5vw + 1rem, 3.5rem); line-height: 1.08; margin: .25rem 0 0.5rem; letter-spacing: .2px; }
header .meta { color: var(--muted); font-variant-numeric: tabular-nums; font-size: clamp(0.9rem, 0.8vw + 0.9rem, 1.05rem); margin-bottom: .75rem; }
nav { margin-top: .25rem; }
nav a { color: var(--accent-2); text-decoration: none; padding: .4rem .6rem; border-radius: 6px; display: inline-block; }
nav a:hover, nav a:focus-visible { text-decoration: underline; outline: none; }

/* Main content presentation (glass panels) */
main { padding: 1rem 0 2rem; }
article {
  max-width: clamp(640px, 78vw, 980px);
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
  border-radius: 14px;
  background: rgba(255, 248, 235, 0.10);
  border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 28px rgba(0,0,0,.25);
}
@supports not (backdrop-filter: blur(12px)) {
  article {
    background: rgba(255, 248, 235, 0.16);
    border-color: rgba(255,255,255,.4);
  }
}
.featured-image { margin: .75rem 0 0; border-radius: 12px; overflow: hidden; }
.image-frame {
  aspect-ratio: 16/9;
  width: 100%;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  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; }

/* Typography rhythm */
h1, h2 { color: var(--text); }
h1 { font-size: clamp(1.4rem, 2.4vw + 1rem, 2.75rem); margin: .25rem 0 0.5rem; }
h2 { font-size: clamp(1.05rem, 1.8vw + .8rem, 1.4rem); margin: .75rem 0 .25rem; color: #e9f7e0; }
p { font-size: clamp(0.95rem, 1vw + .8rem, 1.08rem); line-height: 1.6; color: var(--text); margin: .4rem 0 1rem; }
ol, ul { padding-left: 1.25rem; margin: .25rem 0 1rem; }
li { margin: .25rem 0; }

/* Content helpers */
.content { padding: 1rem; }

/* Links and interactive controls */
a, button, .btn, .cta {
  font-family: inherit;
  color: var(--text);
  text-decoration: none;
  display: inline-block;
}
a { color: var(--accent-2); }
a:hover, a:focus-visible { text-decoration: underline; outline: none; }

/* Button variants (solid + outline) */
.btn, .cta {
  padding: .55rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(230,213,186,.15);
  color: var(--text);
  transition: transform .15s ease, background .2s ease, color .2s ease;
}
.btn.primary, .cta.primary { background: rgba(230,213,186,.28); border-color: rgba(230,213,186,.6); }
.btn.outline, .cta.outline { background: transparent; border: 1px solid rgba(201,176,137,.8); }
.btn:hover, .cta:hover { transform: translateY(-1px); background: rgba(230,213,186,.22); }
.btn:active, .cta:active { transform: translateY(0); }

/* Focus accessibility (focus-visible) */
:focus-visible { outline: 3px solid rgba(201,176,137,0.95); outline-offset: 2px; border-radius: 6px; }

/* Utility visuals in footer */
footer { padding: 1rem; text-align: center; color: var(--muted); }
.product-ad, .sponsored-page { display: inline-block; margin: .25rem; padding: .5rem 1rem; border-radius: 9px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); }
.product-ad a, .sponsored-page a { color: var(--text); }

/* List & blockquote tweaks */
blockquote { border-left: 3px solid rgba(201,176,137,.8); margin: .75rem 0; padding-left: .75rem; color: #e9f5e0; opacity: .95; }

/* Decorative subtle glow for header area on dark bg */
header { position: relative; z-index: 0; }
header::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -1px;
  width: 60%;
  height: 6px;
  border-radius: 4px;
  background: linear-gradient(to right, transparent, rgba(230,213,186,.8), transparent);
  filter: blur(2px);
  opacity: .8;
  pointer-events: none;
}

/* Grids and side content placeholder (if used) */
aside { display: none; }

/* Typography scale helpers for compact density on mobile */
@media (max-width: 720px) {
  article { padding: .75rem; }
  header { padding-bottom: .5rem; }
  .image-frame { border-radius: 10px; }
  .product-ad, .sponsored-page { display: inline-block; padding: .5rem; }

/* Reduced motion: respect user preference */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Print-friendly adjustments (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  article { background: #fff; border: 1px solid #ddd; box-shadow: none; }
  a, .btn, .cta { color: #000; text-decoration: underline; }
}
