/* ============================================================
   Wonderkit — signed-out landing (marketing splash)
   Adapts the Lovable hero layout to Wonderkit's warm, light
   brand: a sunny yellow → blush → lavender wash, Rubik display,
   the real wk-* atoms, and the pl-composer pattern.
   Atoms (wk-btn / wk-input / wk-chip / pl-social / pl-modal)
   come from ../styles.css + the portal patterns reused inline.
   ============================================================ */
* { box-sizing: border-box; }
html, body { margin: 0; }
#root { min-height: 100vh; }

/* ── The magic-door wash ─────────────────────────────────────── */
.lp {
  position: relative;
  min-height: 100vh;
  /* Bottom safe-area so the chips + footer clear the macOS Dock (and similar OS bars).
     Lifts the centered hero content + the bottom-pinned footer up off the edge. */
  padding-bottom: 96px;
  display: flex;
  flex-direction: column;
  /* Clip only horizontally — the aura blooms (inset:-12%) bleed sideways and must
     stay hidden. Vertical must NOT clip: on a short viewport the hero + chips +
     footer can exceed 100vh, and `overflow:hidden` would cut off the chips/footer
     with no way to scroll to them. overflow-x:hidden lets the page scroll instead. */
  overflow-x: hidden;
  /* darkness (0..1) drives a dark scrim + light-text swap via the vars below */
  --d: 0;
  --lp-ink:   color-mix(in srgb, #ffffff calc(var(--d) * 92%), var(--violet-900));
  --lp-body:  color-mix(in srgb, #efe6ff calc(var(--d) * 88%), var(--ink-700));
  --lp-muted: color-mix(in srgb, #e4d8ff calc(var(--d) * 80%), var(--ink-600));
  /* Light, warm base; the tweakable aura blooms carry the colour mood
     and the calm centre keeps the dark headline readable. */
  background:
    radial-gradient(900px 680px at 56% 60%, rgba(255, 255, 255, .58), transparent 60%),
    linear-gradient(165deg, #faf5ff 0%, #fbeaf4 50%, #f3edff 100%);
}
/* dark scrim — sits above the aura, below the stars + content; the
   colour blooms glow through it for a moody, Lovable-style dark wash */
.lp__dim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(1300px 900px at 56% 36%, rgba(34, 20, 52, .80), rgba(12, 7, 22, .94));
  opacity: 0; /* driven by React from the Darkness tweak */
  transition: opacity var(--dur-slow) var(--ease-out);
}
/* soft top vignette so the nav reads */
.lp::before {
  content: "";
  position: absolute; inset: 0 0 auto 0; height: 220px;
  background: linear-gradient(180deg, rgba(255,255,255,.45), transparent);
  pointer-events: none; z-index: 1;
}

/* drifting aura — big blurred colour blooms that slowly breathe for
   a sense of creative energy (static under reduced-motion) */
.lp__aura { position: absolute; inset: -12%; z-index: 0; pointer-events: none; overflow: hidden; }
.lp__aura span {
  position: absolute; border-radius: 50%;
  filter: blur(60px); opacity: .55; mix-blend-mode: multiply;
  will-change: transform;
}
.lp__aura .b1 { top: 2%;  left: 4%;  width: 40vw; height: 40vw; }
.lp__aura .b2 { top: -4%; right: 2%; width: 44vw; height: 44vw; }
.lp__aura .b3 { bottom: -8%; left: 28%; width: 52vw; height: 52vw; }
.lp__aura .b4 { bottom: 0; right: 14%; width: 38vw; height: 38vw; }
.lp__aura--still span { animation: none !important; }
@media (prefers-reduced-motion: no-preference) {
  .lp__aura .b1 { animation: lp-drift-a 19s ease-in-out infinite; }
  .lp__aura .b2 { animation: lp-drift-b 23s ease-in-out infinite; }
  .lp__aura .b3 { animation: lp-drift-a 27s ease-in-out infinite reverse; }
  .lp__aura .b4 { animation: lp-drift-b 21s ease-in-out infinite reverse; }
}
@keyframes lp-drift-a { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(4%, 5%) scale(1.08); } }
@keyframes lp-drift-b { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(-5%, 4%) scale(1.06); } }

/* twinkling white star-dots */
.lp__stars { position: absolute; inset: 0; z-index: 2; pointer-events: none; overflow: hidden; }
.lp__dot {
  position: absolute; border-radius: 50%; background: #fff;
  box-shadow: 0 0 6px 1px rgba(255, 255, 255, .85), 0 0 2px rgba(255,255,255,.9);
  opacity: .35;
}
@media (prefers-reduced-motion: no-preference) {
  .lp__dot { animation: lp-star-twinkle 4.5s ease-in-out infinite; }
}
@media (prefers-reduced-motion: reduce) { .lp__dot { opacity: .6; } }
@keyframes lp-star-twinkle {
  0%, 100% { opacity: .12; transform: scale(.7); }
  50% { opacity: .95; transform: scale(1); }
}

/* ── Top nav ─────────────────────────────────────────────────── */
.lp-nav {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 28px;
  padding: 16px clamp(20px, 4vw, 52px);
  background: color-mix(in srgb, rgba(20, 12, 32, .60) calc(var(--d) * 100%), rgba(255, 255, 255, .55));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, rgba(255,255,255,.10) calc(var(--d) * 100%), rgba(124, 58, 237, .08));
}
.lp-brand { display: inline-flex; align-items: center; gap: 11px; flex-shrink: 0; cursor: pointer; text-decoration: none; }
.lp-brand img { width: 36px; height: 36px; border-radius: 23%; box-shadow: 0 3px 10px rgba(124, 58, 237, .30); display: block; }
.lp-brand b { font-family: var(--font-display); font-weight: 600; font-size: 21px; color: var(--lp-ink); letter-spacing: -0.02em; }

