:root {
  --bg: #1a0b12;
  --bg-2: #3a0b12;
  --bg-3: #5a1b20;
  --peach: #f5c6a5;
  --peach-2: #f29d74;
  --text: #f9f0ea;
  --muted: #cdb7aa;
  --accent: #f29d74;
  --accent-2: #e08a63;
  --card: rgba(255, 255, 255, 0.08);
  --card-strong: rgba(255, 255, 255, 0.14);
  --shadow: 0 8px 26px rgba(0,0,0,.35);
  --radius: 14px;
  --focus: 2px solid rgba(255, 214, 180, 0.95);
  --container: 1200px;
}

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

html, body { height: 100%; }

html, body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(135deg, rgba(40,0,10,.95), rgba(18,0,8,.95) 60%, rgba(8,0,0,.95) 100%), 
              linear-gradient(to bottom right, rgba(0,0,0,.08), rgba(0,0,0,.0));
  min-height: 100dvh;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, "Helvetica Neue", sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

/* Subtle layered noise/scanline overlay (pure CSS) */
html::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(to bottom, rgba(255,255,255,.04) 1px, transparent 1px),
    linear-gradient(to right, rgba(0,0,0,.05) 1px, transparent 1px);
  background-size: 4px 4px, 4px 4px;
  mix-blend-mode: overlay;
  opacity: 0.25;
  filter: saturate(110%);
}

/* Page layout containers and glass panels (fallback + backdrop-filter) */
header, nav, main, article, aside, footer {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius);
  padding: 1rem;
  margin: 0.75rem auto;
  width: min(90%, var(--container));
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) and not (-webkit-backdrop-filter: blur(12px)) {
  header, nav, main, article, aside, footer {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.4);
  }
}
@media (prefers-color-scheme: light) {
  html::before { opacity: 0.15; }
}
:focus-visible {
  outline: 2px solid rgba(255, 214, 180, 0.95);
  outline-offset: 2px;
  border-radius: 6px;
}

/* Page typography and hierarchy */
h1 {
  font-size: clamp(1.75rem, 2.5vw + 1rem, 3rem);
  line-height: 1.15;
  margin: 0.25rem 0 0.5rem;
  color: var(--peach);
  letter-spacing: 0.2px;
}
h2 { font-size: clamp(1.25rem, 1.5vw + 0.9rem, 2rem); margin: 0.75rem 0 0.25rem; color: #fff; }
h3 { font-size: clamp(1rem, 0.8vw + 0.9rem, 1.25rem); margin: 0.75rem 0 0.25rem; color: #ffdccc; }

/* Header + meta styling */
header {
  text-align: center;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  position: relative;
  z-index: 1;
}
header .meta {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
  font-size: clamp(0.8rem, 0.8vw + 0.4rem, 1rem);
  color: var(--muted);
  margin-top: .25rem;
}
nav {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin-top: .75rem;
}
nav a {
  color: var(--text);
  text-decoration: none;
  padding: .5rem 1rem;
  border-radius: 999px;
  background: rgba(0,0,0,.15);
  border: 1px solid rgba(255,255,255,.25);
  transition: transform .2s ease, background .2s ease;
}
nav a:hover, nav a:focus-visible {
  text-decoration: underline;
  background: rgba(0,0,0,.25);
  transform: translateY(-1px);
}
main { display: block; padding: 0; }

/* Content utility */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 1rem; }

/* Image frame handling */
.image-frame {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 8px 24px rgba(0,0,0,.28);
  background: #000;
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: saturate(1.05);
}

/* Article content and typography tweaks */
.content {
  color: var(--text);
  font-size: clamp(0.95rem, 0.9vw + 0.8rem, 1.1rem);
  line-height: 1.65;
}
.content p { margin: .6rem 0; }
.content ul, .content ol { margin: .6rem 0 1rem 1.2rem; }
.content li { margin: .25rem 0; }

/* Lists and bullets styling for contrast */
ul { padding: 0; margin: 0.5rem 0; }
ul li { margin: .25rem 0; }

/* Glass panels for sections (applied to semantic blocks) */
footer, aside, article, section {
  /* keep internal rhythm via container spacing; actual glass styling handled above */
}

/* Product/ad area styling (glass-like) */
.product-ad {
  padding: .75rem;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.28);
  text-align: center;
}
.product-ad a { color: var(--text); text-decoration: none; font-weight: 600; display: inline-block; padding: .5rem 1rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); }
.product-ad a:hover, .product-ad a:focus-visible { text-decoration: underline; background: rgba(0,0,0,.25); }

/* Generic button/link styling */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  font: inherit;
}
button, .btn {
  padding: .65rem 1rem;
  border-radius: 8px;
  background: var(--peach);
  color: #3a1a12;
  border: 1px solid rgba(255, 204, 188, 0.8);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
  transition: transform .2s ease, background .2s ease;
}
button:hover, .btn:hover { transform: translateY(-1px); background: #f4b89b; }
button:active, .btn:active { transform: translateY(0); }
.btn.outline {
  background: transparent;
  border: 1px solid var(--peach-2);
  color: var(--peach-2);
}
.btn:focus-visible, .cta:focus-visible, a:focus-visible { outline: 2px solid rgba(255, 214, 180, 0.95); outline-offset: 3px; }

/* Hero CTAs emphasis (within header) */
header h1 + p { margin-top: .25rem; color: var(--muted); }

/* Utilities for grid layouts */
.grid { display: grid; gap: 1rem; }
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
.card {
  background: var(--card);
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 6px 16px rgba(0,0,0,.22);
}
.tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: .25em .6em;
  border-radius: 999px;
  background: rgba(243, 199, 167, 0.25);
  color: #ffd8c0;
  border: 1px solid rgba(243, 199, 167, 0.6);
}

/* Image caption helper (if used) */
figcaption { font-size: .85rem; color: var(--muted); text-align: center; }

/* Layout tweaks for lists within article for readability */
article ul, article ol { padding-left: 1.25rem; }

/* Print styles for readability */
@media print {
  body { background: white; color: black; }
  a { color: black; text-decoration: underline; }
  header, nav, main, article, aside, footer { border: none; background: transparent; padding: 0; margin: 0; }
  .container { max-width: 100%; padding: 0; }
}

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