/* 1. Tokens & Base */
:root {
  --bg: #0b0b12;
  --bg-2: #1a0b1d;
  --surface: rgba(236, 191, 214, 0.14);
  --surface-2: rgba(236, 191, 214, 0.24);
  --text: #f9f2f6;
  --muted: #cbb0bd;
  --accent: #c63d63;       /* burgundy */
  --accent-2: #8a1e3a;
  --rose: #e7a4b1;
  --glow: 0 8px 24px rgba(198, 61, 99, 0.34);
  --radius: 14px;
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  --focus-ring: 0 0 0 3px rgba(198, 61, 99, 0.6);
  --focus-offset: 3px;
  --maxw: clamp(520px, 90vw, 1120px);
}

html, body { height: 100%; }
* { box-sizing: border-box; }

/* 2. Layered background (gradient + subtle CSS noise/scanlines) */
html { background: #000; }
body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(135deg, rgba(18,6,22,0.95) 0%, rgba(16,4,12,0.95) 60%),
              radial-gradient(circle at 20% -10%, rgba(255,255,255,0.06), transparent 40%);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, "Noto Sans", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100%;
  overflow-x: hidden;
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  /* powder-like grain + subtle scanlines (pure CSS) */
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(rgba(0,0,0,0.05), rgba(0,0,0,0.05));
  background-size: 4px 4px, 4px 4px, 100% 2px;
  background-position: 0 0, 0 0, 0 0;
  mix-blend-mode: overlay;
  opacity: 0.5;
  filter: saturate(110%);
}
@media (prefers-reduced-motion: reduce) {
  body::before { display: none; }
}
:focus { outline: none; }

/* 3. Layout primitives */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.28);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
}
.tag {
  display: inline-block;
  padding: .25rem .6rem;
  font-size: .75rem;
  border-radius: 999px;
  background: rgba(198,61,99,0.25);
  color: #ffdbe6;
  border: 1px solid rgba(198,61,99,0.6);
}

/* 4. Header / hero styling */
header {
  padding: 2rem 1rem 1.5rem;
  text-align: center;
}
header h1 {
  margin: 0;
  font-family: inherit;
  font-weight: 700;
  font-size: clamp(2rem, 4vw + 1rem, 4rem);
  line-height: 1.08;
  letter-spacing: .4px;
}
header .meta {
  margin-top: .25rem;
  color: var(--muted);
  font-size: clamp(0.85rem, 0.6vw + 0.8rem, 1rem);
}

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

/* 6. Article content with glass panel look */
article {
  margin: 1rem 0;
  padding: 1.25rem;
  border-radius: calc(var(--radius) + 2px);
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.28);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  article { background: rgba(255,255,255,0.18); }
}
article h2 {
  font-size: clamp(1.5rem, 1vw + 1rem, 2.4rem);
  margin: .5rem 0 .4rem;
  color: var(--text);
}
article p {
  color: var(--text);
  margin: .25rem 0 1rem;
  max-width: 70ch;
}
article ul { padding-left: 1.25rem; margin: .25rem 0 1rem; }
article li { margin: .25rem 0; }

/* 7. Footer / product ad + other sections */
footer { padding: 2rem 1rem; text-align: center; }

.product-ad, .sponsored-page {
  display: grid;
  place-items: center;
  padding: .75rem;
  margin: .5rem auto;
  border-radius: 12px;
  background: rgba(193, 42, 60, 0.25);
  border: 1px solid rgba(193, 42, 60, 0.6);
}
.product-ad a, .sponsored-page a {
  display: inline-block;
  padding: .6rem 1rem;
  border-radius: 999px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,0.6);
  background: rgba(193,42,60,0.75);
}
.product-ad a:hover, .sponsored-page a:hover {
  background: rgba(193,42,60,1);
}
.product-ad a:focus-visible, .sponsored-page a:focus-visible,
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  outline-offset: var(--focus-offset);
}
footer p { color: var(--muted); }

/* 8. Interactive controls (buttons/links) */
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; color: var(--accent-2); }
button, .btn, .cta {
  font-family: inherit;
  font-size: 1rem;
  line-height: 1.25;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease, color .2s ease;
}
.btn {
  display: inline-block;
  padding: .6rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.5);
  background: rgba(198,61,99,0.95);
  color: #fff;
  font-weight: 700;
}
.btn + .btn { margin-left: .5rem; }
.btn:hover { transform: translateY(-1px); background: rgba(198,61,99,1); }
.btn:focus-visible { outline: none; box-shadow: var(--focus-ring); }
.btn--outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.8);
  color: var(--text);
}
.cta {
  display: inline-block;
  padding: .6rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.08);
  color: var(--text);
  text-decoration: none;
}
.cta:hover { background: rgba(255,255,255,0.14); }

/* 9. Typography helpers */
p + p { margin-top: .25rem; }

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