/* Palette & Base */
:root{
  --bg: #0b1020;
  --bg-2: #0a1a30;
  --text: #eaf2ff;
  --muted: #a8b4d3;
  --accent: #1e6bd6;      /* cobalt-like blue */
  --accent-2: #8a1f1f;     /* maroon */
  --card: rgba(12, 26, 60, 0.28);
  --glass: rgba(12, 26, 60, 0.28);
  --border: rgba(255,255,255,0.25);
  --shadow: rgba(0,0,0,.35);
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html { color-scheme: dark; }
body {
  margin: 0;
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  color: var(--text);
  /* Layered background: gradient + subtle scanlines + faint glow accents */
  background:
    linear-gradient(135deg, rgba(6,18,40,.95), rgba(20,0,40,.95) 60%, rgba(6,18,40,.95)),
    radial-gradient(circle at 20% -10%, rgba(40,120,255,.12), transparent 40%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  background-attachment: fixed, scroll, scroll;
  min-height: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Layout primitives */
.container {
  width: min(1100px, 92%);
  margin-inline: auto;
  padding-inline: 0.75rem;
}
.grid { display: grid; gap: 1rem; }
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 8px 22px var(--shadow);
}
.tag {
  display: inline-block;
  padding: .15em .6em;
  font-size: .75rem;
  border-radius: 999px;
  background: rgba(30, 107, 214, 0.15);
  color: var(--text);
  border: 1px solid rgba(30,107,214,.4);
}
.image-frame, .image-frame img {
  display: block;
}
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.04);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
  image-rendering: auto;
}
.featured-image { margin: 1rem 0; }

/* Glass panels & surfaces (with fallback) */
.header-glass, .card-glass, .footer-glass {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  /* Fallback for older browsers */
  background-clip: padding-box;
}
@supports not ((backdrop-filter: blur(12px)) and (-webkit-backdrop-filter: blur(12px))) {
  .header-glass, .card-glass, .footer-glass {
    background: rgba(10,20,40,.75);
    border-color: rgba(255,255,255,.35);
  }
}

/* Typography & hero */
header {
  display: grid;
  gap: 0.5rem;
  justify-items: center;
  text-align: center;
  padding: 1.75rem 1rem;
  margin: 2rem auto;
  width: min(1100px, 92%);
  border-radius: 14px;
  background: rgba(8, 18, 40, 0.32);
  border: 1px solid var(--border);
  backdrop-filter: blur(10px) saturate(1.2);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  box-shadow: 0 12px 28px rgba(0,0,0,.25);
}
header h1 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1.1;
  margin: 0;
  font-weight: 700;
  color: #f6fbff;
  letter-spacing: .2px;
}
header .meta {
  margin: 0;
  font-size: .9rem;
  color: var(--muted);
}
nav { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; }
nav a {
  color: var(--text);
  text-decoration: none;
  padding: .4rem .75rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.15);
}
nav a:hover { text-decoration: underline; }

/* Main content */
main { padding: 1rem 0; }
article { width: 100%; }
article h2 {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  margin: .75rem 0 .5rem;
  color: #fff;
}
section { margin: 1rem 0; color: var(--text); }
section p { color: var(--muted); line-height: 1.6; margin: 0.25rem 0 0; }
ul { margin: .5rem 0 0 1.25rem; color: var(--text); }
li { margin: .25rem 0; }
blockquote {
  margin: .5rem 0; padding-left: .75rem; border-left: 3px solid var(--accent);
  color: var(--muted); font-style: italic;
}
.featured-image { display: block; }

/* Footer & ad panels */
footer { padding: 1rem 0 2rem; display: grid; gap: .75rem; justify-items: center; }
.product-ad, .sponsored-page {
  width: min(520px, 92%);
  text-align: center;
}
.product-ad a, .sponsored-page a {
  display: block;
  padding: .6rem .8rem;
  color: var(--text);
  text-decoration: none;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.18);
}
.product-ad a:hover, .sponsored-page a:hover { text-decoration: underline; }

/* Utility widgets */
.container, .grid, .card, .tag { /* section headers only, no extra prose */ }

/* Interactive controls (buttons/links) */
.btn, a.btn, .cta { display: inline-block; padding: .65rem 1rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.4); text-align: center; cursor: pointer; text-decoration: none; font-weight: 600; transition: transform .15s ease, background .2s ease, color .2s ease; }
.btn.primary, a.btn.primary, .cta.primary {
  background: var(--accent);
  color: white;
  border-color: rgba(0,0,0,.15);
}
.btn.primary:hover { transform: translateY(-1px); background: #1a75e0; }
.btn.ghost, a.btn.ghost {
  background: transparent;
  color: var(--text);
  border-color: rgba(255,255,255,.5);
}
.btn:focus-visible, a.btn:focus-visible, .cta:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Links accessibility */
a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Print styles */
@media print {
  body { background: white; color: black; }
  a { text-decoration: underline; color: black; }
}
