/* Public marketing + sign-in landing (aurea/blueprints/landing.py).
 * Standalone document — loads _tokens.css (schema §2 palette) then this.
 * CSS-only animated aurora hero; respects prefers-reduced-motion (the
 * global rule in _tokens.css freezes the keyframes). A Unicorn Studio
 * WebGL scene drops in behind the hero when UNICORN_STUDIO_PROJECT_ID
 * is set; otherwise the aurora is the backdrop. */

:root {
  --landing-maxw: 1120px;
  --landing-nav-h: 64px;
}

html, body {
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.landing-wrap {
  width: 100%;
  overflow-x: clip;
}

.landing-container {
  max-width: var(--landing-maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------------------------------------------------------------- Nav */
.landing-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--landing-nav-h);
  display: flex;
  align-items: center;
  background: rgba(251, 251, 252, 0.72);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--divider);
}
.landing-nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--text);
}
.landing-brand__mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent) 0%, #8B5CF6 100%);
  box-shadow: var(--shadow-fab);
}
.landing-nav__links {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.landing-nav__signin {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--divider-strong);
  background: var(--bg-elev);
  transition: var(--transition);
}
.landing-nav__signin:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
  transform: translateY(-1px);
}

/* --------------------------------------------------------------- Hero */
.landing-hero {
  position: relative;
  padding: 96px 0 88px;
  overflow: hidden;
  isolation: isolate;
}
.landing-hero__bg {
  position: absolute;
  inset: -20% -10% -10% -10%;
  z-index: -2;
  pointer-events: none;
}
/* Unicorn Studio embed sits above the aurora when present */
.landing-hero__unicorn {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.9;
}

/* CSS aurora — three drifting radial blooms */
.aurora {
  position: absolute;
  inset: 0;
  filter: blur(60px) saturate(140%);
}
.aurora__blob {
  position: absolute;
  border-radius: 50%;
  opacity: 0.55;
  mix-blend-mode: multiply;
  will-change: transform;
}
.aurora__blob--1 {
  width: 520px; height: 520px;
  left: 4%; top: -8%;
  background: radial-gradient(circle at 30% 30%, #4178E5, transparent 70%);
  animation: aurora-drift-1 18s ease-in-out infinite alternate;
}
.aurora__blob--2 {
  width: 460px; height: 460px;
  right: 6%; top: -4%;
  background: radial-gradient(circle at 60% 40%, #8B5CF6, transparent 70%);
  animation: aurora-drift-2 22s ease-in-out infinite alternate;
}
.aurora__blob--3 {
  width: 580px; height: 580px;
  left: 38%; top: 6%;
  background: radial-gradient(circle at 50% 50%, #38BDF8, transparent 70%);
  animation: aurora-drift-3 26s ease-in-out infinite alternate;
}
@keyframes aurora-drift-1 {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(60px, 40px, 0) scale(1.12); }
}
@keyframes aurora-drift-2 {
  from { transform: translate3d(0, 0, 0) scale(1.05); }
  to   { transform: translate3d(-50px, 60px, 0) scale(0.95); }
}
@keyframes aurora-drift-3 {
  from { transform: translate3d(0, 0, 0) scale(0.95); }
  to   { transform: translate3d(40px, -50px, 0) scale(1.1); }
}

.landing-hero__inner {
  position: relative;
  max-width: 760px;
}
.landing-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border: 1px solid rgba(65, 120, 229, 0.18);
}
.landing-eyebrow__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(65, 120, 229, 0.18);
}
.landing-hero h1 {
  margin: 22px 0 0;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  font-weight: 700;
}
.landing-hero h1 .grad {
  background: linear-gradient(120deg, var(--accent) 0%, #8B5CF6 60%, #38BDF8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.landing-hero__sub {
  margin: 22px 0 0;
  max-width: 580px;
  font-size: clamp(17px, 2.2vw, 20px);
  line-height: 1.55;
  color: var(--text-2);
}

/* ------------------------------------------------------------- Finder */
.landing-finder {
  margin: 36px 0 0;
  padding: 8px;
  display: flex;
  gap: 8px;
  max-width: 520px;
  background: var(--bg-elev);
  border: 1px solid var(--divider-strong);
  border-radius: 999px;
  box-shadow: var(--shadow-pop);
}
.landing-finder__input {
  flex: 1 1 auto;
  border: none;
  background: transparent;
  padding: 0 16px;
  font-size: 16px;
  color: var(--text);
  min-width: 0;
}
.landing-finder__input:focus { outline: none; }
.landing-finder__input::placeholder { color: var(--text-3); }
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 26px;
  border: none;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  color: #fff;
  background: var(--accent);
  box-shadow: var(--shadow-fab);
  transition: var(--transition);
}
.btn-primary:hover { background: var(--accent-strong); transform: translateY(-1px); }
.landing-hero__alt {
  margin: 16px 0 0;
  font-size: 14px;
  color: var(--text-2);
}
.landing-hero__alt a {
  color: var(--accent-strong);
  font-weight: 600;
  text-decoration: none;
}
.landing-hero__alt a:hover { text-decoration: underline; }

