/* Base tokens */
:root{
  --bg: #0b0e14;
  --bg-2: #141824;
  --surface: rgba(255,255,255,.08);
  --surface-2: rgba(255,255,255,.14);
  --text: #e6e1f5;
  --muted: #b5b0c9;
  --accent: #8b5cff;
  --accent-2: #b07bff;
  --border: rgba(170,170,210,.4);
  --card: rgba(20,22,28,.65);
  --shadow: 0 6px 20px rgba(0,0,0,.35);
  --radius: 14px;
  --radius-sm: 10px;
  --focus: 0 0 0 3px rgba(139,92,255,.65);
}

/* Lightweight resets & layout primitives */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif; }
body {
  margin: 0;
  color: var(--text);
  background-color: var(--bg);
  /* Layered background: gradient + scanlines + subtle glow */
  background-image:
    linear-gradient(135deg, rgba(60,0,90,.65), rgba(0,0,0,.75)),
    repeating-linear-gradient(to bottom,
      rgba(255,255,255,.04) 0 1px,
      rgba(255,255,255,0) 1px 2px),
    radial-gradient(circle at 10% -10%, rgba(127,90,255,.15), transparent 40px),
    radial-gradient(circle at 90% 0%, rgba(255,255,255,.04), transparent 40px);
  background-blend-mode: overlay, overlay, normal, normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  min-height: 100%;
  padding: 0;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: none; box-shadow: var(--focus); }

/* Layout utilities */
.container { width: min(1200px, 92vw); margin-inline: auto; padding-block: 1rem; }
.grid { display: grid; gap: 1rem; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem; box-shadow: var(--shadow); backdrop-filter: blur(8px) saturate(1.2); -webkit-backdrop-filter: blur(8px) saturate(1.2); }
.tag { display:inline-block; padding: .25rem .6rem; border-radius: 999px; font-size: .75rem; color: #fff; background: linear-gradient(135deg, rgba(139,92,255,.8), rgba(120,110,200,.8)); border: 1px solid rgba(255,255,255,.25); }

/* Header / Hero typography */
header { text-align: center; padding: 2rem 1rem 1rem; position: relative; isolation: isolate; }
header h1 {
  font-size: clamp(1.8rem, 3vw + 1rem, 4rem);
  line-height: 1.04;
  margin: 0 0 .5rem;
  letter-spacing: .5px;
  text-shadow: 0 1px 0 rgba(0,0,0,.4);
}
header .meta { color: var(--muted); font-size: clamp(0.8rem, .8vw + .6rem, 1rem); }

/* Main content styling with glass panels */
main { padding: 1rem 0 2rem; }
article { max-width: clamp(680px, 80vw, 980px); margin: 0 auto; padding: 0 0.5rem; }
.featured-image { margin: 1rem 0 0; padding: 0 0; }
.image-frame {
  width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  background: #0a0a0f;
  box-shadow: 0 6px 18px rgba(0,0,0,.5);
}
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Content blocks */
.article h2 { font-size: clamp(1.5rem, 2.8vw + 1rem, 2.6rem); margin: .75rem 0 0.5rem; color: #f3f0ff; }
.article p { color: #e5e0f7; margin: .4rem 0 1rem; font-size: clamp(1rem, 0.9vw + .9rem, 1.15rem); }
ul { padding-left: 1.25rem; margin: .5rem 0 1rem; }
li { margin: .25rem 0; }

/* Section-specific glass panels (optional sections) */
.product-ad, .sponsored-page { margin: 1rem 0; display: block; text-align: center; }
.product-ad a, .sponsored-page a {
  display: inline-block; padding: .75rem 1rem; border-radius: 999px;
  background: rgba(139,92,255,.25); border: 1px solid rgba(139,92,255,.55);
  color: #fff; text-decoration: none; font-weight: 600;
  transition: transform .2s ease, background-color .2s ease;
}
.product-ad a:hover, .sponsored-page a:hover { transform: translateY(-1px); background: rgba(135,97,255,.35); }

/* Buttons & interactive controls */
.button-base, a.btn, button.btn, .cta {
  display: inline-block; padding: .75rem 1.25rem; border-radius: 10px;
  font-weight: 600; text-align: center; text-decoration: none;
  border: 1px solid rgba(168,168,210,.5);
  background: linear-gradient(180deg, rgba(99, 84, 178, .9), rgba(68, 54, 120, .9));
  color: #fff; cursor: pointer;
  transition: transform .2s ease, background-color .2s ease, box-shadow .2s;
}
.button-base:hover, a.btn:hover, button.btn:hover, .cta:hover { transform: translateY(-1px); }
.button-outline {
  background: transparent; color: var(--text);
  border: 1px solid rgba(139,92,255,.8);
}
.button-outline:hover { background: rgba(139,92,255,.15); }
.button:focus-visible, a.btn:focus-visible, button.btn:focus-visible, .cta:focus-visible {
  outline: none; box-shadow: var(--focus);
}
.btn { composes: button-base; } /* no-op in CSS cascade; kept for clarity if refactored */

/* Glass panel helpers for content blocks that read as panels */
.section-panel {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  backdrop-filter: blur(12px) saturate(1.25);
  -webkit-backdrop-filter: blur(12px) saturate(1.25);
}
.section-panel + .section-panel { margin-top: .75rem; }

/* Content container helpers */
.content { padding: .5rem; }

/* Aside (if any) */
aside { display: block; }

/* Typography helpers for a compact UI */
.label { font-size: .75rem; letter-spacing: .4px; text-transform: uppercase; color: var(--muted); }

/* Grid utilities for responsive layouts (auto-fit) */
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }

/* Dark-mode friendly overrides (light scheme variant) */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f4fb;
    --bg-2: #e9e4f6;
    --text: #1a1233;
    --muted: #534064;
    --surface: rgba(20,22,28,.08);
    --surface-2: rgba(255,255,255,.8);
    --border: rgba(20,20,30,.25);
    --card: rgba(255,255,255,.82);
    --shadow: 0 8px 24px rgba(0,0,0,.08);
  }
  body { background-blend-mode: normal; }
  a { color: #4a2bd6; }
  .image-frame { border-color: rgba(0,0,0,.15); }
  .product-ad a, .sponsored-page a { background: rgba(74,42,214,.25); border-color: rgba(74,42,214,.6); }
}

/* Print-friendly tweaks */
@media print {
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
  .section-panel { background: #fff; border: 1px solid #000; }
}

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