/* ── Reset & Base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #F4F6FB;
  --text-dark: #1a1a2e;
  --text-body: rgba(30, 30, 50, 0.6);
  --text-muted: rgba(30, 30, 50, 0.35);
  --accent-green: #44B84F;
  --accent-orange: #E88F58;
  --gradient: linear-gradient(135deg, #E88F58 0%, #44B84F 100%);
  --card-bg: rgba(255, 255, 255, 0.75);
  --card-border: rgba(255, 255, 255, 0.9);
  --border: rgba(0, 0, 0, 0.09);
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.08), 0 2px 8px rgba(0,0,0,0.04);
  --shadow-lg: 0 24px 64px rgba(0,0,0,0.1), 0 4px 16px rgba(0,0,0,0.06);
  --radius: 1rem;
  --radius-sm: 0.625rem;
}

/* Prevent CSS display rules from overriding the hidden attribute */
[hidden] { display: none !important; }

html {
  scroll-behavior: smooth;
  color-scheme: light;
}

body {
  background-color: var(--bg);
  color: var(--text-body);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow-x: hidden;
}

/* ── Background blobs ── */
.blob {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.blob-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(68,184,79,0.22) 0%, transparent 70%);
  top: -220px;
  right: -200px;
  animation: blobFloat 8s ease-in-out infinite alternate;
}

.blob-2 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, rgba(232,143,88,0.18) 0%, transparent 70%);
  bottom: -160px;
  left: -180px;
  animation: blobFloat 10s ease-in-out infinite alternate-reverse;
}

/* Dot grid overlay */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle, rgba(0,0,0,0.07) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

/* Decorative rings */
body::after {
  content: '';
  position: fixed;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 1.5px solid rgba(68,184,79,0.12);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
}

@keyframes blobFloat {
  from { transform: translateY(0px) scale(1) rotate(-38deg); }
  to   { transform: translateY(18px) scale(1.03) rotate(-38deg); }
}

@keyframes blobFloatSmall {
  from { transform: translateY(0px) scale(1) rotate(30deg); }
  to   { transform: translateY(-14px) scale(1.02) rotate(30deg); }
}

/* ── Decorative Pills ── */
.deco-pill {
  position: fixed;
  border-radius: 999px;
  pointer-events: none;
  z-index: 0;
}

.pill-large {
  width: 320px;
  height: 128px;
  /* Two-tone capsule: light half left, green half right */
  background: linear-gradient(90deg,
    rgba(210, 245, 212, 0.55) 0%,
    rgba(210, 245, 212, 0.55) 50%,
    rgba(68, 184, 79, 0.45) 50%,
    rgba(68, 184, 79, 0.45) 100%
  );
  border: 2px solid rgba(68, 184, 79, 0.3);
  box-shadow: inset 0 2px 12px rgba(255,255,255,0.4), 0 8px 32px rgba(68,184,79,0.15);
  top: 6%;
  right: -80px;
  transform: rotate(-38deg);
  animation: blobFloat 7s ease-in-out infinite alternate;
}

.pill-small {
  width: 180px;
  height: 72px;
  background: linear-gradient(90deg,
    rgba(232, 143, 88, 0.2) 0%,
    rgba(232, 143, 88, 0.2) 50%,
    rgba(68, 184, 79, 0.25) 50%,
    rgba(68, 184, 79, 0.25) 100%
  );
  border: 1.5px solid rgba(68, 184, 79, 0.2);
  box-shadow: inset 0 1px 8px rgba(255,255,255,0.3);
  bottom: 12%;
  left: -40px;
  transform: rotate(30deg);
  animation: blobFloatSmall 9s ease-in-out infinite alternate;
}

/* ── Layout ── */
section {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 4rem 1.5rem 2rem;
  position: relative;
  z-index: 1;
}

.container {
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.75rem;
  text-align: center;
}

footer {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 1.5rem 2.5rem;
  position: relative;
  z-index: 1;
}

