/* Bananamandi placeholder — desktop & mobile modes */

:root {
  --ocean-top: #0E4952;
  --ocean: #0B3A43;
  --ocean-deep: #072930;
  --banana: #F6C945;
  --banana-deep: #E2AC1F;
  --leaf: #8CC56B;
  --cream: #FFF4CF;
  --cream-dim: rgba(255, 244, 207, 0.72);
  --font: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, -apple-system, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
}

body {
  font-family: var(--font);
  color: var(--cream);
  background:
    radial-gradient(120% 90% at 50% 45%, var(--ocean-top) 0%, var(--ocean) 55%, var(--ocean-deep) 100%);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}

#world, #swarm {
  position: fixed;
  inset: 0;
  z-index: 0;
  display: block;
}
#swarm { z-index: 2; pointer-events: none; }

.vignette {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(42% 38% at 50% 46%, rgba(7, 41, 48, 0.62) 0%, rgba(7, 41, 48, 0) 100%),
    radial-gradient(140% 100% at 50% 50%, rgba(0, 0, 0, 0) 60%, rgba(4, 24, 29, 0.55) 100%);
}

.stage {
  position: relative;
  z-index: 3;
  height: 100vh;
  height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  pointer-events: none;
  padding:
    max(24px, env(safe-area-inset-top))
    max(28px, env(safe-area-inset-right))
    max(22px, env(safe-area-inset-bottom))
    max(28px, env(safe-area-inset-left));
}

.stage > * { pointer-events: none; }
.notify, .notify * { pointer-events: auto; }

/* ---------- brand ---------- */
.logo-wrap { margin: 0; line-height: 0; }

.logo {
  display: block;
  width: auto;
  height: auto;
  max-width: min(520px, 70vw);
  max-height: 26vh;
  margin: 0 auto;
  filter: drop-shadow(0 10px 30px rgba(4, 24, 29, 0.55));
  animation: rise 1s 0.7s cubic-bezier(.2, .8, .2, 1) both;
}

.wordmark {
  display: inline-block;
  line-height: 0.9;
  font-weight: 800;
  font-size: clamp(3rem, 9vw, 7.5rem);
  letter-spacing: -0.045em;
  font-variation-settings: "opsz" 96;
  color: var(--banana);
  text-shadow: 0 0.04em 0 var(--banana-deep), 0 0.14em 0.4em rgba(4, 24, 29, 0.55);
  animation: rise 1s 0.7s cubic-bezier(.2, .8, .2, 1) both;
}

/* ---------- pitch ---------- */
.pitch { animation: rise 1s 1s cubic-bezier(.2, .8, .2, 1) both; }

