:root {
  --bg: #0b0e14;
  --bg-2: #141824;
  --text: #e9e6ff;
  --muted: #b3a8c8;
  --accent: #9f7aff;
  --accent-2: #cbb8ff;
  --glass: rgba(14, 14, 22, 0.22);
  --glass-strong: rgba(14, 14, 22, 0.34);
  --border: rgba(180, 170, 210, 0.45);
  --shadow: 0 8px 28px rgba(0,0,0,.35);
  --radius: 14px;
}

html, body, header, nav, main, article, footer, aside {
  box-sizing: border-box;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  line-height: 1.5;
  background: linear-gradient(135deg, #0b0e14 0%, #131a2a 60%, #0b0e14 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* Obsidian spiral + lavender glow (layered background) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 50% 50%, rgba(159,122,255,.12) 0 20%, transparent 22%),
    conic-gradient(from 45deg at 50% 50%, rgba(80,0,120,.0) 0 30%, rgba(80,0,120,.08) 30% 60%, rgba(0,0,0,.0) 60% 100%);
  mix-blend-mode: screen;
  opacity: 0.8;
  filter: saturate(1.05);
  z-index: 0;
}
body {
  isolation: isolate;
}
body {
  /* subtle scanlines */
  background-image:
    linear-gradient(rgba(255,255,255,0.04), rgba(255,255,255,0.04)),
    linear-gradient(180deg, rgba(0,0,0,.0) 0, rgba(0,0,0,.0) 100%);
  background-size: 100% 2px, 100% 100%;
  background-blend-mode: overlay;
}
main { position: relative; z-index: 1; }

/* Glass utility */
.glass {
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}
@supports not (backdrop-filter: blur(10px)) {
  .glass {
    background: rgba(12,12,18,.92);
    border: 1px solid rgba(140,140,180,.6);
  }
}

/* Layout helpers */
.container {
  width: 100%;
  max-width: clamp(320px, 90vw, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid {
  display: grid;
  gap: 1rem;
}
.card {
  padding: 1rem;
  border-radius: 12px;
  background: rgba(15,15,25,.25);
  border: 1px solid rgba(120,110,170,.35);
  transition: transform .2s ease, background .25s ease;
}
.card:hover { transform: translateY(-2px); background: rgba(15,15,25,.32); }

/* Typography scale (fluid) */
h1, h2, h3 {
  margin: 0 0 .5rem 0;
  line-height: 1.15;
}
h1 { font-size: clamp(1.75rem, 2.6vw + 1rem, 3.25rem); letter-spacing: .2px; color: var(--text); }
h2 { font-size: clamp(1.25rem, 1.8vw + .8rem, 2.25rem); color: var(--text); }
h3 { font-size: clamp(1.05rem, 1.2vw + .6rem, 1.4rem); color: var(--text); }

/* Header */
header {
  padding: 1.25rem 0;
}
header h1 { text-shadow: 0 1px 0 rgba(0,0,0,.4); }
header nav {
  margin-top: .5rem;
}
header nav a {
  color: var(--text);
  text-decoration: none;
  opacity: .92;
  padding: .4rem .6rem;
  border-radius: 6px;
  border: 1px solid rgba(160,140,210,.35);
  background: rgba(18,18,28,.35);
}
header nav a:hover { text-decoration: underline; opacity: 1; }

/* Featured image frame */
.featured-image {
  margin: .75rem 0 1rem;
  border-radius: 14px;
  overflow: hidden;
}
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(150,130,210,.4);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
  transition: transform .3s ease;
}
.image-frame:hover img { transform: scale(1.02); }

/* Content area */
.content { padding: 0; }

/* Text color helpers */
.muted { color: var(--muted); }

/* Lists */
ul { padding-left: 1.4rem; }
li { margin: .25rem 0; }

/* Links and CTAs */
a, button, .btn, .cta {
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}
a:hover { text-decoration: underline; }

/* Buttons (solid and outline) */
.btn, .cta {
  display: inline-block;
  padding: .65em 1.05em;
  border-radius: 999px;
  border: 1px solid rgba(159,122,255,.55);
  background: linear-gradient(#1a1b2a, #141622);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.btn:hover, .cta:hover {
  transform: translateY(-1px);
  background: linear-gradient(#30254a, #1b1740);
  border-color: rgba(159,122,255,.85);
}
.btn.outline, .cta.outline {
  background: transparent;
  border: 1px solid rgba(159,122,255,.75);
  color: var(--text);
}
.btn:active, .cta:active { transform: translateY(0); }

/* Footer product ad blocks */
footer {
  padding: 1.25rem 0;
  margin-top: 1rem;
}
.product-ad, .sponsored-page {
  display: inline-block;
  vertical-align: top;
  width: calc(50% - .5rem);
  min-width: 210px;
  margin: 0 .25rem 0 0;
}
.product-ad a, .sponsored-page a {
  display: block;
  padding: .75rem;
  text-align: center;
  border-radius: 12px;
}
.product-ad a { background: rgba(20,20,30,.5); border: 1px solid rgba(120,110,170,.5); }
.sponsored-page a { background: rgba(8,8,14,.5); border: 1px solid rgba(60,40,100,.5); }
footer p { text-align: center; margin: .75rem 0 0; color: var(--muted); }

/* Layout utilities (responsive) */
@media (max-width: 900px) {
  .product-ad, .sponsored-page { width: 100%; margin: .5rem 0 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; transform: none !important; }
}
@media print {
  body { background: #fff; color: #000; }
  a { text-decoration: underline; }
}
