/* Base tokens */
:root{
  --bg: #0a0f22;
  --bg-2: #0b1a2b;
  --text: #e9f4ff;
  --muted: #a6baff;
  --accent: #4aa3ff;
  --accent-2: #7bd3ff;
  --card: rgba(255,255,255,.08);
  --border: rgba(255,255,255,.28);
  --shadow: 0 8px 28px rgba(0,0,0,.25);
}

/* Section headers (structure) */
html, body, header, nav, main, article, footer, aside { box-sizing: border-box; }
html, body { height: 100%; }
html, body { margin: 0; padding: 0; }

/* Layered background: gradient + subtle scanlines + soft glow noise */
body {
  min-height: 100vh;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial;
  line-height: 1.55;
  background:
    linear-gradient(135deg, rgba(6,18,38,.95) 0%, rgba(2,6,20,.95) 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, rgba(255,255,255,.04) 1px 2px, transparent 2px 4px),
    radial-gradient(circle at 20% 10%, rgba(0,180,255,.08), transparent 40%),
    radial-gradient(circle at 80% 0%, rgba(0,120,255,.08), transparent 40%);
  background-blend-mode: overlay, overlay, screen, screen;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layout helpers */
.container { width: 100%; max-width: clamp(640px, 90vw, 1200px); padding-inline: 1rem; margin-inline: auto; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 1rem; box-shadow: var(--shadow); }

/* Glass panels with graceful fallback */
header, nav, main, aside, article, footer {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 14px;
  padding: 1rem;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  header, nav, main, aside, article, footer { background: rgba(255,255,255,.14); }
}
a, button, .btn, .cta {
  font-family: inherit;
  color: var(--text);
  text-decoration: none;
  background: transparent;
  border: 0;
  padding: .5rem 0.9rem;
  border-radius: 8px;
  cursor: pointer;
}
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 2px solid #a6d4ff;
  outline-offset: 2px;
}
a:hover, a:focus { text-decoration: underline; color: var(--accent-2); }

/* Hero & typography */
h1 {
  font-size: clamp(2rem, 2.2vw + 1rem, 3.5rem);
  line-height: 1.08;
  margin: 0 0 .5rem;
  letter-spacing: .2px;
}
p { margin: 0 0 1rem; color: color-mix(in oklab, var(--text), black 18%); }
.small { font-size: .875rem; color: var(--muted); }

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

/* Utilities (core selectors required) */
ul { padding-left: 1.25rem; margin: .5rem 0; }
li { margin: .25rem 0; }

/* Content area targets */
.content { padding: 1rem; }

/* Product/ad blocks in footer */
.product-ad a { display: block; padding: .75rem 1rem; border-radius: 10px; background: rgba(20,120,255,.15); border: 1px solid rgba(255,255,255,.25); color: var(--text); }
.product-ad a:hover { background: rgba(20,120,255,.25); }
.product-ad p { margin: 0; }

/* Links & CTAs styling variants */
.btn { display: inline-block; padding: .6rem .95rem; border-radius: 8px; border: 1px solid rgba(122, 200, 255, .5); background: rgba(74,144,255,.8); color: #fff; }
.btn.secondary { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); color: var(--text); }
.btn:hover { filter: brightness(1.05); transform: translateY(-0.5px); }
.btn:active { transform: translateY(0); opacity: .92; }

.cta { display:inline-block; padding: .55rem .9rem; border-radius: 8px; border: 1px solid rgba(76, 160, 255, .6); background: rgba(80,170,255,.75); }

/* Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  header, main, article, footer { background: transparent; border: 0; box-shadow: none; }
  a { text-decoration: underline; color: inherit; }
}

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