/* Base */
:root {
  --bg: #0a1020;
  --bg-2: #0b1a2b;
  --text: #e8f0ff;
  --muted: #a9b6d1;
  --accent: #e0004d;
  --accent-2: #1e3a8a;
  --surface: rgba(8, 16, 32, 0.22);
  --surface-2: rgba(255, 255, 255, 0.04);
  --radius: 12px;
}
*,
*::before,
*::after { box-sizing: border-box; }
html, body {
  height: 100%;
}
html, body, header, nav, main, article, footer, aside {
  margin: 0;
  padding: 0;
}
html, body {
  color: var(--text);
  background: linear-gradient(135deg, rgba(0, 50, 100, 0.6), rgba(6, 8, 20, 0.8)),
              linear-gradient(#000, #04070d);
  background-attachment: fixed;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}
html { color-scheme: dark; }

/* Layered background: subtle noise/scanlines */
html::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to bottom, rgba(0,0,0,.08), rgba(0,0,0,.08) 1px, transparent 1px, transparent 2px),
    linear-gradient(to right, rgba(0,0,0,.04), rgba(0,0,0,.04) 1px, transparent 1px, transparent 2px),
    radial-gradient(circle at 10% 15%, rgba(0,120,255,.08), transparent 40%);
  background-size: 100% 2px, 2px 100%, 100px 100px;
  mix-blend-mode: overlay;
  opacity: 0.6;
  z-index: 0;
}
body { position: relative; z-index: 0; }

/* Layout containers */
.container {
  width: 100%;
  max-width: clamp(320px, 92vw, 1100px);
  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 rgba(255,255,255,.25);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 6px 20px rgba(0,0,0,.4);
  backdrop-filter: saturate(1.2) blur(12px);
  -webkit-backdrop-filter: saturate(1.2) blur(12px);
}
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: inset 0 0 12px rgba(0,0,0,.25);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.04);
  transition: transform .4s ease;
}
.image-frame:hover img { transform: scale(1.02); }

/* Typography & helpers */
h1, h2, h3 { color: var(--text); margin: .75rem 0 .25rem; line-height: 1.15; }
h1 { font-size: clamp(1.6rem, 2.5vw + 1rem, 2.6rem); font-weight: 700; letter-spacing: .2px; }
h2 { font-size: clamp(1.15rem, 0.9vw + 1rem, 1.5rem); font-weight: 700; }
h3 { font-size: clamp(1rem, 0.8vw + 0.9rem, 1.125rem); font-weight: 700; color: var(--text); }
p { color: #e8f0ff; margin: 0.5rem 0 1rem; }
ul, ol { margin: 0.5rem 0 1rem 1.25rem; padding: 0; color: var(--muted); }
li { margin: .25rem 0; color: #dbe8ff; }

/* Links & buttons (accessible focus) */
a, button, .btn, .cta {
  color: #fff;
  text-decoration: none;
  font: inherit;
  cursor: pointer;
}
a { color: var(--accent); }
a:hover, a:focus-visible { text-decoration: underline; color: var(--accent-2); }

/* Buttons variants */
.btn {
  display: inline-block;
  padding: 0.75rem 1.15rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.4);
  background: linear-gradient(135deg, rgba(20,40,90,.95), rgba(10,20,60,.95));
  color: #fff;
  transition: transform .15s ease, background .2s ease;
  text-align: center;
}
.btn.secondary {
  background: transparent;
  border: 1px solid rgba(255,255,255,.55);
  color: var(--text);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* Focus ring accessibility (focus-visible) */
:focus-visible {
  outline: 3px solid color-m-mix(#ff2e57, #ffffff, 50%);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Glass panels (with fallback) */
.glass {
  background: rgba(8, 16, 32, 0.22);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 12px;
  padding: 1rem;
  backdrop-filter: saturate(1.2) blur(12px);
  -webkit-backdrop-filter: saturate(1.2) blur(12px);
  box-shadow: 0 8px 28px rgba(0,0,0,.35);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass { background: rgba(8, 16, 32, 0.72); }
}

/* Header / hero */
header {
  text-align: center;
  padding: 2rem 1rem 1.25rem;
  position: relative;
  z-index: 1;
}
header h1 {
  font-weight: 700;
  font-size: clamp(1.8rem, 4vw + 1rem, 3rem);
}
header .meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: .25rem;
}
nav {
  margin-top: .75rem;
}
nav a {
  display: inline-block;
  padding: .45rem .8rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.25);
  color: var(--text);
}
nav a:hover, nav a:focus-visible { text-decoration: underline; background: rgba(255,255,255,.04); }

/* Main content layout */
main { padding: 1rem 0 2rem; }
article { display: grid; gap: 1rem; justify-items: center; }

/* Content utility helpers */
.content { padding: 1rem; }

/* Product ad / footer sections */
footer {
  padding: 1rem;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
  justify-items: center;
  text-align: center;
}
.product-ad, .sponsored-page {
  width: 100%;
}
.product-ad a, .sponsored-page a {
  display: inline-block;
  padding: .6rem 1rem;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(0,0,0,.25), rgba(0,0,0,.35));
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
}
@media (min-width: 700px) {
  footer {
    grid-template-columns: repeat(3, 1fr);
  }
  .product-ad, .sponsored-page { text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Aside (optional, present for completeness) */
aside { display: none; }

/* Print readability (basic) */
@media print {
  body { background: #fff; color: #000; }
  a, .btn { color: #000; text-decoration: underline; }
}
