:root {
  /* Tokenized palette (scarlet / maroon inspired) */
  --bg: #120101;
  --bg-2: #2a0000;
  --text: #f8f9fa;
  --muted: #cbd5e1;
  --accent: #ff2a5a;
  --accent-2: #8b0000;

  /* Glass / surfaces */
  --glass: rgba(255, 255, 255, 0.08);
  --glass-border: rgba(255, 255, 255, 0.25);
  --shadow: 0 8px 28px rgba(0,0,0,.40);
  --radius: 14px;

  /* UI tokens */
  --focus: 3px solid rgba(255,255,255,.9);
  --gap: 1rem;
}

*,
*::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, Inter, Arial, sans-serif;
  line-height: 1.5;
  min-height: 100%;
  /* Layered background: gradient + subtle starfield/scanlines (pure CSS) */
  background:
    /* subtle scarlet stars */
    radial-gradient(circle at 12% 22%, rgba(255,255,255,.12) 0 2px, transparent 2px),
    radial-gradient(circle at 68% 64%, rgba(255,255,255,.08) 0 2px, transparent 2px),
    /* main gradient (future cyberpunk) */
    linear-gradient(135deg, #2a0000 0%, #1a0000 60%, #0a0000 100%),
    /* scanlines */
    repeating-linear-gradient(to bottom, rgba(0,0,0,.25) 0 1px, transparent 1px 2px);
  background-blend-mode: overlay, overlay, normal, overlay;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html, body { scroll-behavior: smooth; }

/* Layout helpers */
.container { width: min(100%, 1100px); margin-inline: auto; padding-inline: 1rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--gap); }

.card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: calc(var(--radius) - 4px);
  box-shadow: var(--shadow);
  padding: 0.9rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

@supports not (backdrop-filter: blur(10px)) {
  .card { background: rgba(255,255,255,.12); }
}

/* Section styling (core selectors) */
html, body, header, nav, main, article, footer, aside {
  /* ensure they are part of flow and styleable even if not all used */
  display: block;
}

header {
  padding: 1.75rem 1rem;
  max-width: clamp(320px, 90vw, 1100px);
  margin: 0 auto;
  border-bottom: 1px solid rgba(255,255,255,.15);
  border-radius: 0 0 var(--radius) var(--radius);
  background: rgba(0,0,0,.28);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2;
}

header h1 {
  margin: 0 0 .25rem;
  font-size: clamp(1.8rem, 2.5vw + 1rem, 3.4rem);
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: .2px;
  color: #fff;
}

header .meta {
  margin: 0;
  font-size: clamp(.95rem, .4vw + .8rem, 1.05rem);
  color: var(--muted);
}

nav {
  margin-top: .75rem;
}

nav a {
  color: #fff;
  text-decoration: none;
  padding: .35rem .6rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.15);
}
nav a:hover { text-decoration: underline; }

/* Main content and article layout */
main {
  padding: 1.25rem 0;
}

article {
  max-width: clamp(640px, 92vw, 980px);
  margin: 0 auto;
  padding: 0 1rem;
}

.featured-image { margin: 0.75rem 0 1rem; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.25); box-shadow: 0 6px 20px rgba(0,0,0,.5); }
.image-frame { width: 100%; aspect-ratio: 16 / 9; display: block; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.25); box-shadow: 0 6px 20px rgba(0,0,0,.5); background: #000; }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

.content { padding: 0; color: var(--text); }

/* Typography scale for content */
h1, h2, h3 { color: #fff; margin: .75rem 0 .25rem; }
h2 { font-size: clamp(1.25rem, 0.8rem + 2vw, 2rem); }
h3 { font-size: clamp(1rem, 0.6rem + 1.5vw, 1.25rem); }

p { margin: 0.5rem 0 1rem; color: #e9e9e9; }
ul, ol { margin: 0.5rem 0 1rem 1.25rem; padding: 0; }
li { margin: .25rem 0; }

/* Lists and inline emphasis */
blockquote {
  margin: .75rem 0;
  padding: .75rem 1rem;
  border-left: 3px solid rgba(255,255,255,.5);
  background: rgba(255,255,255,.08);
  border-radius: 6px;
}

/* Link and button styles (interactive controls) */
a, button, .btn, .cta {
  font-family: inherit;
  font-size: 1rem;
  color: inherit;
  text-decoration: none;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: #fff;
}
a { color: var(--accent); }
a:hover, a:focus-visible { text-decoration: underline; outline: none; }

/* Buttons (solid and outline variants) */
.btn {
  display: inline-block;
  padding: .75rem 1.25rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  transition: transform .15s ease, background .2s ease;
}
.btn.secondary {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,.3);
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn:active { transform: translateY(0); }
.btn:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 2px;
  border: 0;
}

/* Utilities / small UI bits used by page */
.tag {
  display: inline-block;
  padding: .15rem .5rem;
  font-size: .75rem;
  border-radius: 999px;
  background: rgba(255,255,255,.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
}

/* Image frame utility (for any future uses) */
.image-frame { aspect-ratio: 16 / 9; }

/* Footer / ad panels with glass feel */
footer {
  padding: 1rem 1rem 2rem;
  border-top: 1px solid rgba(255,255,255,.15);
  margin-top: 2rem;
  background: rgba(0,0,0,.25);
}
footer .product-ad,
footer .sponsored-page {
  display: inline-block;
  vertical-align: middle;
  margin: 0 .5rem 0 0;
  padding: .5rem .9rem;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
}
footer p { margin: .25rem 0 0; color: var(--muted); }

/* Print styles for readability */
@media print {
  body { background: #fff; color: #000; }
  header, footer { background: #fff; border: none; }
  a { text-decoration: underline; color: #06c; }
}

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