/* Base & Palette */
:root {
  --bg: #0b0b0f;
  --bg-2: #1a0000;
  --text: #f7f7f7;
  --muted: #c8cbd6;
  --accent: #e10600;
  --accent-2: #ff3b30;
  --card: rgba(255,255,255,.08);
  --glass-border: rgba(255,255,255,.28);
  --surface: rgba(0,0,0,.25);
}
html, body { height: 100%; }
* { box-sizing: border-box; }
html, body, header, nav, main, article, aside, footer { scroll-margin-top: 0; }

/* Layered background: gradient + subtle noise/scanlines */
html {
  background: none;
}
body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, "Noto Sans", sans-serif;
  line-height: 1.5;
  background:
    linear-gradient(135deg, rgba(0,0,0,.85), rgba(20,0,0,.95) 60%, rgba(0,0,0,.95)),
    radial-gradient(circle at 10% 0%, rgba(255,0,0,.08), transparent 40%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  background-blend-mode: overlay, overlay, normal;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; }

/* Layout utilities */
.container {
  width: 100%;
  max-width: clamp(320px, 90vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}
.card {
  background: var(--card);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.tag {
  display: inline-block;
  font-size: .75rem;
  padding: .25rem .5rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.15);
  color: var(--text);
}

/* Glass panels (with fallback) */
.glass {
  background: rgba(255,255,255,.08);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 8px 28px rgba(0,0,0,.25);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass {
    background: rgba(0,0,0,.6);
    border-color: rgba(255,255,255,.15);
  }
}

/* Hero & typography */
h1, h2, h3 {
  margin: 0 0 .5rem;
  line-height: 1.15;
}
h1 {
  font-size: clamp(1.6rem, 1.6rem + 2.2vw, 3rem);
  letter-spacing: .2px;
}
h2 {
  font-size: clamp(1.25rem, 1.2rem + 1.2vw, 2rem);
}
h3 {
  font-size: clamp(1.05rem, 1rem + 0.8vw, 1.25rem);
}
p { color: var(--muted); margin: 0 0 1rem; }

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

/* Content area (may be applied by page sections) */
.content {
  max-width: clamp(320px, 90vw, 760px);
  margin-inline: auto;
  padding-block: 1rem;
}

/* Link, button, CTA treatments (focus outlines, hover states) */
a, button, .btn, .cta {
  color: #fff;
  text-decoration: none;
  background: transparent;
  border: 1px solid rgba(255,255,255,.4);
  border-radius: 8px;
  padding: .6rem .92rem;
  display: inline-block;
  font-weight: 600;
  transition: transform .15s ease, background .2s ease, border-color .2s ease;
}
a:hover, a:focus, .btn:hover, .btn:focus, .cta:hover {
  text-decoration: underline;
  outline: none;
}
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}
a, button, .btn, .cta {
  background-color: rgba(225,0,0,.0);
}
.btn {
  background: rgba(225,0,0,.92);
  border-color: rgba(255,255,255,.8);
  color: #fff;
}
.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,.6);
  color: #fff;
}
.btn:focus-visible, .btn-outline:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}
.btn:hover { transform: translateY(-1px); }

/* Lists */
ul { padding-left: 1.25rem; margin: .5rem 0 1rem; color: var(--muted); }
li { margin: .25rem 0; }

/* Sectioned content styling (glass-like panels for sections) */
header, main, footer {
  padding: 1rem 0;
}
header {
  padding-block: 1rem;
}
header > h1 {
  margin-bottom: .25rem;
}
nav a { color: var(--accent); text-decoration: none; padding: .25rem .5rem; border-radius: 6px; border: 1px solid rgba(225,0,0,.5); display: inline-block; }
nav a:hover, nav a:focus { text-decoration: underline; }

/* Main layout */
main { padding: 1rem 0; }
article { display: block; }

/* Footer & product ad styling */
footer {
  padding: 1rem 0 2rem;
  display: grid;
  gap: 1rem;
}
footer .product-ad, footer .sponsored-page {
  text-align: center;
}
footer .product-ad a, footer .sponsored-page a {
  display: block;
  padding: .75rem;
  border-radius: 10px;
}
footer .product-ad { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); }
footer .sponsored-page { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); }

/* Global focus outlines for accessibility on links inside content */
a:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; }

/* Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; }
}

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