/* Section: Palette & Background */
/* Tokens derived from midnight blue + gold for cyberpunk vibe */
:root {
  --bg: #0a1020;
  --bg-2: #0b1a2b;
  --text: #eef2f7;
  --muted: #a5aab5;
  --accent: #d4af37;
  --accent-2: #ffd76a;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.14);
  --focus: 0 0 0 3px rgba(212, 175, 55, 0.75);
  --radius: 14px;
  --shadow: 0 8px 28px rgba(0,0,0,.45);
}

/* Layered background: gradient + subtle noise/scanlines (pure CSS) */
html, body {
  height: 100%;
}
body {
  margin: 0;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
  line-height: 1.6;
  background:
    linear-gradient(135deg, rgba(4,8,20,.95) 0%, rgba(7,12,26,.95) 60%, rgba(1,4,12,.95) 100%),
    radial-gradient(circle at 10% -10%, rgba(212,175,55,.08) 0, transparent 40%),
    radial-gradient(circle at 90% 0%, rgba(212,175,55,.05) 0, transparent 40%);
  background-blend-mode: normal, overlay, overlay;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

/* Subtle scanlines/noise overlay for depth */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 100% 2px, 2px 100%;
  mix-blend-mode: overlay;
  opacity: 0.25;
  z-index: -1;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 60px 40px, rgba(255, 214, 0, .08) 0 20px, transparent 20px);
  opacity: 0.25;
  mix-blend-mode: overlay;
  z-index: -1;
}

/* Section: Layout basics */
* { box-sizing: border-box; }
header, main, footer, aside { display: block; }

/* Section: Typography (fluid sizing) */
h1, h2, h3 { margin: 0 0 .5rem; color: var(--text); }
p { margin: 0 0 1rem; color: var(--text); }
a { color: var(--text); text-decoration: none; }

/* Section: Core layout helpers */
.container {
  max-width: clamp(320px, 90vw, 1100px);
  margin-inline: auto;
  padding: 1rem;
}
.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card { /* glass card with optional backdrop-filter */
  background: var(--panel);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  color: var(--text);
}
.tag {
  display: inline-block;
  padding: .25rem .6rem;
  border-radius: 999px;
  font-size: .75rem;
  background: rgba(255,255,255,.15);
  color: var(--text);
  line-height: 1;
}

/* Section: Image frame (frame around image) */
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.35);
  box-shadow: 0 8px 22px rgba(0,0,0,.42);
  background: #000;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  image-rendering: auto;
  filter: saturate(1.05);
}

/* Section: Glass panels (fallback included) */
.glass {
  background: var(--panel);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
@supports (backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px)) {
  .glass {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}
@supports not (backdrop-filter: blur(8px)) {
  .glass {
    background: rgba(255,255,255,.14);
  }
}

/* Section: Navigation & header styles */
header {
  text-align: center;
  padding: 1.25rem 1rem 0.75rem;
}
header h1 {
  font-size: clamp(1.75rem, 2.8vw + 1rem, 3.25rem);
  line-height: 1.15;
  margin-bottom: .5rem;
}
nav {
  display: flex;
  justify-content: center;
}
nav a {
  padding: .4rem .75rem;
  border-radius: 6px;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08);
  transition: transform .2s ease, background .2s ease;
}
nav a:hover { background: rgba(255,255,255,.15); text-decoration: underline; }
nav a:focus-visible { outline: none; box-shadow: var(--focus); }

/* Section: Main content styling */
main { padding: 0 1rem 1rem; }
article { display: block; }

/* Section: Product ad & sponsor blocks in footer */
.product-ad, .sponsored-page {
  margin: .75rem 0;
  border-radius: 12px;
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.28);
  padding: .5rem;
  text-align: center;
}
.product-ad a, .sponsored-page a {
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .4rem .9rem;
}
.product-ad a:hover, .sponsored-page a:hover { text-decoration: underline; }

/* Section: Buttons & interactive controls */
.btn, .cta, a.btn, a.cta, button {
  display: inline-block;
  padding: .6rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.5);
  background: rgba(255,255,255,.08);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.btn:hover, .cta:hover, a.btn:hover, a.cta:hover { transform: translateY(-1px); background: rgba(255,255,255,.16); }
.btn:focus-visible, a.btn:focus-visible, .cta:focus-visible, a.cta:focus-visible, button:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}
.btn--solid {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: 1px solid rgba(0,0,0,.25);
  color: #1a1300;
}
.btn--outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,.7);
}
.btn + .btn { margin-left: .5rem; }

/* Section: List styling (ul, li) */
ul { margin: 0 0 1rem 1.25rem; padding: 0; }
li { margin: .25rem 0; }

/* Section: Aside (reserved, kept minimal for accessibility) */
aside { display: none; }

/* Section: Accessibility & motion preference */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Section: Print (basic readability) */
@media print {
  body { color: #000; background: #fff; }
  .glass { background: #fff !important; color: #000; -webkit-filter: none; filter: none; }
  a { text-decoration: underline; }
}
