/* Base tokens */
:root {
  --bg: #000000;
  --bg-2: #0a0a0f;
  --bg-3: #14141b;
  --text: #eaf2ff;
  --muted: #a6afc7;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-2: rgba(255, 255, 255, 0.12);
  --border: rgba(255, 255, 255, 0.25);
  --accent: #00eaff;
  --accent-2: #8a2be2;
  --shadow: 0 8px 22px rgba(0, 0, 0, 0.55);
  --focus: 0 0 0 3px rgba(0, 230, 255, 0.55);
  --radius: 12px;
}

/* Dark mode prefers-color-scheme fallback */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f7fb;
    --bg-2: #eeeef4;
    --bg-3: #e9e9f0;
    --text: #0b0b12;
    --muted: #555a6e;
    --surface: rgba(0, 0, 0, 0.08);
    --surface-2: rgba(0, 0, 0, 0.12);
    --border: rgba(0, 0, 0, 0.15);
    --accent: #0066ff;
    --accent-2: #7a3af3;
    --shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    --focus: 0 0 0 3px rgba(0, 102, 255, 0.5);
  }
}

/* Layout scaffolding */
html, body {
  height: 100%;
}
html {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans";
}
* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--text);
  background: 
    linear-gradient(180deg, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.95) 60%, rgba(0,0,0,1) 100%),
    radial-gradient(circle at 20% 10%, rgba(0, 180, 255, 0.08), transparent 40%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0px, rgba(255,255,255,0.04) 1px, transparent 1px, transparent 2px);
  background-blend-mode: overlay, overlay, normal;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Layered background micro-noise (pure CSS) via scanlines overlay implemented above */

/* Base typography & links */
h1, h2, h3 { margin: 0 0 .5em; line-height: 1.15; }
p { margin: 0 0 1em; color: color-mix(in oklab, var(--text), #000 6%); }
ul { margin: 0 0 1em 1.25em; padding: 0; }
li { margin: .25em 0; }

/* Accessibility: focus treatment */
:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  outline-offset: 2px;
}
a, button, .btn, .cta {
  text-decoration: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
a:hover, a:focus-visible { text-decoration: underline; text-underline-offset: 3px; }

/* Structural selectors */
header, nav, main, article, aside, footer {
  display: block;
}
header { padding: 1.25rem; text-align: center; }
header h1 { font-size: clamp(1.6rem, 2.5vw + 1rem, 3rem); letter-spacing: .5px; margin-bottom: .25rem; }
header .meta { color: var(--muted); font-size: clamp(0.8rem, 1.4vw, 0.95rem); }

/* Layout helpers */
.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(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform .2s ease, background .2s ease;
}
.card:hover { transform: translateY(-2px); }
.tag {
  display: inline-block;
  padding: .25em .5em;
  border-radius: 999px;
  font-size: .75rem;
  color: #001018;
  background: rgba(0, 230, 255, 0.25);
  border: 1px solid rgba(0, 230, 255, 0.6);
}

/* Media/media blocks */
.featured-image { margin: 1rem 0; }
.image-frame { display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; border: 1px solid rgba(255,255,255,.25); box-shadow: 0 8px 20px rgba(0,0,0,.45); }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Glass panel aesthetic with fallback */
.glass {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 8px 22px rgba(0,0,0,.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass { background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.4); }
}

/* Hero / content styling */
main { padding: 1rem 0 2rem; }
article { display: block; }

/* Content area styles for potential .content container */
.content { padding: 1rem; }

/* Footer / sections inside */
.product-ad, .sponsored-page { display: block; margin: .5rem 0; padding: .75rem; border-radius: 10px; background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.25); }
.product-ad a, .sponsored-page a { display: block; color: var(--text); }

/* Interactive controls (buttons/CTAs) */
.btn, .cta {
  display: inline-block;
  padding: .7em 1em;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.25);
  background: linear-gradient(135deg, rgba(0,230,255,.9), rgba(124, 67, 255, .9));
  color: #001018;
  font-weight: 600;
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn:hover, .cta:hover { transform: translateY(-1px); }
.btn:active, .cta:active { transform: scale(.98); }
.btn.outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.6);
}
.btn:focus-visible, .cta:focus-visible, a:focus-visible { outline: none; box-shadow: var(--focus); }

/* Image caption / minor typography helpers */
.figure { font-size: 0.92rem; color: var(--muted); }

/* Print accessibility */
@media print {
  body { background: #fff; color: #000; }
  a { color: #00a; text-decoration: underline; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; transform: none !important; }
} 

/* Specific element targeting per HTML structure */
html, body, header, nav, main, article, footer, aside { /* explicit selectors for clarity in CSS tooling */ }
.image-frame, .image-frame img { image-rendering: auto; }