/* Section: Token Palette */
:root {
  --bg: #03040a;
  --bg-2: #0b0b14;
  --text: #e9e0c8;
  --muted: #c7b19c;
  --accent: #ff4bd1;      /* plasma pink */
  --accent-2: #ffd166;    /* gold */
  --surface: rgba(255, 255, 255, 0.12);
  --surface-2: rgba(255, 255, 255, 0.18);
  --border: rgba(255, 255, 255, 0.25);
  --shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  --radius: 14px;
  --focus: 0 0 0 3px rgba(255, 68, 200, 0.55);
  --focus-border: rgba(255,255,255,.9);
}

/* Section: Base & Layout (Mobile-First) */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
body {
  margin: 0;
  color: var(--text);
  background-color: var(--bg);
  min-height: 100dvh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  /* Layered background: gradient + subtle scanlines + faint stars */
  background-image:
    radial-gradient(circle at 20% 10%, rgba(255, 215, 0, 0.15) 0 20%, transparent 20px),
    radial-gradient(circle at 80% 0%, rgba(255, 0, 128, 0.12) 0 30%, transparent 30px),
    linear-gradient(135deg, rgba(4,6,20,.92) 0%, rgba(8,6,20,.92) 60%, rgba(4,6,20,.92) 100%),
    repeating-linear-gradient(to bottom, rgba(255,255,255,.04) 0 1px, transparent 1px 4px);
  background-blend-mode: screen, screen, normal, overlay;
}
*::selection { background: rgba(255, 209, 0, 0.25); color: #000; }

/* Section: Global helpers */
.container {
  width: min(100%, 1100px);
  margin-inline: auto;
  padding-inline: 1rem;
}
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* Section: Glass/frosted panels (fallback included) */
header, main, footer, aside {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
@supports not (backdrop-filter: blur(10px)) {
  header, main, footer, aside { background: rgba(255,255,255,0.22); }
}
header { display: block; margin-block: 0.5rem 1rem; }
main { margin: 0.5rem auto 1rem; }
footer { margin-top: 1rem; }

/* Section: Typography & hero */
h1 {
  font-size: clamp(1.6rem, 2.6vw + 1rem, 3.6rem);
  line-height: 1.05;
  margin: 0 0 0.5rem;
  letter-spacing: .2px;
  color: var(--text);
  text-shadow: 0 2px 14px rgba(0,0,0,.45);
}
header nav a {
  color: var(--accent-2);
  text-decoration: none;
  font-weight: 600;
}
header nav a:hover, header nav a:focus-visible {
  text-decoration: underline;
  outline: none;
  color: var(--accent);
}
.preamble {
  color: var(--muted);
  font-size: clamp(0.95rem, 1vw + 0.6rem, 1.1rem);
  margin: 0.25rem 0 0;
}
.content { color: var(--text); }

/* Section: Image frame */
.image-frame {
  aspect-ratio: 16 / 9;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 12px 28px rgba(0,0,0,.28);
  display: block;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.01);
  transition: transform .25s ease;
}
.image-frame:hover img { transform: scale(1.04); }

/* Section: Content primitives */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  color: #111;
  background: linear-gradient(135deg, #ffd166, #ffb020);
  border: 1px solid rgba(0,0,0,.08);
}
ul, li { margin: 0; padding: 0; list-style: none; }

/* Section: Links & buttons (interactive states) */
a, button, .btn, .cta {
  font: inherit;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}
a { color: var(--accent-2); }
a:hover, a:focus-visible { text-decoration: underline; outline: none; color: var(--accent); }
.btn, .cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.5);
  background: linear-gradient(to bottom right, rgba(255, 0, 120, 0.95), rgba(255, 77, 180, 0.95));
  color: #fff;
  font-weight: 600;
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.5);
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(0,0,0,.25); }
.btn:focus-visible, .cta:focus-visible {
  outline: none;
  box-shadow: var(--focus);
  border-color: var(--focus-border);
  outline-offset: 2px;
}
a.btn:focus-visible, a.cta:focus-visible { outline: none; }

/* Section: Utility classes (provided) */
.container { width: min(100%, 1100px); margin-inline: auto; padding-inline: 1rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }

/* Section: Print (basic readability) */
@media print {
  body { background: #fff; color: #000; }
  header, main, footer { background: #fff; border: 0; box-shadow: none; }
  a, button { color: #000; text-decoration: underline; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
@media (min-width: 900px) {
  main { padding-inline: 0; }
  .image-frame { border-radius: 16px; }
}
