/* Base tokens */
:root {
  --bg: #020b12;
  --bg-2: #041018;
  --surface: rgba(8, 16, 28, 0.28);
  --surface-2: rgba(8, 16, 28, 0.42);
  --text: #eafff7;
  --muted: #a9f6de;
  --accent: #00e676;      /* emerald neon */
  --accent-2: #3f51b5;     /* indigo */
  --border: rgba(0, 230, 118, 0.4);
  --shadow: 0 10px 28px rgba(0,0,0,.25);
  --ring: rgba(0, 255, 170, 0.9);
  --focus-offset: 2px;
}

/* Global */
html, body {
  height: auto;
}
* { box-sizing: border-box; }
:focus-visible { outline: 3px solid var(--ring); outline-offset: var(--focus-offset); }

/* Layered, GPU-friendly dark emerald + indigo neon background with scanlines/noise (pure CSS) */
body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  background: linear-gradient(135deg, rgba(0, 60, 40, 0.25), rgba(8, 8, 28, 0.25)),
              radial-gradient(circle at 20% 0%, rgba(0, 230, 118, 0.18), transparent 40%),
              radial-gradient(circle at 70% 20%, rgba(63, 81, 181, 0.15), transparent 40%),
              var(--bg);
  min-height: 100vh;
  background-blend-mode: overlay;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: overlay;
  background-image:
    repeating-linear-gradient(0deg, rgba(0, 255, 118, .04) 0 1px, transparent 1px 2px),
    repeating-linear-gradient(90deg, rgba(63, 81, 181, .04) 0 1px, transparent 1px 2px);
  background-size: auto;
  opacity: 0.75;
  z-index: 0;
}

/* Layout helpers */
.container { width: 100%; max-width: clamp(320px, 92vw, 1120px); padding: 0 1rem; margin: 0 auto; }

/* Section scaffolding presets (for semantic targets) */
header, main, footer, aside { position: relative; z-index: 1; }

/* Header / Hero */
header {
  padding: clamp(1.25rem, 4vw, 2.5rem) 0;
  text-align: center;
}
header > .container { padding: 0 1rem; }

header h1 {
  font-size: clamp(1.6rem, 2.5vw + 1rem, 2.8rem);
  line-height: 1.08;
  margin: 0.25rem 0 0.35rem;
  color: var(--text);
  letter-spacing: .2px;
  text-shadow: 0 0 8px rgba(0, 255, 118, 0.6);
}
header .meta {
  font-size: clamp(0.75rem, 1.6vw, 0.95rem);
  color: var(--muted);
  margin-top: .25rem;
}

/* Main content (article) */
main { padding: 1rem 0 2rem; }
article {
  margin: 0 auto;
  padding: 1rem;
  border-radius: 14px;
  background: rgba(8, 16, 28, 0.28);
  border: 1px solid rgba(0, 255, 118, 0.28);
  max-width: clamp(320px, 92vw, 980px);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  article { background: rgba(8,16,28,0.72); }
}
article h1 {
  font-size: clamp(1.4rem, 2.6vw + 1rem, 2.2rem);
  margin: 0 0 .5rem;
  color: var(--text);
}
article p { color: #eafff4; line-height: 1.65; margin: .75rem 0; }
article h2 { font-size: clamp(1.05rem, 2vw, 1.25rem); color: #eafff7; margin: .9rem 0 .5rem; }
article ul { margin: 0.5rem 0 1rem 1.25rem; padding: 0; }
article li { margin: .25rem 0; }

/* Image handling (compat with provided selectors) */
.image-frame, .featured-image {
  display: block;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 255, 170, 0.35);
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
  background: #000;
}
.image-frame { aspect-ratio: 16/9; }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Extra image container used by HTML sample */
.featured-image { margin: 0 auto 1rem; width: min(100%, 720px); }

/* Subtle glass-like card patterns for internal sections */
.card {
  background: var(--surface);
  border: 1px solid rgba(0, 255, 118, 0.28);
  border-radius: 12px;
  padding: 0.9rem;
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
}
.tag {
  display: inline-block;
  padding: .15em .6em;
  font-size: .75rem;
  border-radius: 999px;
  background: rgba(0, 255, 118, 0.15);
  border: 1px solid rgba(0, 255, 118, 0.4);
  color: var(--text);
}

/* Utility grid and layout helpers */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
@media (min-width: 700px) {
  .grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
}
@media (min-width: 1024px) {
  .grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}

/* Product ad / footer newsletter-like card */
.product-ad {
  padding: 1rem;
  margin: 1rem auto 0;
  border-radius: 12px;
  background: rgba(2, 6, 15, 0.34);
  border: 1px solid rgba(0, 255, 118, 0.38);
  text-align: center;
}
.product-ad h3 { margin: 0 0 .5rem; font-size: 1rem; }
.product-ad a {
  display: inline-block;
  padding: .55rem 1rem;
  border-radius: 999px;
  background: rgba(0, 230, 118, 0.92);
  color: #041812;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid rgba(0,0,0,.15);
}
.product-ad a:hover { filter: brightness(1.04); }

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

.btn, .cta, a.btn, button.btn {
  display: inline-block;
  padding: 0.75rem 1.15rem;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid rgba(0, 230, 118, 0.8);
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease;
  cursor: pointer;
}
.btn { background: var(--accent); color: #041812; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.secondary, .cta {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(0, 230, 118, 0.8);
}
.btn:focus-visible, .cta:focus-visible, a.btn:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

/* Form elements (basic, theme-consistent) */
input, textarea, select {
  font: inherit;
  color: var(--text);
  background: rgba(8, 16, 28, 0.5);
  border: 1px solid rgba(0, 255, 118, 0.5);
  border-radius: 8px;
  padding: .5rem .75rem;
  outline: none;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(0,255,118,.25); }

/* Nav placeholder (if used) */
nav { display: block; }

/* Print styles (basic readability) */
@media print {
  body { background: white; color: #000; }
  body::before { display: none; }
  * { -webkit-print-color-adjust: exact; color-adjust: exact; }
  header, main, footer { background: none; box-shadow: none; border: none; }
}
  
/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}