/* Palette & Foundations */
:root{
  --bg: #1e0d0f;            /* deep maroon base */
  --bg-2: #2a0f12;
  --panel: rgba(8, 16, 16, 0.28);
  --panel-strong: rgba(8,16,16,0.42);
  --text: #e6ffea;           /* high-contrast light text over glass */
  --muted: #a8d6b8;
  --accent: #7af6a0;          /* pastel green accent */
  --accent-2: #c6ffd9;
  --border: rgba(255,255,255,0.25);
  --shadow: 0 8px 24px rgba(0,0,0,.25);
  --radius: 14px;
  --focus: 2px solid #a9ffd5;
}
*,
*::before,
*::after{ box-sizing: border-box; }

html, body { height: 100%; }

/* Layered background: maroon gradient + subtle starfield/scanlines (no images) */
body {
  margin: 0;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    linear-gradient(135deg, rgba(60,0,0,.65), rgba(20,0,0,.75)),
    radial-gradient(circle at 20px 60px, rgba(200,255,230,.15) 2px, transparent 2px),
    radial-gradient(circle at 120px 140px, rgba(150,255,210,.10) 2px, transparent 2px),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  background-blend-mode: multiply;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
  padding-block: 1rem;
}
html:focus-within{ outline: none; }

/* Layout helpers */
.container{ width: min(100%, 1200px); margin-inline: auto; padding-inline: 1rem; }
.grid{ display: grid; gap: 1rem; }
.card{ background: rgba(8, 18, 18, 0.28); border: 1px solid rgba(180,255,210,.25); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

/* Glass panels with accessible fallbacks */
header, main, footer, aside{ 
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  margin: .75rem 0;
  /* Backdrop blur for glassy effect; fallback if not supported */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  header, main, footer, aside { background: rgba(8, 18, 18, 0.6); }
}

/* Typography (fluid) */
h1{ 
  font-size: clamp(1.4rem, 2.6vw + 1rem, 2.2rem);
  line-height: 1.15;
  margin: .4rem 0 .8rem;
  letter-spacing: .2px;
}
h2{ font-size: clamp(1.15rem, 1.4vw + 0.8rem, 1.4rem); margin: .75rem 0 .5rem; }
p, li, ul{ color: rgba(234,255,240,.95); }
ul, ol{ padding-left: 1.25rem; margin: .5rem 0 1rem; }
blockquote{ margin: .25rem 0 1rem; padding: .5rem 1rem; border-left: 3px solid rgba(122,246,160,.6); background: rgba(122,246,160,.08); border-radius: 6px; }

/* Image framing with borders/glow */
.image-frame, .featured-image{
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 8px 18px rgba(0,0,0,.25);
  display: block;
}
.image-frame{ aspect-ratio: 16/9; width: 100%; }
.image-frame img{ width: 100%; height: 100%; object-fit: cover; display: block; }

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

/* Links & buttons (interactive states) */
a, button, .btn, .cta{
  color: #062a1a;
  text-decoration: none;
  display: inline-block;
  border-radius: 8px;
  padding: .65em 1em;
  font-weight: 600;
  transition: transform .15s ease, background-color .2s ease, color .2s ease;
}
a{ color: var(--text); }
a:hover, a:focus{ text-decoration: underline; outline: none; }
.btn, .cta{ background: var(--accent); color: #062a1a; border: 1px solid rgba(0,0,0,.15); }
.btn:hover, .cta:hover{ background: #64f7b3; transform: translateY(-1px); }
.btn.outline{ background: transparent; color: var(--text); border: 1px solid rgba(122,246,160,.8); }
.btn:focus-visible, button:focus-visible, .cta:focus-visible, a:focus-visible{ outline: var(--focus); outline-offset: 2px; }

/* Product ad styling (in footer) */
.product-ad{ display: inline-block; padding: .25rem .5rem; margin-right: .5rem; }
.product-ad a{ display: inline-flex; align-items: center; gap: .5rem; padding: .5rem 0.75rem; border-radius: 999px; background: rgba(0,0,0,.15); border: 1px solid rgba(255,255,255,.25); color: var(--text); }

/* Misc inline items (tags, small helpers) */
.tag{ display:inline-block; padding: .25em .6em; font-size: .8rem; border-radius: 999px; background: rgba(122,246,160,.25); border: 1px solid rgba(122,246,160,.6); color: var(--text); }

/* Lists visuals */
ul, li{ color: var(--text); }

/* Print styles (basic readability) */
@media print{
  body{ background: #fff; color: #000; }
  header, main, footer{ background: #fff; border: none; border-radius: 0; padding: .5in; }
  a{ color: #000; text-decoration: underline; }
}
  
/* Motion respect */
@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; }
}
  
/* Section headers (structure clarity) */
.footer-spacer{ height: 0.5rem; }

/* Lightweight responsive helpers */
@media (min-width: 768px){
  .grid{ grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
  
/* Accessibility: ensure high contrast on glass text for content over panels */
header, main, footer{ color: var(--text); }
header h1, main h1{ text-shadow: 0 1px 0 rgba(0,0,0,.25); }

/* Optional content container usage hint */
.image-wrap{ margin: .75rem 0; }
