/* Base tokens */
:root{
  --bg: #0b0f1a;
  --bg-2: #1a0d2a;
  --text: #eaf0ff;
  --muted: #c6b8e5;
  --accent: #ffd600;      /* cyber yellow */
  --accent-2: #ff2d95;    /* pink/circuit highlight */
  --glass: rgba(255,255,255,0.08);
  --glass-border: rgba(255,255,255,0.25);
  --shadow: 0 8px 22px rgba(0,0,0,.28);
  --radius: 12px;
  --focus-ring: 0 0 0 3px rgba(255,215,0,.75);
  --text-on-glass: #f7faff;
}

/* Base layout + background layers (mobile-first) */
html, body { height: 100%; }
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Helvetica Neue", sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, var(--bg), var(--bg-2) 60%);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* subtle glow accents (future cyberpunk) */
  background: radial-gradient(circle at 15% 15%, rgba(255,214,0,.08), transparent 25%),
              radial-gradient(circle at 85% 20%, rgba(255,0,170,.08), transparent 25%),
              linear-gradient(135deg, rgba(10,10,18,.0), rgba(10,10,18,.0));
  mix-blend-mode: overlay;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* pure CSS scanlines / noise */
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 4px 4px, 4px 4px;
  opacity: .25;
  mix-blend-mode: overlay;
}

/* Layout utilities */
.container {
  width: 100%;
  max-width: clamp(680px, 90vw, 1100px);
  margin-inline: auto;
  padding: 16px;
  position: relative;
  z-index: 1;
}
.grid {
  display: grid;
  gap: 1rem;
}
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}

/* Section elements (structure) */
header, main, footer, aside, article { display: block; }

/* Glassy surfaces with graceful fallback */
header, main, footer, aside, article {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  header, main, footer, aside, article {
    background: rgba(255,255,255,.10);
  }
}

/* Typography hierarchy (responsive) */
h1, h2, h3, h4 { margin: .25rem 0; line-height: 1.15; }
h1 { font-size: clamp(1.6rem, 4vw, 2.6rem); font-weight: 750; letter-spacing: .2px; color: var(--text); }
p { margin: .5rem 0; color: var(--text); opacity: .95; }

/* Hero/content area */
.image-frame {
  width: min(96%, 860px);
  aspect-ratio: 16 / 9;
  margin: 1rem auto;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 8px 22px rgba(0,0,0,.38);
  background: rgba(0,0,0,.15);
  display: grid;
  place-items: center;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
}
.content { color: var(--text); }

/* Link and CTA styling (accessible focus) */
a, button, .btn, .cta {
  font-family: inherit;
  font-size: clamp(0.95rem, 1.2vw, 1rem);
  color: var(--text);
  text-decoration: none;
  border-radius: 8px;
  outline: none;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; color: #ff6ac9; }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  outline-offset: 2px;
}
.btn, .cta {
  padding: .65em 1.05em;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.45);
  background: var(--accent);
  color: #1a1600;
  font-weight: 700;
  display: inline-block;
  transition: transform .15s ease, background .2s ease;
}
.btn:hover, .cta:hover { transform: translateY(-1px); background: #ffe43a; }
.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.70);
}
.btn--outline:hover {
  background: rgba(255,255,255,.08);
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Lists (generic) */
ul { margin: .5rem 0; padding-left: 1.2rem; }
li { margin: .25rem 0; }

/* Product ad / footer accents */
.product-ad, .sponsored-page {
  display: block;
  text-align: center;
  margin: .5rem 0;
  padding: .75rem;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 10px;
}
.product-ad a, .sponsored-page a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}
.product-ad p, .sponsored-page p { margin: 0; font-weight: 600; }

/* Image vignette / frame tweaks for accessibility */
.image-frame { outline: 1px solid rgba(255,255,255,.25); }

/* Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; color: #000; }
}
