/* Palette & Foundations */
:root{
  --bg: #0b1020;
  --bg-2: #1a1f4a;
  --bg-3: #0a0f2a;
  --text: #eaf4ff;
  --muted: #a6b3d6;
  --accent: #4fc3ff;
  --accent-2: #7b5cff;
  --card: rgba(255,255,255,.08);
  --card-2: rgba(255,255,255,.12);
  --border: rgba(255,255,255,.25);
  --shadow: 0 8px 28px rgba(0,0,0,.32);
  --focus: 2px solid #8bd7ff;
  --radius: 12px;
}
:root, html, body { height: 100%; }
* { box-sizing: border-box; }
html { color-scheme: dark; }
html, body { margin: 0; }

/* Layered, GPU-friendly background (gradient + subtle scanlines) */
html, body {
  background: 
    radial-gradient(circle at 20% -10%, rgba(91, 112, 255, .25), transparent 28%),
    radial-gradient(circle at 80% 10%, rgba(0, 180, 255, .20), transparent 28%),
    linear-gradient(135deg, rgba(8,15,40,.98) 0%, rgba(14,10,40,.98) 60%, rgba(7,6,22,.98) 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  background-blend-mode: screen, overlay, normal, overlay;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Noto Sans", "Liberation Sans";
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  display: flex;
  min-height: 100dvh;
  flex-direction: column;
  padding: 0;
  margin: 0;
}

/* Layout utilities */
.container {
  width: min(92vw, 1100px);
  margin-inline: auto;
  padding: 0 1rem;
}

.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: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--text);
}

.tag {
  display: inline-block;
  padding: .15em .5em;
  border-radius: 999px;
  font-size: .75rem;
  color: #04142a;
  background: linear-gradient(135deg, #a6e0ff, #c2b3ff);
  border: 1px solid rgba(255,255,255,.6);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Glass panels with graceful fallback */
.glass {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass { background: rgba(255,255,255,.20); }
}

/* Header / Hero styling */
header {
  padding: 2rem 1rem 1rem;
  text-align: center;
}
header h1 {
  font-size: clamp(1.6rem, 1.4rem + 2.5vw, 3rem);
  line-height: 1.15;
  margin: .25rem 0 .5rem;
  font-weight: 800;
  letter-spacing: .2px;
  color: #eefaFF;
}
header .meta {
  color: var(--muted);
  font-size: clamp(0.85rem, 0.6vw + .8rem, 1rem);
  margin-bottom: .75rem;
}
nav {
  margin-top: .25rem;
}
nav a {
  color: var(--text);
  text-decoration: none;
  padding: .5rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.15);
  transition: transform .15s ease, background .2s ease;
}
nav a:hover { text-decoration: underline; text-underline-offset: .2em; background: rgba(0,0,0,.22); }
nav a:focus-visible { outline: var(--focus); outline-offset: 3px; }

/* Main content / article */
main {
  flex: 1 1 auto;
  padding: 1rem 0 2rem;
}
article {
  display: block;
  padding: 1rem;
}
.featured-image { margin: .75rem 0; }
.image-frame {
  aspect-ratio: 16/9;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 6px 22px rgba(0,0,0,.25);
}
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Typography for content */
h2, h3 {
  color: #eaf4ff;
  margin-top: 0.75rem;
}
p { color: #e6f0ff; margin: .5rem 0 1rem; }

/* Lists and content helpers */
ul, ol { padding-left: 1.25rem; margin: .25rem 0 1rem; color: #e9f0ff; }
li { margin: .25rem 0; }

/* Content wrapper for glass panels around blocks if needed */
.content { padding: .75rem; }

/* Link styling (WCAG-friendly contrast on dark glass) */
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; text-underline-offset: .25em; outline: none; color: #8bd6ff; }

/* Buttons, CTAs, variants */
button, .btn, .cta {
  font: inherit;
  padding: .65rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.4);
  background: rgba(0,0,0,.22);
  color: #ffffff;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
button:hover, .btn:hover, .cta:hover { transform: translateY(-1px); background: rgba(0,0,0,.28); }
button:active, .btn:active, .cta:active { transform: translateY(0); }
button.primary, .btn.primary {
  background: linear-gradient(135deg, #0a6cff 0%, #4f3cff 100%);
  border: none;
  color: #fff;
}
button.secondary, .btn.secondary {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  color: #eaffff;
}
button.outline, .btn.outline, .cta.outline {
  background: transparent;
  border: 1px solid rgba(120,190,255,.95);
  color: #eaffff;
}
:focus-visible { outline: 2px dashed var(--accent); outline-offset: 3px; }

/* Utility for images and frames in content */
.image-frame:hover { transform: translateZ(0); }

/* Footer / product ad blocks */
footer { padding: 1.5rem 0 2rem; text-align: center; }
.product-ad, .sponsored-page { display: inline-block; margin: .25rem; min-width: 210px; }
.product-ad a, .sponsored-page a { color: #fff; text-decoration: none; display: block; padding: .75rem 1rem; }
.product-ad { background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.32); border-radius: 12px; box-shadow: var(--shadow); }
.product-ad p, .sponsored-page p { margin: 0; font-size: .95rem; }
footer p { color: var(--muted); font-size: .9rem; margin-top: .75rem; }

/* Print-friendly tweaks (basic readability) */
@media print {
  html, body { background: #fff; color: #000; }
  body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .glass, .card, header, main, article, footer { background: none; border: none; box-shadow: none; }
  a { text-decoration: underline; }
}
@media (prefers-reduced-motion: reduce){
  * { animation: none !important; transition: none !important; transform: none !important; }
}
@media (max-width: 720px){
  header { padding: 1.25rem 0.75rem; }
  .grid { grid-template-columns: 1fr; }
  .product-ad, .sponsored-page { width: 100%; display: block; }
}