/* Palette & Theme */
:root{
  --bg: #031c12;
  --bg-2: #0a2b1a;
  --text: #eafff2;
  --muted: #c5e9d9;
  --accent: #2be3a7;       /* emerald accent */
  --accent-2: #c0a7ff;     /* lavender accent */
  --focus: #b0a0ff;
  --glass: rgba(2, 28, 22, 0.22);
  --glass-strong: rgba(2, 28, 22, 0.32);
  --border: rgba(122, 255, 214, 0.36);
  --shadow: 0 8px 28px rgba(0,0,0,.28);
  --radius: 14px;
  --container-max: 1100px;
}

/* Base & Background Layering */
html, body { height: 100%; }
* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  line-height: 1.55;
  background: var(--bg);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  /* layered: subtle gradient + noise-like scanlines */
  background:
    radial-gradient(circle at 20% -5%, rgba(43, 227, 167, 0.08), transparent 40%),
    radial-gradient(circle at 100% 0%, rgba(188, 119, 255, 0.08), transparent 40%),
    linear-gradient(135deg, rgba(0, 60, 40, 0.55) 0%, rgba(0, 0, 0, 0.0) 60%),
    repeating-linear-gradient( 0deg,
      rgba(255,255,255,0.04) 0px, rgba(255,255,255,0.04) 1px,
      transparent 1px, transparent 3px);
  mix-blend-mode: overlay;
  filter: saturate(110%);
  animation: drift 60s linear infinite;
  pointer-events: none;
}
@keyframes drift { from { transform: translateZ(0) translateY(0); } to { transform: translateZ(0) translateY(-2px); } }

/* Layout Helpers */
.container { width: min(92%, var(--container-max)); margin-inline: auto; padding-inline: 1rem; }
.grid { display: grid; gap: 1rem; }
.card { background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.08); border-radius: 12px; padding: 1rem; }

/* Glass Panels (with graceful fallback) */
header, nav, main, article, aside, footer {
  /* Glassy surface for accessibility on dark background */
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px) saturate(115%);
  -webkit-backdrop-filter: blur(10px) saturate(115%);
}
@supports not (backdrop-filter: blur(10px)) {
  header, nav, main, article, aside, footer {
    background: rgba(2, 28, 22, 0.60); /* stronger fallback without blur */
    border-color: rgba(122, 255, 214, 0.6);
  }
}

.image-frame { width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; border: 1px solid rgba(122,255,214,.4); box-shadow: 0 6px 16px rgba(0,0,0,.25); }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Typography Notes */
h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.1; font-weight: 700; }
h1 { font-size: clamp(2rem, 3.5vw + 1rem, 3.5rem); letter-spacing: .2px; }
h2 { font-size: clamp(1.25rem, 2vw + .75rem, 2.25rem); }
p { margin: .5rem 0 1rem; color: rgba(var(--text-rgb, 255,255,255), .92); }
.content p { margin-bottom: 1rem; }

/* Ensure readable color over glass */
.header-title { font-weight: 700; }

/* Links & Accessibility */
a { color: var(--accent-2); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; outline: none; color: #d8c6ff; }
a:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; border-radius: 6px; }

/* Buttons (solid + outline) */
.btn, .cta { display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 1rem; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; font-weight: 600; transition: transform .2s ease, background-color .2s ease, border-color .2s ease;
  text-decoration: none; color: #062018;
}
.btn { background: linear-gradient(135deg, var(--accent) 0%, #10c97f 100%); color: #041a12; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Outline variant */
.btn.outline, .cta.outline { background: transparent; color: var(--accent-2); border-color: rgba(194, 167, 255, 0.6); }
.btn.outline:hover, .cta.outline:hover { background: rgba(194, 167, 255, 0.15); }

/* Utility: tags and small chips */
.tag { display: inline-block; padding: .25rem .6rem; border-radius: 999px; font-size: .75rem;
  background: rgba(43, 227, 167, 0.25); color: #eafff9; border: 1px solid rgba(43, 227, 167, 0.65); }

/* Lists styling */
ul { margin: .5rem 0 1rem; padding-left: 1.25rem; }
li { margin: .25rem 0; }

/* Layout specifics to match provided structure */
header { display: block; margin-bottom: 1rem; }
header h1 { font-weight: 800; letter-spacing: .2px; }

/* Main content flow for article structure */
main { display: block; margin: 1rem auto; max-width: var(--container-max); }
article { display: block; }

/* Footer / ad panels */
.product-ad, .sponsored-page { display: block; margin: .5rem 0; }

/* Responsive rhythm */
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
  .container { padding-inline: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

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