:root {
  --bg: #0b0b0f;
  --bg-2: #0f1117;
  --text: #e9e9ee;
  --muted: #a6a6ad;
  --accent: #e50914;       /* scarlet */
  --accent-2: #ff2d4d;
  --glass: rgba(255, 255, 255, 0.08);
  --glass-strong: rgba(255, 255, 255, 0.18);
  --border: rgba(255, 255, 255, 0.25);
  --shadow: 0 8px 24px rgba(0,0,0,0.4);
  --radius: 12px;
  --radius-lg: 14px;
  --focus: 2px solid #fff;
  --focus-offset: 4px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { height: 100%; }

html, body { margin: 0; padding: 0; }

body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial;
  color: var(--text);
  background-color: var(--bg);
  /* Layered background: gradient + subtle scanlines/noise */
  background-image:
    linear-gradient(135deg, rgba(12,12,18,0.95) 0%, rgba(8,8,12,0.95) 100%),
    linear-gradient(rgba(255,255,255,0.04), rgba(255,255,255,0.04)),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 2px);
  background-blend-mode: overlay;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Layout helpers */
.container { max-width: clamp(320px, 90vw, 1100px); margin-inline: auto; padding: 1rem; }

.grid { display: grid; gap: 1rem; }

.card { background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; }

/* Glass panel fallback (with optional backdrop-filter) */
.glass {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
@supports not (backdrop-filter: blur(10px)) {
  .glass { background: var(--glass-strong); }
}

header, main, aside, article, footer {
  display: block;
}

/* Header / hero styling */
header {
  padding: 1.25rem;
}
header h1 {
  font-size: clamp(1.6rem, 2.2vw + 1rem, 2.8rem);
  margin: 0 0 0.25rem;
  line-height: 1.15;
  letter-spacing: 0.2px;
}
header .meta {
  font-size: 0.825rem;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
nav a {
  color: var(--accent);
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}
nav a:hover, nav a:focus-visible {
  text-decoration: underline;
  outline: none;
}

/* Hero/section image frame */
.image-frame, .image-frame img {
  display: block;
}
.image-frame {
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.25);
  box-shadow: 0 6px 18px rgba(0,0,0,0.4);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 450ms ease;
}
.image-frame:hover img { transform: scale(1.04); }

/* Main typography and content flow */
main { padding: 1rem; }
article { line-height: 1.6; max-width: 70ch; }

/* Headings and text blocks */
h2 { font-size: clamp(1.25rem, 1vw + 1rem, 1.75rem); margin: 1.1rem 0 0.5rem; }
p { margin: 0.5rem 0; color: var(--text); }
blockquote {
  margin: 0.75rem 0;
  padding: 0.5rem 1rem;
  border-left: 4px solid var(--accent);
  background: rgba(229, 0, 0, 0.12);
  border-radius: 6px;
}

/* Lists */
ul { padding-left: 1.25rem; margin: 0.75rem 0; }
li { margin: 0.25rem 0; }

/* Product/ads sections in footer */
.product-ad, .sponsored-page {
  display: block;
  padding: 0.75rem;
  margin: 0.5rem 0;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: var(--shadow);
}
.product-ad a, .sponsored-page a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(135deg, rgba(229, 9, 20, 0.95), rgba(255, 72, 92, 0.95));
}
.product-ad a:hover, .sponsored-page a:hover { filter: brightness(1.05); }

/* Generic link/button styles */
a, button, .btn, .cta {
  color: inherit;
  text-decoration: none;
  font-family: inherit;
}
a:focus-visible, button:focus-visible {
  outline: 2px solid #fff;
  outline-offset: var(--focus-offset);
  border-radius: 6px;
}
a:focus-visible { text-decoration: underline; }

/* Buttons and CTAs (solid + outline) */
.btn, .cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 600;
}
.btn {
  background: var(--accent);
  color: #fff;
  padding: 0.7rem 1.15rem;
  border-color: rgba(255,255,255,0.25);
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  transition: transform 180ms ease, filter 180ms ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--outline {
  background: transparent;
  color: var(--text);
  border-color: rgba(255,255,255,0.6);
}
.cta { padding: 0.75rem 1.25rem; }

/* Accessibility + contrast tuning for glass panels */
footer { padding: 1rem; }

/* Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  .glass, .card { background: #fff; border: 1px solid #ccc; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  html, body { scroll-behavior: auto; }
  * { animation: none !important; transition: none !important; }
}
@media (min-width: 800px) {
  main { padding: 2rem 0; }
  .container { padding: 0 1rem; }
  .image-frame { border-radius: calc(var(--radius) + 2px); }
}
