/* Section: Base tokens */
:root {
  --bg: #0a0f14;
  --bg-2: #0b1020;
  --text: #eafff5;
  --muted: #9fb3c8;
  --accent: #ff2ebf;       /* magenta */
  --accent-2: #2cff7a;     /* iridescent green */
  --card: rgba(255,255,255,0.08);
  --card-strong: rgba(255,255,255,0.18);
  --border: rgba(255,255,255,0.25);
  --shadow: 0 6px 18px rgba(0,0,0,.25);
  --radius: 14px;
}

/* Section: Global & Utilities */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, "Helvetica Neue"; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(circle at 25% 0%, rgba(0,255,140,.12), transparent 40%),
    linear-gradient(135deg, rgba(0,0,0,.75), rgba(0,0,0,.35) 60%, rgba(0,0,0,.75)),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 2px, transparent 2px 4px),
    conic-gradient(from 45deg at 60% 40%, rgba(0,255,140,.12), rgba(255,0,180,.12), rgba(0,255,140,.12) 60%, transparent 60%);
  background-blend-mode: overlay;
  min-height: 100%;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img[loading="lazy"] { display: block; }

.container, .grid, .card { box-sizing: border-box; }

/* Section: Layout base */
.container { max-width: clamp(320px, 88vw, 1100px); margin: 0 auto; padding: 1rem; }

/* Section: Glass panels (fallback if backdrop-filter not supported) */
header, main, footer, aside {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 12px;
  padding: 0.75rem;
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}
@supports not ((backdrop-filter: blur(12px)) or (-webkit-backdrop-filter: blur(12px))) {
  header, main, footer, aside {
    background: rgba(255,255,255,0.16);
    border-color: rgba(255,255,255,0.4);
  }
}

/* Section: Typography */
h1 { font-size: clamp(1.25rem, 4vw, 2.25rem); line-height: 1.15; margin: 0 0 .5rem; color: var(--text); }
p { margin: 0 0 0.75rem; }
.content { font-size: clamp(14px, 2.4vw, 17px); line-height: 1.5; color: var(--text); }

/* Section: Layout primitives */
nav { padding: .25rem 0 0; }
nav a { display: inline-flex; align-items: center; gap: .5ch; padding: .4rem .6rem; border-radius: 999px;
  color: var(--text); text-decoration: none; background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.25); }
nav a:hover { text-decoration: underline; }

/* Section: Image frame */
.image-frame { width: 100%; aspect-ratio: 16/9; overflow: hidden; border-radius: 14px;
  border: 1px solid rgba(255,255,255,.25); box-shadow: 0 8px 22px rgba(0,0,0,.25); background: #000; }
.image-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Section: Grid & cards */
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.card { padding: .75rem; border-radius: 12px; background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.25); }

/* Section: Tags */
.tag { display: inline-block; padding: .15rem .5rem; border-radius: 999px; font-size: .75rem;
  background: rgba(0,0,0,.25); color: var(--text); border: 1px solid rgba(255,255,255,.25); }

/* Section: Product ad & sponsorship blocks */
.product-ad { text-align: center; padding: .75rem; margin: .5rem 0; }
.product-ad a { color: var(--text); text-decoration: none; }

/* Section: Link/Button styling */
a, button, .btn, .cta { color: var(--text); text-decoration: none; border: none; cursor: pointer; }
.btn { display: inline-block; padding: .55rem .95rem; border-radius: 999px;
  background: var(--accent); color: #fff; font-weight: 600;
  border: 1px solid rgba(255,255,255,.25);
  transition: transform .2s ease, background .2s ease; }
.btn:hover { transform: translateY(-1px); background: #ff1a9e; }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* Outline variant */
.btn--outline { background: transparent; color: var(--text);
  border: 1px solid rgba(255,255,255,.6); }
.btn--outline:hover { background: rgba(255,255,255,.08); }

/* CTA helper */
.cta { display: inline-block; padding: .55rem .95rem; border-radius: 999px;
  background: var(--accent-2); color: #002; font-weight: 600; border: 1px solid rgba(0,0,0,.15); }

/* Focus & accessibility for links and controls */
a:focus-visible, button:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* Section: Lists */
ul { margin: 0.5rem 0; padding-left: 1.25rem; color: var(--muted); }
li { margin: .25rem 0; }

/* Section: Aside (if present) */
aside { padding-top: .5rem; }

/* Section: Print styles */
@media print {
  body { background: #fff; color: #000; }
  header, main, footer, aside { background: transparent; border: none; box-shadow: none; }
  .image-frame { page-break-inside: avoid; }
}

/* Section: Motion preferences */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* Section: Small-screen adjustments */
@media (max-width: 600px) {
  header { padding: .5rem; }
  .container { padding: .5rem; }
}