/* Tokens */
:root {
  --bg: #0a0a12;
  --bg-2: #0b0b1a;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-2: rgba(255, 255, 255, 0.14);
  --text: #eef2ff;
  --muted: #cbd5e1;
  --accent: #ff2ee8;   /* magenta */
  --accent-2: #d4a400;  /* gold */
  --ring: #ffffff;
  --shadow: 0 8px 28px rgba(0,0,0,.25);
  --radius: 14px;
  --focus: 2px solid #fff;
}

/* Base & utilities */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Inter, Arial, sans-serif; }
body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(135deg, rgba(12,8,20,.9), rgba(4,4,9,.95) 60%, rgba(8,0,24,.95)),
              radial-gradient(circle at 20% -10%, rgba(212,164,0,.15), transparent 40%),
              radial-gradient(circle at 80% 0%, rgba(255,0,199,.15), transparent 40%);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
  isolation: isolate;
}
* { line-height: 1.4; }

/* Layered background: subtle noise/scanlines (pure CSS) */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
body::before {
  background:
    radial-gradient(circle at 20% -10%, rgba(212,164,0,.12), transparent 40%),
    radial-gradient(circle at 90% 10%, rgba(255,0,199,.12), transparent 40%),
    linear-gradient(0deg, rgba(255,255,255,.04) 0 1px, transparent 1px 100%);
  background-blend-mode: overlay;
  background-size: 8px 8px, 8px 8px, 4px 4px;
  mix-blend-mode: overlay;
  opacity: .25;
}
body::after {
  background:
    linear-gradient(135deg, rgba(212,164,0,.08), rgba(212,164,0,0) 40%),
    linear-gradient(315deg, rgba(255,0,199,.12), rgba(0,0,0,0) 40%);
  mix-blend-mode: overlay;
  opacity: .35;
}
@supports (backdrop-filter: blur(8px)) or (-webkit-backdrop-filter: blur(8px)) {
  body { /* glass-like backdrop for depth behind content */
    /* no extra rule needed here; individual panels apply backdrop-filter */
  }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Layout primitives */
.container {
  width: 100%;
  max-width: clamp(320px, 92vw, 1200px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }

/* Glass panels (frosted glass) with graceful fallback */
.glass {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow);
  color: var(--text);
}
@supports (backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px)) {
  .glass { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
}
@supports not (backdrop-filter: blur(12px)) and not (--webkit-backdrop-filter: blur(12px)) {
  .glass { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.4); }
}
.card { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); border-radius: 12px; padding: .75rem; }

/* Typography scale (mobile-first, fluid) */
h1, h2, h3 { color: var(--text); margin: .25rem 0; }
h1 { font-size: clamp(1.6rem, 2.8vw + 0.6rem, 2.8rem); line-height: 1.15; text-shadow: 0 2px 8px rgba(0,0,0,.35); }
h2 { font-size: clamp(1.4rem, 1.4vw + 1rem, 2rem); }
h3 { font-size: clamp(1.1rem, .8vw + .9rem, 1.4rem); }
p { font-size: clamp(0.92rem, 0.4vw + .8rem, 1.05rem); color: #e9e9f0; margin: .4rem 0 1rem; }
ul, ol { margin: .5rem 0 1rem 1.2rem; }
li { margin: .25rem 0; }

/* Image framing (isometric vibe cue) */
.image-frame {
  aspect-ratio: 16/9;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 6px 20px rgba(0,0,0,.25);
  display: block;
  background: #000;
}
.image-frame img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .3s ease;
}
.image-frame:hover img { transform: scale(1.01); }

/* Specific element styles required by selectors */
html, body, header, nav, main, article, footer, aside {
  /* structural rules live here; keep practical defaults */
}
.image-frame, .image-frame img { }

/* Page sections */
header {
  padding: 1.25rem 0;
  text-align: center;
  position: relative;
  z-index: 1;
}
header h1 { font-weight: 700; letter-spacing: .2px; }
header .meta { color: var(--muted); font-size: .95rem; margin-top: .25rem; }

/* Main content handling */
main { padding: 1rem 0; display: block; }
article { display: block; padding: 0; }

/* Content wrapper for article when present */
.content { padding: .75rem; }

/* Image section encapsulation (if used) */
.featured-image { display: flex; justify-content: center; margin: 1rem 0; }
.featured-image img { width: 100%; height: auto; border-radius: 12px; }

/* Feature sections and CTAs */
.btn {
  display: inline-block;
  padding: .65rem 1.15rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.4);
  background: linear-gradient(135deg, var(--accent), #b500a0);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(210,0,210,.4); }
.btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.5);
}
a { color: var(--accent); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 4px; }

/* Footer and ad areas (glass panels) */
footer { padding: 1rem 0; display: grid; gap: .75rem; justify-items: center; align-items: center; text-align: center; }
.product-ad, .sponsored-page {
  min-width: 180px;
  width: 100%;
  max-width: 420px;
}
.product-ad { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25); border-radius: 12px; padding: .75rem; }
.product-ad a, .sponsored-page a { color: var(--text); text-decoration: none; display: block; padding: .25rem; }
.product-ad a:hover, .sponsored-page a:hover { text-decoration: underline; }
.sponsored-page { background: rgba(0,0,0,.25); border: 1px solid rgba(255,255,255,.25); border-radius: 12px; padding: .75rem; }

/* Forms (basic styling to match theme) */
input, textarea, select {
  width: 100%; padding: .5rem .75rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.25);
  background: rgba(255,255,255,.08);
  color: var(--text);
}
input::placeholder, textarea::placeholder { color: rgba(235,235,245,.6); }

/* Print styles (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  header, nav, main, footer { background: none; color: #000; }
}
