:root {
  --bg: #eef7ff;
  --surface: #ffffff;
  --surface-soft: #f0f8ff;
  --ink: #0b1724;
  --text: #132032;
  --body: #405268;
  --muted: #6d7f93;
  --accent: #1f8dd6;
  --accent-2: #45bafd;
  --deep: #176fa9;
  --teal: #22c7ba;
  --border: #d7e8f6;
  --warning: #d97706;
  --success: #16a34a;
  --shadow: 0 22px 60px rgba(17, 76, 121, 0.16);
  --soft-shadow: 0 12px 32px rgba(17, 76, 121, 0.1);
  --radius: 20px;
  --font-heading: "Cairo", "IBM Plex Sans Arabic", "Segoe UI", Arial, sans-serif;
  --font-body: "IBM Plex Sans Arabic", "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
}

body {
  min-height: 100%;
  margin: 0;
  background:
    radial-gradient(circle at 22% 0%, rgba(69, 186, 253, 0.26), transparent 13rem),
    radial-gradient(circle at 86% 18%, rgba(34, 199, 186, 0.14), transparent 12rem),
    linear-gradient(180deg, #f7fcff 0%, var(--bg) 52%, #f8fbff 100%);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  display: block;
}

.lead-shell {
  display: grid;
  min-height: 100svh;
  place-items: start center;
  padding: max(12px, env(safe-area-inset-top)) 12px max(14px, env(safe-area-inset-bottom));
}

.lead-card {
  position: relative;
  isolation: isolate;
  width: min(100%, 420px);
  min-height: 0;
  overflow: hidden;
  padding: 22px 16px 16px;
  border: 1px solid rgba(215, 232, 246, 0.86);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.88)),
    linear-gradient(135deg, rgba(69, 186, 253, 0.16), rgba(255, 255, 255, 0));
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.ambient-map {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  opacity: 0.8;
}

.ambient-map::before {
  position: absolute;
  inset: 4% -22% auto;
  height: 280px;
  content: "";
  background:
    linear-gradient(90deg, transparent 49%, rgba(31, 141, 214, 0.06) 50%, transparent 51%),
    linear-gradient(0deg, transparent 49%, rgba(31, 141, 214, 0.06) 50%, transparent 51%);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, #000, transparent 78%);
  transform: rotate(-12deg);
}

.ambient-map span {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent-2);
  box-shadow: 0 0 0 10px rgba(69, 186, 253, 0.12);
  animation: pulse 2.8s ease-in-out infinite;
}

.ambient-map span:nth-child(1) {
  top: 16%;
  right: 13%;
}

.ambient-map span:nth-child(2) {
  top: 32%;
  left: 12%;
  animation-delay: 0.5s;
}

.ambient-map span:nth-child(3) {
  right: 20%;
  bottom: 24%;
  animation-delay: 1s;
}

.hero {
  display: grid;
  gap: 10px;
  justify-items: center;
  text-align: center;
}

.logo {
  display: block;
  width: 76px;
  height: 76px;
  object-fit: contain;
  border-radius: 22px;
  filter: drop-shadow(0 12px 24px rgba(31, 141, 214, 0.16));
}

.launch-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 9px;
  border: 1px solid rgba(31, 141, 214, 0.13);
  border-radius: 999px;
  background: rgba(240, 248, 255, 0.88);
  color: var(--deep);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}

.micro-hints {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 7px;
}

.micro-hints span {
  padding: 5px 9px;
  border: 1px solid rgba(31, 141, 214, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--deep);
  font-size: 0.74rem;
  font-weight: 700;
}

h1,
h2 {
  margin: 0;
  font-family: var(--font-heading);
  line-height: 1.18;
  letter-spacing: 0;
}

h1 {
  max-width: 100%;
  color: var(--ink);
  font-size: clamp(2rem, 8.4vw, 2.55rem);
  font-weight: 800;
}

.hero p {
  max-width: 31ch;
  margin: 0;
  color: var(--body);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.55;
}

.choice-panel {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  transition: opacity 220ms ease, transform 220ms ease;
}

.choice-panel.is-exiting {
  opacity: 0;
  transform: translateY(10px) scale(0.98);
}

