:root {
  /* Palette (blue city lights / dark matter black) */
  --bg: #0a0f1e;
  --bg-2: #0b1220;
  --text: #eaf6ff;
  --muted: #a9c6ff;
  --accent: #4ea8ff;
  --accent-2: #1e3a8a;
  --glass: rgba(13, 18, 40, 0.28);
  --glass-opaque: rgba(13, 18, 40, 0.60);
  --border: rgba(110, 140, 255, 0.35);
  --shadow: 0 10px 28px rgba(0,0,0,0.35);
  --focus: 0 0 0 3px rgba(90,170,255,0.6);
  --radius: 14px;
  --radius-sm: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans";
}

html, body { height: 100%; }
* { box-sizing: border-box; }

/* Base & Layered Background */
html, body { margin: 0; font-family: var(--font); color: var(--text); background: linear-gradient(135deg, rgba(8,16,32,0.95) 0%, rgba(6,12,24,0.95) 100%), #061022; }
body { min-height: 100dvh; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; position: relative; }

/* Subtle layered background: gradient + scanlines + soft noise */
body::before {
  content: "";
  position: fixed; inset: 0;
  background:
    linear-gradient(to bottom, rgba(255,255,255,0.02), rgba(255,255,255,0.02)),
    repeating-linear-gradient(to bottom, rgba(0,0,0,0.05) 0 1px, transparent 1px 2px),
    radial-gradient(circle at 20% 10%, rgba(60,140,255,0.08), transparent 40%),
    radial-gradient(circle at 70% 30%, rgba(0,0,0,0.06), transparent 40%);
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 0;
  opacity: 0.85;
  filter: saturate(110%);
}

/* Glass panels (with fallback) */
header, main, aside, article, footer, nav {
  background: rgba(12, 18, 40, 0.28);
  border: 1px solid rgba(110, 140, 255, 0.32);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 0.75rem auto;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 1;
}
@supports (backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px)) {
  header, main, aside, article, footer, nav {
    background: rgba(12, 18, 40, 0.25);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }
}
@media (prefers-color-scheme: light) {
  header, main, aside, article, footer, nav { background: rgba(255,255,255,0.65); color: #0a0a0a; }
}

/* Layout helpers */
.container { max-width: clamp(320px, 90vw, 1120px); margin-inline: auto; padding: 1rem; }

/* Grid utilities */
.grid { display: grid; gap: 1rem; }
.grid.auto { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* Typography scale (fluid) */
h1 { font-size: clamp(1.8rem, 4vw + 1rem, 3.2rem); line-height: 1.08; margin: 0 0 0.5rem; letter-spacing: .2px; }
h2 { font-size: clamp(1.25rem, 1.6vw + 0.6rem, 1.75rem); margin: 1rem 0 .5rem; }
h3 { font-size: clamp(1rem, 1.2vw + 0.6rem, 1.25rem); margin: .75rem 0; }
p { font-size: clamp(0.95rem, 1.6vw, 1.05rem); line-height: 1.6; color: var(--muted); margin: 0 0 1rem; }

/* Content area helpers */
.content { padding: 0; }

/* Image frame */
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(120,180,255,0.4);
  box-shadow: 0 8px 22px rgba(0,0,0,0.4);
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transform: scale(1.01);
  transition: transform 0.25s ease;
}
.image-frame:hover img { transform: scale(1.04); }

/* Section: hero-style emphasis (within article main) */
article { padding: 1rem 0; }

/* List tweaks */
ul { padding-left: 1.25rem; margin: .75rem 0; }
li { margin: .4rem 0; }

/* Product ad / footer blocks */
.product-ad, .sponsored-page {
  display: block;
  text-align: center;
  padding: .75rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(110,140,255,0.32);
  background: rgba(12,18,40,0.28);
  margin: .5rem 0;
}
.product-ad a, .sponsored-page a { color: var(--text); text-decoration: none; display: inline-block; padding: .25rem .75rem; border-radius: 999px; border: 1px solid rgba(110,140,255,0.25); }
.product-ad a:hover, .sponsored-page a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* Interactive elements (buttons, links, CTAs) */
a, button, .btn, .cta {
  font-family: inherit; font-weight: 600; cursor: pointer;
}
a { color: var(--accent); text-decoration: none; transition: color .2s ease; }
a:hover, a:focus-visible { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; outline: none; }
button, .btn, .cta {
  background: var(--accent);
  color: #001b33;
  border: 1px solid rgba(255,255,255,0.25);
  padding: 0.68rem 1.1rem;
  border-radius: 999px;
  display: inline-block;
  text-align: center;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .2s ease;
}
.btn { background: linear-gradient(135deg, #2fa8ff 0%, #4e7aff 100%); color: #001b33; }
.btn.secondary { background: transparent; color: var(--text); border: 1px solid rgba(160,210,255,0.6); }
.btn.ghost { background: transparent; border: 1px solid rgba(255,255,255,0.25); color: var(--text); }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(0,0,0,0.25); }
.btn:focus-visible, .cta:focus-visible, .btn:focus-visible {
  outline: none; box-shadow: var(--focus); border-color: rgba(110,140,255,0.8);
  outline-offset: 2px;
}

/* Header / nav tweaks for compact top area */
header > h1 { font-size: clamp(1.4rem, 3.2vw + 0.8rem, 2.4rem); margin: 0 0 .25rem; }
header .meta { color: var(--muted); font-size: .9rem; margin: 0 0 .5rem; }

/* Print styles (readable) */
@media print {
  body, header, main, aside, article, footer { background: #fff; color: #000; }
  a, button { color: #000; text-decoration: none; }
  .image-frame { page-break-inside: avoid; }
}

/* Responsive behavior for mobile-first approach */
@media (max-width: 720px) {
  .container { padding: .75rem; }
  header, main, footer, aside { padding: .75rem; }
  .grid.auto { grid-template-columns: 1fr; }
}

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