/* 01. Base tokens & palette */
:root{
  --bg: #0a111a;
  --bg-2: #0b1920;
  --text: #eafff6;
  --muted: #b3fff0;
  --accent: #2affc7;      /* mint */
  --accent-2: #ff2b2b;     /* red */
  --card: rgba(255, 255, 255, 0.12);
  --card-border: rgba(255, 255, 255, 0.28);
  --shadow: 0 6px 20px rgba(0,0,0,.25);
  --radius: 12px;
}

/* 02. Layout primitives */
html, body { height: 100%; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

/* Layered background: gradient + subtle noise/scanlines (pure CSS) */
html, body {
  color-scheme: dark;
  background: 
    linear-gradient(135deg, rgba(42,255,199,.08), rgba(0,0,0,0) 60%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.03) 0 1px, rgba(0,0,0,0) 1px 2px),
    radial-gradient(circle at 20% 0%, rgba(0,255,180,.15), transparent 40%),
    #04070b;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text);
  text-rendering: optimizeLegibility;
}

body { min-height: 100%; }

/* Central container & grid helpers */
.container { width: 100%; max-width: clamp(340px, 86vw, 1100px); margin-inline: auto; padding: 0 1rem; }

/* Simple responsive grid for sections if needed */
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* Card primitive for optional panels */
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 0.75rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
@supports not ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
  .card { background: rgba(255,255,255,0.22); }
}

.tag {
  display: inline-block;
  font-size: 12px;
  padding: 0.25em 0.5em;
  border-radius: 999px;
  background: rgba(0,0,0,.25);
  color: var(--text);
  border: 1px solid rgba(255,255,255,.25);
}

/* 03. Global typography & color treatment */
h1, h2, h3 { margin: 0.25em 0; line-height: 1.15; }
h1 { font-size: clamp(1.4rem, 3.2vw + 0.8rem, 2.4rem); letter-spacing: .2px; color: var(--text); text-shadow: 0 2px 12px rgba(0,255,200,.25); }
h2 { font-size: clamp(1.25rem, 2.4vw + 1rem, 1.9rem); color: #eaffff; }
h3 { font-size: clamp(1rem, 2vw + .5rem, 1.25rem); color: #eaffff; }

/* 04. Glass panels (with fallback) */
.glass, .backdrop {
  background: rgba(2, 8, 23, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: var(--radius);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 0.75rem;
}
@supports not ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
  .glass, .backdrop { background: rgba(255,255,255,0.24); }
}

/* 05. Image frame styling */
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  background: #0b1117;
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .4s ease;
}
.image-frame img:hover { transform: scale(1.02); }

/* 06. Core layout elements (semantic) */
html, body, header, nav, main, article, footer, aside { /* semantic selectors kept lean */ }

header {
  text-align: center;
  padding: 1.75rem 1rem 1rem;
}

header h1 { margin-bottom: 0.25rem; font-weight: 700; }

header .meta {
  margin: 0.25rem 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}

nav { margin-top: .25rem; }

nav a {
  color: var(--text);
  text-decoration: none;
  padding: .25rem .5rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.25);
  transition: transform .2s ease;
}
nav a:hover { transform: translateY(-1px); text-decoration: underline; }

main { padding: 1rem 0 2rem; }

article { padding: 0 0.5rem; }

/* Feature area card for hero content */
.featured-image { display: block; width: 100%; max-width: 720px; margin: 0 auto 1rem; }

.content { padding: 0 0.25rem; }

/* Paragraphs & lists readability on glass panels */
p { margin: .75em 0; color: var(--text); }
ul, ol { margin: .5em 0 1em 1.25em; color: var(--text); }
ol { padding-left: 1.25em; }
ol li { margin: .25em 0; }

/* 07. Interactive states (links, buttons, CTAs) */
a, button, .btn, .cta { text-decoration: none; color: var(--text); }

/* Buttons: solid and outline variants */
.btn {
  display: inline-block;
  padding: .6em 1em;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(42,255,199,.25);
  color: #04140f;
  font-weight: 600;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); background: rgba(42,255,199,.42); }
.btn:active { transform: translateY(0); background: rgba(42,255,199,.32); }
.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.5);
}
.btn--outline:hover {
  background: rgba(255,255,255,.08);
}
.cta { font-weight: 700; }

/* Links: emphasize on hover/focus for accessibility */
a { color: var(--text); }
a:hover, a:focus { text-decoration: underline; }

/* Focus visibility for keyboard nav on interactive elements */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 08. Footer & side modules (product ads) */
footer { padding: 1.5rem 0; text-align: center; color: var(--muted); }
footer .product-ad, footer .sponsored-page {
  display: inline-block;
  margin: 0.25rem;
  padding: .6rem 1rem;
  border-radius: 999px;
  background: rgba(2, 6, 23, 0.42);
  border: 1px solid rgba(255,255,255,.28);
  color: var(--text);
  text-decoration: none;
}
footer p { margin: .5rem 0 0; }

/* 09. Utility helpers (for structural pages) */
hr { border: 0; height: 1px; background: rgba(255,255,255,.15); margin: 1rem 0; }

ul.inline { list-style: none; padding: 0; margin: 0; display: flex; gap: .5rem; align-items: center; }

/* 10. Print styles (readability) */
@media print {
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
  .glass, .card { background: #fff; border: 1px solid #ccc; box-shadow: none; }
}

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