/* Section: Tokens & Base */
:root {
  --bg: #0b001a;
  --bg-2: #1a0030;
  --surface: rgba(20, 0, 60, 0.28);
  --surface-2: rgba(20, 0, 60, 0.42);
  --text: #f8fbff;
  --muted: #cbd5e1;
  --accent: #ff2a2a;
  --accent-2: #7c3aed;
  --shadow: 0 8px 28px rgba(0,0,0,.35);
  --radius: 14px;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; }
body {
  margin: 0;
  color: var(--text);
  background: 
    linear-gradient(135deg, rgba(12,0,40,.9) 0%, rgba(26,0,60,.95) 60%),
    radial-gradient(circle at 20% -10%, rgba(180,0,40,.25), transparent 25%),
    #060613;
  min-height: 100%;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-attachment: fixed;
  line-height: 1.5;
  word-break: break-word;
}
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 2px 2px, 2px 2px;
  mix-blend-mode: overlay;
  opacity: .55;
}
img { display: block; max-width: 100%; height: auto; }

header, nav, main, article, aside, footer { display: block; }

/* Section: Layout scaffolding */
.container { max-width: clamp(320px, 90vw, 1100px); margin-inline: auto; padding-inline: 1rem; }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* Section: Typography & utilities */
h1, h2, h3 { line-height: 1.15; margin: .25rem 0 0.5rem; font-weight: 700; color: #fff; }
h1 { font-size: clamp(1.75rem, 5vw, 2.75rem); }
h2 { font-size: clamp(1.25rem, 4vw, 1.75rem); }
p { color: var(--muted); margin: 0 0 1rem; font-size: clamp(0.95rem, 2.8vw, 1.05rem); }
blockquote { margin: .75rem 0; padding-left: .75rem; border-left: 3px solid var(--accent); color: #fff; font-style: italic; }
ul { margin: .5rem 0 0 1.25rem; padding: 0; color: var(--muted); }
li { margin: .25rem 0; }

/* Section: Glass panels (frosted) */
.glass {
  background: rgba(16, 0, 40, 0.22);
  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);
  /* Fallback for browsers without backdrop-filter */
}
@supports not (backdrop-filter: blur(12px)) {
  .glass { background: rgba(16,0,40,0.60); border-color: rgba(255,255,255,.40); }
}

/* Section: 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: 0 6px 16px rgba(0,0,0,.25);
  background: #000;
}
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Backwards-compatible featured image wrapper (non-frame) */
.featured-image { border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.25); box-shadow: 0 8px 20px rgba(0,0,0,.25); }

/* Section: Content container (used for article text blocks) */
.content { padding: 0.75rem 0; }

/* Section: Buttons & links (interactive states) */
a, button, .btn, .cta { text-decoration: none; color: #fff; cursor: pointer; }
a { color: #fff; }
a:hover, a:focus-visible { text-decoration: underline; text-decoration-color: rgba(255,255,255,.7); }
.btn, .cta {
  display: inline-block;
  padding: .65rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.45);
  background: linear-gradient(135deg, rgba(255,0,40,.95), rgba(124,58,237,.95));
  font-weight: 600;
  color: #fff;
  transition: transform .15s ease, box-shadow .2s ease;
  box-shadow: 0 6px 14px rgba(0,0,0,.25);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.outline, .cta.outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,.6);
  color: #fff;
}
.btn:focus-visible, .cta:focus-visible, a:focus-visible, button:focus-visible {
  outline: 3px solid var(--accent-2);
  outline-offset: 2px;
}
.cta { /* a secondary action variant */ }

/* Section: Layout helpers (utility classes) */
.aside { display: block; }

/* Section: Header, Main, Article, Footer basics */
html, body, header, nav, main, article, footer, aside { /* structural defaults kept lean */ }
header { padding: 1rem 0; }
header h1 { margin: 0; font-weight: 800; letter-spacing: .2px; }
header .meta { margin: .25rem 0 0; color: var(--muted); font-size: .92rem; }

/* Main content flow: centered container with fluid typography */
main { padding: 1rem 0; }
footer { padding: 1rem 0; color: #e9e9ff; }

/* Sections inside article content spacing (tight, readable) */
article > section { margin: 1rem 0; }
article h2 { margin-top: .25rem; color: #fff; }

/* Product ad blocks in footer */
.product-ad, .sponsored-page { display: block; }
.product-ad a, .sponsored-page a {
  display: block;
  padding: .9rem;
  border-radius: 10px;
  text-align: center;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  transition: transform .15s ease, background .2s ease;
}
.product-ad a:hover, .sponsored-page a:hover { background: rgba(255,255,255,.14); text-decoration: underline; }
.product-ad a:focus-visible, .sponsored-page a:focus-visible { outline: 3px solid var(--accent-2); outline-offset: 2px; }

/* Print styles: basic readability */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; color: #000; }
  .glass { background: #fff; border: 1px solid #ccc; box-shadow: none; backdrop-filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; transform: none !important; }
}
@media (min-width: 700px) {
  main { padding-inline: 0; }
  .container { padding-inline: 0; }
}

/* Section: Structural naming compliance (ensure required selectors exist) */
html, body, header, nav, main, article, footer, aside { }
.image-frame, .image-frame img { }
.content { }
.product-ad { }
a, button, .btn, .cta { }
ul, li { }
.container, .grid, .card, .tag { }