/* Base reset & tokens */
:root{
  --bg: #0f111a;
  --bg-2: #1a1f2a;
  --text: #e9e7f7;
  --muted: #b7b9c9;
  --accent: #c9b7e8;      /* soft lilac */
  --accent-2: #8f83c7;    /* deeper lilac for contrasts */
  --card: rgba(255,255,255,.08);
  --card-2: rgba(255,255,255,.12);
  --border: rgba(255,255,255,.28);
  --shadow: 0 6px 20px rgba(0,0,0,.25);
  --focus: 3px solid rgba(170,150,255,.9);
  --radius: 14px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Liberation Sans", sans-serif; }
body {
  margin: 0;
  color: var(--text);
  /* Layered background: gradient + subtle noise/scanlines + vignette */
  background:
    linear-gradient(135deg, rgba(60,70,85,.65), rgba(20,20,40,.65)),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 3px),
    linear-gradient(to bottom right, rgba(15,17,20,.95), rgba(30,24,40,.95)),
    #0b0e14;
  background-blend-mode: overlay, overlay, normal, normal;
  min-height: 100%;
  font-size: clamp(14px, 2.0vw, 16px);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  isolation: isolate;
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) {
  body { background-attachment: scroll; }
}

/* Layered background helper for accessibility */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 20% -10%, rgba(200,180,230,.08) 0 40%, transparent 40%),
              radial-gradient(circle at 70% 0%, rgba(120,100,200,.05) 0 40%, transparent 40%);
  mix-blend-mode: overlay;
  opacity: .5;
  z-index: -1;
}

/* Layout primitives */
.container { width: min(1100px, 92%); margin-inline: auto; padding: 0 1rem; }
.grid { display: grid; gap: 1rem; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); }
.tag { display: inline-block; padding: .25em .6em; border-radius: 999px; font-size: .75rem; background: rgba(200,180,230,.25); color: #f6f3ff; border: 1px solid rgba(200,180,230,.5); }

/* Glass panels & fallbacks */
.glass, .card, .product-ad, header, main, article, aside, footer {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
@supports not (backdrop-filter: blur(8px)) {
  .glass, .card, .product-ad {
    background: rgba(255,255,255,.18);
    border: 1px solid rgba(255,255,255,.4);
  }
}

/* Core typography & content */
.content { max-width: 60ch; color: var(--text); }
h1, h2, h3 { color: var(--text); margin: .5em 0 0.25em; line-height: 1.25; }
h1 { font-size: clamp(1.75rem, 4.5vw, 3rem); letter-spacing: .2px; }
h2 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h3 { font-size: clamp(1.05rem, 2.5vw, 1.2rem); margin-top: .75rem; }
p { margin: 0 0 1rem 0; color: var(--text); opacity: .95; }
ul { padding-left: 1.25em; margin: .25em 0 1rem; }
li { margin: .25em 0; }

/* Image framing */
.image-frame { width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.25); background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.04)); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15), 0 8px 28px rgba(0,0,0,.28); }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Interactive elements */
a { color: var(--accent-2); text-decoration: none; border-bottom: 1px solid transparent; }
a:hover, a:focus { text-decoration: underline; border-bottom-color: rgba(176,160,230,.6); }

/* Focus states - accessible with focus-visible */
:focus-visible { outline: 0; box-shadow: 0 0 0 3px rgba(140,120,230,.8); border-radius: 6px; }

/* Buttons & CTAs */
.btn, .cta { display: inline-block; padding: .6rem 1rem; border-radius: 8px; font-weight: 600; text-decoration: none; border: 1px solid rgba(255,255,255,.6); cursor: pointer; color: #fff; transition: transform .2s ease, filter .2s ease; }
.btn { background: linear-gradient(to bottom, #8f83d6, #6a5bd9); }
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn:active { transform: translateY(0); }
.btn:focus-visible, .cta:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(140,120,230,.8); }

/* Outline variant for emphasis */
.btn.outline { background: transparent; color: var(--text); border: 1px solid rgba(180,180,255,.75); }

/* Product ad block styling */
.product-ad { padding: 1rem; margin: 1rem 0; border-radius: 12px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); display: block; }

/* Lists styling to improve readability on glass */
ul { list-style-position: inside; padding-left: 0; margin-left: 0; }

/* Accessibility & readability tweaks */
html, body, header, nav, main, article, footer, aside { scroll-behavior: smooth; }

/* Small helpers */
.container, .grid, .card, .tag { /* utility shells kept lean for production use */ }

/* Print styles */
@media print {
  body { background: white; color: #000; }
  a { color: #000; text-decoration: underline; }
}
 
/* Reduced motion safeguard for animations (if any added later) */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Structural selectors (as requested) styling hints */
html, body, header, nav, main, article, footer, aside { /* structural block defaults defined above */ }
.image-frame, .image-frame img { /* image framing handled above */ }
.content { /* content area handled above */ }
.product-ad { /* product ad handled above */ }
a, button, .btn, .cta { /* interactive primitives handled above */ }
ul, li { /* list styling handled above */ }
.container, .grid, .card, .tag { /* utilities handled above */ }