.choice-card {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 76px;
  padding: 12px;
  border: 1px solid rgba(31, 141, 214, 0.14);
  border-radius: 22px;
  background: linear-gradient(135deg, #ffffff, #f5fbff);
  color: var(--text);
  text-align: right;
  box-shadow: 0 10px 26px rgba(17, 76, 121, 0.08);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.choice-card:active {
  transform: scale(0.98);
}

.choice-card:hover,
.choice-card:focus-visible {
  border-color: rgba(31, 141, 214, 0.42);
  box-shadow: 0 16px 34px rgba(17, 76, 121, 0.13);
  outline: none;
}

.choice-card:first-child .choice-icon {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.choice-card:nth-child(2) .choice-icon {
  background: linear-gradient(135deg, #146aa3, var(--teal));
}

.choice-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 17px;
  color: #ffffff;
}

.choice-icon svg {
  width: 23px;
  height: 23px;
  fill: currentColor;
}

.choice-card strong,
.choice-card small {
  grid-column: 2;
}

.choice-card strong {
  font-size: 1.05rem;
  font-weight: 800;
}

.choice-card small {
  margin-top: -6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 600;
}

.form-panel,
.success-panel {
  margin-top: 16px;
  animation: riseIn 280ms ease both;
}

.form-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.back-button {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #ffffff;
  color: var(--accent);
  box-shadow: 0 10px 22px rgba(18, 54, 86, 0.08);
}

.back-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
}

.form-heading p {
  margin: 0 0 2px;
  color: var(--accent);
  font-size: 0.83rem;
  font-weight: 800;
}

.form-heading h2 {
  font-size: 1.22rem;
}

form {
  display: grid;
  gap: 11px;
}

.field,
.chip-group,
.toggle-group {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}

.field span,
legend {
  color: var(--body);
  font-size: 0.9rem;
  font-weight: 800;
}

.field small {
  color: var(--muted);
  font-weight: 600;
}

input,
select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text);
  outline: none;
  padding: 0 14px;
  font-size: 0.98rem;
  font-weight: 650;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--accent) 50%),
    linear-gradient(135deg, var(--accent) 50%, transparent 50%);
  background-position:
    left 18px center,
    left 12px center;
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
  padding-left: 34px;
}

input:focus,
select:focus {
  border-color: rgba(35, 136, 209, 0.62);
  box-shadow: 0 0 0 4px rgba(55, 183, 255, 0.14);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chips button,
.toggle-options button {
  min-height: 39px;
  border: 1px solid rgba(35, 136, 209, 0.16);
  border-radius: 999px;
  background: #ffffff;
  color: var(--body);
  padding: 7px 11px;
  font-size: 0.86rem;
  font-weight: 800;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.chips button:active,
.toggle-options button:active {
  transform: scale(0.97);
}

.chips button.is-selected,
.toggle-options button.is-selected {
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #ffffff;
}

.toggle-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.toggle-options button {
  border-radius: 18px;
}

.consent {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 10px;
  color: var(--body);
  font-size: 0.88rem;
  font-weight: 700;
}

.consent input {
  width: 22px;
  height: 22px;
  min-height: 22px;
  margin: 2px 0 0;
  accent-color: var(--accent);
}

.submit-button {
  position: relative;
  display: grid;
  min-height: 52px;
  place-items: center;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, #1578bd, #37b7ff);
  color: #ffffff;
  font-size: 1.02rem;
  font-weight: 900;
  box-shadow: 0 18px 34px rgba(35, 136, 209, 0.27);
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.78;
}

.spinner {
  position: absolute;
  left: 18px;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 999px;
  opacity: 0;
}

.submit-button.is-loading .spinner {
  opacity: 1;
  animation: spin 700ms linear infinite;
}

.form-status {
  min-height: 22px;
  margin: -2px 0 0;
  color: var(--warning);
  font-size: 0.88rem;
  font-weight: 800;
  text-align: center;
}

.honeypot-field {
  position: absolute;
  right: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.success-panel {
  display: grid;
  justify-items: center;
  padding: 18px 4px 8px;
  text-align: center;
}

.checkmark {
  display: grid;
  width: 78px;
  height: 78px;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--success), var(--teal));
  color: #ffffff;
  box-shadow: 0 18px 40px rgba(22, 163, 74, 0.25);
  animation: popIn 420ms cubic-bezier(0.2, 1.4, 0.4, 1) both;
}

.checkmark svg {
  width: 44px;
  height: 44px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.8;
}

.success-panel h2 {
  font-size: 1.55rem;
}

.success-panel p {
  margin: 10px 0 6px;
  color: var(--body);
  font-size: 1.08rem;
  font-weight: 800;
}

.success-panel small {
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.55;
  }
  50% {
    transform: scale(1.45);
    opacity: 1;
  }
}

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

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

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

@media (max-height: 760px) {
  .lead-card {
    min-height: auto;
    padding-top: 14px;
  }

  .logo {
    width: 66px;
    height: 66px;
  }

  h1 {
    font-size: clamp(1.8rem, 7.8vw, 2.32rem);
  }

  .hero p {
    font-size: 0.93rem;
  }

  .choice-panel {
    margin-top: 14px;
  }

  .choice-card {
    min-height: 70px;
    padding: 10px;
  }
}

@media (max-width: 360px) {
  .lead-shell {
    padding-inline: 8px;
  }

  .lead-card {
    padding-inline: 12px;
    border-radius: 26px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
