/* Tokens */
:root {
  --bg: #0b0a14;
  --bg-2: #1b0f2a;
  --surface: rgba(255, 255, 255, 0.08);
  --text: #eafff0;
  --muted: #a6f5c0;
  --accent: #39ff8a;
  --accent-2: #7a5cff;
  --border: rgba(255, 255, 255, 0.25);
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f6fb;
    --bg-2: #e8e8ff;
    --surface: rgba(0, 0, 0, 0.08);
    --text: #0b1020;
    --muted: #4b4b6a;
    --accent: #0a7a2b;
    --accent-2: #6a39ff;
    --border: rgba(0, 0, 0, 0.15);
    --shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
  }
}

/* Layout helpers */
html, body, header, nav, main, article, aside, footer {
  box-sizing: border-box;
}
html, body {
  height: 100%;
}
html, body { color: var(--text); background: var(--bg); margin: 0; }

/* Layered, responsive background (gradient + subtle scanlines/noise) */
body {
  background-color: var(--bg);
  background-image:
    radial-gradient(circle at 20% 20%, rgba(120,0,210,.25), transparent 40%),
    radial-gradient(circle at 75% 0%, rgba(0,255,120,.15), transparent 40%),
    linear-gradient(135deg, rgba(60,0,90,.7), rgba(10,0,20,.9)),
    repeating-linear-gradient(to bottom, rgba(0,0,0,.08) 0 1px, transparent 1px 2px);
  background-blend-mode: screen, overlay, normal, normal;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
  overflow-x: hidden;
}

*,
*::before,
*::after { box-sizing: border-box; }

/* Typography (fluid) */
html { font-size: 16px; }
body { font-size: clamp(14px, 1.6vw, 18px); }

/* Container & grid utilities */
.container { max-width: clamp(24rem, 72rem, 1100px); margin-inline: auto; padding-inline: 1rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1rem; box-shadow: var(--shadow); backdrop-filter: saturate(1.2) blur(12px); -webkit-backdrop-filter: blur(12px); }
@supports not (backdrop-filter: blur(12px)) {
  .card { background: rgba(255, 255, 255, 0.18); }
}
.tag { display: inline-block; padding: 0.15em 0.5em; border-radius: 6px; font-size: 0.75rem; color: var(--text); border: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.15); }

/* Interaction primitives */
a, button, .btn, .cta { color: var(--text); text-decoration: none; cursor: pointer; }
a:hover, a:focus, .btn:hover, .cta:hover { text-decoration: underline; }
a:focus-visible, .btn:focus-visible, .cta:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

/* Glass/mrost panel (with fallback) */
.content, .card, .image-frame, .product-ad { background: rgba(255, 255, 255, 0.08); border: 1px solid var(--border); border-radius: 12px; padding: 0.75rem; }
.content { backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
@supports not (backdrop-filter: blur(10px)) {
  .content, .card { background: rgba(255, 255, 255, 0.18); }
}
.image-frame { aspect-ratio: 16 / 9; width: 100%; overflow: hidden; border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 6px 18px rgba(0,0,0,.3); background: #000; }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Hero & header */
header { padding: 2rem 0; text-align: center; }
header h1 { font-size: clamp(1.8rem, 2.5vw + 1rem, 3rem); margin: 0.25rem 0; letter-spacing: .4px; color: var(--text); text-shadow: 0 0 12px rgba(0,255,140,.25); }
header .meta { color: var(--muted); font-size: 0.95rem; }

/* Page sections */
main { padding: 1rem 0 2rem; }
article { display: grid; gap: 1rem; }

/* Specific selectors required by the HTML structure */
html, body, header, nav, main, article, footer, aside { /* general semantic targets; no extra style beyond defaults above */ }

/* Featured media & content blocks */
.featured-image { width: 100%; margin: 0 0 0.75rem; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow); }
.featured-image img { width: 100%; height: auto; display: block; }

/* Content typography blocks */
.content p { margin: 0 0 1rem; color: var(--text); }
.content h2, .content h3 { margin: 0.75rem 0 0.5rem; color: var(--text); }
.content blockquote { margin: 0 0 1rem; padding-left: 1rem; border-left: 3px solid var(--accent-2); color: var(--muted); font-style: italic; }

/* Lists */
ul { margin: 0.5rem 0 1rem 1.25rem; padding: 0; }
li { margin: 0.25rem 0; }

/* CTAs */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: .75rem 1.25rem; border-radius: 8px; border: 1px solid rgba(120,255,200,.6); background: linear-gradient(135deg, rgba(0,255,140,.9), rgba(0,200,120,.9)); font-weight: 600; color: #021; }
.btn + .btn { margin-left: .5rem; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(0,0,0,.25); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid rgba(124,255,200,.8); }
.cta { padding: .75rem 1.25rem; border-radius: 999px; border: 1px solid rgba(124,255,200,.6); background: linear-gradient(135deg, rgba(0,255,140,.85), rgba(0,180,120,.85)); font-weight: 700; }

/* Footer layout (compact, glassy blocks) */
footer { padding: 1.5rem 1rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; align-items: start; color: var(--text); }
footer p { margin: 0.25rem 0; opacity: .95; font-size: .92rem; }

/* Utility: image caption-like label styling for image blocks if needed */
.caption { font-size: .85rem; color: var(--muted); text-align: center; }

/* Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; color: #000; }
  .image-frame { page-break-inside: avoid; }
}

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