/* Base & Tokens */
:root{
  --bg: #0b0f0a;
  --bg-2: #111a13;
  --surface: rgba(10, 22, 12, 0.62);
  --surface-2: rgba(12, 24, 16, 0.42);
  --text: #eaf6e9;
  --muted: #a8c6a8;
  --olive: #3a5a1e;
  --olive-2: #6b8f43;
  --accent: #4f46e5;      /* Indigo-500 */
  --accent-2: #7c3aed;    /* Indigo-600-ish */
  --radius: 14px;
  --shadow-light: 0 6px 20px rgba(0,0,0,.25);
  --shadow-soft: 0 3px 12px rgba(0,0,0,.18);
  --focus: 2px solid color-m-maybe;
}
:focus { outline: none; }

/* Base reset */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif; }
body {
  margin: 0;
  color: var(--text);
  background: 
    linear-gradient(135deg, rgba(20,40,14,.88), rgba(10,18,10,.92)),
    repeating-linear-gradient(to bottom, rgba(0,0,0,.04) 0 1px, transparent 1px 2px),
    radial-gradient(circle at 70% 20%, rgba(60,100,40,.25), transparent 40%),
    #0a0f0a;
  background-blend-mode: normal;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Reduced motion respect */
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Layout helpers */
.container {
  width: 100%;
  max-width: clamp(320px, 88ch, 1100px);
  margin-inline: auto;
  padding: 0 1rem;
}
.grid {
  display: grid;
  gap: 1rem;
}
.card {
  background: rgba(8, 16, 10, 0.56);
  border: 1px solid rgba(120, 170, 120, 0.35);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-soft);
}
.tag {
  display: inline-block;
  padding: 0.25em 0.5em;
  font-size: 0.75rem;
  border-radius: 999px;
  background: rgba(124, 58, 237, 0.22);
  color: var(--text);
  border: 1px solid rgba(124,58,237,0.4);
  letter-spacing: .2px;
}
ul { margin: 0; padding: 0; list-style: none; }
li { margin: 0.25rem 0; }

/* Glass panels (with fallback) */
.glass {
  background: rgba(8, 16, 12, 0.28);
  border: 1px solid rgba(180, 210, 170, 0.35);
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(0,0,0,.28);
  backdrop-filter: blur(12px) saturate(1.1);
  -webkit-backdrop-filter: blur(12px) saturate(1.1);
}
.no-backdrop {
  background: rgba(8, 16, 12, 0.84);
  border: 1px solid rgba(140, 170, 120, 0.5);
}
.section {
  padding: 1rem;
  border-radius: 12px;
}
.section + .section { margin-top: 0.75rem; }

/* Imagery */
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: inset 0 0 24px rgba(0,0,0,.25);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
  transition: transform .3s ease;
}
.image-frame:hover img { transform: scale(1.02); }

/* Element selectors targeted by the spec */
html, body, header, nav, main, article, footer, aside {
  /* ensure semantic blocks participate in layout flow */
}
header, main, footer, aside {
  padding: 1rem 0;
}
header { padding-top: 2rem; padding-bottom: 1rem; text-align: center; }
header h1 {
  font-size: clamp(1.4rem, 1.2rem + 2vw, 2.4rem);
  line-height: 1.15;
  margin: 0.25rem 0 0;
  font-weight: 700;
  letter-spacing: .2px;
}
main { padding: 0 0.5rem; }

/* Hero + content layout (compact) */
.content { padding: 0.75rem; }

/* Product Ad / Footer sections */
.product-ad, .sponsored-page {
  display: block;
  margin: 0.4rem 0;
}
.product-ad a, .sponsored-page a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  text-decoration: none;
  border-radius: 12px;
  padding: 0.6rem 1rem;
  color: var(--text);
  background: linear-gradient(135deg, rgba(15,23,12,0.6), rgba(8,16,12,0.6));
  border: 1px solid rgba(100, 180, 110, 0.5);
  transition: transform .15s ease;
}
.product-ad a:hover, .sponsored-page a:hover { transform: translateY(-1px); text-decoration: underline; }

/* Links & interactive elements */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}
a:hover, a:focus { text-decoration: underline; outline: none; }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
  border-radius: 6px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  padding: 0.75em 1.05em;
  border-radius: 10px;
  background: var(--accent);
  color: white;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); background: #5a4ae0; }
.btn:active { transform: translateY(0); }
.btn + .btn { margin-left: .5rem; }

/* Outline variant for buttons/CTAs */
.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(79,70,229,.8);
}
.btn--outline:hover { background: rgba(79,70,229,.08); }

/* Small UI helpers */
.cta { display: inline-flex; align-items: center; gap: .5rem; padding: .6rem 1rem; border-radius: 999px; }

/* Typography & readability */
h1, h2, h3, h4 { line-height: 1.25; font-weight: 700; }
p { color: var(--muted); }

/* Print styles */
@media print {
  body { background: white; color: #000; }
  .glass { background: #fff; border: 1px solid #ccc; }
}
 
/* Header/body layout rhythm for mobile-first */
@media (min-width: 640px) {
  header { padding: 2rem 0; }
  main { padding: 1rem 0; }
}
@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}
 
/* Section-specific style overrides to ensure WCAG-friendly contrast on glass */
:root { --text-on-glass: #eafbe9; }

/* Ensure wrappers render gracefully if JS is disabled or not loaded */
.image-frame { background: rgba(0,0,0,.08); }

/* Section headers for readability in large viewports */
header > h1 { color: var(--text); text-shadow: 0 1px 0 rgba(0,0,0,.25); }

/* Alt text accessibility helpers (non-visual tweaks) */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}