/* -------------------------------------------------------------- Banner */
.landing-banner {
  margin: 24px 0 0;
  max-width: 520px;
  padding: 12px 16px;
  border-radius: var(--radius-schema-md);
  font-size: 14px;
  line-height: 1.45;
  border: 1px solid transparent;
}
.landing-banner--info {
  background: var(--accent-soft);
  border-color: rgba(65, 120, 229, 0.22);
  color: var(--accent-strong);
}
.landing-banner--warn {
  background: var(--color-warning-50);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--color-warning-700);
}
.landing-banner--error {
  background: var(--color-danger-50);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--color-danger-700);
}
.landing-banner--success {
  background: var(--color-success-50);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--color-success-700);
}

/* ----------------------------------------------------- Workspace picker */
.landing-picker {
  margin: 22px 0 0;
  max-width: 520px;
  display: grid;
  gap: 10px;
}
.landing-picker__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-radius: var(--radius-schema-md);
  background: var(--bg-elev);
  border: 1px solid var(--divider-strong);
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}
.landing-picker__row:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-pop);
}
.landing-picker__arrow { color: var(--accent); }

/* ------------------------------------------------------------ Features */
.landing-features {
  padding: 88px 0;
}
.landing-section-head {
  max-width: 620px;
  margin: 0 0 48px;
}
.landing-section-head h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.02em;
  font-weight: 700;
}
.landing-section-head p {
  margin: 14px 0 0;
  font-size: 18px;
  color: var(--text-2);
  line-height: 1.55;
}
.landing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.landing-card {
  padding: 28px;
  border-radius: var(--radius-schema-lg);
  background: var(--bg-elev);
  border: 1px solid var(--divider);
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}
.landing-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-pop);
}
.landing-card__icon {
  width: 44px; height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-schema-md);
  background: var(--accent-soft);
  color: var(--accent-strong);
  margin-bottom: 18px;
}
.landing-card__icon svg { width: 22px; height: 22px; }
.landing-card h3 {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.landing-card p {
  margin: 0;
  color: var(--text-2);
  line-height: 1.55;
  font-size: 15px;
}

/* ---------------------------------------------------------------- Beta */
.landing-beta {
  padding: 16px 0 96px;
}
.landing-beta__panel {
  position: relative;
  overflow: hidden;
  padding: 56px;
  border-radius: var(--radius-schema-lg);
  background: linear-gradient(135deg, #15181D 0%, #1E2330 60%, #243049 100%);
  color: #fff;
  box-shadow: var(--shadow-pop);
}
.landing-beta__panel::before {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 480px; height: 480px;
  background: radial-gradient(circle at 50% 50%, rgba(65,120,229,0.45), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}
.landing-beta__grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.landing-beta__panel h2 {
  margin: 0;
  font-size: clamp(26px, 3.5vw, 36px);
  letter-spacing: -0.02em;
  font-weight: 700;
}
.landing-beta__panel p {
  margin: 14px 0 0;
  color: rgba(255, 255, 255, 0.72);
  line-height: 1.6;
  font-size: 16px;
}
.landing-beta__form {
  display: grid;
  gap: 12px;
}
.landing-field {
  display: grid;
  gap: 6px;
}
.landing-field label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.72);
}
.landing-field input,
.landing-field select,
.landing-field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-schema-md);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  transition: var(--transition);
}
.landing-field input::placeholder,
.landing-field textarea::placeholder { color: rgba(255, 255, 255, 0.4); }
.landing-field input:focus,
.landing-field select:focus,
.landing-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.10);
}
/* Native dropdown popups render on the OS surface (usually light), so force
   readable dark option text; the unselected placeholder stays muted. */
.landing-field select { appearance: none; cursor: pointer; }
.landing-field select:invalid { color: rgba(255, 255, 255, 0.4); }
.landing-field select option { color: #111; }
.landing-field textarea { resize: vertical; min-height: 76px; }
.landing-field--row { grid-template-columns: 1fr 1fr; gap: 12px; display: grid; }
.btn-on-dark {
  margin-top: 4px;
  width: 100%;
  height: 50px;
}
.landing-beta__note {
  margin: 12px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

/* -------------------------------------------------------------- Footer */
.landing-footer {
  border-top: 1px solid var(--divider);
  padding: 32px 0;
}
.landing-footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
  color: var(--text-3);
}
.landing-footer a { color: var(--text-2); text-decoration: none; }
.landing-footer a:hover { color: var(--accent-strong); }

/* ------------------------------------------------------------ Responsive */
@media (max-width: 860px) {
  .landing-grid { grid-template-columns: 1fr; }
  .landing-beta__grid { grid-template-columns: 1fr; gap: 28px; }
  .landing-beta__panel { padding: 36px 24px; }
  .landing-hero { padding: 64px 0 56px; }
}
@media (max-width: 520px) {
  .landing-finder { border-radius: var(--radius-schema-lg); flex-direction: column; }
  .landing-finder__input { padding: 12px 16px; }
  .btn-primary { width: 100%; }
  .landing-field--row { grid-template-columns: 1fr; }
  .landing-footer__inner { flex-direction: column; align-items: flex-start; }
}
