:root {
  color-scheme: dark;
  --bg: #090b12;
  --panel: rgba(255, 255, 255, 0.08);
  --panel-strong: rgba(255, 255, 255, 0.13);
  --text: #f7f1e8;
  --muted: #b9b0c8;
  --accent: #ffcf6a;
  --accent-2: #89f7fe;
  --accent-3: #c471ed;
  --shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 15%, rgba(196, 113, 237, 0.32), transparent 28rem),
    radial-gradient(circle at 85% 20%, rgba(137, 247, 254, 0.2), transparent 24rem),
    linear-gradient(145deg, #090b12 0%, #12172a 55%, #20142f 100%);
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image: linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 20px;
}

.panel {
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: 32px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
}

.hero, .controls, .output, .manifesto { padding: clamp(24px, 4vw, 44px); }
.hero { min-height: 430px; display: flex; flex-direction: column; justify-content: center; }
.output { position: relative; overflow: hidden; grid-row: span 2; min-height: 620px; }
.manifesto { grid-column: 1 / -1; }

.kicker, .eyebrow {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 18px; font-size: clamp(4rem, 12vw, 8.6rem); line-height: 0.86; letter-spacing: -0.09em; }
h2 { font-size: clamp(1.6rem, 4vw, 3rem); line-height: 1; letter-spacing: -0.05em; }
.lede { max-width: 13ch; font-size: clamp(1.7rem, 4vw, 3.5rem); line-height: 0.96; letter-spacing: -0.055em; }
p { color: var(--muted); font-size: 1.04rem; line-height: 1.7; }

.hero-actions, .cards { display: flex; flex-wrap: wrap; gap: 12px; }
.button, select {
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  color: var(--text);
  background: var(--panel-strong);
  font: inherit;
}
.button { cursor: pointer; padding: 14px 20px; font-weight: 800; transition: transform 160ms ease, background 160ms ease; }
.button:hover { transform: translateY(-2px); background: rgba(255,255,255,0.18); }
.primary { color: #15100a; background: linear-gradient(135deg, var(--accent), #ff8f70); border: 0; }

.controls { display: grid; gap: 18px; align-content: start; }
label { display: grid; gap: 8px; color: var(--accent-2); font-size: 0.84rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.12em; }
select { width: 100%; padding: 13px 16px; text-transform: none; letter-spacing: 0; }

.constellation { position: absolute; inset: 0; opacity: 0.52; }
.star {
  position: absolute;
  width: var(--size);
  height: var(--size);
  border-radius: 999px;
  background: white;
  box-shadow: 0 0 22px currentColor;
  animation: drift 9s ease-in-out infinite alternate;
}
.output > *:not(.constellation) { position: relative; z-index: 1; }
#brief-body { font-size: 1.25rem; }

.card {
  flex: 1 1 170px;
  min-height: 145px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 22px;
  background: rgba(0,0,0,0.22);
}
.card b { display: block; margin-bottom: 9px; color: var(--accent-2); }
.card span { color: var(--text); line-height: 1.45; }

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: 320px;
  padding: 14px 18px;
  border-radius: 18px;
  background: #f7f1e8;
  color: #17121f;
  opacity: 0;
  transform: translateY(12px);
  transition: 180ms ease;
}
.toast.show { opacity: 1; transform: translateY(0); }

@keyframes drift { to { transform: translate3d(12px, -18px, 0) scale(1.25); opacity: 0.65; } }

@media (max-width: 840px) {
  .shell { grid-template-columns: 1fr; padding-top: 24px; }
  .output { min-height: auto; }
  .manifesto { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
