/* Base palette and tokens */
:root {
  --bg: #0a0a14;
  --bg-2: #141326;
  --text: #e9e4f7;
  --muted: #b6b0c9;
  --accent: #d500e6;    /* magenta */
  --accent-2: #4b6aff;  /* indigo */
  --glass: rgba(255,255,255,.10);
  --glass-2: rgba(255,255,255,.22);
  --border: rgba(255,255,255,.28);
  --shadow: 0 8px 28px rgba(0,0,0,.45);
  --radius: 12px;
  --focus: 2px solid rgba(213,0,230,.95);
}

/* Reset & layout foundation */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { color-scheme: dark; }
body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial;
  line-height: 1.5;
  font-size: 16px;
  background: linear-gradient(135deg, rgba(213,0,230,.25), rgba(60,0,90,.60) 40%, rgba(0,0,0,.92)),
              radial-gradient( circle at 20% -10%, rgba(80,0,180,.12), transparent 40% );
  /* Layered subtle scanlines/noise via CSS only (no images) */
  background-image:
    linear-gradient(135deg, rgba(213,0,230,.25), rgba(60,0,90,.60) 40%, rgba(0,0,0,.92)),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px),
    repeating-linear-gradient(to right, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  background-blend-mode: normal, overlay, overlay;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
}

body::before {
  /* Subtle grain overlay for depth (no heavy assets) */
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle at 20% 20%, rgba(255,255,255,.04) 0 2px, transparent 2px 100%);
  background-size: 4px 4px;
  mix-blend-mode: overlay;
  opacity: .25;
}

/* Global typography */
h1, h2 { margin: 0 0 .5rem; font-weight: 700; letter-spacing: .2px; color: var(--text); }
p { margin: 0 0 1rem; color: var(--text); }
ul { margin: 0 0 1rem 1.15rem; padding: 0; }
li { margin: .25rem 0; }

/* Layout helpers */
.container { width: 100%; max-width: clamp(720px, 78vw, 1100px); padding: 0 1rem; margin: 0 auto; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* Glass panels (with fallback) */
.glass, .card, .product-ad, header, main, footer, article {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.fallback-glass {
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.36);
}
.no-backdrop { backdrop-filter: none; -webkit-backdrop-filter: none; }

/* Structural elements */
header { text-align: center; padding: 2rem 1rem; position: relative; overflow: hidden; }
main { padding: 1rem; }
footer { padding: 1rem; display: grid; gap: .75rem; }

/* Hero heading */
header h1 {
  font-size: clamp(2rem, 1.2rem + 4vw, 3.6rem);
  line-height: 1.04;
  margin-bottom: .25rem;
  text-shadow: 0 0 16px rgba(213,0,230,.6);
}
header .meta {
  font-size: clamp(0.9rem, .4vw + .6rem, 1.05rem);
  color: var(--muted);
}

/* Content area styling */
.main-content { padding: 0; margin: 0 auto; max-width: 720px; }
.content { padding: 0 0 0; margin: 0 auto; max-width: 700px; color: var(--text); }

/* Image frame rules (and legacy class) */
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04), 0 8px 28px rgba(0,0,0,.4);
  background: #000;
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  image-rendering: -webkit-optimize-contrast;
}
.featured-image { margin: 1rem 0 1.25rem; }

/* Article styling inside main */
article { padding: .75rem; }

/* Link and button styling (interactive variants) */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: .6em 1em;
  display: inline-block;
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
a { color: var(--accent-2); }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}
.btn { background: var(--accent); color: white; border-color: rgba(213,0,230,.65); }
.btn:hover { background: #e100e6; }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn.secondary, .cta { background: transparent; border-color: rgba(255,255,255,.45); color: var(--text); }
.btn.secondary:hover, .cta:hover { background: rgba(255,255,255,.08); text-decoration: underline; }

/* Utility-ish classes */
.tag {
  display: inline-block;
  padding: .15em .55em;
  border-radius: 999px;
  font-size: .75rem;
  color: #fff;
  background: linear-gradient(135deg, rgba(214,0,230,.9), rgba(75,106,255,.9));
  border: 1px solid rgba(255,255,255,.4);
}
 ul { padding-left: 1.25rem; }

/* Typography tuning for readability on glass panels */
p { font-size: clamp(1rem, 0.9rem + 0.4vw, 1.15rem); }

/* Hero pattern emphasis (subtle) */
header::after {
  content: "";
  position: absolute;
  left: -20px; right: -20px; bottom: 0;
  height: 48px;
  background: linear-gradient(to top, rgba(0,0,0,.0), rgba(0,0,0,.18));
  pointer-events: none;
  border-radius: 0 0 12px 12px;
  mix-blend-mode: multiply;
}

/* Specific sections for the page layout */
.product-ad { padding: .9rem 1rem; display: flex; align-items: center; justify-content: center; text-align: center; }
.product-ad a { font-weight: 600; }
.sponsored-page { padding-top: .25rem; padding-bottom: .25rem; }

footer p { text-align: center; color: var(--muted); font-size: .9rem; margin: .5rem 0 0; }

/* Accessibility: prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  html:focus-within { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}

/* Responsive adjustments */
@media (min-width: 700px) {
  .container { padding: 0 1.25rem; }
  .glass, .card { border-radius: 14px; }
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f0fb;
    --bg-2: #e9e3f5;
    --text: #14131a;
    --muted: #575666;
    --accent: #7a2bd9;
    --accent-2: #0d5cff;
    --glass: rgba(255,255,255,.75);
    --glass-2: rgba(255,255,255,.88);
    --border: rgba(0,0,0,.15);
    --shadow: 0 6px 20px rgba(0,0,0,.12);
  }
  body {
    background-image:
      linear-gradient(135deg, rgba(122,42,217,.15), rgba(12,60,160,.25)),
      repeating-linear-gradient(to bottom, rgba(0,0,0,.04) 0 1px, transparent 1px 2px),
      repeating-linear-gradient(to right, rgba(0,0,0,.04) 0 1px, transparent 1px 2px);
  }
  header { background: rgba(255,255,255,.6); backdrop-filter: blur(8px); }
  .glass { background: rgba(255,255,255,.84); }
  a, .btn { color: var(--accent-2); }
}

/* Print styles (basic readability) */
@media print {
  body { background: white; color: black; }
  a { color: black; text-decoration: underline; }
  .glass, .card { background: transparent; border: none; box-shadow: none; }
}
