/* Section: Base tokens */
:root {
  --bg: #041f0f;
  --bg-2: #0a2e17;
  --text: #eafff7;
  --muted: #a7d6a7;
  --accent: #6ee875;
  --accent-2: #a7ffba;
  --surface: rgba(12, 40, 16, 0.22);
  --surface-soft: rgba(12, 40, 16, 0.14);
  --glass-border: rgba(110, 232, 150, 0.40);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  --radius: 14px;
  --focus: 2px solid rgba(110, 232, 150, 0.95);
}

/* Section: Reset & base layout (mobile-first) */
html, body {
  height: 100%;
}
html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
               Arial, "Noto Sans", "Liberation Sans", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 20% 0%, rgba(110,232,150,.12), transparent 40%),
              radial-gradient(circle at 80% 60%, rgba(110,232,150,.08), transparent 40%),
              linear-gradient(135deg, #041f0f 0%, #06240f 60%, #041f0f 100%);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
  position: relative;
  isolation: isolate;
}
html::before {
  content: "";
  position: fixed; inset: 0;
  background: repeating-linear-gradient(
                0deg,
                rgba(0,0,0,.04) 0px,
                rgba(0,0,0,.04) 1px,
                transparent 1px,
                transparent 2px
              );
  mix-blend-mode: overlay;
  opacity: .25;
  pointer-events: none;
  z-index: 0;
}
html::after {
  content: "";
  position: fixed; inset: 0;
  background: radial-gradient(rgba(0,0,0,.04), rgba(0,0,0,0) 40%),
              radial-gradient(circle at 50% 0%, rgba(0,0,0,.04), transparent 60%);
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 0;
}
* { box-sizing: border-box; }

/* Section: Structural layout helpers (containers/grids) */
.container {
  width: 100%;
  max-width: clamp(640px, 92vw, 1120px);
  margin: 0 auto;
  padding-inline: 1rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.tag {
  display: inline-block;
  font-size: 12px;
  padding: 0.25em 0.5em;
  border-radius: 999px;
  background: rgba(110, 232, 150, 0.15);
  color: #eafff6;
  border: 1px solid rgba(110, 232, 150, 0.35);
}

/* Section: Typography & readable scale (responsive) */
h1, h2, h3, h4, h5 {
  margin: 0 0 .5rem;
  line-height: 1.15;
}
h1 {
  font-size: clamp(1.75rem, 2.2vw + 1rem, 3.5rem);
  letter-spacing: .2px;
  background: linear-gradient(90deg, var(--accent), #9fe59a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
h2 { font-size: clamp(1.375rem, 1.2vw + 1rem, 2.25rem); }
h3 { font-size: clamp(1.05rem, 0.8vw + 0.9rem, 1.4rem); }

/* Section: Basic typography blocks */
p { margin: 0 0 1rem; color: rgba(234, 255, 248, 0.95); }
blockquote {
  margin: .5rem 0 1rem;
  padding: .5rem 1rem;
  border-left: 4px solid var(--accent);
  background: rgba(0,0,0,.15);
  border-radius: 6px;
}
ul { padding-left: 1.25rem; margin: .5rem 0 1rem; color: rgba(235,255,248,.96); }
li { margin: .25rem 0; }

/* Section: Image framing rules (image-frame) */
.image-frame {
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(110, 232, 150, 0.55);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  background: #0a1f12;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Section: Glass panels (applied broadly for frosted feel) */
header, main, article, footer, aside {
  background: rgba(9, 30, 12, 0.22);
  border: 1px solid rgba(110, 232, 150, 0.40);
  border-radius: 14px;
  padding: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
@supports not (backdrop-filter: blur(12px)) {
  header, main, article, footer, aside {
    background: rgba(9, 30, 12, 0.40);
  }
}

/* Section: Links & interactive controls (a, button, .btn, .cta) */
a {
  color: var(--accent-2);
  text-decoration: none;
  transition: color .2s ease;
}
a:hover, a:focus {
  text-decoration: underline;
  color: #b6ffbd;
}
a:focus-visible {
  outline: var(--focus);
  outline-offset: 3px;
}
button, .btn, .cta {
  font: inherit;
  cursor: pointer;
  border-radius: 10px;
  border: 1px solid rgba(110, 232, 150, 0.6);
  padding: 0.6rem 1rem;
  background: rgba(110, 232, 150, 0.22);
  color: #041f0f;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
button:hover, .btn:hover, .cta:hover {
  transform: translateY(-1px);
  background: rgba(110, 232, 150, 0.34);
}
button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 0;
  outline: var(--focus);
  outline-offset: 3px;
}
.btn--outline {
  background: transparent;
  color: var(--text);
  border-color: rgba(110, 232, 150, 0.8);
}
.btn--outline:hover {
  background: rgba(110, 232, 150, 0.15);
}
.cta {
  display: inline-block;
  text-decoration: none;
}
.btn { min-width: 110px; }

/* Section: Layouts for content areas */
header { text-align: center; padding: 1.5rem 1rem; }
header h1 { margin-bottom: .25rem; }
header .meta { color: var(--muted); font-size: 0.92rem; margin-top: .25rem; }

/* Main content area */
main { padding: 1rem; }

/* Article content area */
article { max-width: clamp(640px, 90vw, 900px); margin: 1rem auto; padding: 1rem; }

/* Featured image area adaptation (works with existing HTML image) */
.featured-image { display: block; width: 100%; margin: 0 auto 1rem; }

/* Section: Footer & side promos (product-ad) */
.product-ad {
  display: block;
  text-align: center;
  padding: 0.75rem;
}
.product-ad a {
  display: inline-block;
  padding: .65rem 1rem;
  border-radius: 999px;
  background: rgba(110, 232, 150, 0.25);
  border: 1px solid rgba(110, 232, 150, 0.6);
  color: var(--text);
  text-decoration: none;
}
.product-ad a:hover { background: rgba(110, 232, 150, 0.38); text-decoration: none; }

/* Footer normalization with glass feel preserved */
footer { margin-top: 1rem; padding: 1rem; text-align: center; }

/* Section: Print styles (basic readability) */
@media print {
  html, body {
    background: #fff;
    color: #000;
  }
  header, main, article, footer, aside {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
  }
  a { text-decoration: underline; color: #000; }
}

/* Section: Motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Section: Utility & responsive helpers (logically-scoped) */
@media (min-width: 720px) {
  .container { padding-inline: 0; }
}
@media (max-width: 520px) {
  header, main, article, footer, aside { padding: .75rem; }
  .image-frame { border-radius: 10px; }
}