:root {
  --brand: #A93765;
  --text-on-brand: #ffffff;
  --brand-contrast: #ffffff;
  --title-glow: rgba(255, 255, 255, 0.20);
}

/* Light theme */
[data-theme="light"] {
  --brand: #F9E6EE; /* super light magenta */
  --text-on-brand: #7b1f49; /* darker magenta for text */
  --brand-contrast: #7b1f49;
  --title-glow: rgba(123, 31, 73, 0.25);
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  font-family: "Open Sans", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text-on-brand);
  background-color: var(--brand);
}

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: calc(16px + env(safe-area-inset-top, 0)) 16px 16px 16px;
  background: var(--brand);
}

.logo {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top, 0));
  left: clamp(24px, 8vw, 96px);
  transform: none;
  text-decoration: none;
  color: var(--text-on-brand);
  font-family: "Baloo 2", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(20px, 3vw, 28px);
  letter-spacing: 0.5px;
  text-shadow: 0 4px 14px var(--title-glow);
}



.hero-title {
  margin: 0;
  text-align: center;
  font-family: "Baloo 2", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 700;
  line-height: 1.05;
  font-size: clamp(32px, 7vw, 72px);
  max-width: 16ch;
  text-shadow: 0 6px 20px var(--title-glow);
  animation: titleFadeIn 520ms ease 160ms both;
}

.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(12px, 3vh, 28px);
  width: 100%;
}

.concept-wave {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-family: "Baloo 2", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(18px, 3vw, 22px);
  opacity: 0;
  transform: translateY(6px) scale(0.98);
  animation: fadeInUp 500ms ease 120ms forwards;
  text-shadow: 0 4px 14px var(--title-glow);
}

.concept-wave .char {
  display: inline-block;
  transform-origin: 50% 100%;
  animation: wave 1400ms ease-in-out infinite;
  animation-delay: calc(var(--i) * 60ms);
}

.concept-wave .space { width: 8px; }

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes wave {
  0%, 100% { transform: translateY(0); }
  25% { transform: translateY(-6px); }
  50% { transform: translateY(0); }
  75% { transform: translateY(6px); }
}

@keyframes titleFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}


@media (prefers-reduced-motion: reduce) {
  .hero-title { animation: none !important; }
}

.signup-form {
  width: 100%;
  max-width: 640px;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
  margin-top: clamp(8px, 4vh, 40px);
}

.signup-input {
  flex: 1 1 auto;
  height: 56px;
  padding: 0 18px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.12);
  color: var(--text-on-brand);
  font-size: 16px;
  outline: none;
  box-shadow: 0 2px 12px var(--title-glow);
}

.signup-input::placeholder {
  color: rgba(255, 255, 255, 0.72);
}

.signup-input:focus-visible {
  box-shadow: 0 2px 12px var(--title-glow), 0 0 0 3px rgba(255, 255, 255, 0.35);
  border-color: rgba(255, 255, 255, 0.75);
}

/* Light theme form field overrides */
[data-theme="light"] .signup-input {
  border: 1px solid rgba(0, 0, 0, 0.2);
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-on-brand);
}

[data-theme="light"] .signup-input::placeholder {
  color: rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .signup-input:focus-visible {
  box-shadow: 0 2px 12px var(--title-glow), 0 0 0 3px rgba(123, 31, 73, 0.3);
  border-color: rgba(123, 31, 73, 0.6);
}

.signup-button {
  flex: 0 0 auto;
  height: 56px;
  padding: 0 22px;
  border-radius: 9999px;
  border: none;
  background: var(--brand-contrast);
  color: var(--brand);
  font-weight: 700;
  font-family: "Baloo 2", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 16px;
  cursor: pointer;
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
  box-shadow: 0 6px 20px var(--title-glow);
}

.signup-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px var(--title-glow);
}

.signup-button:active {
  transform: translateY(0);
  box-shadow: 0 4px 12px var(--title-glow);
}

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

@media (min-width: 768px) {
  .hero {
    padding: calc(32px + env(safe-area-inset-top, 0)) 32px 32px 32px;
  }
  .logo {
    left: clamp(32px, 10vw, 128px);
    transform: none;
    font-size: clamp(24px, 2.5vw, 32px);
  }
  .hero-title {
    font-size: clamp(48px, 7vw, 96px);
  }
}

.thanks-text {
  display: block;
  text-align: center;
  font-family: "Baloo 2", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 700;
  font-size: 20px;
}

/* Error + shake styles */
@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

.is-shaking {
  animation: shake 0.4s ease;
}

.signup-input.is-error {
  border-color: rgba(255, 86, 86, 0.95);
  box-shadow: 0 0 0 3px rgba(255, 86, 86, 0.35);
}

.signup-button.is-error {
  box-shadow: 0 0 0 3px rgba(255, 86, 86, 0.5);
}
