:root {
  /* Theme: lavender void + charcoal accents */
  --bg: #0b0b14;
  --bg-2: #141021;
  --surface: rgba(20, 18, 28, 0.28);
  --surface-strong: rgba(20, 18, 28, 0.42);
  --text: #eaf0ff;
  --muted: #b9bfd3;
  --accent: #a58bfa;
  --accent-2: #7c5cff;
  --border: rgba(255, 255, 255, 0.28);
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  --radius: 12px;
}

html, body, header, nav, main, article, footer, aside {
  /* ensure consistent rendering across HTML5 sections */
  display: block;
}

/* Layout helpers */
:root { --container-max: clamp(860px, 90vw, 1100px); }

/* Noise/scanline layered background (gradient + subtle lines) */
html, body {
  height: 100%;
}
body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background: 
    linear-gradient(135deg, rgba(60,0,100,.92), rgba(12,0,28,.92) 60%, rgba(6,0,20,.92)),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 3px);
  background-blend-mode: overlay;
  min-height: 100vh;
  overflow-x: hidden;
}

html { color-scheme: dark; }

/* Glass panels (with backdrop-filter) + fallback variant */
.glass {
  background: rgba(28, 24, 40, 0.28);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.glass.fallback {
  background: rgba(28, 24, 40, 0.66);
  border: 1px solid rgba(255,255,255,.48);
  padding: 1rem;
  box-shadow: 0 6px 22px rgba(0,0,0,.5);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Section scaffolding */
header, main, footer { padding: 0; }

/* Header & hero typography */
header {
  padding: 2rem 1rem 1rem;
  text-align: center;
}
header h1 {
  margin: 0.25rem 0 0;
  font-size: clamp(1.8rem, 3.2vw + 1rem, 3.2rem);
  line-height: 1.15;
  letter-spacing: .2px;
}
header .meta {
  margin-top: .25rem;
  color: var(--muted);
  font-size: 0.92rem;
}
nav {
  margin-top: .5rem;
}
nav a {
  color: var(--text);
  text-decoration: none;
  padding: .4rem .6rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.25);
}
nav a:hover,
nav a:focus-visible {
  text-decoration: underline;
  outline: none;
  background: rgba(255,255,255,.04);
}

/* Main content container with responsive grid/utilities */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: rgba(18, 16, 28, 0.38);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 12px;
  padding: 0.75rem;
}
.tag {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: 999px;
  font-size: .75rem;
  color: var(--text);
  background: rgba(167,139,250,.25);
  border: 1px solid rgba(167,139,250,.5);
}
.image-frame {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 6px 18px rgba(0,0,0,.4);
  background: #000;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
}
.content {
  color: var(--text);
  padding: 0.5rem 0;
}
ul, li {
  margin: 0;
  padding: 0;
  list-style-position: outside;
  padding-left: 1.25rem;
}
li { margin: .25rem 0; }

/* Article styling (content blocks) */
article {
  margin: 1rem 0;
}
article h2, article h3 {
  color: #f2f0ff;
}
blockquote {
  margin: .75rem 0;
  padding: .5rem 1rem;
  border-left: 3px solid var(--accent-2);
  color: var(--text);
  background: rgba(0,0,0,.18);
  border-radius: 6px;
}

/* Linkable and interactive elements */
a, button, .btn, .cta {
  font-family: inherit;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  border: none;
  cursor: pointer;
}
a { color: var(--text); }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; text-decoration: underline; }

/* CTA & button variants */
.btn, .cta {
  display: inline-block;
  padding: .62rem .95rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.28);
  background: linear-gradient(to right, rgba(168,139,250,.32), rgba(124,92,255,.32));
  text-shadow: none;
  transition: transform .2s ease, opacity .2s ease;
}
.btn:hover, .cta:hover {
  transform: translateY(-2px);
  opacity: .95;
}
.btn:focus-visible, .cta:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

/* Footer & product-ad styling (glass-like panels) */
footer {
  padding: 1.25rem 1rem 2rem;
}
.product-ad, .sponsored-page {
  display: block;
  text-align: center;
  padding: .75rem;
  border-radius: 10px;
  margin: .25rem 0;
  background: rgba(14, 12, 22, 0.28);
  border: 1px solid rgba(255,255,255,.28);
}
.product-ad a, .sponsored-page a {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}
.product-ad a:hover, .sponsored-page a:hover { text-decoration: underline; }

/* Print-friendly adjustments (basic readability) */
@media print {
  body { background: white; color: #000; }
  nav, footer { display: none; }
  .container { padding: 0; width: 100%; }
  a, button { text-decoration: underline; color: inherit; }
}

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