/* Section: Base Tokens */
:root{
  --bg: #0a0210;
  --bg-2: #1a0a1f;
  --text: #f5eaff;
  --muted: #c9b7d8;
  --accent: #8a2be2;       /* neon purple */
  --accent-2: #7b001d;     /* burgundy */
  --glass: rgba(255,255,255,.08);
  --glass-2: rgba(255,255,255,.22);
  --glass-border: rgba(255,255,255,.28);
  --shadow: 0 8px 28px rgba(0,0,0,.38);
  --radius: 14px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

/* Section: Layout & Background (mobile-first) */
html, body, header, nav, main, article, aside, section, footer {
  margin: 0;
  padding: 0;
  border: 0;
  vertical-align: baseline;
  outline: none;
}
html, body { height: 100%; }
body {
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background:
    linear-gradient(135deg, rgba(122,0,140,.75) 0%, rgba(73,0,40,.85) 60%, rgba(12,0,20,.95) 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 2px, transparent 2px 4px);
  background-attachment: fixed;
  background-blend-mode: normal;
}
@media (prefers-color-scheme: dark) {
  :root { --text: #f7eaff; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Section: Global helpers & utilities */
.container { width: 100%; max-width: clamp(720px, 90vw, 1200px); padding-inline: 1rem; margin-inline: auto; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.card { background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.tag { display: inline-block; padding: .25em .6em; font-size: .75rem; border-radius: 999px; background: rgba(138,43,226,.25); color: #fff; border: 1px solid rgba(255,255,255,.28); }

/* Section: Core structural selectors */
html, body { scroll-behavior: smooth; }
header {
  padding-block: clamp(1.25rem, 4vw, 2.5rem);
  padding-inline: 1rem;
  margin: 0 auto;
}
nav { margin-top: .5rem; }
main { padding: 1rem; }
article { display: block; }

/* Section: Typography & hero emphasis */
h1, h2 { margin: .25rem 0; font-weight: 700; letter-spacing: .2px; }
h1 { font-size: clamp(2rem, 5vw + 1rem, 4rem); line-height: 1.04; text-wrap: balance; color: #fff; }
h2 { font-size: clamp(1.25rem, 1.2vw + 1rem, 2rem); color: #f0eaff; }
p { color: #e8d7f3; margin: .75rem 0; }
.meta { color: var(--muted); font-size: .9rem; }

/* Section: Image framing (neon framed visuals) */
.image-frame, .featured-image {
  display: block;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 6px 22px rgba(0,0,0,.35);
  background: #000;
}
.image-frame { aspect-ratio: 16/9; }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Section: Glass panels with backdrop (Fallback provided) */
.glass {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 12px;
  padding: .75rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 24px rgba(0,0,0,.28);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass { background: rgba(255,255,255,.18); }
}

/* Section: Interactions for links & controls */
a, button, .btn, .cta {
  text-decoration: none;
  color: #fff;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s ease, border-color .2s ease;
}
a:hover, a:focus { text-decoration: underline; color: var(--accent-2); }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(126,0,255,.25);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .75rem 1.25rem; border-radius: .75rem;
  border: 1px solid rgba(255,255,255,.28);
  background: linear-gradient(135deg, rgba(120,0,80,.95), rgba(140,0,140,.85));
  color: #fff;
  font-weight: 600; font-size: 1rem;
}
.btn.secondary {
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.3);
}
.btn.outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,.6);
  color: #fff;
}
.cta { padding: .8rem 1.2rem; border-radius: .75rem; }

/* Section: Site navigation tweaks (backdrop-aware) */
header > h1 { margin-bottom: .25rem; font-weight: 700; color: #fff; }
nav a { color: #e9d5ff; padding: .25rem .5rem; border-radius: .5rem; }
nav a:hover { background: rgba(138,43,226,.25); }

/* Section: Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; }
  .glass { background: #fff; color: #000; border: 1px solid #ccc; }
}

/* Section: Content container & layout helpers */
.content { color: var(--text); }

/* Section: Footers / ads as glass panels */
.product-ad, .sponsored-page { display: block; margin: .5rem 0; }
.product-ad a, .sponsored-page a { display: block; padding: .75rem 1rem; border-radius: .5rem; text-align: center; background: rgba(138,43,226,.25); border: 1px solid rgba(255,255,255,.3); }

/* Section: Accessibility enhancers for high contrast text on glass */
:focus { outline: none; }
main, header, footer { position: relative; z-index: 1; }

/* Section: Minimal motion-safe animations (GPU-friendly) */
@media (prefers-reduced-motion: reduce) {
  .btn, .cta { transition: none; }
}