/* ── Logo ── */
.logo-wrap {
  width: 110px;
  height: 110px;
  border-radius: 28px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(68,184,79,0.12);
  animation: fadeDown 0.7s ease both;
  flex-shrink: 0;
}

.logo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* ── Hero Text ── */
.hero-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  animation: fadeUp 0.7s 0.1s ease both;
}

h1 {
  font-family: 'Lexend', sans-serif;
  font-weight: 600;
  font-size: 2.75rem;
  letter-spacing: -0.075rem;
  color: var(--text-dark);
  line-height: 1.1;
}

h2.tagline {
  font-family: 'Lexend', sans-serif;
  font-weight: 500;
  font-size: 1.625rem;
  letter-spacing: -0.025rem;
  line-height: 1.3;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

p.description {
  font-size: 0.9375rem;
  line-height: 1.75;
  color: var(--text-body);
  max-width: 420px;
}

/* ── Feature Pills ── */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  animation: fadeUp 0.7s 0.2s ease both;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(68,184,79,0.2);
  border-radius: 100px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-dark);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(8px);
}

/* ── Form Card ── */
.form-card {
  width: 100%;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 1.5rem;
  padding: 2rem;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  animation: fadeUp 0.7s 0.3s ease both;
}

.form-heading {
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
  letter-spacing: -0.01em;
}

#waitlist-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  text-align: left;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.field label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-dark);
  letter-spacing: 0.01em;
}

.field input,
.field select {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  color: var(--text-dark);
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: var(--shadow-sm);
}

.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23999' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.field input:focus,
.field select:focus {
  border-color: var(--accent-green);
  box-shadow: 0 0 0 3px rgba(68, 184, 79, 0.12), var(--shadow-sm);
}

.field input::placeholder {
  color: rgba(0, 0, 0, 0.25);
}

/* Submit button */
button[type="submit"] {
  margin-top: 0.5rem;
  width: 100%;
  padding: 0.9rem 1.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #ffffff;
  background: var(--gradient);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 52px;
  box-shadow: 0 4px 16px rgba(68,184,79,0.3);
  letter-spacing: 0.01em;
}

button[type="submit"]:hover {
  opacity: 0.92;
  box-shadow: 0 6px 24px rgba(68,184,79,0.4);
  transform: translateY(-1px);
}

button[type="submit"]:active {
  transform: translateY(0) scale(0.99);
}

button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,255,255,0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Error */
.form-error {
  font-size: 0.8125rem;
  color: #d32f2f;
  min-height: 1em;
}

/* ── Success Section ── */
#done-section {
  flex: 1;
  min-height: 60vh;
}

#done-section .container {
  gap: 1.25rem;
}

.success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(68,184,79,0.35);
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) both;
}

/* ── Footer Divider ── */
.footer-divider {
  width: 40px;
  height: 1px;
  background: var(--border);
  margin-bottom: 1.25rem;
}

/* ── Social Icons ── */
.social-icons {
  list-style: none;
  display: flex;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  animation: fadeUp 0.7s 0.4s ease both;
}

.social-icons li a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: var(--text-muted);
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--border);
  transition: color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.15s;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
}

.social-icons li a:hover {
  color: var(--text-dark);
  background: #ffffff;
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* ── Animations ── */
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-16px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

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

@keyframes popIn {
  from { opacity: 0; transform: scale(0.5); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── Responsive ── */
@media (max-width: 600px) {
  section { padding: 3rem 1.25rem 1.5rem; }
  h1 { font-size: 2.25rem; }
  h2.tagline { font-size: 1.375rem; }
  .form-card { padding: 1.5rem 1.25rem; }
  .logo-wrap { width: 90px; height: 90px; border-radius: 22px; }
}

@media (max-width: 400px) {
  h1 { font-size: 2rem; }
  h2.tagline { font-size: 1.25rem; }
  .pills { gap: 0.375rem; }
  .pill { font-size: 0.75rem; padding: 0.3rem 0.7rem; }
}
