/* 01. Tokens & Palette */
:root{
  --bg: #0b061b;
  --bg-2: #1a0a25;
  --bg-3: #2a1340;
  --text: #e9e0ff;
  --muted: #c8b6ff;
  --accent: #8a5cff;      /* purple */
  --accent-2: #b06a3f;    /* bronze */
  --glass: rgba(15,0,40,.22);
  --glass-2: rgba(255,255,255,.08);
  --stroke: rgba(255,255,255,.28);
  --shadow: 0 10px 28px rgba(0,0,0,.25);
}

/* 02. Global & Layout */
* { box-sizing: border-box; }

html, body { height: 100%; }
html { background: transparent; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: transparent;
  position: relative;
}

/* Layered background: gradient + subtle noise/scanlines (pure CSS) */
html::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 15% 20%, rgba(138,90,255,.25), transparent 40%),
    radial-gradient(circle at 70% 10%, rgba(0,150,255,.15), transparent 40%),
    conic-gradient(from 200deg at 50% 50%, rgba(120,0,180,.18), rgba(0,0,0,0) 40%),
    linear-gradient(135deg, rgba(8,0,40,.95), rgba(40,0,60,.95) 60%, rgba(0,0,0,.95) 100%);
  background-blend-mode: screen, overlay, overlay, normal;
  opacity: 1;
  pointer-events: none;
}
html::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: repeating-linear-gradient(to bottom,
              rgba(255,255,255,.04) 0 1px,
              transparent 1px 2px);
  mix-blend-mode: overlay;
  pointer-events: none;
  opacity: .85;
}

/* 03. Utilities & primitives */
.container { width: 100%; max-width: clamp(320px, 92vw, 1120px); margin-inline: auto; padding-inline: 1rem; }

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

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

/* 04. Glass panels (fallback if backdrop-filter unsupported) */
@supports not (backdrop-filter: blur(1px)) {
  .glass-supported { background: rgba(8,0,40,.66); }
}
article { 
  background: rgba(8,0,40,.26); 
  border: 1px solid rgba(255,255,255,.28); 
  border-radius: 16px; 
  padding: 1rem;
  margin: 0.75rem auto;
  max-width: 900px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  article { background: rgba(8,0,40,.66); }
}

header, footer { background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.25); border-radius: 14px; padding: 1rem; }

/* 05. Nav & Interactions */
nav { display: inline-flex; flex-wrap: wrap; gap: .5rem; justify-content: center; margin-top: .25rem; }

a, button, .btn, .cta {
  font-family: inherit;
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.28);
  background: linear-gradient(to bottom, rgba(138,107,255,.95), rgba(68,0,100,.95));
  padding: .6rem 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s ease, filter .2s ease;
}
a:hover, .btn:hover, .cta:hover { filter: brightness(1.05); text-decoration: underline; text-underline-offset: 2px; }
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  text-decoration: none;
}
button { background: linear-gradient(to bottom, rgba(110,0,255,.95), rgba(60,0,120,.95)); }

/* 06. Image framing */
.image-frame, .featured-image {
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 16/9;
  border: 1px solid rgba(255,255,255,.28);
  background: #000;
  box-shadow: inset 0 0 24px rgba(180,120,60,.25), 0 6px 20px rgba(0,0,0,.35);
}
.image-frame img, .featured-image img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  image-rendering: auto;
}

/* 07. Content typography */
.content { padding: 0.25rem 0 0; }
h1, h2, h3 { color: var(--text); margin: .4rem 0; line-height: 1.15; }
h1 { font-size: clamp(1.8rem, 1.6vw + 1rem, 3rem); letter-spacing: .2px; }
h2 { font-size: clamp(1.25rem, 0.8vw + 1rem, 2rem); margin-top: .9rem; }
h3 { font-size: clamp(1.05rem, 0.6vw + .9rem, 1.4rem); }
p { color: #e9e0ff; line-height: 1.6; margin: .5rem 0; }
blockquote { margin: .9rem 0; padding: .75rem 1rem; border-left: 4px solid var(--accent); background: rgba(138,107,255,.15); border-radius: 6px; color: #fff; }

ul { padding-left: 1.25rem; margin: .5rem 0; }
li { margin: .25rem 0; }

/* 08. Decorative tags & accessories */
.tag { display:inline-block; padding: .25rem .6rem; border-radius: 999px; font-size: .75rem; background: rgba(138,107,255,.25); color: #fff; border: 1px solid rgba(138,107,255,.5); }

/* 09. Sectioned content helpers (utility-ish) */
.product-ad, .sponsored-page { border-radius: 12px; overflow: hidden; }
.product-ad a, .sponsored-page a { display: block; width: 100%; text-align: center; padding: .75rem 1rem; }

/* 10. Footer & meta */
footer { display: grid; gap: .75rem; grid-template-columns: 1fr; justify-items: center; text-align: center; padding: 1rem 1rem 1.25rem; }
footer p { color: var(--muted); font-size: .92rem; }

/* 11. Responsive tweaks */
@media (min-width: 700px) {
  main { padding: 1.5rem; }
  article { margin: 1.5rem auto; padding: 1.25rem; }
  footer { grid-template-columns: 1fr 1fr; }
  .image-frame, .featured-image { margin: .25rem 0; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* 12. Print styles */
@media print {
  html, body { background: #fff; color: #000; }
  a { text-decoration: underline; color: #00f; }
}
  
/* 13. Accessibility helpers (keyboard focus) */
:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* 14. Structural element defaults (present selectors) */
html, body, header, nav, main, article, footer, aside { 
  /* structural declarations kept minimal to satisfy selector coverage */
}
ul, li { list-style: disc; } 

/* 15. Optional glass panel for content sections (class-less fallback) */
header, main, footer { background: rgba(0,0,0,.25); }