/* Spika waitlist — blue & white */

@font-face {
  font-family: "Lama Sans";
  src: url("../fonts/lama/LamaSans-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Lama Sans";
  src: url("../fonts/lama/LamaSans-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Lama Expanded";
  src: url("../fonts/lama/expanded/LamaSans-MediumExpanded.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Lama Expanded";
  src: url("../fonts/lama/expanded/LamaSans-BoldExpanded.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --blue: #1b00f6;
  --blue-deep: #090062;
  --blue-mid: #1300cc;
  --blue-glow: #4d70ff;
  --blue-wash: #eef2ff;
  --blue-wash-top: #dde8ff;
  --white: #ffffff;
  --bg: #f8f9fc;
  --text: #0d0c22;
  --text-muted: #6b6e8a;
  --border: #e5e5ea;
  --font: "Lama Sans", system-ui, sans-serif;
  --display: "Lama Expanded", "Lama Sans", system-ui, sans-serif;
  --ar: "Lama Sans", system-ui, sans-serif;
  --ar-display: "Lama Expanded", "Lama Sans", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --gaze-x: 0px;
  --gaze-y: 0px;
  --blink-l: 1;
  --blink-r: 1;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  max-width: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--white);
  color: var(--text);
  font-family: var(--font);
  font-optical-sizing: auto;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  max-width: 100%;
}

body[dir="rtl"] {
  font-family: var(--ar);
}

body[dir="rtl"] .headline,
body[dir="rtl"] .card__title,
body[dir="rtl"] .success__title {
  font-family: var(--ar-display);
}

body[dir="rtl"] .eyebrow {
  letter-spacing: normal;
  text-transform: none;
}

body[dir="rtl"] .headline {
  letter-spacing: 0;
  font-size: clamp(2.1rem, 7.5vw, 3.75rem);
}

body[dir="rtl"] .lead {
  max-width: 100%;
}

a {
  color: var(--blue);
}

/* Background */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  animation: orbFloat 14s ease-in-out infinite;
}

.bg__orb--1 {
  width: min(90vw, 520px);
  height: min(90vw, 520px);
  top: -18%;
  left: -12%;
  background: radial-gradient(circle, var(--blue-glow), transparent 68%);
}

.bg__orb--2 {
  width: min(70vw, 400px);
  height: min(70vw, 400px);
  bottom: -10%;
  right: -8%;
  background: radial-gradient(circle, var(--blue-wash-top), transparent 70%);
  animation-delay: -5s;
}

.bg__grid {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(27, 0, 246, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(27, 0, 246, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, black, transparent);
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(12px, -16px) scale(1.04); }
}

.page {
  position: relative;
  z-index: 1;
  width: min(100%, 40rem);
  max-width: 100%;
  margin: 0 auto;
  padding: 0.75rem 1.25rem 0.75rem;
  overflow-x: clip;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.landing {
  overflow-x: clip;
  flex: 1;
}

/* Header — blue bar for light wordmark */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  background: var(--blue);
  border-radius: 1rem;
  box-shadow: 0 12px 32px rgba(27, 0, 246, 0.22);
}

.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.brand__wordmark {
  display: block;
  height: 26px;
  width: auto;
}

.top .lang-btn {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
}

.top .lang-btn:hover {
  border-color: rgba(255, 255, 255, 0.65);
  color: var(--white);
  background: rgba(255, 255, 255, 0.18);
}

.top .lang-btn.is-on {
  border-color: var(--white);
  background: var(--white);
  color: var(--blue);
}

.lang {
  display: flex;
  gap: 0.35rem;
}

.lang-btn {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  color: var(--text-muted);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.42rem 0.7rem;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.25s, color 0.25s, background 0.25s, transform 0.25s var(--ease);
}

.lang-btn:hover {
  border-color: var(--blue-glow);
  color: var(--blue);
}

.lang-btn.is-on {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
  transform: scale(1.02);
}

/* Hero */
.hero {
  margin-bottom: 1.25rem;
  overflow: visible;
}

.eyebrow {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--blue);
}

.headline {
  margin: 0.65rem 0 0;
  font-family: var(--display);
  font-size: clamp(2.5rem, 9vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.22;
  overflow: visible;
}

.headline__line {
  display: block;
  overflow: visible;
  overflow-wrap: anywhere;
}

.headline__line--accent {
  color: var(--blue);
}

.lead {
  margin: 1rem 0 0;
  color: var(--text-muted);
  font-size: clamp(1rem, 2.5vw, 1.12rem);
  max-width: 36ch;
  line-height: 1.55;
}

.pills {
  list-style: none;
  margin: 1.35rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill-tag {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: var(--blue-wash);
  color: var(--blue-deep);
  border: 1px solid rgba(27, 0, 246, 0.08);
  max-width: 100%;
  overflow-wrap: anywhere;
}

body.is-ready .pill-tag {
  animation: pillPop 0.5s var(--ease) both;
}

body.is-ready .pill-tag:nth-child(2) { animation-delay: 0.48s; }
body.is-ready .pill-tag:nth-child(3) { animation-delay: 0.56s; }

@keyframes pillPop {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
}

/* Reveal on load */
.reveal {
  opacity: 0;
  transform: translateY(18px);
}

body.is-ready .reveal {
  animation: riseIn 0.75s var(--ease) forwards;
}

.headline.reveal {
  opacity: 1;
  transform: none;
  animation: none;
}

.headline.reveal .headline__line {
  opacity: 0;
  transform: translateY(18px);
}

body.is-ready .headline.reveal .headline__line {
  animation: riseInLine 0.75s var(--ease) forwards;
}

body.is-ready .headline__line:nth-child(1) { animation-delay: 0.08s; }
body.is-ready .headline__line:nth-child(2) { animation-delay: 0.18s; }
body.is-ready .headline__line:nth-child(3) { animation-delay: 0.28s; }
body.is-ready .eyebrow { animation-delay: 0s; }
body.is-ready .lead { animation-delay: 0.32s; }
body.is-ready .pills { animation-delay: 0.4s; }
body.is-ready .card.reveal { animation-delay: 0.48s; }

@keyframes riseIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* End at transform:none so Syne descenders are not clipped by the compositor layer */
@keyframes riseInLine {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Card / form */
.card {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(27, 0, 246, 0.1);
  border-radius: 1.35rem;
  padding: 1.35rem 1.35rem 1.25rem;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 20px 50px rgba(27, 0, 246, 0.08);
}

.card__title {
  margin: 0 0 1rem;
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Waitlist card — matches header blue */
#waitlistPanel.card {
  background: var(--blue);
  border: none;
  border-radius: 1rem;
  box-shadow: 0 12px 32px rgba(27, 0, 246, 0.22);
  color: var(--white);
}

#waitlistPanel .card__title {
  color: var(--white);
  font-size: 1.12rem;
}

#waitlistPanel .waitlist__label {
  color: rgba(255, 255, 255, 0.72);
}

#waitlistPanel .waitlist__input {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--text);
}

#waitlistPanel .waitlist__input:focus {
  border-color: var(--white);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.22);
}

