/* Section: Base tokens */
:root {
  --bg: #031224;
  --bg-2: #0a1a33;
  --surface: rgba(8, 12, 40, 0.22);
  --surface-2: rgba(8, 12, 40, 0.55);
  --text: #e8f0ff;
  --muted: #a6b6d9;
  --accent: #5bdcff;
  --accent-2: #8a5cff;
  --border: rgba(120, 170, 255, 0.40);
  --focus: #7bdcff;
  --shadow: 0 8px 28px rgba(0,0,0,0.50);
}

/* Section: Dark mode + color-scheme fallbacks */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7faff;
    --bg-2: #e8f0ff;
    --surface: rgba(255, 255, 255, 0.92);
    --surface-2: rgba(255, 255, 255, 0.97);
    --text: #0b1a30;
    --muted: #42517a;
    --accent: #0b4cff;
    --accent-2: #d400ff;
    --border: rgba(30, 60, 160, 0.40);
    --focus: #0b4cff;
    --shadow: 0 4px 14px rgba(0,0,0,0.08);
  }
}
* { box-sizing: border-box; }
html, body { height: 100%; }
html { line-height: 1.0; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color: var(--text);
  min-height: 100%;
  background-color: var(--bg);
  /* Layered background: gradient + subtle scanlines/noise */
  background-image:
    linear-gradient(135deg, rgba(8,12,40,.95) 0%, rgba(6,10,26,.95) 60%, rgba(4,8,20,.95) 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px),
    repeating-linear-gradient(to right, rgba(255,255,255,.04) 0 1px, transparent 1px 2px),
    radial-gradient(circle at 20% 0%, rgba(60,120,255,.15), transparent 40%);
  background-blend-mode: overlay, overlay, overlay, normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color-scheme: dark;
}
a { color: var(--accent); text-decoration: none; cursor: pointer; }
a:hover { text-decoration: underline; color: var(--accent-2); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

/* Section: Layout primitives */
.container { width: min(100%, 1200px); margin-inline: auto; padding: 0 1rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }

/* Section: Page structural elements */
html, body, header, nav, main, article, aside, footer { }
html, body { height: 100%; }
header, nav, main, article, aside, footer { padding: 1rem; }

/* Section: Glass panels (fallback if backdrop-filter unsupported) */
.glass {
  background: rgba(8,12,40,.22);
  border: 1px solid rgba(120,170,255,.35);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 6px 20px rgba(0,0,0,.40);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
  .glass { background: rgba(8,12,40,.55); backdrop-filter: none; }
}

/* Section: Image frame styling */
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(120,170,255,.50);
  box-shadow: 0 6px 18px rgba(0,0,0,.60);
  background: rgba(10,14,34,.60);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Section: Content area and product ad */
.content { padding: 1rem; }

/* Section: Product ad + simple promo blocks */
.product-ad {
  display: block;
  text-align: center;
  padding: .75rem;
  margin: .75rem 0;
  border-radius: 12px;
  background: rgba(8,12,40,.55);
  border: 1px solid rgba(120,170,255,.40);
}
.sponsored-page { }

.tag {
  display: inline-block;
  padding: .15em .6em;
  border-radius: 999px;
  font-size: .75rem;
  border: 1px solid rgba(120,170,255,.50);
  background: rgba(60,120,255,.25);
  color: var(--text);
}

/* Section: Typography & helpers */
h1, h2, h3 { color: var(--text); margin: 0 0 .5rem; }
h1 { font-size: clamp(1.6rem, 1rem + 4vw, 3rem); line-height: 1.05; letter-spacing: .3px; }
p { margin: 0 0 1rem; color: var(--muted); font-size: clamp(0.95rem, 0.9vw, 1.25rem); }

/* Section: Form controls (float-ready, in-theme) */
input, textarea, select {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(120,170,255,.40);
  color: var(--text);
  padding: .6rem .8rem;
  border-radius: 8px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
  border-color: var(--focus);
  box-shadow: 0 0 0 4px rgba(123,200,255,.25);
}

/* Section: Buttons & CTA variants */
.btn, a.btn, .cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .7rem 1.1rem;
  border-radius: 8px;
  border: 1px solid rgba(120,170,255,.50);
  background: rgba(20,60,160,.25);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.btn:hover, .cta:hover { transform: translateY(-1px); background: rgba(120,170,255,.34); border-color: rgba(120,170,255,.80); }
.btn:focus-visible, a.btn:focus-visible, .cta:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(123,200,255,.25);
}
.btn.primary { background: linear-gradient(135deg, #3aa6ff 0%, #1747d8 100%); border: none; color: #fff; }
.btn.outline { background: transparent; border: 1px solid rgba(120,170,255,.6); }

/* Section: Legal, footer, and header visuals */
header { text-align: center; padding: 1.25rem 1rem; }
main { padding: 1rem; }
footer { padding: 1rem; }

/* Section: Print accessibility */
@media print {
  body { background: #fff; color: #000; }
  .glass, .image-frame { background: #fff; border: 1px solid #000; }
}

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