:root {
  /* Palette: baby blue sparks on dark matter black backdrop */
  --bg: #0a0f1a;
  --bg-2: #0b1220;
  --text: #e8f3ff;
  --muted: #a9c6ea;
  --accent: #6bd7ff;      /* baby-blue highlight */
  --accent-2: #bfeaff;    /* lighter contrast for UI accents */
  --panel: rgba(20, 28, 52, 0.22);
  --panel-border: rgba(110, 170, 255, 0.38);
  --radius: 12px;
  --shadow: 0 8px 20px rgba(0,0,0,.25);
  --focus: 2px solid var(--accent);
  --card: rgba(10, 14, 28, 0.6);
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }
html { color-scheme: dark; }
body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans";
  line-height: 1.5;
  background:
    linear-gradient(135deg, #0b1020 0%, #0a0f1a 60%, #0a0f1a 100%),
    linear-gradient(to bottom, rgba(93,140,255,0.08), rgba(93,140,255,0.02) 60%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0 1px, transparent 1px 2px);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-y: auto;
}

/* Base glass panel utility (fallback included) */
.glass {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  /* Fallback when backdrop-filter is not supported */
}
@supports not (backdrop-filter: blur(8px)) and not (-webkit-backdrop-filter: blur(8px)) {
  .glass { background: rgba(12,18,38,0.70); }
}
@supports (backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px)) {
  .glass { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
}

/* Layout scaffolding */
header, nav, main, article, aside, footer {
  display: block;
}
.container {
  max-width: clamp(320px, 90vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: rgba(12, 18, 32, 0.58);
  border: 1px solid rgba(110, 170, 255, 0.38);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.tag {
  display: inline-block;
  padding: 0.25em 0.5em;
  border-radius: 999px;
  font-size: 0.75rem;
  color: #dff4ff;
  background: rgba(107, 215, 255, 0.25);
  border: 1px solid rgba(107, 215, 255, 0.45);
}
.image-frame {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(120, 180, 255, 0.4);
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
  display: block;
  margin: 0 auto 1rem;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
  transform: translateZ(0);
}
.content { font-size: clamp(1rem, 0.9vw + 0.6rem, 1.125rem); line-height: 1.6; color: var(--text); }

/* Structural selectors (must-styles) */
html, body, header, nav, main, article, footer, aside { /* selectors intentionally styled */ }
.content, .product-ad { }

/* Header / hero styling with clear typographic hierarchy */
header {
  padding-block: 1rem;
  padding-inline: 0.75rem;
}
header h1 {
  font-size: clamp(1.4rem, 2vw + 1rem, 2.4rem);
  line-height: 1.15;
  margin: 0 0 0.25rem;
  letter-spacing: 0.2px;
}
header .meta {
  color: var(--muted);
  font-size: clamp(0.85rem, 0.8vw + 0.6rem, 1rem);
  margin: 0 0 0.75rem;
}
nav {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
nav a {
  color: var(--accent);
  text-decoration: none;
  padding: .25rem .6rem;
  border-radius: 6px;
  border: 1px solid rgba(107,215,255,0.4);
}
nav a:hover { text-decoration: underline; }
nav a:focus-visible { outline: var(--focus); outline-offset: 2px; }

/* Main content alignment */
main {
  padding: 1rem 0 2rem;
}
.article {
  max-width: min(900px, 92vw);
  margin: 0 auto;
}
.featured-image { text-align: center; margin: 1rem auto 1rem; }

/* Typography specifics for content sections inside article */
h2, h3 {
  color: var(--text);
  margin: 1rem 0 0.5rem;
}
h2 { font-size: clamp(1.25rem, 1vw + 1.25rem, 2rem); }
h3 { font-size: clamp(1.05rem, 0.8vw + 1rem, 1.25rem); }

/* Paragraphs and lists inside article */
p { margin: 0 0 1rem; color: var(--text); }
ul { padding-left: 1.25rem; margin: 0.5rem 0 1rem; }
li { margin: 0.25rem 0; }

/* Blockquote styling for emphasis */
blockquote {
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--accent);
  background: rgba(107, 215, 255, 0.12);
  border-radius: 6px;
  color: var(--text);
}

/* Footer / ad sections with glass panels */
footer {
  padding: 1.25rem 0;
  border-top: 1px solid rgba(100, 150, 255, 0.25);
  margin-top: 2rem;
}
.product-ad, .sponsored-page {
  display: inline-block;
  margin: 0.25rem;
}
.product-ad a, .sponsored-page a, footer p {
  text-decoration: none;
  color: var(--text);
}
.product-ad { width: auto; }
footer p {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Interactive controls (buttons / links) */
button, .btn, .cta, a {
  font: inherit;
  color: var(--text);
  background: transparent;
  border: 1px solid rgba(107,215,255,0.4);
  padding: 0.5em 1em;
  border-radius: 999px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn {
  background: var(--accent);
  color: #00131a;
  border: 1px solid rgba(107,215,255,0.6);
  font-weight: 600;
}
.btn:hover { transform: translateY(-1px); }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, .cta:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
}
.image-frame { outline: 0; }

/* Image frame refinement */
.product-image { width: 100%; height: auto; display: block; border-radius: 8px; }

/* Accessibility tweaks for motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition: none !important; transform: none !important; }
}

/* Print-friendly adjustments (small) */
@media print {
  body { background: #fff; color: #000; }
  nav, .glass, .image-frame { display: none !important; }
  .container { max-width: 100%; padding: 0; }
}