#waitlistPanel .waitlist__consent {
  color: rgba(255, 255, 255, 0.92);
}

#waitlistPanel .waitlist__consent-box {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.22);
}

#waitlistPanel .waitlist__consent-mark {
  border-color: rgba(255, 255, 255, 0.7);
}

#waitlistPanel .waitlist__consent-input:checked + .waitlist__consent-box .waitlist__consent-mark {
  background: var(--white);
  border-color: var(--white);
}

#waitlistPanel .waitlist__error {
  color: #ffd0dc;
}

#waitlistPanel .btn--primary {
  background: var(--white);
  color: var(--blue-deep);
  box-shadow: 0 10px 28px rgba(9, 0, 98, 0.28);
}

#waitlistPanel .btn--primary:hover:not(:disabled) {
  background: var(--blue-wash);
  color: var(--blue-deep);
  box-shadow: 0 14px 32px rgba(9, 0, 98, 0.32);
}

#waitlistPanel .waitlist__legal a {
  color: rgba(255, 255, 255, 0.78);
}

#waitlistPanel .waitlist__legal a:hover {
  color: var(--white);
}

.waitlist__form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.waitlist__label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.waitlist__input {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 0.85rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s var(--ease);
}

.waitlist__input:focus {
  border-color: var(--blue-glow);
  box-shadow: 0 0 0 4px rgba(77, 112, 255, 0.18);
  transform: translateY(-1px);
}

