/* CSS – The Masks Whisper in the Dark (production-ready, mobile-first) */

/* Palette & tokens */
:root{
  --bg: #0b0610;            /* void base */
  --bg-2: #1a0f1e;          /* deeper purple */
  --text: #f6efe7;           /* parchment text */
  --muted: #c9b6a0;          /* muted text */
  --accent: #ff6f61;          /* coral accent (primary) */
  --accent-2: #7a5cff;        /* void purple (secondary) */
  --glass: rgba(20, 8, 22, 0.28);
  --glass-2: rgba(255,255,255,0.28);
  --card: rgba(20, 8, 22, 0.42);
  --radius: 14px;
  --shadow: 0 8px 24px rgba(0,0,0,0.25);
  --focus: 3px solid color-mix(in oklab, white 60%, var(--accent));
}

/* Base & layout helpers */
html, body { height: 100%; }
* { box-sizing: border-box; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial; font-size: 16px; }
body {
  margin: 0;
  color: var(--text);
  background:
    /* parchment glow over void gradient */
    radial-gradient( circle at 15% 10%, rgba(255, 125, 110, 0.20) 0%, transparent 25% ),
    linear-gradient(135deg, #0b0610 0%, #1a0f2a 40%, #251033 100%);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    /* subtle scanlines + noise texture (pure CSS) */
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0 1px, transparent 1px 2px),
    repeating-linear-gradient(to right, rgba(0,0,0,0.015) 0 2px, transparent 2px 4px);
  opacity: 0.8;
  z-index: 0;
  mix-blend-mode: overlay;
}
main { position: relative; z-index: 1; padding: 2rem 1rem 3rem; }

/* Glass panels / frosted look (with graceful fallback) */
header {
  max-width: clamp(680px, 90vw, 980px);
  margin-inline: auto;
  padding: 1.75rem 1.25rem;
  text-align: center;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(12,6,12,0.40);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  header {
    background: rgba(12,6,12,0.72);
  }
}
header h1 {
  margin: 0.25rem 0 0.5rem;
  font-size: clamp(1.8rem, 2.4vw + 1rem, 3.6rem);
  line-height: 1.04;
  letter-spacing: .2px;
  color: #ffe9d7;
}
header .meta {
  margin: 0.25rem 0 0.5rem;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas;
  font-size: clamp(0.9rem, 0.8vw + 0.7rem, 1.05rem);
}
nav {
  margin-top: 0.75rem;
}
nav a {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem 0.75rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.28);
  color: var(--text);
  text-decoration: none;
  transition: transform .15s ease;
}
nav a:hover { transform: translateY(-1px); text-decoration: underline; }
nav a:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* Content container + typography */
.container { width: 100%; max-width: clamp(860px, 90vw, 1100px); margin: 0 auto; padding: 0 1rem; }
.content { padding: 0.75rem 0 0; color: var(--text); }

h2 {
  font-size: clamp(1.4rem, 1vw + 1.1rem, 2.2rem);
  margin: 1rem 0 0.5rem;
  color: var(--accent-2);
}
p { font-size: clamp(1rem, 0.8vw + 0.8rem, 1.25rem); line-height: 1.6; color: var(--text); margin: 0.75rem 0; }
blockquote {
  margin: 1rem 0;
  padding: .5rem 1rem;
  border-left: 3px solid var(--accent);
  color: var(--muted);
  font-style: italic;
  background: rgba(0,0,0,0.15);
  border-radius: 8px;
}
.featured-image { margin: 1rem 0 1rem; }
.image-frame {
  width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(0,0,0,0.25);
  box-shadow: 0 6px 18px rgba(0,0,0,0.35);
}
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

footer {
  padding: 1.25rem 1rem 2rem;
}
.product-ad, .sponsored-page {
  display: inline-block;
  width: calc(50% - 1rem);
  margin: .5rem;
  text-align: center;
  vertical-align: top;
  border-radius: 12px;
  padding: 1rem;
  background: rgba(12,6,14,0.62);
  border: 1px solid rgba(255,255,255,0.28);
  box-shadow: 0 6px 18px rgba(0,0,0,0.25);
}
.product-ad a, .sponsored-page a { color: var(--text); text-decoration: none; display: block; width: 100%; height: 100%; }
.product-ad p, .sponsored-page p { margin: 0; font-weight: 600; }

/* Utility & primitives */
ul, li { margin: 0; padding: 0; list-style: none; }
ul { display: grid; grid-auto-flow: row; gap: .25rem; padding-left: 1rem; }
li { padding-left: 0.25rem; }
.tag {
  display: inline-block;
  font-size: .75rem;
  padding: .25rem .6rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.08);
  color: var(--text);
}

/* Buttons & links (focus-visible accessible) */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.28);
  background: linear-gradient(135deg, rgba(255,111,97,0.95), rgba(255,111,97,0.75));
  padding: 0.6rem 1rem;
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
  transition: transform .15s ease, background .2s ease;
}
a:hover, .btn:hover, .cta:hover { text-decoration: underline; transform: translateY(-1px); }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,255,255,0.25);
  outline-offset: 2px;
}
.btn { background: rgba(0,0,0,0.25); color: var(--text); }
.btn.outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.55);
}

/* Glassy content blocks (fallback for non-backdrop-filter) */
@supports not (backdrop-filter: blur(12px)) {
  header, .product-ad, .sponsored-page {
    background: rgba(18,10,18,0.82);
    border-color: rgba(255,255,255,0.45);
  }
}

/* Layout helpers (responsive grid) */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 1rem;
}
.card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 12px;
  padding: 1rem;
}
.container.glass-placeholder { } /* placeholder for potential composition */

/* Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  header, main, footer { background: transparent; box-shadow: none; }
}
 
/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}