:root {
  /* Palette Tokens (pastel yellow lava cracks + emerald green accents) */
  --bg: #0b0f14;
  --bg-2: #141824;
  --text: #eafff5;
  --muted: #bdf8d0;
  --accent: #2bd47b;      /* emerald green */
  --accent-2: #f7e86b;    /* pastel yellow */
  --card: rgba(18, 26, 20, 0.22);
  --glass-border: rgba(43, 212, 123, 0.38);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  --outline: 2px solid rgba(43, 212, 123, 0.95);
}

/* Section: Base & Global */
html, body {
  height: 100%;
}
* { box-sizing: border-box; }
html {
  color-scheme: dark;
}
body {
  margin: 0;
  color: var(--text);
  font-family: ui-system, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", sans-serif;
  line-height: 1.6;
  background:
    linear-gradient(135deg, rgba(8,12,18,.95), rgba(8,12,18,.85) 60%, rgba(8,12,18,.95)),
    radial-gradient(circle at 15% -5%, rgba(255, 245, 170, .08) 0 15%, transparent 15%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.03) 0 1px, transparent 1px 2px);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }

/* Section: Layout Utilities */
.container {
  width: 100%;
  max-width: clamp(320px, 92vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--card);
  border: 1px solid rgba(60, 255, 200, 0.38);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow);
}
.tag {
  display: inline-block;
  padding: .25em .6em;
  font-size: .75rem;
  border-radius: 999px;
  background: rgba(43, 212, 123, 0.18);
  border: 1px solid rgba(43, 212, 123, 0.38);
  color: #eafff0;
}
ul { padding-left: 1.25rem; margin: .5rem 0 1rem; }
li { margin: .25rem 0; }

/* Section: Glass Panels (with fallback) */
header, main, footer, .glass {
  background: rgba(14, 22, 28, 0.22);
  border: 1px solid rgba(60, 255, 200, 0.38);
  border-radius: 14px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 28px rgba(0,0,0,.25);
  padding: 1rem;
  overflow: hidden;
}
@supports not (backdrop-filter: blur(10px)) {
  header, main, footer, .glass {
    background: rgba(14, 22, 28, 0.32);
  }
}
header { padding: 1.25rem; text-align: center; margin: 0 auto 0.5rem; }
header h1 {
  font-size: clamp(1.6rem, 2.2vw + 1rem, 2.8rem);
  line-height: 1.15;
  margin: 0 0 .25rem;
  color: #f7fff7;
  letter-spacing: .2px;
}
header .meta {
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  color: var(--muted);
}
nav {
  margin-top: .5rem;
}
nav a {
  color: var(--accent-2);
  padding: .25em .6em;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.15);
}
nav a:hover { text-decoration: underline; }

/* Section: Core Content Typography */
main { padding: 1rem 0; }
article {
  margin: 0 auto;
  padding: 1rem;
  border-radius: 14px;
  max-width: clamp(520px, 92vw, 860px);
}
.article h2 {
  font-size: clamp(1.4rem, 1.3vw + 1rem, 2rem);
  margin: .25rem 0 .5rem;
  color: #eaffff;
}
.article h3 {
  font-size: clamp(1.15rem, 1.2vw + .8rem, 1.6rem);
  margin: .75rem 0 .4rem;
  color: #eaffff;
}
article p { color: #eafaf0; margin: .5rem 0; }
blockquote {
  margin: .75rem 0;
  padding-left: 1rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
}
.featured-image { margin: 1rem 0; }

/* Section: Image Handling */
.image-frame, .featured-image {
  display: block;
  width: 100%;
}
.image-frame {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(46, 214, 140, 0.4);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Optional: generic image style if .image-frame is not used */
.image-frame img, .featured-image img { display: block; width: 100%; height: auto; }

/* Section: Product Ad / Footer Blocks */
footer {
  padding: 1.25rem;
  display: grid;
  gap: .75rem;
  justify-items: center;
  border-top: 1px solid rgba(46, 214, 140, .35);
  background: rgba(8, 12, 16, 0.28);
  margin-top: 1rem;
}
footer .product-ad,
footer .sponsored-page {
  width: min(100%, 720px);
}
footer a {
  display: block;
  padding: .75rem 1rem;
  border-radius: 10px;
  text-align: center;
  background: rgba(0,0,0,.22);
  color: #eafff8;
  border: 1px solid rgba(60,255,200,.38);
}
@media (min-width: 640px) {
  footer { grid-template-columns: 1fr 1fr; }
}
footer p { margin: .25rem 0 0; color: var(--muted); font-size: .92rem; }

/* Section: Interactions (buttons, links) */
button, .btn, .cta {
  display: inline-block;
  padding: .6em 1em;
  border-radius: 9px;
  border: 1px solid rgba(0,0,0,.15);
  background: rgba(0,0,0,.28);
  color: #eafff6;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease;
}
.btn.primary {
  background: var(--accent);
  color: #052b17;
  border-color: rgba(0,0,0,.0);
}
.btn.secondary {
  background: rgba(43,212,123,.25);
  border-color: rgba(43,212,123,.5);
  color: #eafff0;
}
button:hover, .btn:hover, .cta:hover { transform: translateY(-1px); }
button:focus-visible, .btn:focus-visible, .cta:focus-visible, a:focus-visible {
  outline: var(--outline);
  outline-offset: 3px;
  text-decoration: underline;
}
a:focus-visible { text-decoration: underline; }

/* Section: Typography Details (readability on glass) */
h1, h2, h3 { text-rendering: optimizeLegibility; }
p { margin-block: 0.5rem; }

/* Section: Print (small, readable) */
@media print {
  body { background: #fff; color: #000; }
  header, main, footer { background: #fff; border: none; }
}

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