.lp-nav__links { display: flex; align-items: center; gap: 4px; }
.lp-nav__link {
  display: inline-flex; align-items: center; gap: 5px;
  font-family: var(--font-sans); font-weight: 700; font-size: 14.5px;
  color: var(--lp-body); text-decoration: none;
  padding: 9px 14px; border-radius: var(--radius-pill); white-space: nowrap;
  transition: background var(--dur-base), color var(--dur-base);
}
.lp-nav__link:hover { background: rgba(124, 58, 237, .09); color: var(--color-primary-ink); }
.lp-nav__link svg { opacity: .6; }
.lp-nav__sp { flex: 1; }
.lp-nav__auth { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.lp-nav__auth .wk-btn--ghost { color: var(--lp-body); }
.lp-nav__auth .wk-btn--ghost:hover { background: color-mix(in srgb, rgba(255,255,255,.14) calc(var(--d) * 100%), var(--ink-150)); color: var(--lp-ink); }

/* hamburger (small screens) */
.lp-burger { display: none; width: 42px; height: 42px; border-radius: var(--radius-pill); border: 1.5px solid rgba(124,58,237,.16); background: rgba(255,255,255,.7); color: var(--color-primary-ink); align-items: center; justify-content: center; cursor: pointer; }

/* ── Hero ────────────────────────────────────────────────────── */
.lp-hero {
  position: relative; z-index: 5; flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
  padding: clamp(40px, 7vh, 92px) clamp(20px, 5vw, 40px) 40px;
}
.lp-hero__inner { width: 100%; max-width: 1180px; display: flex; flex-direction: column; align-items: center; }

.lp-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, .72); border: 1.5px solid rgba(124, 58, 237, .16);
  color: var(--color-primary-ink); font-weight: 800; font-size: 12.5px;
  letter-spacing: .01em; padding: 7px 15px 7px 11px; border-radius: var(--radius-pill);
  box-shadow: var(--shadow-xs); margin-bottom: 26px; white-space: nowrap;
}
.lp-pill__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint-600); box-shadow: 0 0 0 3px var(--mint-200); }

