@import url("https://fonts.googleapis.com/css2?family=Fredoka:wght@500;600;700&family=Nunito:wght@400;500;600;700;800&display=swap");

:root {
  --navy-deep: #0b2242;
  --navy: #12305d;
  --navy-light: #1e4373;
  --cream: #fbf6ec;
  --ink: #2b2b26;
  --ochre: #e3a857;
  --ochre-dark: #c98a34;
  --muted: #9fb3d1;
  --splash-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --splash-ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  overscroll-behavior-y: none;
}

body {
  font-family: "Nunito", sans-serif;
  background: var(--navy-deep);
  color: var(--cream);
  overflow-x: hidden;
}

body.is-booting {
  overflow: hidden;
  height: 100%;
  touch-action: none;
}

/* ---------- Brand splash (ported from app BrandSplash) ---------- */
.vivace-brand-splash {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(1.5rem, env(safe-area-inset-top)) 1.5rem max(1.5rem, env(safe-area-inset-bottom));
  background: #050a16;
  color: #fffefa;
  overflow: hidden;
}

.vivace-brand-splash--handoff {
  pointer-events: none;
  background-color: transparent;
  transition: background-color 380ms ease;
}

.vivace-brand-splash--handoff .vivace-brand-splash__atmosphere {
  opacity: 0;
  transition: opacity 320ms ease;
}

.vivace-brand-splash--handoff .vivace-brand-splash__lockup-bloom,
.vivace-brand-splash--handoff .vivace-brand-splash__lockup-shine {
  opacity: 0 !important;
  transition: opacity 200ms ease;
  animation: none !important;
}

.vivace-brand-splash--done {
  display: none;
}

.vivace-brand-splash__atmosphere {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.vivace-brand-splash__vignette {
  position: absolute;
  inset: -10%;
  background: radial-gradient(ellipse at 50% 42%, transparent 18%, rgba(5, 10, 22, 0.55) 58%, #050a16 78%);
  animation: vivace-splash-vignette 3.4s var(--splash-ease) forwards;
}

.vivace-brand-splash__horizon {
  position: absolute;
  left: -20%;
  right: -20%;
  bottom: -35%;
  height: 78%;
  background: radial-gradient(
    ellipse 70% 55% at 50% 100%,
    rgba(217, 160, 91, 0.55) 0%,
    rgba(217, 160, 91, 0.18) 32%,
    rgba(255, 248, 230, 0.06) 52%,
    transparent 70%
  );
  filter: blur(8px);
  opacity: 0;
  transform: translateY(28%) scale(0.85);
  animation: vivace-splash-horizon 3.4s var(--splash-ease) forwards;
}

.vivace-brand-splash__beam {
  position: absolute;
  left: 50%;
  top: 8%;
  width: min(42vw, 14rem);
  height: 78%;
  transform: translateX(-50%) scaleY(0.2);
  transform-origin: 50% 100%;
  background: linear-gradient(
    180deg,
    rgba(255, 248, 230, 0) 0%,
    rgba(255, 248, 230, 0.14) 28%,
    rgba(217, 160, 91, 0.22) 58%,
    rgba(217, 160, 91, 0) 100%
  );
  filter: blur(18px);
  opacity: 0;
  mix-blend-mode: screen;
  animation: vivace-splash-beam 3.4s var(--splash-ease) forwards;
}

.vivace-brand-splash__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  mix-blend-mode: screen;
  opacity: 0;
  will-change: transform, opacity;
}

.vivace-brand-splash__orb--amber {
  width: min(78vw, 28rem);
  height: min(78vw, 28rem);
  left: 50%;
  top: 38%;
  transform: translate(-50%, -50%) scale(0.35);
  background: radial-gradient(circle, rgba(217, 160, 91, 0.72) 0%, rgba(217, 160, 91, 0) 68%);
  animation:
    vivace-splash-orb-in-a 1.4s var(--splash-ease) forwards,
    vivace-splash-orb-drift-a 6s var(--splash-ease-soft) 1.2s infinite alternate;
}

.vivace-brand-splash__orb--cream {
  width: min(48vw, 16rem);
  height: min(48vw, 16rem);
  left: 50%;
  top: 40%;
  transform: translate(-50%, -50%) scale(0.35);
  background: radial-gradient(circle, rgba(255, 248, 230, 0.95) 0%, rgba(255, 248, 230, 0) 70%);
  animation:
    vivace-splash-orb-in-b 1.2s var(--splash-ease) 0.15s forwards,
    vivace-splash-orb-drift-b 5.2s var(--splash-ease-soft) 1.1s infinite alternate;
}

.vivace-brand-splash__orb--soft {
  width: min(92vw, 34rem);
  height: min(92vw, 34rem);
  left: 42%;
  top: 48%;
  transform: translate(-50%, -50%) scale(0.35);
  background: radial-gradient(circle, rgba(61, 79, 111, 0.55) 0%, rgba(61, 79, 111, 0) 70%);
  filter: blur(64px);
  animation:
    vivace-splash-orb-in-c 1.6s var(--splash-ease) 0.05s forwards,
    vivace-splash-orb-drift-c 7s var(--splash-ease-soft) 1.3s infinite alternate;
}

.vivace-brand-splash__sparks {
  position: absolute;
  inset: 0;
}

.vivace-brand-splash__spark {
  position: absolute;
  width: calc(3px * var(--s, 1));
  height: calc(3px * var(--s, 1));
  border-radius: 50%;
  background: #fff8e6;
  box-shadow:
    0 0 6px rgba(217, 160, 91, 0.9),
    0 0 14px rgba(255, 248, 230, 0.55);
  opacity: 0;
  transform: translate(-50%, 24px) scale(0.4);
  animation: vivace-splash-spark 2.8s var(--splash-ease) var(--d, 0s) forwards;
}

.vivace-brand-splash__noise {
  position: absolute;
  inset: 0;
  opacity: 0.045;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  pointer-events: none;
  animation: vivace-splash-noise 3.4s linear forwards;
}

.vivace-brand-splash__stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.vivace-brand-splash__lockup-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 8rem;
  height: 8.6rem;
  color: rgba(255, 254, 250, 0.16);
  animation: vivace-splash-mark 3s var(--splash-ease) forwards;
}

