/* Section: Tokens & Base */ 
:root {
  --bg: #000000;
  --bg-2: #0b0b0f;
  --bg-3: #14141a;
  --surface: rgba(18, 18, 28, 0.34);
  --surface-2: rgba(255, 255, 255, 0.08);
  --text: #f5f5f7;
  --muted: #c9c4c4;
  --accent: #8b0a2b;
  --accent-2: #c2173a;
  --ring: rgba(188, 0, 38, 0.9);
  --card-radius: 14px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}
html, body, header, nav, main, article, footer, aside {
  /* layout primitives will be neutral; colors come from palette above */
}
html, body { height: 100%; }

/* Section: Global layout + background (layered gradient + subtle scanlines) */
body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  line-height: 1.5;
  background: 
    radial-gradient(circle at 20% -10%, rgba(120,0,40,.25), transparent 40%),
    radial-gradient(circle at 100% 0%, rgba(60,0,20,.25), transparent 40%),
    linear-gradient(#000, #020204);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  isolation: isolate;
}
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  /* subtle scanlines + noise-like texture (no images) */
  background-image:
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px),
    repeating-linear-gradient(to right, rgba(255,255,255,.025) 0 1px, transparent 1px 2px);
  mix-blend-mode: overlay;
  opacity: .25;
}
body::after {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,.03), transparent 40%),
    radial-gradient(circle at 0% 100%, rgba(0,0,0,.25), transparent 40%);
  mix-blend-mode: overlay;
  filter: saturate(1.1);
  opacity: .6;
}

/* Section: Structural selectors baseline (glass-like treatments) */
header, nav, main, article, aside, footer {
  background: rgba(14, 14, 24, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius:  var(--card-radius);
  padding: .75rem;
  margin: .5rem auto;
  max-width: 1100px;
}
header, main { padding-top: 1rem; padding-bottom: 1rem; }

/* Section: Typography & utilities */
* { box-sizing: border-box; }
h1, h2, h3, h4, h5, h6 { margin: .25rem 0; font-weight: 700; color: #fff; }
p { margin: .5rem 0; color: var(--text); }
ul { padding-left: 1.25rem; margin: .5rem 0; }
li { margin: .25rem 0; }

/* Section: Container & grid utilities */
.container {
  width: 100%;
  max-width: clamp(320px, 92vw, 1100px);
  margin-inline: auto;
  padding: 0 1rem;
}
.grid { display: grid; gap: 1rem; }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }

/* Section: Glass panel primitive (fallback included) */
.card {
  background: rgba(12,12,20,.28);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  .card { background: rgba(12,12,20,.42); }
}

/* Section: Image frame (aspect-ratio, glow, border) */
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 8px 20px rgba(0,0,0,.5);
  background: #111;
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover;
  display: block;
  filter: saturate(1.05);
  transition: transform .4s ease;
}
.image-frame:hover img { transform: scale(1.03); }

/* Section: Content area (text blocks) */
.content { padding: .5rem 0; color: var(--text); }

/* Section: Links & Buttons (interactive states) */
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; color: var(--accent-2); outline: none; }
button, .btn, .cta {
  font: inherit;
  padding: .6rem 1rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  color: #fff;
  background: var(--accent);
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.btn { display: inline-flex; align-items: center; gap: .5rem; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(139,0,43,.6); }
.btn:active { transform: translateY(0); }
.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.25);
}
.cta { display:inline-flex; align-items:center; gap:.6rem; padding-inline: .9rem; }

/* Focus ring (high contrast) */
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 6px; }

/* Section: Glass panels for core sections (ensures WCAG AA readable contrast) */
header, nav, main, article, aside, footer { color: var(--text); }

/* Section: Utility tokens (brand accents) */
.tag {
  display:inline-block;
  padding: .25rem .6rem;
  font-size: .75rem;
  border-radius: 999px;
  background: rgba(139,0,40,.28);
  color: #fff;
  border: 1px solid rgba(139,0,40,.65);
}

/* Section: Print-friendly tweaks (small) */
@media print {
  body { background: #fff; color: #000; }
  header, main, footer { background: #fff; border: none; border-radius: 0; padding: .25in; }
  a { text-decoration: underline; }
}

/* Section: Responsive typography (fluid) */
html {
  font-size: 16px;
}
@media (min-width: 420px) {
  html { font-size: 15.5px; }
}
@media (min-width: 768px) {
  html { font-size: 16px; }
}
@media (min-width: 1024px) {
  html { font-size: 17px; }
}
h1 { font-size: clamp(1.6rem, 1.2rem + 2.5vw, 2.8rem); line-height: 1.15; }

/* Section: Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}