/* Base palette & tokens (dark matter + lilac) */
:root{
  --bg: #0a0a0f;
  --bg-2: #141421;
  --text: #e9e1f7;
  --muted: #b8b3cc;
  --accent: #b89dff;
  --accent-2: #8f7dff;
  --card: rgba(255,255,255,0.08);
  --card-2: rgba(255,255,255,0.12);
  --border: rgba(255,255,255,0.25);
  --shadow: 0 8px 24px rgba(0,0,0,0.45);
  --radius: 12px;
  --focus: 0 0 0 3px rgba(184,157,255,0.75);
}

/* Global reset & mobile-first base */
html, body { height: 100%; }
* { box-sizing: border-box; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial; }
body {
  margin: 0;
  color: var(--text);
  background-color: var(--bg);
  /* Layered background: gradient + subtle scanlines/noise */
  background-image:
    linear-gradient(135deg, rgba(60,0,60,0.22), rgba(12,6,20,0.72) 60%, rgba(6,6,12,0.88)),
    repeating-linear-gradient(to bottom, rgba(255,255,255,0.04) 0 1px, transparent 1px 2px);
  background-blend-mode: screen, overlay;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Layout helpers */
.container {
  width: min(92%, 1200px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid { display: grid; gap: 1rem; }

/* Header / hero styling */
header {
  padding: 1rem 0;
}
header h1 {
  font-size: clamp(1.6rem, 1.8rem + 1.9vw, 3.6rem);
  line-height: 1.08;
  margin: 0 0 0.25rem;
  letter-spacing: .2px;
  color: var(--text);
}
header .meta {
  font-size: clamp(0.8rem, 0.6vw + 0.8rem, 1rem);
  color: var(--muted);
  margin: 0 0 .5rem;
}
nav a {
  color: var(--accent);
  text-decoration: none;
  padding: .4rem .6rem;
  border-radius: 6px;
}
nav a:hover, nav a:focus-visible {
  text-decoration: underline;
  outline: none;
}
@media (min-width: 720px) {
  header { padding: 1.25rem 0; }
  header h1 { font-size: clamp(2.2rem, 1.6rem + 3vw, 4rem); }
}

/* Image frame styling (targets .image-frame and .image-frame img) */
.image-frame, .image-frame img {
  display: block;
}
.image-frame {
  aspect-ratio: 16/9;
  width: 100%;
  overflow: hidden;
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 12px 28px rgba(0,0,0,0.42);
  background: #000;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
  transform: scale(1.001);
  transition: transform 0.4s ease;
}
.image-frame:hover img { transform: scale(1.04); }

/* Content areas (glass panels) */
.glass {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  color: var(--text);
  backdrop-filter: blur(12px) saturate(1.05);
  -webkit-backdrop-filter: blur(12px) saturate(1.05);
  box-shadow: var(--shadow);
}
@supports ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
  .glass { background: rgba(255,255,255,0.08); }
}
@media (prefers-reduced-motion: reduce) {
  .glass, .image-frame img { transition: none; animation: none; }
}
.content { /* utility for article segments if needed */ }

/* Article styling */
main { padding: 1rem 0 2rem; }
article { display: block; }
article h2 {
  font-size: clamp(1.4rem, 1.2rem + 2vw, 2.2rem);
  margin: .75rem 0;
  color: var(--text);
}
article h3 { font-size: clamp(1.05rem, 0.9rem + 1.2vw, 1.3rem); margin: .6rem 0; color: var(--text); }
article p { font-size: clamp(0.95rem, 0.9vw + 0.8rem, 1.125rem); line-height: 1.6; color: rgba(233,225,247,0.95); margin: .6rem 0; }
blockquote {
  margin: .6rem 0;
  padding: .6rem 1rem;
  border-left: 3px solid var(--accent-2);
  background: rgba(255,255,255,0.04);
  border-radius: 6px;
  color: #e8e0f7;
}
ul { margin: .6rem 0 1rem 1.1rem; padding: 0; }
ul li { margin: .25rem 0; color: rgba(225,216,243,0.95); }

/* Footer / ad panels */
footer {
  padding: 1rem 0 2rem;
  display: grid;
  gap: 1rem;
}
.product-ad, .sponsored-page {
  text-align: center;
}
.product-ad a, .sponsored-page a {
  display: block;
  text-decoration: none;
  color: var(--text);
}
.product-ad p, .sponsored-page p { margin: 0; }

/* Glass panels for footer sections (adaptable) */
footer .glass {
  padding: .75rem;
}
@media (min-width: 640px) {
  footer { grid-template-columns: 1fr 1fr; align-items: start; }
  .product-ad, .sponsored-page { padding: .25rem; }
}
footer p { text-align: center; color: var(--muted); font-size: .9rem; }

/* Buttons & links (interactive states) */
a, button, .btn, .cta {
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; outline: none; }
button, .btn, .cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 999px;
  padding: .65rem 1rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  color: #fff;
  background: var(--accent);
  text-decoration: none;
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease;
  box-shadow: 0 6px 14px rgba(0,0,0,.25);
}
button:hover, .btn:hover, .cta:hover { transform: translateY(-1px); }
button:active, .btn:active, .cta:active { transform: translateY(0); }
.btn { background: var(--accent); }
.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.4);
}
.btn:focus-visible, .cta:focus-visible, a:focus-visible, button:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  transform: translateZ(0);
}
.cta { padding: .65rem 1.1rem; }

/* Utility for small screens: compact typography */
@media (max-width: 420px) {
  .container { padding-inline: .5rem; }
  header h1 { font-size: 1.8rem; }
}

/* Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; color: #000; }
  .glass { background: transparent; border: 1px solid #ccc; box-shadow: none; }
}