.vivace-brand-splash__lockup-bloom {
  position: absolute;
  inset: -18%;
  background: radial-gradient(circle, rgba(217, 160, 91, 0.55) 0%, rgba(217, 160, 91, 0) 68%);
  filter: blur(22px);
  opacity: 0;
  transform: scale(0.7);
  animation: vivace-splash-bloom 3s var(--splash-ease) forwards;
}

.vivace-brand-splash__lockup {
  position: relative;
  z-index: 1;
  width: 7.4rem;
  height: 8.05rem;
  display: block;
  background-color: #fffefa;
  -webkit-mask-image: url("./assets/logo-lockup-mask.png");
  mask-image: url("./assets/logo-lockup-mask.png");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
}

.vivace-brand-splash__lockup-shine {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    115deg,
    transparent 28%,
    rgba(255, 254, 250, 0.08) 42%,
    rgba(255, 248, 230, 0.85) 50%,
    rgba(217, 160, 91, 0.35) 56%,
    transparent 68%
  );
  background-size: 220% 100%;
  background-position: 120% 0;
  -webkit-mask-image: url("./assets/logo-lockup-mask.png");
  mask-image: url("./assets/logo-lockup-mask.png");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  mix-blend-mode: screen;
  opacity: 0;
  animation: vivace-splash-shine 3s var(--splash-ease) forwards;
  pointer-events: none;
}

