/* Base */
:root {
  --bg: #0a001a;
  --bg-2: #120022;
  --text: #e9e1f5;
  --muted: #b59bd2;
  --accent: #ff3ea5;
  --accent-2: #4f6bff;
  --surface: rgba(17, 6, 22, 0.40);
  --surface-2: rgba(17, 6, 22, 0.28);
  --card-border: rgba(160, 120, 240, 0.40);
  --shadow: 0 8px 28px rgba(0,0,0,0.5);
  --radius: 14px;
}
:root {
  color-scheme: dark;
}
*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

/* Layered background: gradient + subtle scanlines/noise (pure CSS) */
html, body {
  background: 
    linear-gradient(135deg, rgba(255, 0, 170, 0.08), rgba(0, 0, 0, 0.08) 60%, rgba(70, 0, 120, 0.08)),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0 1px, rgba(0,0,0,0) 1px 2px),
    linear-gradient(135deg, #0a001a 0%, #120022 60%, #0a001a 100%);
  margin: 0;
  padding: 0;
  min-height: 100%;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layout */
.container {
  max-width: clamp(640px, 92vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}

header, main, footer, aside, nav {
  padding: 0;
}

header {
  display: grid;
  justify-items: center;
  text-align: center;
  padding: 2rem 1rem;
  background: rgba(8, 0, 20, 0.40);
  border-bottom: 1px solid rgba(180, 120, 240, 0.35);
  border-radius: 14px;
  margin: 1rem auto;
  max-width: min(1000px, 90%);
  box-shadow: var(--shadow);
}
header h1 {
  font-size: clamp(1.8rem, 2.6vw + 1rem, 3.6rem);
  line-height: 1.04;
  margin: 0 0 .25rem 0;
  letter-spacing: .2px;
}
header .meta {
  color: var(--muted);
  font-size: clamp(0.9rem, 0.8vw + 0.8rem, 1.05rem);
  margin: 0;
}

/* Article content */
main {
  padding: 1rem 0 2rem;
}
article {
  display: grid;
  gap: 1rem;
  align-content: start;
}
.featured-image { width: 100%; display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid rgba(255,255,255,0.22); box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04), 0 6px 20px rgba(0,0,0,0.4); }
.image-frame { aspect-ratio: 16/9; width: 100%; display: block; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,0.25); box-shadow: 0 6px 20px rgba(0,0,0,0.35); }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
h2 { font-size: clamp(1.25rem, 1.2vw + 1rem, 1.75rem); margin: .25rem 0; color: #f6e0ff; }
p { margin: .5rem 0 1rem; color: #e8e0f7; font-size: clamp(1rem, 0.9vw + 0.9rem, 1.125rem); line-height: 1.55; }

/* Lists & quotes */
ul { margin: .5rem 0 1rem 1.25rem; padding: 0; }
li { margin: .25rem 0; }

/* Blockquote styling for rhythm in the narrative */
blockquote {
  margin: .75rem 0;
  padding: .75rem 1rem;
  border-left: 3px solid var(--accent-2);
  background: rgba(255,255,255,0.05);
  border-radius: 8px;
  font-style: italic;
}

/* Product ad / footer panels as glass cards */
.product-ad, .sponsored-page, .content, .card {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: .75rem;
  box-shadow: var(--shadow);
}
.product-ad a, .sponsored-page a {
  display: block;
  text-decoration: none;
  color: #fff;
}
.product-ad:hover, .sponsored-page:hover {
  transform: translateY(-1px);
}
footer {
  padding: 1rem 0 2rem;
  display: grid;
  gap: 1rem;
  justify-items: center;
  text-align: center;
  background: rgba(12,0,40,0.25);
  border-top: 1px solid rgba(180,120,240,0.35);
}
footer p { margin: .25rem 0; color: var(--muted); }

/* Utility components */
.container, .grid, .card, .tag { /* placeholders for utility usage by page structure */ }

/* Links & interactive controls */
a, button, .btn, .cta {
  color: #fff;
  text-decoration: none;
  background: transparent;
  border: 0;
  border-radius: 999px;
  padding: 0.55rem 1rem;
  display: inline-block;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}
a, .cta {
  /* solid CTA variant (default) */
  background: linear-gradient(135deg, rgba(255, 60, 160, 0.95), rgba(120, 60, 200, 0.95));
  color: #fff;
}
.btn {
  background: linear-gradient(135deg, rgba(0,0,0,0.0), rgba(255,255,255,0.08));
  color: #e9e1ff;
  border: 1px solid rgba(255,255,255,0.25);
}
.btn.primary {
  background: linear-gradient(135deg, var(--accent), #ff1a8a);
  box-shadow: 0 6px 14px rgba(255, 60, 160, 0.5);
}
.btn.outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.5);
  color: var(--text);
}
a:hover, .btn:hover { filter: brightness(1.05); transform: translateY(-1px); }

/* Glass panels (fallback if backdrop-filter unavailable) */
@supports not (backdrop-filter: blur(8px)) {
  .surface, .card, .product-ad { background: rgba(17,6,22,0.75); }
  .card { border-color: rgba(160,120,240,0.6); }
}

/* Typography: responsive fluid sizes for body text */
html { font-size: 16px; }
@media (min-width: 720px) {
  html { font-size: 17px; }
}
@media (min-width: 1024px) {
  html { font-size: 18px; }
}

/* Accessible color contrast helpers (ensure on glass) */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f2fb;
    --bg-2: #ffffff;
    --text: #1b1b1f;
    --muted: #55536a;
    --surface: rgba(255,255,255,0.86);
    --surface-2: rgba(255,255,255,0.92);
    --card-border: rgba(60, 40, 70, 0.25);
  }
  html, body { color-scheme: light; }
  body {
    background: linear-gradient(135deg, #fdf3fb 0%, #f3f0fb 60%, #fdf3fb 100%), repeating-linear-gradient(to bottom, rgba(0,0,0,0.02) 0 1px, transparent 1px 2px);
  }
  header { background: rgba(255,255,255,0.8); border-bottom: 1px solid rgba(0,0,0,0.08); }
  .image-frame { border-color: rgba(0,0,0,0.2); }
  a, button, .btn, .cta { color: #1b1b1f; }
  a:hover { text-decoration: underline; }
}

/* Print styles (basic readability) */
@media print {
  body { background: white; color: black; }
  header, main, footer { box-shadow: none; background: none; }
  a { text-decoration: underline; color: inherit; }
}