.waitlist__honeypot {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

.waitlist__turnstile {
  display: flex;
  justify-content: center;
}

.waitlist__turnstile:empty {
  display: none;
}

.waitlist__consent {
  display: block;
  cursor: pointer;
}

.waitlist__consent-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.waitlist__consent-box {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.85rem 1rem;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.waitlist__consent:hover .waitlist__consent-box {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
}

.waitlist__consent-input:focus-visible + .waitlist__consent-box {
  outline: 2px solid rgba(255, 255, 255, 0.55);
  outline-offset: 2px;
}

.waitlist__consent-mark {
  flex-shrink: 0;
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.12rem;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-radius: 0.35rem;
  background: transparent;
  position: relative;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}

.waitlist__consent-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.15s var(--ease);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10' fill='none'%3E%3Cpath d='M1 5.2 4.2 8.4 11 1.4' stroke='%231B00F6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 0.62rem auto no-repeat;
}

.waitlist__consent-input:checked + .waitlist__consent-box .waitlist__consent-mark {
  background: var(--white);
  border-color: var(--white);
}

.waitlist__consent-input:checked + .waitlist__consent-box .waitlist__consent-mark::after {
  opacity: 1;
}

.waitlist__consent-text {
  font-size: 0.88rem;
  line-height: 1.5;
  color: inherit;
}

.waitlist__error {
  margin: 0;
  font-size: 0.88rem;
  color: #d12a4a;
  text-align: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 0.85rem;
  padding: 0.95rem 1.25rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.25s var(--ease), background 0.25s, box-shadow 0.25s;
}

.btn--primary {
  width: 100%;
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 10px 28px rgba(27, 0, 246, 0.28);
}

.btn--primary:hover:not(:disabled) {
  transform: translateY(-2px);
  background: var(--blue-mid);
  box-shadow: 0 14px 36px rgba(27, 0, 246, 0.32);
}

.btn--primary:disabled {
  opacity: 0.65;
  cursor: wait;
  transform: none;
}

.btn--ghost {
  background: var(--white);
  color: var(--blue);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  border-color: var(--blue-glow);
}

.waitlist__legal {
  margin: 0.35rem 0 0;
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* Success — glyph only (no black box) */
.success {
  text-align: center;
  padding: 1.5rem 0 0.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.glyph-stage {
  position: relative;
  width: 10rem;
  height: 7rem;
  margin: 0 auto 1.5rem;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.5s var(--ease), transform 0.55s var(--ease);
}

.glyph-stage.is-visible {
  opacity: 1;
  transform: scale(1);
}

.glyph {
  position: relative;
  width: 100%;
  height: 100%;
  color: var(--text);
}

.glyph .face__eyes {
  position: absolute;
  top: 38%;
  left: 50%;
  display: flex;
  gap: 22px;
  transform: translate(calc(-50% + var(--gaze-x)), calc(-50% + var(--gaze-y)));
  transition: transform 0.45s var(--ease);
}

.glyph.is-snap .face__eyes {
  transition-duration: 0.22s;
}

.glyph .eye {
  display: block;
  width: 11px;
  height: 24px;
  background: var(--text);
  border-radius: 999px;
  transform: scaleY(var(--blink-l));
  transform-origin: center;
  transition: transform 0.12s ease;
  box-shadow: none;
}

.glyph .eye--r {
  transform: scaleY(var(--blink-r));
}

.glyph .face__mouth {
  position: absolute;
  top: 72%;
  left: 50%;
  width: 52px;
  height: auto;
  transform: translate(-50%, -50%);
  color: var(--text);
  pointer-events: none;
}

.success__copy {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.55s var(--ease) 0.15s, transform 0.55s var(--ease) 0.15s;
  max-width: 26rem;
}

.success__copy.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.success__brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.35rem;
  margin-bottom: 1rem;
  background: var(--blue);
  border-radius: 0.85rem;
  box-shadow: 0 10px 28px rgba(27, 0, 246, 0.22);
}

.success__logo {
  display: block;
  height: 26px;
  width: auto;
}

.success__title {
  margin: 0;
  font-family: var(--display);
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--blue-deep);
}

.success__position {
  margin: 0.5rem 0 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--blue);
}

.success__duplicate {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.success__hint {
  margin: 0.75rem 0 0;
  font-size: 0.92rem;
  color: var(--blue);
  line-height: 1.5;
}

.success__url {
  display: block;
  margin: 0.75rem 0 0;
  font-size: 0.72rem;
  color: var(--text-muted);
  word-break: break-all;
}

.success__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  justify-content: center;
  margin-top: 1rem;
}

.success__actions .btn {
  min-width: 8.5rem;
}

.foot {
  margin-top: auto;
  padding-top: 0.65rem;
  padding-bottom: 0.35rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.foot a {
  color: var(--text-muted);
  text-decoration: none;
}

.foot a:hover {
  color: var(--blue);
}

.store-badge {
  margin: 1rem 0 0;
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}

.store-badge--landing {
  opacity: 1;
  transform: none;
  margin-top: 0.85rem;
}

.store-badge.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.store-badge__img {
  display: block;
  margin: 0 auto;
  height: 48px;
  width: auto;
  max-width: 168px;
  opacity: 0.92;
  border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {
  .bg__orb,
  .reveal,
  .pill-tag {
    animation: none !important;
  }

  .reveal,
  body.is-ready .reveal {
    opacity: 1;
    transform: none;
  }

  .headline.reveal .headline__line,
  body.is-ready .headline.reveal .headline__line {
    opacity: 1;
    transform: none;
    animation: none !important;
  }
}
