/* Base tokens */
:root {
  --bg: #041a0a;
  --bg-2: #062214;
  --surface: rgba(4, 21, 12, 0.38);
  --text: #eafff0;
  --muted: #a9f0c8;
  --accent: #2c9c3e;       /* forest green */
  --accent-2: #1f6b2d;     /* darker forest */
  --card: rgba(2, 12, 8, 0.28);
  --border: rgba(0, 255, 120, 0.5);
  --shadow: 0 8px 22px rgba(0,0,0,.28);
  --radius: 14px;
  --ring: 0 0 0 4px rgba(43,210,107,.55);
}

/* Reset & globals */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { height: 100%; }
html { font-size: 16px; }
body {
  margin: 0;
  padding: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  line-height: 1.55;
  background: 
    radial-gradient(circle at 15% 20%, rgba(0,255,110,.08), transparent 40px),
    radial-gradient(circle at 70% 60%, rgba(0,60,0,.10), transparent 60px),
    linear-gradient(135deg, rgba(2,24,8,.95), rgba(0,0,0,.95)),
    repeating-linear-gradient(to bottom, rgba(0,0,0,.06) 0 1px, transparent 1px 2px);
  background-blend-mode: overlay;
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layout helpers */
.container { width: 100%; padding: 0 1rem; margin: 0 auto; max-width: clamp(640px, 86vw, 1120px); }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* Glass panels (with fallback) */
.backdrop {
  background: rgba(2, 12, 8, 0.28);
  border: 1px solid rgba(0, 255, 120, 0.5);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  .backdrop { background: rgba(2, 12, 8, 0.6); border-color: rgba(0, 255, 120, 0.75); }
}

/* Elements to style per spec */
html, body, header, nav, main, article, footer, aside { /* included selectors for completeness */ }
.image-frame, .image-frame img { }
.content { }

/* Typography scale (fluid) */
h1, h2, h3 { line-height: 1.15; margin: .25rem 0; }
h1 { font-size: clamp(1.6rem, 4vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 3.5vw, 2.25rem); font-weight: 700; color: var(--text); }
h3 { font-size: clamp(1.1rem, 2.6vw, 1.35rem); font-weight: 600; color: var(--text); }
p { color: #eafff3; margin: .4rem 0 1rem; }

/* Header (hero) */
header {
  padding: clamp(1.25rem, 3vw, 2.5rem);
  margin: 1rem auto;
  border-radius: var(--radius);
  max-width: clamp(640px, 90vw, 1100px);
  text-align: center;
  background: rgba(4, 18, 8, 0.32);
  border: 1px solid rgba(0, 255, 120, 0.5);
  box-shadow: var(--shadow);
}
header h1 { margin: .25rem 0 0.4rem; color: var(--text); }
header .meta { color: var(--muted); font-size: 0.92rem; margin-top: .25rem; }

/* Navigation (Back link) */
nav { margin-top: .75rem; }
nav a {
  display: inline-block;
  padding: .5rem 1rem;
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
  border: 1px solid rgba(0,255,120,.5);
  background: rgba(2, 12, 8, 0.28);
}
nav a:hover, nav a:focus-visible { text-decoration: underline; }

/* Main content and article styling */
main { padding: 1rem; }
article {
  max-width: clamp(640px, 90vw, 980px);
  margin: 0 auto;
  padding: 1rem;
  border-radius: 12px;
  background: rgba(2,12,8,.28);
  border: 1px solid rgba(0, 255, 120, .45);
  box-shadow: var(--shadow);
}
.featured-image { margin: 0 0 0.75rem; }
.featured-image img {
  width: 100%; height: auto; display: block;
  border-radius: 12px;
  border: 1px solid rgba(0,255,120,.4);
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
}
.image-frame { aspect-ratio: 16 / 9; width: 100%; overflow: hidden; border-radius: 12px; border: 1px solid rgba(0,255,120,.4); background: rgba(0,0,0,.2); box-shadow: 0 6px 16px rgba(0,0,0,.25); }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Lists and inline helpers */
ul { margin: .4rem 0 1rem 1.2rem; }
li { margin: .25rem 0; }

/* Blockquotes */
blockquote {
  margin: 1rem 0;
  padding: .5rem 1rem;
  border-left: 3px solid rgba(43,210,107,.8);
  color: #dfffe6;
  background: rgba(0,0,0,.18);
  border-radius: 6px;
}

/* Footer & "ad" sections */
footer {
  padding: 1rem;
  text-align: center;
  color: var(--muted);
}
footer .product-ad,
footer .sponsored-page {
  display: inline-block;
  margin: .25rem;
  padding: .5rem 1rem;
  border-radius: 999px;
  background: rgba(2,12,8,.28);
  border: 1px solid rgba(0,255,120,.5);
  color: var(--text);
  text-decoration: none;
}
footer p { margin-top: .5rem; font-size: .92rem; }

/* Content cards and tags (utility) */
.card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(0,255,120,.4);
  border-radius: 12px;
  padding: .75rem;
}
.tag {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: .75rem;
  background: rgba(43,210,107,.18);
  border: 1px solid rgba(43,210,107,.4);
  color: #dfffe6;
}

/* Link and button styles (accessibility) */
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus-visible { color: var(--accent-2); text-decoration: underline; outline: none; }

/* Buttons (solid & outline variants) */
.btn,
button,
.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .75rem 1.25rem;
  border-radius: 10px;
  font-weight: 600;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  transition: transform .15s ease, background-color .2s ease;
}
.btn {
  background: linear-gradient(135deg, #2bd26b 0%, #1a7f2e 100%);
  color: #06250a;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }

/* Outline variant for contrast when needed */
.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(43,210,107,.75);
}
.btn--outline:hover { background: rgba(0,0,0,.08); }

/* Focus management for interactive elements */
:focus-visible { outline: 2px solid #a7f3d0; outline-offset: 4px; border-radius: 6px; }

/* Forms (basic, matching theme) */
input,
textarea,
select {
  font: inherit;
  color: var(--text);
  padding: .5rem .75rem;
  border-radius: 8px;
  border: 1px solid rgba(0,255,120,.5);
  background: rgba(2,12,8,.25);
}
input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; box-shadow: var(--ring); }

/* Responsive tweaks for readability on small devices */
@media (max-width: 700px) {
  header { padding: 1.25rem; }
  article { padding: 0.75rem; }
}

/* Print styles (basic readability) */
@media print {
  body { background: white; color: black; }
  header, nav, footer { background: transparent; box-shadow: none; border: none; }
}
