/* Base Design Tokens */
:root {
  --bg: #0a0a0f;
  --bg-2: #11131a;
  --text: #e9e9ee;
  --muted: #a6a6aa;
  --accent: #ff1e1e;
  --accent-2: #e60000;
  --glass: rgba(20, 20, 28, 0.22);
  --glass-2: rgba(20, 20, 28, 0.28);
  --border: rgba(255, 255, 255, 0.25);
  --card: rgba(20, 20, 28, 0.60);
  --shadow: 0 6px 20px rgba(0,0,0,.5);
  --radius: 14px;
  --focus: 2px solid var(--accent);
}

/* Layout & global resets */
html, body {
  height: 100%;
}
* { box-sizing: border-box; }
html, body, header, nav, main, article, aside, footer {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body {
  margin: 0;
  color: var(--text);
  background: 
    linear-gradient(135deg, rgba(8,8,12,0.95) 0%, rgba(15,15,20,0.92) 60%, rgba(6,0,0,0.95) 100%),
    radial-gradient( circle at 20% 0%, rgba(120,0,0,0.15), transparent 40% ),
    /* Subtle scanlines for cyber feel (CSS-only) */
    repeating-linear-gradient(to bottom, rgba(0,0,0,0.12) 0 1px, transparent 1px 2px);
  background-blend-mode: overlay, overlay, normal;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  line-height: 1.5;
  min-height: 100svh;
  padding: 0;
}
img { max-width: 100%; display: block; }

/* Sectioning semantics styling */
header, main, footer, aside, article, nav {
  display: block;
}

/* Content container + utilities */
.container {
  width: 100%;
  max-width: clamp(320px, 92vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid { display: grid; gap: 1rem; }
.card {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem;
  box-shadow: var(--shadow);
}
.tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.15em 0.45em;
  border-radius: 999px;
  background: rgba(255,0,0,.25);
  color: #fff;
  border: 1px solid rgba(255,255,255,.25);
}

/* Section headers for readability in production pages */
.section-header { font-weight: 600; letter-spacing: .4px; margin: .5rem 0 0.25rem; }

/* Hero / header styling */
header {
  padding: clamp(1rem, 2.5vw, 2rem) 0;
  text-align: center;
}
header h1 {
  font-size: clamp(1.4rem, 2vw + 1rem, 2.2rem);
  line-height: 1.15;
  margin: 0;
  letter-spacing: .2px;
  text-wrap: balance;
}
.main { padding: 1rem 0 0; }

/* Image frame with glassy border & glow */
.image-frame {
  width: min(96%, 1080px);
  aspect-ratio: 16 / 9;
  border-radius: calc(var(--radius) + 2px);
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(0,0,0,.25);
  box-shadow: 0 8px 22px rgba(0,0,0,.45), inset 0 0 0 1px rgba(255,255,255,.04);
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover;
  image-rendering: auto;
  filter: saturate(1.05);
  transition: transform .3s ease;
}
.image-frame:focus-within img,
.image-frame:hover img {
  transform: scale(1.002);
}

/* Glass panels (product ads / CTAs) */
.product-ad, .sponsored-page {
  display: block;
  padding: 0.9rem 1rem;
  text-align: center;
  border-radius: 12px;
  background: rgba(15,15,18,.60);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
}
.product-ad a, .sponsored-page a {
  color: #fff;
  text-decoration: none;
}
.product-ad a:hover, .sponsored-page a:hover { text-decoration: underline; }
.product-ad + .sponsored-page { margin-top: .5rem; }

/* Link, button, CTA styling (focus rings guaranteed) */
a, button, .btn, .cta {
  font: inherit;
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255,255,255,.28);
  padding: 0.55rem 0.95rem;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  transition: background .2s ease, transform .2s ease, border-color .2s ease;
}
a { color: var(--text); }
a:hover { text-decoration: underline; text-decoration-skip-ink: auto; }
.btn, .cta {
  background: rgba(230, 0, 0, 0.28);
  border-color: rgba(255,255,255,.4);
}
.btn:hover, .cta:hover {
  background: rgba(230, 0, 0, 0.42);
  transform: translateY(-1px);
}
:focus-visible {
  outline: var(--focus);
  outline-offset: 2px;
  border-color: rgba(255,255,255,.8);
}
button:focus-visible, .btn:focus-visible, .cta:focus-visible, a:focus-visible {
  outline-offset: 3px;
}

/* Typography */
.content {
  padding: 0.75rem 0;
  color: var(--text);
}
.content p {
  margin: 0.6rem 0;
  color: var(--text);
}
ul, li { margin: 0; padding: 0 0 0 1.15em; }
ul { margin-block: .5rem; }
li { margin: .25rem 0; }

/* Layout helpers */
@media (min-width: 700px) {
  .grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 980px) {
  .grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}

/* Dark mode variant for better legibility in light environments */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f7f7fb;
    --bg-2: #ffffff;
    --text: #0a0a0f;
    --muted: #44464e;
    --accent: #b30000;
    --accent-2: #c40000;
    --glass: rgba(255,255,255,.72);
    --glass-2: rgba(255,255,255,.82);
    --border: rgba(0,0,0,.15);
    --card: rgba(255,255,255,.75);
    --shadow: 0 4px 12px rgba(0,0,0,.08);
  }
  body {
    background: 
      linear-gradient(135deg, rgba(250,250,255,0.95) 0%, rgba(245,245,255,0.92) 60%, rgba(240,240,245,0.95) 100%),
      radial-gradient(circle at 20% 0%, rgba(190,0,0,0.12), transparent 40%),
      0 0;
  }
  .image-frame {
    border-color: rgba(0,0,0,.15);
    background: rgba(255,255,255,.7);
  }
  .product-ad, .sponsored-page {
    background: rgba(255,255,255,.86);
    color: #111;
  }
  a, .btn, .cta {
    border-color: rgba(0,0,0,.15);
  }
}

/* Print styles */
@media print {
  body { background: #fff; color: #000; }
  a { color: #000; text-decoration: underline; }
}
 
/* Motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; transform: none !important; }
}