/* Section: Base */
:root{
  --bg: #0a0a0f;
  --bg-2: #141021;
  --text: #e9e0e8;
  --muted: #b8b0bd;
  --accent: #7a1a2e;
  --accent-2: #e0566b;
  --card: rgba(14,6,18,.65);
  --glass: rgba(22,6,18,.42);
  --shadow: 0 6px 20px rgba(0,0,0,.4);
  --outline: rgba(255,255,255,.38);
  --container: 1100px;
}
html, body { height: 100%; }
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; color: var(--text); }

/* Section: Layered background (gradient + scanlines) */
body {
  min-height: 100vh;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial;
  line-height: 1.54;
  background:
    linear-gradient(135deg, rgba(20,0,20,.95), rgba(8,0,12,.95) 60%, rgba(0,0,0,.95)),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  background-attachment: fixed;
  text-rendering: optimizeLegibility;
}
/* Subtle global focus ring will be handled per control (focus-visible) */

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

/* Section: Typography */
h1, h2 { margin: 0 0 .35em; letter-spacing: .2px; }
h1 { font-size: clamp(2rem, 4vw + 1rem, 3.5rem); line-height: 1.05; color: #fff; text-shadow: 0 6px 22px rgba(0,0,0,.5); }
h2 { font-size: clamp(1.25rem, 2.2vw + .6rem, 1.75rem); color: #fff; }
p { margin: 0 0 1rem; font-size: clamp(.95rem, 1.6vw, 1.125rem); color: var(--text); }
.meta { color: var(--muted); font-size: .92rem; }

/* Section: Glass panels (fallback + backdrop-filter) */
header, .card, section.product-ad, section.sponsored-page, footer {
  background: var(--glass);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 12px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
header, main, footer { display: block; }
header { padding: 1rem; margin: 1rem auto; }
footer { padding: 1rem; margin: 1rem auto; display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: start; }

/* Fallback for environments without backdrop-filter */
@supports not (backdrop-filter: blur(8px)) {
  header, .card, section.product-ad, section.sponsored-page, footer { background: rgba(0,0,0,.5); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Section: Image framing */
.image-frame, .featured-image { border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.28); box-shadow: 0 6px 18px rgba(0,0,0,.35); background: #000; display: block; }
.image-frame { aspect-ratio: 16/9; }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Section: Content area (main content wrapper) */
.content { padding: 1rem; color: var(--text); }

/* Section: Product ad / callouts (footer utilities) */
.product-ad, .sponsored-page { padding: .75rem; text-align: center; display: inline-block; }
.product-ad a, .sponsored-page a { color: var(--text); text-decoration: none; display: inline-block; width: 100%; }

/* Section: Links & Buttons (interactive) */
a, button, .btn, .cta {
  color: #fff;
  text-decoration: none;
  background: rgba(122,26,46,.6);
  border: 1px solid rgba(255,255,255,.38);
  padding: .6em .95em;
  border-radius: 999px;
  display: inline-block;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
a:hover, a:focus { text-decoration: underline; color: #ffdede; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }
.btn, .cta { background: rgba(122,26,46,.66); }

/* Section: Lists */
ul, li { margin: 0; padding: 0; list-style: disc; padding-left: 1.25rem; color: var(--text); }
li { margin: .25rem 0; }

/* Section: Article-specific tweaks */
article { max-width: 900px; margin: 0 auto; padding: 0 1rem 1rem; }

/* Section: Printable styles */
@media print {
  body { background: #fff; color: #000; }
  a { color: #00f; text-decoration: underline; }
  header, nav, footer { page-break-after: avoid; }
}

/* Section: Responsive micro-adjusts for mobile-first */
@media (max-width: 720px) {
  footer { grid-template-columns: 1fr; }
  header { border-radius: 14px; }
}
