/* Base tokens */
:root {
  --bg: #0b0f15;
  --bg-2: #141824;
  --surface: rgba(20, 20, 40, 0.22);
  --surface-2: rgba(20, 20, 40, 0.12);
  --text: #e9e5ff;
  --muted: #b9aee3;
  --accent: #b48cff;      /* lavender accent */
  --accent-2: #8a5aff;    /* deeper lavender for focus */
  --border: rgba(255, 255, 255, 0.25);
  --outline: rgba(166, 156, 214, 0.9);
  --shadow: 0 8px 28px rgba(0,0,0,0.28);
  --glass-radius: 14px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html, body { margin: 0; padding: 0; }

/* Layered, responsive, espresso + lavender theme with CSS-only noise/scanlines */
body {
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  line-height: 1.5;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(20,10,20,.85) 0%, rgba(12,8,24,.95) 60%, rgba(15,8,22,.9) 100%),
    radial-gradient(circle at 20% 0%, rgba(138,90,255,.08), transparent 40%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 2px);
  background-blend-mode: overlay, overlay, normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color-scheme: dark;
}

/* Layout containers and utilities */
.container {
  width: min(92%, 1100px);
  margin: 0 auto;
  padding: 0 1rem;
}

.grid {
  display: grid;
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow);
}

.tag {
  display: inline-block;
  padding: .25rem .5rem;
  border-radius: 999px;
  font-size: .75rem;
  color: #111216;
  background: rgba(184,140,255,.9);
  border: 1px solid rgba(184,140,255,.8);
}

/* Header / navigation / hero region (glass panels) */
header, main, footer {
  padding: 1rem;
  border-radius: var(--glass-radius);
  margin: 1rem auto;
  width: min(92%, 1100px);
  background: rgba(14,12,28,.22);
  border: 1px solid rgba(180,160,255,.38);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

@supports not (backdrop-filter: blur(12px)) {
  header, main, footer {
    background: rgba(14,12,28,.66);
  }
}

header {
  text-align: center;
}
header h1 {
  font-size: clamp(1.6rem, 1.2rem + 2.2vw, 2.8rem);
  line-height: 1.15;
  margin: 0 0 .25rem;
  color: var(--text);
}
header .meta {
  color: var(--muted);
  font-size: clamp(0.9rem, 0.8vw + 0.6rem, 1.05rem);
  margin: .25rem 0 0;
}
nav {
  margin-top: .5rem;
}
nav a {
  color: var(--text);
  text-decoration: none;
  padding: .4rem .6rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.25);
}
nav a:hover, nav a:focus-visible {
  text-decoration: underline;
  outline: none;
  background: rgba(184,140,255,.15);
}
a, button, .btn, .cta {
  text-decoration: none;
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
}
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
  border-radius: 6px;
}
a:hover { text-decoration: underline; }

/* Hero content: leverage typography and CTAs */
.hero { padding: 0.75rem 0 0; }

/* Image framing for hero content */
.image-frame {
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 6px 18px rgba(0,0,0,.25);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
}

/* Main article styling and content */
main article {
  display: block;
  padding: 0;
}
main h2 {
  font-size: clamp(1.4rem, 1.6vw + 1rem, 2.2rem);
  margin: .75rem 0 .25rem;
  color: var(--text);
}
main h3 {
  font-size: clamp(1.15rem, 1.6vw + .8rem, 1.6rem);
  margin: .75rem 0;
  color: var(--text);
}
main p {
  color: var(--muted);
  margin: .5rem 0 1rem;
}
blockquote {
  margin: .75rem 0;
  padding-left: .75rem;
  border-left: 3px solid var(--accent-2);
  color: var(--muted);
  font-style: italic;
}
ul {
  padding-left: 1.25rem;
  margin: .5rem 0 1rem;
}
ul li {
  margin: .25rem 0;
  color: var(--text);
}
.product-ad {
  display: block;
  padding: .75rem;
  margin: .75rem 0;
  border-radius: 12px;
  text-align: center;
  background: rgba(24, 20, 40, .28);
  border: 1px solid rgba(180,150,255,.4);
}
.product-ad a { color: var(--text); }

/* Content area wrapper for glass panel effect */
.content {
  padding: .75rem;
  color: var(--text);
}
.content p { margin: .4rem 0 1rem; }

/* Image/visual framing utility */
.image-frame + .content { padding-top: .25rem; }

/* Print styles for readability */
@media print {
  body { background: #fff; color: #000; }
  header, main, footer { background: none; border: none; box-shadow: none; }
  a, button { color: #000; text-decoration: underline; }
}

/* Responsive helpers: simple grid for lists or media blocks */
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  header, main, footer { padding: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}