/* Base tokens: violet + maroon cyber palette */
:root {
  --bg: #0b0920;
  --bg-2: #170c1d;
  --surface: rgba(20, 0, 40, 0.72);
  --text: #f7f3ff;
  --muted: #c9b9d8;
  --accent: #8a00d6;      /* violet */
  --accent-2: #7a1420;    /* maroon shade */
  --panel: rgba(17, 0, 26, 0.65);
  --panel-2: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.28);
  --focus: 3px solid color-mix(in oklab, var(--accent) 60%, transparent);
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  --radius: 14px;
  --focus-ring: 0 0 0 3px rgba(138, 0, 214, 0.55);
}

/* Section: Light mode tweaks (partial) */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #1b0d1d;
    --bg-2: #2a1840;
    --surface: rgba(40, 25, 60, 0.75);
    --text: #1b0e1e;
    --muted: #5b4b63;
    --panel: rgba(255, 255, 255, 0.75);
    --panel-2: rgba(0, 0, 0, 0.08);
    --border: rgba(0, 0, 0, 0.15);
    --shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  }
}

/* Section: Global resets & base layout (mobile-first) */
*,
*::before,
*::after { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial; }
body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(135deg, rgba(120, 0, 160, 0.75), rgba(40, 0, 20, 0.75) 60%), var(--bg);
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  position: relative;
  isolation: isolate;
}

/* Layered background: gradient + subtle noise/scanlines (pure CSS) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 20% -10%, rgba(180, 0, 160, 0.25) 0 20%, transparent 40%),
    radial-gradient(circle at 80% 0%, rgba(120, 0, 120, 0.25) 0 25%, transparent 40%),
    linear-gradient(135deg, rgba(60, 0, 40, 0.25), rgba(0, 0, 0, 0.25) 60%);
  /* Subtle scanlines/noise */
  background-image:
    radial-gradient(circle at 20% -10%, rgba(180,0,160,.25) 0 20%, transparent 40%),
    radial-gradient(circle at 80% 0%, rgba(120,0,160,.25) 0 25%, transparent 40%),
    linear-gradient(135deg, rgba(60,0,40,.25), rgba(0,0,0,.25) 60%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0px, rgba(255,255,255,.04) 1px, transparent 1px, transparent 2px);
  background-blend-mode: overlay;
  opacity: .9;
}

/* Layout containers */
header, main, footer, aside { display: block; }
.container {
  width: 100%;
  max-width: clamp(340px, 92vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  color: var(--text);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
@supports not (backdrop-filter: blur(8px)) {
  .card { background: rgba(20,0,40,0.92); }
}
.header { padding: 1.25rem 0; text-align: center; }
header h1 {
  font-size: clamp(1.3rem, 2.4vw + 1rem, 2.4rem);
  margin: 0;
  letter-spacing: .02em;
  line-height: 1.15;
  color: var(--text);
  text-shadow: 0 1px 0 rgba(0,0,0,.4);
}
main { padding: 1rem 0; }
footer { padding: 1rem 0; text-align: center; color: var(--muted); }

/* Image frame styling */
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 8px 22px rgba(0,0,0,.45);
  background: #000;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: auto;
  transition: transform .3s ease;
}
.image-frame:hover img {
  transform: scale(1.02);
}

/* Content typography */
.content {
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial;
  font-size: clamp(14px, 2vw + 0.5rem, 18px);
  line-height: 1.5;
  margin: 0;
}
a, button, .btn, .cta {
  text-decoration: none;
  color: #fff;
  cursor: pointer;
}
a { color: var(--accent); }
a:hover, a:focus { text-decoration: underline; outline: none; }

/* Buttons & CTAs (solid + outline) */
.btn, .cta, button {
  display: inline-block;
  padding: .75rem 1.2rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.28);
  background: linear-gradient(135deg, rgba(138,0,214,0.95), rgba(122,0,60,0.95));
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  text-align: center;
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn:hover, .cta:hover, button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0,0,0,.35);
}
.btn:focus-visible, .cta:focus-visible, button:focus-visible {
  outline: var(--focus);
  outline-offset: 3px;
}
.btn.secondary {
  background: transparent;
  color: var(--accent);
  border: 1px solid rgba(138,0,214,.5);
}
.btn.secondary:hover {
  background: rgba(138,0,214,.08);
}

/* Glass panel usage in footer sections (product ads) */
.product-ad, .sponsored-page {
  display: inline-block;
  padding: .55rem .9rem;
  border-radius: 999px;
  margin: .25rem;
  background: rgba(10, 0, 20, 0.6);
  border: 1px solid rgba(255,255,255,.25);
}
.product-ad a, .sponsored-page a { color: #fff; }
.product-ad:hover, .sponsored-page:hover { transform: translateY(-1px); }

/* Lists (utilities: ul, li) */
ul { padding-left: 1.25rem; margin: .5rem 0; }
li { margin: .25rem 0; }

/* Utility tokens */
.container { padding-block: 1rem; }
.grid { gap: 1rem; }

/* Typography helpers (section headers) */
h2 { font-size: clamp(1.1rem, 1.4vw + 1rem, 1.6rem); margin: .5rem 0 0.25rem; }

/* Focus visibility for links in content */
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .image-frame img { transform: none !important; }
}

/* Print: basic readability */
@media print {
  body { background: none; color: #000; }
  .card, .image-frame { background: #fff; color: #000; border: none; box-shadow: none; }
}