@keyframes vivace-splash-vignette {
  0% {
    opacity: 1;
  }
  100% {
    opacity: 0.72;
  }
}
@keyframes vivace-splash-horizon {
  0% {
    opacity: 0;
    transform: translateY(32%) scale(0.8);
  }
  35% {
    opacity: 0.85;
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
@keyframes vivace-splash-beam {
  0% {
    opacity: 0;
    transform: translateX(-50%) scaleY(0.15);
  }
  40% {
    opacity: 0.55;
  }
  100% {
    opacity: 0.9;
    transform: translateX(-50%) scaleY(1);
  }
}
@keyframes vivace-splash-orb-in-a {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.35);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}
@keyframes vivace-splash-orb-in-b {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.35);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}
@keyframes vivace-splash-orb-in-c {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.35);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}
@keyframes vivace-splash-orb-drift-a {
  0% {
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    transform: translate(calc(-50% + 4%), calc(-50% - 3%)) scale(1.08);
  }
}
@keyframes vivace-splash-orb-drift-b {
  0% {
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    transform: translate(calc(-50% - 5%), calc(-50% + 4%)) scale(1.12);
  }
}
@keyframes vivace-splash-orb-drift-c {
  0% {
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    transform: translate(calc(-50% + 6%), calc(-50% - 2%)) scale(1.05);
  }
}
@keyframes vivace-splash-spark {
  0% {
    opacity: 0;
    transform: translate(-50%, 28px) scale(0.3);
  }
  25% {
    opacity: 1;
  }
  100% {
    opacity: 0.15;
    transform: translate(-50%, -42vh) scale(1);
  }
}
@keyframes vivace-splash-noise {
  0% {
    opacity: 0.07;
  }
  100% {
    opacity: 0.035;
  }
}
@keyframes vivace-splash-bloom {
  0% {
    opacity: 0;
    transform: scale(0.55);
  }
  45% {
    opacity: 0.35;
  }
  100% {
    opacity: 0.85;
    transform: scale(1);
  }
}
@keyframes vivace-splash-mark {
  0% {
    color: rgba(255, 254, 250, 0.12);
    filter: drop-shadow(0 0 0 rgba(217, 160, 91, 0));
    transform: scale(0.88) translateY(10px);
  }
  40% {
    color: rgba(255, 254, 250, 0.45);
  }
  100% {
    color: #fffefa;
    filter:
      drop-shadow(0 0 16px rgba(217, 160, 91, 0.7)) drop-shadow(0 0 48px rgba(255, 248, 230, 0.28));
    transform: scale(1) translateY(0);
  }
}
@keyframes vivace-splash-shine {
  0%,
  38% {
    opacity: 0;
    background-position: 130% 0;
  }
  48% {
    opacity: 1;
  }
  72% {
    opacity: 0.85;
    background-position: -40% 0;
  }
  100% {
    opacity: 0;
    background-position: -60% 0;
  }
}

/* ---------- Hero ---------- */
.hero {
  /* One exact first screen — avoids a few leftover scroll pixels on mobile. */
  height: 100dvh;
  min-height: 100dvh;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: max(24px, env(safe-area-inset-top)) 24px max(48px, env(safe-area-inset-bottom));
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 45% at 50% 38%, rgba(227, 168, 87, 0.14), transparent 70%),
    linear-gradient(180deg, var(--navy-deep) 0%, #081934 100%);
}

@supports not (height: 100dvh) {
  .hero {
    height: 100svh;
    min-height: 100svh;
    max-height: 100svh;
  }
}

.hero-enter {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 480ms var(--splash-ease),
    transform 480ms var(--splash-ease);
}

.hero.is-visible .hero-enter {
  opacity: 1;
  transform: translateY(0);
}

.hero.is-visible .headline {
  transition-delay: 60ms;
}

.hero.is-visible .form-wrap {
  transition-delay: 120ms;
}

.hero.is-visible .scroll-cue {
  transition-delay: 200ms;
}

.mark-wrap {
  position: relative;
  width: 8rem;
  height: 8.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
}

.mark-wrap.is-handoff-target .mark,
.mark-wrap.is-handoff-target .mark-glow {
  opacity: 0;
}

.mark-glow {
  position: absolute;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(227, 168, 87, 0.35) 0%, rgba(227, 168, 87, 0) 70%);
  animation: breathe 3.2s ease-in-out infinite;
  filter: blur(2px);
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(0.92);
    opacity: 0.55;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

.mark {
  position: relative;
  z-index: 2;
  width: 7.4rem;
  height: 8.05rem;
  background-color: #fffefa;
  -webkit-mask-image: url("./assets/logo-lockup-mask.png");
  mask-image: url("./assets/logo-lockup-mask.png");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  filter: drop-shadow(0 0 18px rgba(255, 255, 255, 0.25));
}

.headline {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: clamp(28px, 6vw, 46px);
  line-height: 1.2;
  max-width: 600px;
  margin-top: 34px;
  color: #fff;
}

.headline em {
  font-style: normal;
  color: var(--ochre);
}

.form-wrap {
  margin-top: 38px;
  width: 100%;
  max-width: 420px;
}

form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

