/* Base tokens */
:root{
  --bg: #0b1f14;              /* deep sage backdrop */
  --bg-2: #1e3d2d;            /* sage-green layer */
  --surface: rgba(255,255,255,0.08);
  --surface-strong: rgba(255,255,255,0.14);
  --text: #eaf7f0;
  --muted: #a3c9af;
  --accent: #7a1d1d;            /* maroon */
  --accent-2: #a8d6ba;           /* sage-green accent for links/highlights */
  --border: rgba(255,255,255,0.25);
  --shadow: 0 8px 28px rgba(0,0,0,0.25);
  --radius: 12px;
  --focus: 3px solid #fff;
}

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

/* Layout scale & typography (mobile-first) */
html, body { height: 100%; }
html { font-size: 16px; }
body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans";
  line-height: 1.5;
  background-color: var(--bg);
  /* Layered background: gradient + subtle noise + scanlines (pure CSS) */
  background-image:
    radial-gradient(circle at 15% 20%, rgba(255,255,255,0.05) 0 2px, transparent 2px),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.03) 0 2px, transparent 2px),
    linear-gradient(to bottom, rgba(14, 32, 24, 0.70), rgba(9, 18, 14, 0.72)),
    repeating-linear-gradient(to bottom, rgba(0,0,0,0.12) 0 1px, rgba(0,0,0,0.0) 1px 2px);
  background-blend-mode: overlay, overlay, normal, overlay;
  background-size: auto, auto, cover, 100% 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-block: 1rem;
  overflow-x: hidden;
}
 @media (prefers-reduced-motion: reduce){
  body{ background-attachment: scroll; }
 }

/* Structural selectors (must style) */
html, body, header, nav, main, article, footer, aside { }
header, main, footer { display: block; }

/* Page chrome: container & grid helpers */
.container {
  max-width: clamp(320px, 70vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }

/* Section visuals: glass panels with graceful fallbacks */
.card, .content, .image-frame, .product-ad, header, main, footer, aside {
  /* ensure stacking context for glass panels */
}
.content {
  padding: 0.75rem 0;
}
.image-frame,
.featured-image {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.04);
  box-shadow: var(--shadow);
  display: block;
}
.image-frame img,
.featured-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Glass panel base: backdrop with fallback */
.card {
  background: rgba(10, 20, 18, 0.40);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: calc(var(--radius) - 2px);
  padding: 1rem;
  color: var(--text);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: transform 0.25s ease, background 0.25s ease;
}
@supports not (backdrop-filter: blur(12px)) {
  .card { background: rgba(10, 20, 18, 0.75); }
}
.card:hover { transform: translateY(-1px); }

/* Hero / content typography + hierarchy */
header { text-align: center; padding: 1.75rem 0 1rem; }
header h1 {
  margin: 0.25rem 0;
  font-size: clamp(1.4rem, 0.9rem + 2vw, 2.75rem);
  line-height: 1.15;
  letter-spacing: .2px;
}
.meta {
  color: var(--muted);
  font-size: clamp(0.9rem, 0.8vw, 1rem);
  margin-top: .25rem;
}
main { padding: 0 0.5rem 1rem; }
article { display: block; }

/* Featured image frame (alias for .image-frame) */
.featured-image { margin: 0.75rem 0 1rem; }

/* Supporting text headings */
h2, h3 { font-weight: 600; margin: 0.75rem 0 0.25rem; }
p { margin: 0.25rem 0 0.75rem; color: #eaf7f0; }

/* Lists with legible spacing */
ul { padding-left: 1.25rem; margin: 0.5rem 0 0.75rem; }
li { margin: .25rem 0; }

/* Link & button treatments (WCAG AA intent) */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  outline: none;
  cursor: pointer;
  font: inherit;
  transition: color .2s ease, transform .2s ease;
}
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
  border-radius: 6px;
}
a:hover { text-decoration: underline; color: var(--accent-2); }
a:focus-visible { color: var(--accent-2); outline: 2px solid #fff; outline-offset: 2px; }

/* Button variants */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.4);
  background: linear-gradient(to bottom, rgba(122, 10, 10, 0.95), rgba(60,0,0,0.95));
  color: #fff;
  text-shadow: 0 1px 0 rgba(0,0,0,.15);
  box-shadow: 0 3px 10px rgba(0,0,0,.25);
}
.btn.secondary, .cta {
  background: transparent;
  color: var(--accent-2);
  border: 1px solid var(--accent-2);
}
.btn:active {
  transform: translateY(1px);
  filter: saturate(0.95);
}
.btn:hover { filter: saturate(1.05); }

/* Inline link-like button in content area */
.cta { padding: .65rem .95rem; border-radius: 8px; }

/* Utility visuals for lists and tags */
ul, li { list-style: none; padding-left: 0; }
.tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08);
  color: var(--text);
  margin-right: .25rem;
}

/* Product ad block in footer */
.product-ad {
  display: block;
  padding: 1rem;
  border-radius: var(--radius);
  background: rgba(10, 40, 34, 0.48);
  border: 1px solid rgba(255,255,255,0.28);
  margin: 1rem 0;
}
.product-ad h3 { margin: 0 0 .5rem; font-size: 1rem; }
.product-ad a {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  background: rgba(122, 10, 10, 0.9);
  color: #fff;
  border: 1px solid rgba(0,0,0,0.15);
}
.product-ad a:hover { background: rgba(122, 10, 10, 1); text-decoration: none; }

/* Footer text */
footer { padding: 1rem 0; text-align: center; color: var(--muted); }

/* Print-friendly basics */
@media print {
  body { background: white; color: black; }
  .card, .image-frame, .product-ad { background: white; border: none; box-shadow: none; }
  a, a:visited { color: #000; text-decoration: underline; }
}
