/* Theme tokens - aubergine / void purple inspired */
:root {
  --bg: #120318;
  --bg-2: #240033;
  --bg-3: #2a003b;
  --text: #f6f5ff;
  --muted: #c6b7e9;
  --accent: #7a5bd8;       /* primary void purple */
  --accent-2: #a56cff;     /* secondary glow */
  --glass: rgba(255, 255, 255, 0.08);
  --glass-strong: rgba(255, 255, 255, 0.14);
  --border: rgba(255, 255, 255, 0.28);
  --shadow: 0 8px 26px rgba(0,0,0,.35);
  --radius: 14px;
  --radius-sm: 10px;
  --outline: 2px solid rgba(255,255,255,.75);
}

html, body, header, nav, main, article, aside, footer {
  height: auto;
  min-height: 0;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  color: var(--text);
  background-color: var(--bg);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* Layered background: gradient + scanline/noise */
  background-image:
    linear-gradient(135deg, rgba(68,0,102,.95), rgba(28,0,40,.95) 60%, rgba(12,0,28,.95)),
    linear-gradient(to bottom, rgba(0,0,0,.25), rgba(0,0,0,.25)),
    repeating-linear-gradient(0deg, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  background-blend-mode: normal, overlay, overlay;
  background-size: cover;
}

body:after {
  /* subtle vignette for depth without heavy assets */
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 50% 0%, rgba(0,0,0,.0) 20%, rgba(0,0,0,.25) 100%);
  mix-blend-mode: multiply;
}

/* Layout primitives */
.container {
  width: min(100%, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

.card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

@supports not (backdrop-filter: blur(8px)) {
  .card {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.4);
  }
}

header {
  padding: 1.25rem 1rem;
  text-align: center;
  background: rgba(15,0,25,.45);
  border-bottom: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

header h1 {
  margin: 0.25rem 0 0.25rem;
  font-size: clamp(1.4rem, 2.6vw + 0.6rem, 2.6rem);
  line-height: 1.15;
  letter-spacing: .2px;
  color: #fff;
}

nav {
  margin-top: 0.25rem;
}

nav a {
  color: #fff;
  text-decoration: none;
  padding: .25rem .6rem;
  border-radius: 6px;
  display: inline-block;
  transition: transform .2s ease, background .2s ease;
}
nav a:hover { text-decoration: underline; background: rgba(255,255,255,.08); transform: translateY(-1px); }

/* Main content */
main {
  padding: 2rem 1rem 3rem;
  display: grid;
  place-items: center;
}

.image-frame {
  width: 100%;
  max-width: 720px;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.05);
  box-shadow: 0 10px 28px rgba(0,0,0,.4);
  transition: transform .3s ease;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  will-change: transform;
}
.image-frame:hover { transform: scale(1.01); }
@media (prefers-reduced-motion: reduce) {
  .image-frame { transition: none; }
}

.content { padding: .75rem 0; color: var(--muted); }

/* Footer / sections as glass panels */
footer {
  padding: 1.5rem 1rem 2rem;
  display: grid;
  gap: 1rem;
  justify-items: center;
  text-align: center;
  background: rgba(8,0,20,.25);
  border-top: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.product-ad, .sponsored-page {
  width: min(100%, 900px);
  padding: .75rem;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.08);
  box-shadow: var(--shadow);
  text-align: center;
}
.product-ad a, .sponsored-page a {
  color: #fff;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}
.product-ad p, .sponsored-page p {
  margin: 0;
  font-weight: 600;
}
.product-ad:hover, .sponsored-page:hover {
  background: rgba(255,255,255,.12);
  transform: translateY(-1px);
}
@media (prefers-reduced-motion: reduce) {
  .product-ad, .sponsored-page { transition: none; transform: none; }
}

/* Typography & helpers */
h1, h2, h3, h4 {
  letter-spacing: .2px;
}
p { margin: 0.25rem 0; }

/* Link and button treatments (WCAG AA targets) */
a, button, .btn, .cta {
  cursor: pointer;
  outline: none;
}
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: var(--outline);
  outline-offset: 2px;
}
a:hover { text-decoration: underline; }

/* Button variants */
.btn, .cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .55rem .95rem;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid transparent;
}
.btn.primary, .cta.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  text-decoration: none;
}
.btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.32);
}
.btn:focus-visible, .cta:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}
.btn:hover, .cta:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}
.btn:active, .cta:active {
  transform: translateY(0);
  filter: brightness(.98);
}
:where(a, button, .btn, .cta) { font-family: inherit; }

/* Lists & tags (utility) */
ul { padding: 0; margin: 0; list-style: none; }
li { margin: .25rem 0; }
.tag {
  display: inline-block;
  padding: .25rem .6rem;
  border-radius: 999px;
  font-size: .75rem;
  background: rgba(255,255,255,.08);
  color: var(--muted);
  border: 1px solid rgba(255,255,255,.25);
}

/* Content helpers for accessibility in long form */
@media (min-width: 720px) {
  main { padding-inline: 2rem; }
  .container { padding-inline: 0; }
}
@media print {
  html,body { background: #fff; color: #000; }
  header, nav, footer { display: none; }
  main { display: block; padding: 1in; }
  .image-frame { border: none; box-shadow: none; }
}