.lp-hero h1 {
  font-family: var(--font-display); font-weight: 700;
  font-size: clamp(40px, 7vw, 68px); line-height: 1.04;
  letter-spacing: -0.025em; color: var(--lp-ink);
  margin: 0; text-wrap: balance;
}
.lp-hero h1 .sun { color: var(--amber-600); }
.lp-hero__sub {
  font-family: var(--font-sans); font-weight: 500;
  font-size: clamp(16px, 2.1vw, 20px); line-height: 1.5;
  color: var(--lp-body); margin: 20px 0 0; max-width: 1000px; text-wrap: pretty;
}

/* ── Composer (marketing scale) ──────────────────────────────── */
/* Composer spans the full hero column (as wide as the headline), responsive via width:100%.
   The mount host must be full-width too — in the centered flex column it would otherwise
   collapse to its content and cap the composer. */
#lp-composer-host { width: 100%; }
/* ~70% of the hero column, centered; width:100% keeps it responsive on narrow screens. */
.lp-composer-wrap { width: 100%; max-width: 826px; margin: 38px auto 0; }
.lp-composer {
  background: var(--white);
  border: 1.5px solid rgba(124, 58, 237, .14);
  border-radius: 24px;
  box-shadow: 0 18px 50px -18px rgba(91, 33, 182, .30), 0 4px 14px rgba(31, 41, 55, .06);
  padding: 18px 18px 14px; text-align: left;
  display: flex; flex-direction: column; gap: 8px;
  transition: border-color var(--dur-base), box-shadow var(--dur-base);
}
.lp-composer:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 18px 54px -16px rgba(91, 33, 182, .38), 0 0 0 4px var(--color-primary-soft);
}
.lp-composer__ta {
  border: 0; outline: 0; resize: none; width: 100%;
  font-family: var(--font-sans); font-size: 17px; line-height: 1.5; font-weight: 500;
  color: var(--text-strong); background: transparent;
  padding: 8px 8px 4px; min-height: 120px; max-height: 280px; overflow-y: auto;
}
.lp-composer__ta::placeholder { color: var(--text-faint); }
.lp-composer__bar { display: flex; align-items: center; gap: 8px; }
.lp-composer__sp { flex: 1; }

.lp-cbtn {
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; cursor: pointer; border: 0; background: transparent;
  transition: background var(--dur-base), color var(--dur-base), transform var(--dur-fast), filter var(--dur-base);
}
.lp-cbtn--plus { width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--border-hairline); background: var(--white); color: var(--text-muted); font-size: 22px; }
.lp-cbtn--plus:hover { background: var(--surface-subtle); color: var(--color-primary-ink); border-color: var(--violet-200); }
.lp-cbtn--mic { width: 40px; height: 40px; border-radius: 50%; background: var(--surface-subtle); color: var(--text-muted); }
.lp-cbtn--mic:hover { background: var(--violet-100); color: var(--color-primary-ink); }
.lp-cbtn--send { width: 44px; height: 44px; border-radius: 50%; background: var(--color-primary); color: #fff; box-shadow: var(--shadow-primary); }
.lp-cbtn--send:hover { filter: brightness(1.06); transform: var(--lift-hover); box-shadow: var(--shadow-primary-hover); }
.lp-cbtn--send:active { transform: translateY(0); }

/* creation-type selector inside composer */
.lp-type { position: relative; }
.lp-type__btn {
  display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 12px 0 13px; border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-hairline); background: var(--white);
  font: inherit; font-size: 14px; font-weight: 700; color: var(--text-body);
  cursor: pointer; transition: background var(--dur-base), border-color var(--dur-base);
}
.lp-type__btn:hover { background: var(--violet-50); border-color: var(--violet-200); color: var(--color-primary-ink); }
.lp-type__btn .em { font-size: 16px; }
.lp-type__btn .cv { color: var(--text-faint); transition: transform var(--dur-base); }
.lp-type__btn.is-open .cv { transform: rotate(180deg); }
.lp-type__menu {
  position: absolute; bottom: calc(100% + 8px); left: 0; z-index: 20;
  width: 230px; background: var(--white);
  border: 1.5px solid var(--border-card); border-radius: var(--radius-xl);
  box-shadow: var(--shadow-dialog); padding: 6px; animation: lp-pop var(--dur-base) var(--ease-out);
}
.lp-type__opt {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 10px 11px; border: 0; background: transparent; border-radius: var(--radius-md);
  font: inherit; font-size: 14px; font-weight: 600; color: var(--text-body);
  cursor: pointer; text-align: left; transition: background var(--dur-base);
}
.lp-type__opt:hover { background: var(--violet-50); }
.lp-type__opt.is-sel { background: var(--violet-100); color: var(--color-primary-ink); }
.lp-type__opt .em { font-size: 19px; width: 24px; text-align: center; }
.lp-type__opt .lab { flex: 1; }
.lp-type__opt .lab small { display: block; font-weight: 500; font-size: 11.5px; color: var(--text-faint); margin-top: 1px; }