input[type="email"] {
  flex: 1;
  min-width: 200px;
  padding: 15px 18px;
  border-radius: 14px;
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-family: "Nunito", sans-serif;
  font-size: 15px;
  outline: none;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

input[type="email"]::placeholder {
  color: var(--muted);
}

input[type="email"]:focus {
  border-color: var(--ochre);
  background: rgba(255, 255, 255, 0.1);
}

button[type="submit"] {
  padding: 15px 26px;
  border-radius: 14px;
  border: none;
  background: var(--ochre);
  color: var(--navy-deep);
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    transform 0.15s ease,
    opacity 0.2s ease;
  white-space: nowrap;
}

button[type="submit"]:hover:not(:disabled) {
  background: #f0b86a;
  transform: translateY(-1px);
}

button[type="submit"]:disabled {
  opacity: 0.7;
  cursor: wait;
}

button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--ochre);
  outline-offset: 2px;
}

.form-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
}

.form-error {
  display: none;
  margin-top: 10px;
  font-size: 13px;
  color: #ffb4b4;
}

.form-error.show {
  display: block;
}

.confirm {
  display: none;
  background: rgba(227, 168, 87, 0.12);
  border: 1.5px solid rgba(227, 168, 87, 0.35);
  border-radius: 14px;
  padding: 18px 20px;
  font-size: 14px;
  color: var(--cream);
  max-width: 420px;
  margin-top: 38px;
  line-height: 1.6;
}

.confirm.show {
  display: block;
}

.confirm[hidden] {
  display: none !important;
}

.confirm p[hidden] {
  display: none !important;
}

.confirm strong {
  color: var(--ochre);
}

.scroll-cue {
  position: absolute;
  bottom: 28px;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--muted);
  text-transform: uppercase;
  opacity: 0.7;
}

/* ---------- Manifesto ---------- */
.manifesto {
  background: var(--cream);
  color: var(--ink);
  padding: 100px 24px;
  display: flex;
  justify-content: center;
}

.manifesto-inner {
  max-width: 560px;
  text-align: center;
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 800ms var(--splash-ease),
    transform 800ms var(--splash-ease);
}

.manifesto-inner.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.manifesto-eyebrow {
  font-family: "Fredoka", sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--ochre-dark);
  margin-bottom: 18px;
}

.manifesto p {
  font-family: "Fredoka", sans-serif;
  font-size: clamp(20px, 3.6vw, 28px);
  font-weight: 500;
  line-height: 1.5;
  color: var(--navy-deep);
}

.manifesto .signature {
  margin-top: 28px;
  font-family: "Nunito", sans-serif;
  font-size: 14px;
  color: #7a7462;
}

footer {
  background: var(--navy-deep);
  padding: 40px 24px 32px;
  text-align: center;
}

.footer-mark {
  font-family: "Fredoka", sans-serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 4px;
  color: var(--muted);
}

.footer-tag {
  font-size: 12px;
  color: rgba(159, 179, 209, 0.6);
  margin-top: 8px;
}

@media (max-width: 480px) {
  form {
    flex-direction: column;
  }
  button[type="submit"] {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .vivace-brand-splash__vignette,
  .vivace-brand-splash__horizon,
  .vivace-brand-splash__beam,
  .vivace-brand-splash__orb,
  .vivace-brand-splash__spark,
  .vivace-brand-splash__noise,
  .vivace-brand-splash__lockup-wrap,
  .vivace-brand-splash__lockup-bloom,
  .vivace-brand-splash__lockup-shine,
  .mark-glow {
    animation: none !important;
  }

  .vivace-brand-splash__orb {
    opacity: 0.55 !important;
  }

  .vivace-brand-splash__spark {
    opacity: 0 !important;
  }

  .vivace-brand-splash__lockup-wrap {
    color: #fffefa !important;
    filter: drop-shadow(0 0 16px rgba(217, 160, 91, 0.5)) !important;
    transform: none !important;
  }

  .vivace-brand-splash__lockup-shine {
    opacity: 0 !important;
  }

  .vivace-brand-splash--handoff {
    background-color: transparent;
    transition: none;
  }

  .vivace-brand-splash--handoff .vivace-brand-splash__atmosphere {
    transition: none;
  }

  .hero-enter,
  .manifesto-inner {
    transition: none;
  }
}
