:root {
  /* Palette tokens: midnight blue / void purple with chrome glow accents */
  --bg: #0b1020;
  --bg-2: #0a1120;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-2: rgba(255, 255, 255, 0.12);
  --text: #e8f0ff;
  --muted: #b7c6e8;
  --accent: #7f5cff;      /* void purple */
  --accent-2: #2be1ff;     /* cyan glow for highlights */
  --card: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.25);
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  --radius: 14px;
  --radius-sm: 10px;
  --gap: 1.25rem;
  --focus: 2px solid color-mix(in oklab, var(--accent) 60%, white);
  --outline: 2px solid rgba(127, 92, 255, 0.9);
}

/* 1) Base & Layout (Mobile-first) */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; }
body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(135deg, rgba(7,10,28,0.95) 0%, rgba(12,6,28,0.95) 60%, rgba(6,0,20,0.95) 100%),
              radial-gradient(circle at 20% -10%, rgba(127, 63, 255, 0.25), transparent 40%);
  min-height: 100dvh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  isolation: isolate;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  /* subtle scanlines + glow */
  background-image:
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0 1px, transparent 1px 2px),
    radial-gradient(circle at 25% 0%, rgba(125, 70, 255, 0.15), transparent 30%);
  mix-blend-mode: overlay;
  opacity: 0.95;
  animation: drift 120s linear infinite;
}
@keyframes drift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-2px, 2px); }
}

/* 2) Containers & utility helpers */
.container {
  width: 100%;
  max-width: clamp(680px, 86vw, 1200px);
  padding-inline: 1rem;
  margin-inline: auto;
}
.grid {
  display: grid;
  gap: var(--gap);
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.tag {
  display: inline-block;
  padding: .25rem .6rem;
  border-radius: 999px;
  font-size: .75rem;
  color: #e9e6ff;
  background: rgba(127, 92, 255, 0.18);
  border: 1px solid rgba(127, 92, 255, 0.38);
}

/* 3) Header / Hero typography */
header { padding: 1.75rem 0 1rem; text-align: center; }
header h1 {
  font-size: clamp(1.75rem, 2.4vw + 1rem, 3.25rem);
  line-height: 1.08;
  margin: 0.25rem 0 0.25rem;
  letter-spacing: .2px;
  font-weight: 700;
}
header + main { padding: 0 0 1.25rem; }

/* 4) Main / content sections */
main { display: block; padding: 0 0 1.5rem; }
article { display: grid; place-items: center; padding: .5rem 0; }

/* 5) Glass panels / frosted look */
.content {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius);
  padding: 1.25rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.25), inset 0 1px 2px rgba(255,255,255,0.08);
}
@supports not (backdrop-filter: blur(8px)) {
  .content {
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.4);
  }
}

/* 6) Image frame with aspect ratio and glow */
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.28);
  box-shadow: 0 8px 22px rgba(0,0,0,0.45);
  background: #000;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
  transform: translateZ(0);
}
.image-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.25);
  mix-blend-mode: soft-light;
  border-radius: var(--radius);
}

/* 7) Links, buttons, and interactive elements */
a, button, .btn, .cta {
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  display: inline-block;
  border-radius: 999px;
  border: 1px solid transparent;
}
a { color: var(--accent-2); }

a:hover, a:focus { text-decoration: underline; outline: none; }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
  border-radius: 999px;
}

/* Primary CTA button */
.btn.primary {
  background: linear-gradient(135deg, var(--accent), #2b1a6a);
  color: #fff;
  padding: .75rem 1.25rem;
  border: 1px solid rgba(255,255,255,0.35);
  box-shadow: 0 6px 14px rgba(127, 92, 255, 0.6);
}
.btn.primary:hover { transform: translateY(-1px); }
.btn.primary:active { transform: translateY(0); }

/* Outline variant */
.btn.outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.6);
  color: var(--text);
}
.btn.outline:hover { background: rgba(255,255,255,0.08); }

/* Secondary CTA (link-style) */
.cta {
  padding: .5rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.0);
}
.cta:hover { background: rgba(255,255,255,0.08); }

/* 8) Section-specific styling (footer product ads) */
footer { padding: 1rem 0 2rem; text-align: center; }
.product-ad, .sponsored-page {
  display: inline-block;
  margin: 0 .25rem;
  padding: .4rem .75rem;
}
.product-ad a, .sponsored-page a { color: var(--text); text-decoration: none; }

/* 9) Misc elements & utilities */
ul, li { margin: 0; padding: 0; list-style: none; }
ul { display: inline-flex; gap: .75rem; align-items: center; padding: .5rem 0; }

/* 10) Print-friendly basics */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; }
}

/* 11) Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  body::before { display: none; }
}