/* ── Starter chips ───────────────────────────────────────────── */
/* Starter chips: 2 per row (centered grid), aligned to the composer width. */
.lp-starters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; width: 100%; max-width: 826px; margin: 20px auto 0; }
.lp-starters__lead { grid-column: 1 / -1; text-align: center; font-size: 12.5px; font-weight: 700; color: var(--lp-muted); margin-bottom: 2px; }
.lp-chip {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 40px; padding: 0 16px;
  background: rgba(255, 255, 255, .8); border: 1.5px solid rgba(124, 58, 237, .14);
  border-radius: var(--radius-pill);
  font-family: var(--font-sans); font-size: 14px; font-weight: 700; color: var(--color-primary-ink);
  cursor: pointer; transition: background var(--dur-base), transform var(--dur-fast), border-color var(--dur-base);
}
.lp-chip:hover { background: var(--white); transform: var(--lift-hover); border-color: var(--violet-300); }
.lp-chip:active { transform: translateY(0); }
.lp-chip .em { font-size: 15px; }

/* ── Reassurance footer ──────────────────────────────────────── */
.lp-foot {
  position: relative; z-index: 5;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 22px;
  padding: 26px 24px 30px; text-align: center;
}
.lp-foot__item { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; font-weight: 600; color: var(--lp-body); }
.lp-foot__item .em { font-size: 15px; }
.lp-foot__dot { width: 4px; height: 4px; border-radius: 50%; background: var(--violet-300); }
.lp-foot__legal { flex-basis: 100%; display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 2px; }
.lp-foot__legal a { font-size: 13px; font-weight: 600; color: var(--lp-body); text-decoration: none; opacity: .75; }
.lp-foot__legal a:hover { opacity: 1; text-decoration: underline; }

/* ── Auth modal shell (self-contained; mirrors the portal dialog) ─ */
.lp-modal {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background: rgba(31, 41, 55, .42);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  animation: lp-fade var(--dur-base) var(--ease-out);
}
.lp-modal__card {
  background: var(--white); border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-dialog); width: 100%; max-width: 440px;
  max-height: 92vh; overflow-y: auto;
  animation: lp-pop2 var(--dur-slow) var(--ease-out);
}
.lp-modal__head { display: flex; align-items: center; gap: 12px; padding: 20px 22px 10px; }
.lp-modal__head h2 { flex: 1; font-family: var(--font-display); font-weight: 600; font-size: 21px; letter-spacing: -0.01em; color: var(--text-strong); }
.lp-modal__body { padding: 6px 22px 22px; }
.lp-modal__intro { margin: -2px 0 0; color: var(--text-muted); font-size: 14.5px; line-height: 1.45; }
@keyframes lp-fade { from { opacity: 0; } }
@keyframes lp-pop2 { from { opacity: 0; transform: translateY(10px) scale(.97); } }

