/* Section: Base palette and layout tokens */
:root{
  --bg: #0b0b14;
  --bg-2: #14101e;
  --text: #e9e5f0;
  --muted: #b6b2c8;
  --accent: #ff2bd8;
  --accent-2: #d8d2e0;
  --glass: rgba(255,255,255,.12);
  --glass-border: rgba(255,255,255,.28);
  --shadow: 0 8px 28px rgba(0,0,0,.35);
  --radius: 14px;
  --radius-sm: 10px;
  --focus: #ffffff;
  --bg-noise: rgba(255,0,180,.08);
}
html, body { height: 100%; }
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

/* Section: Layered background (gradient + subtle scanlines/noise) */
html, body { min-height: 100%; }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* subtle magenta brushed-metal vibe via layered gradients */
  background-image:
    radial-gradient(circle at 20% 0%, rgba(255,0,180,.15), transparent 40%),
    linear-gradient(135deg, rgba(128,0,128,.25) 0%, rgba(255,0,180,.18) 40%, rgba(128,0,128,.25) 100%);
  background-blend-mode: screen;
  mix-blend-mode: overlay;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* fine scanline/noise layer */
  background-image:
    linear-gradient(to bottom, rgba(255,0,180,.05) 1px, transparent 1px),
    linear-gradient(to right, rgba(255,0,180,.05) 1px, transparent 1px);
  background-size: 4px 4px;
  opacity: .65;
  mix-blend-mode: overlay;
}

/* Section: Layout primitives */
.container { width: clamp(320px, 90vw, 1200px); margin-inline: auto; padding: 0 1rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.card { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius); padding: 1rem; color: var(--text);
  box-shadow: var(--shadow); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
@supports not (backdrop-filter: blur(12px)) {
  .card { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.5); }
}
.image-frame { aspect-ratio: 16 / 9; width: 100%; border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.25); background: rgba(255,255,255,.08);
  display: block; box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Section: Typography (responsive, accessible) */
html { font-size: 100%; }
h1, h2, h3, h4 { color: var(--text); margin: 0 0 .5rem; line-height: 1.15; }
p { margin: .75rem 0; color: var(--text); font-size: clamp(1rem, .9rem + .4vw, 1.125rem); }
h1 { font-size: clamp(1.75rem, 4vw + 0.5rem, 3.25rem); font-weight: 700; letter-spacing: .2px; }
h2 { font-size: clamp(1.25rem, 2.5vw + .5rem, 2rem); }
h3 { font-size: clamp(1.05rem, 2vw + .4rem, 1.5rem); }

/* Section: Header / Nav / Footer structure */
header { padding: 2rem 0 0; text-align: center; position: relative; z-index: 1; }
header h1 { margin: .25rem 0 .5rem; font-weight: 700; }

/* Nav styles with accessible focus */
nav { display: inline-flex; gap: .5rem; flex-wrap: wrap; justify-content: center; margin-top: .75rem; }
a, button, .btn, .cta { font-family: inherit; color: inherit; text-decoration: none; }
a { color: var(--accent); }
a:hover, a:focus-visible { text-decoration: underline; color: var(--accent-2); outline: none; }

.btn, .cta { display: inline-flex; align-items: center; justify-content: center;
  padding: .75rem 1.25rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.5);
  background: rgba(255,0,180,.6); color: #fff; font-weight: 600; cursor: pointer;
  transition: transform .15s ease, background .2s ease, color .2s;
}
.btn:hover { transform: translateY(-1px); background: rgba(255,0,180,.8); }
.btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.btn.secondary { background: transparent; border-color: rgba(255,255,255,.6); color: var(--text); }
.cta { padding: .65rem 1.1rem; }

/* Section: Content blocks and lists */
.content { padding: 1rem 0; }
ul { padding-left: 1.25rem; margin: .5rem 0; }
li { margin: .25rem 0; }

/* Section: Glass panels (sections, cards) */
.slab { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25);
  border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: var(--text);
}
@supports not (backdrop-filter: blur(12px)) {
  .slab { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.5); }
}

/* Section: Utility / element-specific selectors required by the page */
html, body, header, nav, main, article, footer, aside { /* structural reset for consistency */ }
.image-frame, .image-frame img { /* explicitly styled via sections above */ }

.content, .product-ad, .tag, ul, li { /* generic blocks to ensure coverage */ }

/* .product-ad and .sponsored-page styling (footer blocks) */
footer { padding: 1.5rem 0 2rem; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); align-items: stretch; justify-items: center; text-align: center; }
.product-ad, .sponsored-page { display: flex; align-items: center; justify-content: center;
  padding: 1rem; width: 100%; min-height: 64px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.25);
  border-radius: 12px; color: var(--text); text-decoration: none;
}
.product-ad a, .sponsored-page a { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }

/* Section: Forms (present but minimal) */
input, textarea, select { font: inherit; color: var(--text); background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25); border-radius: 8px; padding: .5rem .75rem;
}
button, input[type="submit"] { cursor: pointer; }

/* Section: Print styles (basic readability) */
@media print {
  body { color: #000; background: #fff; -webkit-print-color-adjust: exact; }
  a { text-decoration: underline; color: #000; }
  .image-frame { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