.headline {
  margin: 0 0 0.35em;
  font-weight: 700;
  font-size: clamp(1.35rem, 2.6vw, 2.1rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.sub {
  margin: 0 auto 1.4em;
  max-width: 34em;
  font-size: clamp(0.95rem, 1.15vw, 1.08rem);
  line-height: 1.5;
  color: var(--cream-dim);
  text-wrap: pretty;
}

/* ---------- form ---------- */
.notify {
  display: flex;
  gap: 6px;
  max-width: 440px;
  margin: 0 auto;
  padding: 6px;
  border-radius: 999px;
  background: rgba(7, 41, 48, 0.72);
  border: 1px solid rgba(255, 244, 207, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  user-select: text;
  -webkit-user-select: text;
  touch-action: manipulation;
}

.notify input[type="email"] {
  flex: 1;
  min-width: 0;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--cream);
  font: 500 1rem/1 var(--font);
  outline: none;
}
.notify input::placeholder { color: rgba(255, 244, 207, 0.48); }

.notify button {
  flex: none;
  padding: 0.85em 1.4em;
  border: 0;
  border-radius: 999px;
  background: var(--banana);
  color: #0B3A43;
  font: 700 1rem/1 var(--font);
  cursor: pointer;
  box-shadow: inset 0 -3px 0 var(--banana-deep);
  transition: transform .15s ease, background-color .15s ease;
}
.notify button:hover { background: #FFD75E; }
.notify button:active { transform: translateY(1px); box-shadow: inset 0 -1px 0 var(--banana-deep); }
.notify button:disabled { opacity: .6; cursor: progress; }

.notify:focus-within { border-color: rgba(246, 201, 69, 0.7); }
.notify button:focus-visible,
.notify input:focus-visible {
  outline: 2px solid var(--banana);
  outline-offset: 2px;
}

.notify-msg {
  min-height: 1.4em;
  margin: 0.7em 0 0;
  font-size: 0.92rem;
  color: var(--cream-dim);
}
.notify-msg[data-state="ok"] { color: var(--leaf); }
.notify-msg[data-state="error"] { color: #FFB49A; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- hint ---------- */
.hint {
  margin: 0;
  font-size: 0.9rem;
  color: var(--banana);
  transition: opacity .8s ease, transform .8s ease;
  animation: rise 1s 2.2s cubic-bezier(.2, .8, .2, 1) both;
}
.hint.gone { opacity: 0; transform: translateY(6px); }
.hint-mobile { display: none; }

/* ---------- status bar ---------- */
.status {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  font-size: 0.85rem;
  color: var(--cream-dim);
  animation: rise 1s 1.6s ease both;
}
.status p { margin: 0; }
.ticker-label { color: var(--banana); font-weight: 500; margin-right: 0.4em; }
.ticker.swap #ticker-text { animation: tick .6s ease both; }
#counter-num { color: var(--cream); font-weight: 700; font-variant-numeric: tabular-nums; }

.noscript { position: fixed; inset: auto 0 40% 0; text-align: center; z-index: 3; }

/* =========================================================
   DESKTOP MODE
   ========================================================= */
.mode-desktop .stage {
  grid-template-rows: 1fr auto auto 1fr auto;
  justify-items: center;
  text-align: center;
}
.mode-desktop .brand { grid-row: 2; margin-bottom: 1.6rem; }
.mode-desktop .pitch { grid-row: 3; }
.mode-desktop .hint { grid-row: 4; align-self: start; margin-top: 1.4rem; }
.mode-desktop .status { grid-row: 5; width: 100%; }

/* =========================================================
   MOBILE MODE
   ========================================================= */
.mode-mobile .stage {
  grid-template-rows: auto 1fr auto auto auto;
  justify-items: center;
  text-align: center;
  padding-left: max(18px, env(safe-area-inset-left));
  padding-right: max(18px, env(safe-area-inset-right));
}
.mode-mobile .vignette {
  background:
    linear-gradient(180deg, rgba(7, 41, 48, 0.85) 0%, rgba(7, 41, 48, 0) 20%, rgba(7, 41, 48, 0) 56%, rgba(7, 41, 48, 0.9) 74%);
}
.mode-mobile .brand { grid-row: 1; margin-top: 2vh; }
.mode-mobile .logo { max-width: 78vw; max-height: 17vh; }
.mode-mobile .wordmark { font-size: clamp(2.6rem, 14vw, 4.2rem); }

.mode-mobile .hint { grid-row: 3; margin-bottom: 0.9rem; font-size: 0.88rem; }
.mode-mobile .hint-desktop { display: none; }
.mode-mobile .hint-mobile { display: inline; }

.mode-mobile .pitch { grid-row: 4; width: 100%; max-width: 30rem; }
.mode-mobile .headline { font-size: clamp(1.25rem, 6vw, 1.6rem); }
.mode-mobile .sub { font-size: 0.93rem; margin-bottom: 1.1em; }
.mode-mobile .notify { max-width: none; }
.mode-mobile .notify input[type="email"] { font-size: 16px; } /* stops iOS zoom */
.mode-mobile .notify button { padding: 0.9em 1.15em; }

.mode-mobile .status {
  grid-row: 5;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-size: 0.78rem;
  margin-top: 0.4rem;
}

@media (max-height: 640px) {
  .mode-mobile .sub { display: none; }
  .mode-mobile .logo { max-height: 13vh; }
}
@media (max-height: 640px) and (min-width: 760px) {
  .mode-desktop .sub { display: none; }
}

/* ---------- motion ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes tick {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .logo, .wordmark, .pitch, .hint, .status { animation: none; }
  .ticker.swap #ticker-text { animation: none; }
}
