/* Section: Tokens & Theme */
:root {
  --bg: #0a0a14;
  --bg-2: #141024;
  --text: #f6eaff;
  --muted: #c8b4cf;
  --accent: #8a5cff;       /* neon purple */
  --accent-2: #ff69b4;     /* pastel pink */
  --surface: rgba(255,255,255,0.08);
  --surface-2: rgba(255,255,255,0.14);
  --glass-border: rgba(255,255,255,0.28);
  --shadow-soft: 0 8px 26px rgba(0,0,0,.25);
  --focus: rgba(138,92,255,.95);
  --card: rgba(255,255,255,0.08);
  --card-border: rgba(255,255,255,0.25);
  --ring: 0 0 0 3px rgba(138,92,255,.75);
}

/* Section: Background & Effects (mobile-first layered background) */
html, body {
  height: 100%;
}
html {
  /* enable prefers-color-scheme friendly defaults if needed later */
}
body {
  margin: 0;
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, "Helvetica Neue", sans-serif;
  line-height: 1.45;
  background: 
    radial-gradient(circle at 20% 0%, rgba(138,92,255,.20), transparent 40%),
    radial-gradient(circle at 80% 20%, rgba(255,105,180,.15), transparent 40%),
    linear-gradient(135deg, rgba(10,0,30,.95), rgba(4,0,20,.95) 60%, rgba(0,0,0,.95) 100%);
  background-blend-mode: screen, overlay, normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  isolation: isolate;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* subtle noise / scanline effect (pure CSS) */
  background-image:
    linear-gradient(rgba(255,255,255,.04), rgba(255,255,255,.04)),
    repeating-linear-gradient(to bottom,
      rgba(255,255,255,.025) 0px,
      rgba(255,255,255,.025) 1px,
      transparent 1px,
      transparent 2px);
  mix-blend-mode: overlay;
  opacity: 0.9;
  height: 100%;
}

/* Section: Layout helpers */
.container {
  width: 100%;
  max-width: clamp(320px, 90vw, 1100px);
  margin-inline: auto;
  padding: 0 1rem;
}
.grid {
  display: grid;
  gap: 1rem;
}
.card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: var(--shadow-soft);
}
.tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 999px;
  background: rgba(138,92,255,.25);
  color: #fff;
  letter-spacing: .04em;
}

/* Section: Typography */
h1, h2, h3 {
  color: var(--text);
  margin: 0 0 0.25rem;
  line-height: 1.15;
}
h1 { font-size: clamp(1.75rem, 1.5rem + 2vw, 3rem); font-weight: 700; letter-spacing: .2px; }
h2 { font-size: clamp(1.25rem, 0.8rem + 1.6vw, 2rem); font-weight: 700; }
h3 { font-size: clamp(1rem, 0.6rem + 1vw, 1.25rem); font-weight: 700; color: var(--text); }
p { color: var(--muted); margin: 0 0 1rem; }
.meta { color: rgba(230,210,255,.9); font-size: .92rem; margin: .25rem 0 0; }

/* Section: Glass panels (fallbacks included) */
header, main, article, footer, aside, nav {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 8px 28px rgba(0,0,0,.25);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  margin-bottom: 1rem;
}
@supports not (backdrop-filter: blur(10px)) {
  header, main, article, footer, aside, nav {
    background: rgba(255,255,255,.18);
  }
}
.image-frame, .featured-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  margin: .5rem 0 1rem;
}
.image-frame img, .featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05);
}
.image-frame {
  outline: 1px solid rgba(164,110,255,.35);
  box-shadow: 0 0 22px rgba(164,110,255,.35);
}
.aside-note { color: var(--muted); }

/* Section: Content area variants */
.content {
  padding: 0.75rem 0;
}
.main-hero {
  display: grid;
  gap: 0.75rem;
}
.hero-title {
  display: grid;
  gap: .5rem;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
}
.glass {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 14px;
  padding: 1rem;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 28px rgba(0,0,0,.25);
}
@supports not (backdrop-filter: blur(12px)) {
  .glass { background: rgba(255,255,255,.18); }
}

/* Section: Product Ad (footer area) */
.product-ad {
  display: grid;
  gap: 0.5rem;
  align-items: start;
  padding: 0.75rem;
  background: rgba(20,0,40,.25);
  border: 1px solid rgba(164,110,255,.4);
  border-radius: 12px;
}
.product-ad h3 { margin: 0; }
.product-ad a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: #fff;
  padding: .5rem 0;
}
.product-ad a p { margin: 0; }

/* Section: Buttons & Links */
a {
  color: var(--accent-2);
  text-decoration: none;
}
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: none;
  outline: var(--ring);
  outline-offset: 3px;
  border-radius: 6px;
}
button, .btn, .cta {
  display: inline-block;
  padding: 0.6rem 0.95rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font: inherit;
  color: #fff;
  background: var(--accent);
  transition: transform .15s ease, background .2s ease;
  text-align: center;
}
.btn { background: var(--accent); }
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn:active { transform: translateY(0); }
.btn--outline {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}
.btn--outline:hover {
  background: rgba(138,92,255,.15);
}
.cta { background: linear-gradient(135deg, var(--accent), var(--accent-2)); }

/* Section: Lists & items */
ul { padding-left: 1.25rem; }
li { margin: 0.25rem 0; }

/* Section: Utilities & Responsiveness */
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}

/* Section: Print Styles */
@media print {
  body { background: #fff; color: #000; }
  header, main, article, footer, aside { background: #fff; border: none; }
  a { color: #000; text-decoration: underline; }
}

/* Section: Structural Selectors (explicitly styled) */
html, body, header, nav, main, article, footer, aside { /* ensure consistent box sizing */ box-sizing: border-box; }

/* Ensure images within content scale nicely on narrow screens */
img { max-width: 100%; height: auto; display: block; }

/* Section: Global Focus-visible baseline for accessibility on interactive elements within the page */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }