/* Base & Tokens */
:root {
  --bg: #0a0423;
  --bg-2: #1a0d3a;
  --text: #e8eaff;
  --muted: #a7a7b9;
  --accent: #7a6dff;
  --accent-2: #b6d9ff;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.28);
  --shadow: 0 8px 28px rgba(0,0,0,.25);
  --radius: 14px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; }
body {
  margin: 0;
  color: var(--text);
  line-height: 1.55;
  min-height: 100%;
  font-size: clamp(14px, 2.2vw, 18px);
  background: 
    linear-gradient(135deg, rgba(14,0,40,.95) 0%, rgba(22,6,54,.92) 40%, rgba(9,6,28,.98) 100%),
    radial-gradient(circle at 20% 0%, rgba(124,106,255,.25), transparent 40%),
    linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 100%),
    linear-gradient(to bottom, rgba(0,0,0,.0), rgba(0,0,0,.0));
  background-blend-mode: overlay, overlay, normal, normal;
  background-size: cover;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Subtle "noise/scanline" overlay using layered gradients (pure CSS) */
  background-image:
    linear-gradient(135deg, rgba(14,0,40,.95) 0%, rgba(22,6,54,.92) 40%, rgba(9,6,28,.98) 100%),
    radial-gradient(circle at 20% 0%, rgba(124,106,255,.25), transparent 40%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  background-blend-mode: overlay, overlay, normal;
  overflow-y: auto;
}

/* Layout Helpers */
.container {
  width: 100%;
  max-width: clamp(320px, 86vw, 1100px);
  padding-inline: 1rem;
  margin-inline: auto;
}

.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* Sections & Typography */
header, main, footer, article { display: block; }

/* Glass panels (fallback friendly) */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}
.no-backdrop { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); }

/* Header */
header {
  margin: 1rem auto;
  padding: 1rem 1rem;
  text-align: center;
  max-width: 1100px;
  border-radius: var(--radius);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 10px 28px rgba(0,0,0,.25);
}
header h1 {
  margin: .25rem 0;
  font-size: clamp(1.8rem, 5vw, 3rem);
  letter-spacing: .02em;
}
header .meta {
  margin: .25rem 0 0;
  color: var(--muted);
  font-size: clamp(.9rem, 1.6vw, 1rem);
}
header nav {
  margin-top: .5rem;
}
header nav a {
  color: var(--accent-2);
  text-decoration: none;
  padding: .25em .5em;
  border-radius: 6px;
}
header nav a:hover,
header nav a:focus-visible {
  text-decoration: underline;
  outline: none;
}

/* Main content */
main {
  padding: 1rem 0 2rem;
}
article {
  padding: 1rem;
  max-width: 1100px;
  margin: 0 auto;
}
.featured-image, .image-frame {
  width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  background: #111;
}
.image-frame {
  aspect-ratio: 16 / 9;
  display: block;
  box-shadow: inset 0 0 20px rgba(124,106,255,.45);
}
.image-frame img, .featured-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
h2 { font-size: clamp(1.4rem, 3.5vw, 2rem); margin: .75rem 0 0.25rem; color: #fff; }

/* Content & lists */
.content { padding: .75rem 0; color: #e9e9ff; }
ul { margin: .5rem 0 1rem 1.25rem; }
li { margin: .25rem 0; }

/* Product Ad / footer sections */
footer { padding: 1rem 0 2rem; }
.product-ad, .sponsored-page {
  display: block;
  padding: .75rem;
  text-align: center;
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
}
.product-ad a, .sponsored-page a {
  display: inline-block;
  color: #fff;
  text-decoration: none;
  padding: .5rem 1rem;
  border-radius: 999px;
  background: var(--accent);
  border: 1px solid rgba(255,255,255,.25);
}
.product-ad a:hover, .sponsored-page a:hover {
  background: color-mb(#7a6dff, #6a5aff);
  text-decoration: underline;
}
.product-ad p, .sponsored-page p { margin: 0; }

/* Links & Buttons (interactive states) */
a {
  color: var(--accent-2);
  text-decoration: none;
}
a:hover, a:focus {
  text-decoration: underline;
  text-underline-offset: 2px;
}
a:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  border-radius: 6px;
}
button, .btn, .cta {
  font: inherit;
  cursor: pointer;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.25);
  padding: .6em 1.1em;
  color: #fff;
  background: var(--accent);
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
button:hover, .btn:hover, .cta:hover {
  transform: translateY(-1px);
  background: color-mix(in oklab, var(--accent) 70%, #fff 0%);
}
button:active, .btn:active, .cta:active {
  transform: translateY(0);
  background: var(--accent);
}
.btn.secondary, .cta.outline, button.outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.45);
}
.btn.secondary:hover, .cta.outline:hover, button.outline:hover {
  text-decoration: underline;
}
.cta { display: inline-block; }

/* Utilities (aside placeholder, responsive helpers) */
aside { display: none; }

/* Glassy hero text emphasis (optional subtle glow) */
.glow {
  text-shadow: 0 0 8px rgba(124,106,255,.75);
}

/* Print styles (basic readability) */
@media print {
  body { background: white; color: #000; }
  a { text-decoration: underline; }
  header, footer { background: transparent; border: none; box-shadow: none; }
  .glass, .image-frame { background: transparent; border: none; }
  .image-frame img { object-fit: contain; height: auto; }
}

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