/* Tokens & Base */
:root{
  --bg: #120a2b;
  --bg-2: #240041;
  --bg-3: #2b0a53;
  --text: #f8faff;
  --muted: #cbd5e8;
  --accent: #8b5cf6;
  --accent-2: #ffffff;
  --glass: rgba(255,255,255,.08);
  --glass-2: rgba(255,255,255,.14);
  --border: rgba(255,255,255,.25);
  --shadow: 0 6px 20px rgba(0,0,0,.25);
  --radius: 14px;
  --radius-sm: 10px;
  --gap: 1.25rem;
}

/* Reset & globals */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  line-height: 1.5;
  background: linear-gradient(135deg, var(--bg) 0%, var(--bg-2) 60%, var(--bg-3) 100%);
  min-height: 100%;
}

/* Layered background: gradient + void swirl + subtle scanlines */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    radial-gradient(circle at 60% -10%, rgba(255,255,255,.04), transparent 40%),
    conic-gradient(from 180deg at 50% 50%, rgba(124,58,237,.25), rgba(124,58,237,0) 25%, rgba(124,58,237,.25) 50%, rgba(124,58,237,0) 75%);
  background-blend-mode: overlay;
  animation: swirl 60s linear infinite;
}
@keyframes swirl { to { transform: rotate(360deg); } }

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: repeating-linear-gradient(to bottom, rgba(0,0,0,.04) 0 1px, transparent 1px 2px);
  opacity: .15;
}

/* Layout helpers */
.container { max-width: clamp(720px, 85vw, 1100px); margin: 0 auto; padding: 0 1rem; }

/* Panels / Glass (with fallback) */
.glass {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  /* Fallback if backdrop-filter unsupported */
}
@supports not (backdrop-filter: blur(12px)) {
  .glass { background: rgba(255,255,255,.22); }
}

/* Page regions */
header, main, footer, aside { position: relative; z-index: 1; }

/* Header hero styling */
header { padding: 1rem 0; margin: 0 auto 1rem; }
header h1 { font-size: clamp(1.75rem, 1.2rem + 2vw, 3rem); margin: .25rem 0; font-weight: 700; }
header .meta { font-size: .9rem; color: var(--muted); }

/* Image frame (and fallback .featured-image) */
.image-frame, .featured-image {
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.25);
  background: #000;
}
.image-frame img, .featured-image img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  /* subtle glow */
  filter: saturate(1.05);
  box-shadow: 0 6px 18px rgba(0,0,0,.4);
}

/* Main article content */
main { padding: 1rem 0; }
article { display: block; padding: 0; max-width: 1100px; margin: 0 auto; }

/* Typography scale */
h2 { font-size: clamp(1.5rem, 0.9rem + 2vw, 2.5rem); margin: .75rem 0 .25rem; color: #fff; }
h3 { font-size: clamp(1.1rem, 0.8rem + 1.5vw, 1.5rem); margin: .75rem 0; color: #fff; }
p { color: var(--muted); margin: .5rem 0 1rem; }

/* Lists & quotes */
ul { margin: .5rem 0 1rem 1.25rem; padding: 0; color: var(--muted); }
li { margin: .25rem 0; }
blockquote {
  margin: 1rem 0; padding: .75rem 1rem;
  border-left: 4px solid var(--accent);
  background: rgba(255,255,255,.04);
  color: #fff;
}

/* Inline elements / links */
a, button, .btn, .cta { text-decoration: none; color: #fff; }
a:hover, a:focus { text-decoration: underline; outline: none; }

/* Buttons (solid and outline) */
.btn {
  display: inline-block;
  padding: .6rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.6);
  background: linear-gradient(135deg, rgba(124,58,237,.95), rgba(68,0,140,.95));
  color: #fff;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,.8);
  color: #fff;
}

/* Glass cards / sections */
.card { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); border-radius: var(--radius-sm); padding: .75rem; box-shadow: var(--shadow); }

/* Product ad panel (footer region) */
.product-ad {
  display: flex; flex-direction: column; gap: .5rem;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.product-ad h3 { margin: 0; font-size: 1.05rem; }
.product-ad a { color: #fff; text-decoration: none; padding: .25rem 0; }
.product-ad a:hover { text-decoration: underline; }

/* Footer */
footer { padding: 1rem 0; text-align: center; color: var(--muted); }

/* Utility / layout helpers (grid, container, tag) */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--gap);
}
.card { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); border-radius: var(--radius-sm); padding: .75rem; box-shadow: var(--shadow); }

/* Small UI chips */
.tag {
  display: inline-block; padding: .15em .5em; font-size: .8rem;
  border-radius: 999px; border: 1px solid rgba(255,255,255,.3);
  background: rgba(124,58,237,.25); color: #fff;
}

/* Content wrapper (optional) */
.content { padding: 1rem; color: var(--text); }

/* Accessibility: focus ring on keyboard navigation */
:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(124,58,237,.6);
  border-radius: 6px;
}
a:focus-visible, button:focus-visible { outline: none; }

/* Responsive behavior tweaks */
@media (min-width: 900px) {
  .container { padding: 0 2rem; }
  article { padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html, body { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

@media print {
  body { background: #fff; color: #000; }
  a, button { text-decoration: none; color: inherit; }
}