/* Section: Tokens & Base Reset */
:root {
  --bg: #0b0b12;
  --bg-2: #0a0a14;
  --text: #e9e9ff;
  --muted: #b8b8c9;
  --accent: #ff2d92;
  --accent-2: #7c3cff;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-2: rgba(255, 255, 255, 0.14);
  --border: rgba(255, 255, 255, 0.28);
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --radius: 14px;
  --focus: 3px solid rgba(255, 255, 255, 0.95);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { color-scheme: dark; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
  line-height: 1.55;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(10,4,20,.95), rgba(6,0,20,.95) 60%, rgba(12,8,28,.95)),
    radial-gradient(circle at 15% 0%, rgba(255,0,122,.15), transparent 40%),
    radial-gradient(circle at 85% 15%, rgba(0,255,190,.08), transparent 40%);
  position: relative;
  isolation: isolate;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Section: Layered scanlines/noise (pure CSS) */
body::before, body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
body::before {
  /* subtle grid/scanlines overlay */
  background-image:
    linear-gradient(to bottom, rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(to right, rgba(0,0,0,.04) 1px, transparent 1px);
  background-size: 100% 2px, 2px 100%;
  mix-blend-mode: overlay;
  opacity: 0.9;
}
body::after {
  /* light speckle noise via radial pattern */
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 2px 2px;
  opacity: 0.25;
  mix-blend-mode: overlay;
}

/* Section: Structural layout helpers */
.container {
  width: 100%;
  max-width: clamp(320px, 92vw, 1200px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow);
}

/* Section: Core page regions (must-styles) */
html, body, header, nav, main, article, footer, aside {
  /* ensure predictable stacking for glass panels */
}
header, main, footer, aside {
  position: relative;
  z-index: 1;
}
header {
  margin: 1rem auto;
  padding: 1rem;
  width: min(1100px, 92%);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}
header h1 {
  font-size: clamp(1.6rem, 2.5vw + 1rem, 2.75rem);
  line-height: 1.15;
  margin: 0 0 .25rem;
  letter-spacing: .2px;
  color: #fff;
  text-shadow: 0 0 12px rgba(255,0,140,.6);
}
header nav {
  display: flex;
  gap: .75rem;
  align-items: center;
}
header nav a {
  color: #fff;
  text-decoration: none;
  padding: .25rem .6rem;
  border-radius: 6px;
}
header nav a:hover,
header nav a:focus-visible {
  text-decoration: underline;
  outline: none;
  color: var(--accent-2);
}
main {
  padding: 1rem 0;
}
.article {
  display: grid;
  place-items: center;
  padding: 1rem;
}
.image-frame {
  width: min(100%, 900px);
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  background: #111;
  box-shadow: 0 8px 28px rgba(0,0,0,.5), 0 0 28px rgba(255,0,140,.25);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: translateZ(0);
  /* subtle glow when in focus */
  transition: transform .3s ease;
}
.image-frame:focus-within img,
.image-frame:hover img {
  transform: scale(1.02);
}
footer {
  padding: 1rem 0;
  margin-top: 1rem;
}
.product-ad, .sponsored-page {
  display: inline-block;
  padding: .6rem 1rem;
  margin: .25rem;
  border-radius: 999px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  text-align: center;
  color: #fff;
  text-decoration: none;
  transition: transform .2s ease, background .2s ease;
}
.product-ad:hover, .sponsored-page:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,.12);
}
.product-ad p, .sponsored-page p {
  margin: 0;
  font-weight: 600;
}
p {
  margin: 0 0 0.5rem;
}
footer p {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0.5rem 0 0;
}

/* Section: Typography & utilities */
.content {
  padding: 0.75rem 1rem;
  color: var(--text);
  font-size: clamp(1rem, 0.9vw + 0.9rem, 1.125rem);
  line-height: 1.55;
}
a, button, .btn, .cta {
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
}
a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
a:hover, a:focus-visible {
  color: var(--accent-2);
  text-decoration: underline;
  outline: none;
}
:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
}
.ul, ul { list-style: none; padding: 0; margin: 0; }
li { margin: 0 0 .25rem 0; }

/* Section: Buttons (solid + outline variants) */
.btn {
  display: inline-block;
  padding: .75rem 1.25rem;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 6px 14px rgba(0,0,0,.25);
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:focus-visible { outline: 3px solid rgba(255,255,255,.9); outline-offset: 2px; }
.btn.outline {
  background: rgba(255,255,255,.08);
  color: var(--text);
  border: 1px solid rgba(255,255,255,.3);
  box-shadow: none;
}
.cta { composes: btn; }

/* Section: Glass panel fallback for non-backdrop environments */
@supports not (backdrop-filter: blur(8px)) {
  header, main, footer, aside {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255,255,255,0.25);
    box-shadow: var(--shadow);
  }
}

/* Section: Layout helpers for responsive typography */
@media (max-width: 720px) {
  header { padding: .75rem; }
  .image-frame { width: 100%; aspect-ratio: 16 / 9; }
  header h1 { font-size: 1.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Section: Print styles (basic readability) */
@media print {
  body, header, main, footer { background: #fff !important; color: #000; }
  header, main, footer { padding: 0.5rem; }
  .image-frame { border: none; box-shadow: none; }
}