/* Base tokens */
:root {
  --bg: #0b0a08;
  --bg-2: #14120f;
  --text: #f5eade;
  --muted: #c9b6ad;
  --surface: rgba(255,255,255,0.08);
  --surface-2: rgba(255,255,255,0.14);
  --border: rgba(255,255,255,0.25);
  --shadow: 0 6px 18px rgba(0,0,0,.4);
  --radius: 12px;
  --radius-sm: 10px;
  --accent: #ff3abf;
  --accent-2: #e1008a;
  --focus: 2px solid #00ffd5;
  --focus-color: #00ffd5;
}

:root {
  color-scheme: dark;
}

/* Layered background: gradient + subtle noise/scanlines (pure CSS) */
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color: var(--text);
  background-color: var(--bg);
  background-image:
    linear-gradient(to bottom right, rgba(60,40,30,.6), rgba(10,8,6,.8)),
    radial-gradient(circle at 20% 0%, rgba(140,110,90,.25), transparent 40%),
    radial-gradient(circle at 100% 100%, rgba(90,40,60,.25), transparent 40%);
  background-blend-mode: multiply, overlay, overlay;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  min-height: 100%;
  overflow-x: hidden;
  line-height: 1.5;
  letter-spacing: .1px;
}
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 0;
  /* subtle scanlines + speckle for texture */
  background-image:
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px),
    repeating-linear-gradient(to right, rgba(0,0,0,.04) 0 1px, transparent 1px 2px);
  mix-blend-mode: overlay;
  opacity: .22;
}
* { box-sizing: border-box; }

.Container, .container { /* utility */ }
.container { max-width: clamp(28rem, 64rem, 1200px); margin: 0 auto; padding: 0 1rem; }

/* Layout sections (semantic) */
header, nav, main, article, aside, footer {
  width: 100%;
  padding: 1rem;
  box-sizing: border-box;
}
header, footer { position: relative; z-index: 1; }

/* Glass panel look (fallback included) */
.glass {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass { background: rgba(255,255,255,.18); }
}

/* Header hero with clear typography hierarchy */
header {
  display: block;
}
header h1 {
  font-size: clamp(1.75rem, 1.1rem + 3vw, 3.25rem);
  line-height: 1.04;
  margin: 0 0 .25rem 0;
  font-weight: 700;
  letter-spacing: .2px;
  text-shadow: 0 0 8px rgba(255,0,170,.25);
}
header .meta {
  font-size: clamp(0.95rem, .4vw + .8rem, 1.05rem);
  color: var(--muted);
  margin: 0;
}
header .badge {
  display: inline-flex; align-items: center; gap: .5ch;
  padding: .25rem .6rem; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(0,0,0,.25);
  color: #fff;
  text-transform: uppercase; font-size: .75rem;
}
header { margin: 1rem auto; padding: 1rem; }

/* Main content area */
main { padding: 0; }
article {
  margin: 0 auto;
  padding: 1rem;
  max-width: clamp(28rem, 82vw, 1000px);
}
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 6px 20px rgba(0,0,0,.4);
  background: #0a0a0a;
  display: block;
  margin: 0 0 1rem 0;
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  image-rendering: auto;
  filter: saturate(1.05);
}
h2 {
  font-size: clamp(1.5rem, 0.9vw + 1.2rem, 2.5rem);
  margin: .25rem 0 0.5rem;
  letter-spacing: .2px;
}
p { color: #f1e6dd; margin: .6rem 0; font-size: clamp(0.95rem, 0.5vw + .9rem, 1.15rem); }

/* Blockquote styling with theme-safe contrast */
blockquote {
  margin: .75rem 0; padding: .75rem 1rem;
  border-left: 4px solid var(--accent);
  background: rgba(0,0,0,.15);
  border-radius: 8px;
  color: #fff;
}
blockquote::after { content: ""; }

/* Lists */
ul { margin: .6rem 0 .6rem 1.1rem; }
li { margin: .25rem 0; }

/* Content helper container (optional) */
.content { padding: 1rem; }

/* Utility grid, cards, tags */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.card {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: 0 6px 16px rgba(0,0,0,.35);
}
.tag {
  display: inline-block;
  padding: .25rem .5rem;
  font-size: .75rem;
  border-radius: 999px;
  background: rgba(255, 0, 140, .65);
  color: white;
  border: 1px solid rgba(255,255,255,.5);
}

/* Product ad / footer blocks as glass panels */
.product-ad, .sponsored-page {
  padding: .75rem; border-radius: var(--radius-sm);
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.25);
  text-align: center;
}
.product-ad a, .sponsored-page a {
  color: #fff; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem;
}
.product-ad:hover, .sponsored-page:hover { transform: translateY(-1px); transition: transform .2s ease; }
.product-ad:focus-visible, .sponsored-page:focus-visible { outline: 3px solid var(--focus-color); outline-offset: 2px; }

/* Links and controls */
a, button, .btn, .cta {
  color: #fff; text-decoration: none; outline: none;
  font-weight: 600;
}
a { transition: color .2s ease; }
a:hover, a:focus-visible { text-decoration: underline; color: var(--accent-2); outline: none; }
button, .btn, .cta {
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 999px;
  padding: .65rem 1rem;
  background: linear-gradient(to bottom, rgba(255,0,180,.9), rgba(255,0,180,.6));
  color: #fff;
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
  box-shadow: 0 6px 12px rgba(0,0,0,.25);
}
.btn { font-size: .95rem; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn--outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,.8);
  color: #fff;
}
.cta { padding: .65rem 1.15rem; }

/* Focus styles for accessibility */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}
:focus:not(:focus-visible) { outline: none; }

/* Dark-mode friendly overrides (light mode variant for readability) */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5efe9;
    --bg-2: #e9e0d9;
    --text: #1a1a1a;
    --muted: #5a514a;
    --surface: rgba(0,0,0,.08);
    --surface-2: rgba(0,0,0,.15);
    --border: rgba(0,0,0,.25);
    --shadow: 0 4px 14px rgba(0,0,0,.15);
    --accent: #c400ff;
    --accent-2: #7a00b3;
  }
  body { background: linear-gradient(#fff, #f6f2ed); color: var(--text); }
  .glass { background: rgba(255,255,255,.75); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
  a, button, .btn, .cta { color: #1a1a1a; }
  a:hover, a:focus-visible { color: var(--accent-2); text-decoration: underline; }
  .image-frame { border-color: rgba(0,0,0,.15); box-shadow: 0 4px 12px rgba(0,0,0,.15); }
  .product-ad, .sponsored-page { background: rgba(255,255,255,.9); color: #1a1a1a; }
}

/* Simple print style for readability */
@media print {
  body { background: #fff; color: #000; }
  header, main, footer { background: none; border: none; padding: 0; }
  .image-frame { page-break-inside: avoid; }
}
  
/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}