:root {
  --teal-900: #1a5c57;
  --teal-700: #2a9b94;
  --teal-500: #3bb8ae;
  --coral-500: #e8896b;
  --ink: #1f3333;
  --ink-soft: #4a6361;
  --muted: #7a9190;
  --line: #d7e5e3;
  --paper-2: #f7faf9;
  --shadow: 0 14px 36px rgba(42, 155, 148, 0.1);
  --radius-md: 18px;
  --font: "Vazirmatn", Tahoma, sans-serif;
}

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

html,
body {
  height: 100%;
  margin: 0;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1000px 520px at 80% -10%, rgba(244, 165, 138, 0.18), transparent 60%),
    radial-gradient(800px 460px at 10% 0%, rgba(59, 184, 174, 0.16), transparent 55%),
    linear-gradient(180deg, #fffefc 0%, var(--paper-2) 55%, #eef7f5 100%);
  line-height: 1.65;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

.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;
}

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.5;
  animation: float 18s ease-in-out infinite;
}

.blob-a {
  width: 280px;
  height: 280px;
  background: rgba(59, 184, 174, 0.28);
  top: -70px;
  right: -50px;
}

.blob-b {
  width: 220px;
  height: 220px;
  background: rgba(232, 137, 107, 0.2);
  bottom: 8%;
  left: -70px;
  animation-delay: -6s;
}

.blob-c {
  width: 140px;
  height: 140px;
  background: rgba(42, 155, 148, 0.14);
  top: 45%;
  right: 10%;
  animation-delay: -11s;
}

.scene {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  width: 100%;
  height: min(28vh, 260px);
  opacity: 0.9;
}

.path-line {
  stroke-dasharray: 8 14;
  animation: dash 28s linear infinite;
}

.page {
  position: relative;
  z-index: 1;
  height: 100dvh;
  height: 100vh;
  display: grid;
  place-items: center;
  padding: max(0.75rem, env(safe-area-inset-top)) 1rem max(0.75rem, env(safe-area-inset-bottom));
}

.stage {
  width: min(560px, 100%);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.55rem, 1.6vh, 1rem);
  animation: rise 0.8s ease both;
}

.logo {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
}

.logo-mark {
  width: clamp(52px, 8vh, 64px);
  height: auto;
  filter: drop-shadow(0 10px 20px rgba(42, 155, 148, 0.28));
  animation: soft-bob 5.5s ease-in-out infinite;
}

.logo-word {
  font-size: clamp(1.75rem, 4.5vh, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--teal-900);
  line-height: 1.1;
}

.headline {
  margin: 0;
  font-size: clamp(1.15rem, 3.1vh, 1.7rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.45;
}

.subhead {
  margin: 0;
  max-width: 34rem;
  font-size: clamp(0.88rem, 2.1vh, 1.05rem);
  color: var(--ink-soft);
  font-weight: 500;
}

.signup-form {
  width: min(420px, 100%);
  margin-top: 0.35rem;
}

.signup-title {
  margin: 0 0 0.7rem;
  font-size: clamp(0.9rem, 2.1vh, 1.05rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.55;
}

.signup-row {
  display: flex;
  gap: 0.5rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.3rem;
  box-shadow: var(--shadow);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.signup-row:focus-within {
  border-color: var(--teal-500);
  box-shadow: 0 0 0 4px rgba(59, 184, 174, 0.18), var(--shadow);
}

.signup-row input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0.75rem 1rem;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.signup-row input::placeholder {
  color: #a3b5b4;
}

.signup-row button {
  flex-shrink: 0;
  border: 0;
  border-radius: 999px;
  padding: 0.75rem 1.2rem;
  font: inherit;
  font-weight: 700;
  font-size: 0.92rem;
  color: #fff;
  background: linear-gradient(135deg, var(--teal-700), var(--teal-500));
  cursor: pointer;
  transition: transform 0.18s ease, filter 0.18s ease, opacity 0.18s ease;
}

.signup-row button:hover:not(:disabled) {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.signup-row button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.privacy {
  margin: 0.65rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.form-status {
  min-height: 1.25em;
  margin: 0.4rem 0 0;
  font-size: 0.86rem;
  font-weight: 600;
}

.form-status.is-ok {
  color: var(--teal-700);
}

.form-status.is-err {
  color: #c45b4a;
}

.footer {
  margin-top: 0.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
}

.social {
  display: flex;
  justify-content: center;
  gap: 0.55rem;
}

.social-link {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--teal-700);
  background: rgba(255, 252, 250, 0.9);
  border: 1px solid var(--line);
  transition: transform 0.18s ease, color 0.18s ease, background 0.18s ease,
    border-color 0.18s ease;
}

.social-link svg {
  width: 17px;
  height: 17px;
}

.social-link:hover {
  color: #fff;
  background: linear-gradient(135deg, var(--teal-700), var(--coral-500));
  border-color: transparent;
  transform: translateY(-2px);
}

.social-link:focus-visible,
.signup-row button:focus-visible,
.signup-row input:focus-visible {
  outline: 3px solid rgba(59, 184, 174, 0.45);
  outline-offset: 2px;
}

.copy {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}

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

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(10px, -14px);
  }
}

@keyframes soft-bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes dash {
  to {
    stroke-dashoffset: -400;
  }
}

@media (max-width: 420px) {
  .signup-row {
    flex-direction: column;
    border-radius: var(--radius-md);
    padding: 0.45rem;
  }

  .signup-row input {
    text-align: center;
    padding: 0.7rem;
  }

  .signup-row button {
    width: 100%;
  }
}

@media (max-height: 700px) {
  .scene {
    height: 18vh;
    opacity: 0.55;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