/* ── Auth modal extras (built on pl-modal + pl-social) ───────── */
.lp-auth__ctx {
  display: flex; gap: 11px; align-items: flex-start;
  background: var(--color-success-fill); border: 1.5px solid var(--color-success-border);
  border-radius: var(--radius-lg); padding: 12px 14px; margin: 14px 0 0;
}
.lp-auth__ctx .em { font-size: 17px; line-height: 1.3; flex-shrink: 0; }
.lp-auth__ctx-t { font-size: 13.5px; line-height: 1.45; color: var(--ink-800); }
.lp-auth__ctx-t b { font-weight: 800; color: var(--mint-700); }
.lp-auth__ctx-q { color: var(--text-strong); font-style: italic; }

.lp-social { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.lp-social__btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; padding: 12px 16px; border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-pill); background: var(--white);
  font: inherit; font-size: 15px; font-weight: 700; color: var(--text-strong);
  cursor: pointer; transition: border-color var(--dur-base), background var(--dur-base), transform var(--dur-fast);
}
.lp-social__btn:hover { border-color: var(--color-primary); background: var(--violet-50); transform: var(--lift-hover); }
.lp-social__glogo, .lp-social__alogo { display: block; flex-shrink: 0; }
/* standard "Sign in with Apple" — black button, white mark */
.lp-social__btn--apple { background: #000; border-color: #000; color: #fff; }
.lp-social__btn--apple .lp-social__alogo { margin-top: -2px; }
.lp-social__btn--apple:hover { background: #1a1a1a; border-color: #1a1a1a; transform: var(--lift-hover); }

.lp-divider { display: flex; align-items: center; gap: 12px; color: var(--text-faint); font-size: 12px; font-weight: 600; margin: 16px 0; }
.lp-divider::before, .lp-divider::after { content: ""; flex: 1; height: 1px; background: var(--border-hairline); }

.lp-fields { display: flex; flex-direction: column; gap: 13px; }
.lp-auth__switch { margin: 18px 0 2px; text-align: center; font-size: 14px; color: var(--text-muted); }
.lp-auth__switch button { border: 0; background: transparent; font: inherit; font-size: 14px; font-weight: 800; color: var(--color-primary-ink); cursor: pointer; padding: 0; }
.lp-auth__switch button:hover { text-decoration: underline; }
.lp-auth__fine { margin: 14px 0 0; text-align: center; font-size: 11.5px; line-height: 1.5; color: var(--text-faint); }
.lp-auth__fine a { color: var(--text-muted); }

@keyframes lp-pop { from { opacity: 0; transform: translateY(6px) scale(.98); } }

/* entrance — content rests fully VISIBLE (opacity:1, no transform); the
   animation only adds a gentle rise when the timeline is live. We never
   leave the resting state hidden, so static captures, PDF export,
   reduced-motion, and frozen-timeline previews always show the content. */
@media (prefers-reduced-motion: no-preference) {
  .lp-rise { animation: lp-rise .6s var(--ease-out); }
  .lp-rise-1 { animation-delay: .04s; }
  .lp-rise-2 { animation-delay: .12s; }
  .lp-rise-3 { animation-delay: .20s; }
  .lp-rise-4 { animation-delay: .28s; }
  .lp-rise-5 { animation-delay: .36s; }
}
@keyframes lp-rise { from { opacity: 0; transform: translateY(14px); } }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 760px) {
  .lp-nav__links { display: none; }
  .lp-burger { display: inline-flex; }
  .lp-nav__auth .lp-loginbtn { display: none; }
  .lp-hero { padding-top: 36px; }
  /* one chip per row on phones — two would be too cramped for the longer prompts */
  .lp-starters { grid-template-columns: 1fr; }
}

/* ── Pre-auth waitlist (invite-only launch capture) ─────────────── */
.lp-waitlist { position: relative; z-index: 2; display: flex; justify-content: center; padding: 0 24px 12px; }
.lp-waitlist__inner { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lp-waitlist__form { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.lp-waitlist__form .wk-input { min-width: 240px; }
.lp-waitlist__msg { font-size: 13px; color: var(--text-muted); min-height: 18px; text-align: center; }
