/* ============================
   Tokens
   ============================ */
:root {
  --bg-base: #0A0F1C;
  --bg-elevated: #111827;
  --accent: #3AA9FF;
  --accent-dim: #3AA9FF66;
  --accent-deep: #1E3A5F;
  --text-primary: #F1F4F8;
  --text-secondary: #8A94A6;
  --success: #3AD1A0;
  --error: #FF6B6B;

  --font-head: "Sora", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Work Sans", "Helvetica Neue", Arial, sans-serif;

  --size-headline: clamp(2.1rem, 4.5vw, 3.4rem);
  --size-subhead: clamp(1.1rem, 2vw, 1.3rem);
  --size-section-title: 1.35rem;
  --size-body: 1rem;
  --size-label: 0.92rem;
  --size-small: 0.8rem;

  --radius: 14px;
  --transition: 180ms cubic-bezier(0.4, 0, 0.2, 1);
  --max-form: 720px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(ellipse 120% 60% at 50% -10%, var(--accent-deep) 0%, transparent 55%),
    linear-gradient(180deg, var(--bg-base) 0%, #0B111F 40%, var(--bg-base) 100%);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--size-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, legend {
  font-family: var(--font-head);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  margin: 0;
}

a { color: var(--accent); }

/* ============================
   Hero
   ============================ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 6.5rem 1.5rem 5rem;
  text-align: center;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background:
    linear-gradient(160deg, rgba(58, 169, 255, 0.08), transparent 45%),
    linear-gradient(200deg, rgba(30, 58, 95, 0.5), transparent 60%);
}

/* ============================
   Shooting stars (sitewide)
   ============================ */
.stars-bg {
  position: fixed;
  inset: 0;
  z-index: -3;
  overflow: hidden;
  pointer-events: none;
}

.shooting-star {
  position: absolute;
  top: 0;
  left: 0;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--text-primary);
  box-shadow: 0 0 8px 2px rgba(58, 169, 255, 0.85);
  opacity: 0;
  animation-name: shoot;
  animation-timing-function: cubic-bezier(0.3, 0, 0.6, 1);
  animation-iteration-count: infinite;
  animation-delay: var(--delay, 0s);
  animation-duration: var(--duration, 7s);
}

@keyframes shoot {
  0% {
    transform: translate(0, 0);
    opacity: 0;
  }
  4% {
    opacity: 1;
  }
  20% {
    transform: translate(-55vw, 38vh);
    opacity: 0;
  }
  100% {
    transform: translate(-55vw, 38vh);
    opacity: 0;
  }
}

.hero-content {
  max-width: 760px;
  margin: 0 auto;
  position: relative;
}

.eyebrow {
  font-family: var(--font-head);
  font-size: var(--size-small);
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 1.1rem;
}

.hero h1 {
  font-size: var(--size-headline);
  line-height: 1.12;
  margin-bottom: 1.25rem;
}

.subhead {
  font-size: var(--size-subhead);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 2.25rem;
}

/* ============================
   Buttons
   ============================ */
.btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  border: none;
  border-radius: 10px;
  padding: 0.9rem 1.9rem;
  cursor: pointer;
  transition: background-color var(--transition), transform var(--transition), color var(--transition);
}

.btn-primary {
  background: var(--accent);
  color: #06121F;
}

.btn-primary:hover {
  background: #58B9FF;
  transform: scale(1.03);
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn:focus-visible {
  outline: 2px solid var(--text-primary);
  outline-offset: 3px;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* ============================
   Main / form intro
   ============================ */
main {
  max-width: var(--max-form);
  margin: 0 auto;
  padding: 1rem 1.25rem 6rem;
}

.form-intro {
  padding: 2rem 0 1rem;
  scroll-margin-top: 1.5rem;
}

.form-intro h2 {
  font-size: 1.7rem;
  margin-bottom: 0.6rem;
}

.form-intro p {
  color: var(--text-secondary);
}

/* ============================
   Form sections
   ============================ */
.section {
  min-width: 0;
  background: var(--bg-elevated);
  border: 1px solid #1C2536;
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  margin: 0 0 1.75rem;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.02) inset;
}

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

.section-title {
  font-size: var(--size-section-title);
  margin-bottom: 1.5rem;
  transition: color var(--transition);
}

.section:hover .section-title,
.section:focus-within .section-title {
  color: var(--accent);
}

.section-note {
  font-size: var(--size-label);
  color: var(--accent);
  background: rgba(58, 169, 255, 0.08);
  border: 1px solid rgba(58, 169, 255, 0.25);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin: -0.5rem 0 1.5rem;
}

.steps {
  margin: 0 0 1.75rem;
  padding-left: 1.25rem;
  color: var(--text-secondary);
  font-size: var(--size-label);
}

.steps li {
  margin-bottom: 0.6rem;
}

.steps li:last-child {
  margin-bottom: 0;
}

.steps li::marker {
  color: var(--accent);
  font-weight: 600;
}

.subgroup {
  border: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.subgroup:last-child { margin-bottom: 0; }

.subgroup > legend {
  font-family: var(--font-body);
  font-size: var(--size-label);
  font-weight: 600;
  color: var(--text-primary);
  padding: 0;
  margin-bottom: 0.75rem;
}

/* ============================
   Fields
   ============================ */
.field {
  margin-bottom: 1.4rem;
}

.field:last-child { margin-bottom: 0; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

label {
  display: block;
  font-size: var(--size-label);
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.field-row .field > label {
  min-height: 2.6em;
  line-height: 1.3;
  display: flex;
  align-items: flex-end;
  margin-bottom: 0.6rem;
}

.required-tag {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.72rem;
  color: var(--accent);
  background: rgba(58, 169, 255, 0.12);
  border-radius: 5px;
  padding: 0.15rem 0.45rem;
  margin-left: 0.4rem;
  vertical-align: middle;
  letter-spacing: 0.02em;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
select,
textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: var(--size-body);
  color: var(--text-primary);
  background: #0D1421;
  border: 1px solid #253248;
  border-radius: 9px;
  padding: 0.75rem 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
}

textarea {
  resize: vertical;
  min-height: 5rem;
  font-family: var(--font-body);
}

select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%238A94A6' d='M4 6l4 4 4-4' stroke='%238A94A6' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.9rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

select:invalid {
  color: #52607A;
}

select option {
  color: var(--text-primary);
  background: #0D1421;
}

input::placeholder,
textarea::placeholder {
  color: #52607A;
}

input:hover,
select:hover,
textarea:hover {
  border-color: #34465F;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(58, 169, 255, 0.18);
  background: #0F1826;
}

/* Browsers force a white/yellow background on autofilled or paste-suggested
   fields; this is the standard override since background-color itself is
   ignored on autofilled inputs. */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text-primary);
  -webkit-box-shadow: 0 0 0px 1000px #0D1421 inset;
  box-shadow: 0 0 0px 1000px #0D1421 inset;
  caret-color: var(--text-primary);
  transition: background-color 9999s ease-in-out 0s;
}

input:autofill,
textarea:autofill {
  background: #0D1421;
  color: var(--text-primary);
}

.other-input {
  margin-top: 0.9rem;
}

/* ============================
   Checkboxes / radios
   ============================ */
.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem 1.25rem;
}

.radio-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.5rem;
}

.checkbox,
.radio {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--size-label);
  font-weight: 400;
  color: var(--text-primary);
  margin-bottom: 0;
  cursor: pointer;
}

.checkbox input,
.radio input {
  appearance: none;
  -webkit-appearance: none;
  width: 19px;
  height: 19px;
  flex-shrink: 0;
  border: 1.5px solid #3A4A63;
  background: #0D1421;
  transition: border-color var(--transition), background-color var(--transition), box-shadow var(--transition);
  position: relative;
  cursor: pointer;
}

.checkbox input { border-radius: 5px; }
.radio input { border-radius: 50%; }

.checkbox input:checked,
.radio input:checked {
  border-color: var(--accent);
  background: var(--accent);
}

.checkbox input:checked::after {
  content: "";
  position: absolute;
  left: 5.5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #06121F;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.radio input:checked::after {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #06121F;
}

.checkbox input:focus-visible,
.radio input:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(58, 169, 255, 0.28);
}

/* ============================
   Conditional field
   ============================ */
.conditional-field {
  margin-top: 1rem;
  padding-left: 1rem;
  border-left: 2px solid var(--accent-deep);
}

/* ============================
   Submit area
   ============================ */
.submit-area {
  text-align: center;
  padding-top: 0.5rem;
}

.btn-submit {
  width: 100%;
  padding: 1.05rem 1.9rem;
  font-size: 1.05rem;
}

.form-status {
  margin-top: 1.5rem;
  border-radius: var(--radius);
  padding: 1.5rem;
}

.checkmark {
  width: 44px;
  height: 44px;
}

.checkmark-lg {
  width: 72px;
  height: 72px;
}

.checkmark-circle {
  stroke: var(--success);
  stroke-width: 2.5;
  stroke-dasharray: 152;
  stroke-dashoffset: 152;
  animation: circle-draw 0.5s ease forwards;
}

.checkmark-check {
  stroke: var(--success);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: check-draw 0.35s ease 0.45s forwards;
}

@keyframes circle-draw { to { stroke-dashoffset: 0; } }
@keyframes check-draw { to { stroke-dashoffset: 0; } }

.status-error {
  color: var(--error);
  background: rgba(255, 107, 107, 0.08);
  border: 1px solid rgba(255, 107, 107, 0.3);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.status-error p { margin: 0; color: var(--text-primary); }

/* ============================
   Success page
   ============================ */
.success-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 3rem 1.5rem;
}

.success-content {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.success-content .checkmark {
  margin-bottom: 1.75rem;
}

.success-content .eyebrow {
  color: var(--success);
}

.success-content h1 {
  font-size: var(--size-headline);
  line-height: 1.15;
  margin-bottom: 1.25rem;
}

.success-content .subhead {
  margin-bottom: 0;
}

/* ============================
   Footer
   ============================ */
.site-footer {
  text-align: center;
  padding: 2.5rem 1.5rem 3rem;
  color: var(--text-secondary);
  font-size: var(--size-small);
}

/* ============================
   Responsive
   ============================ */
@media (max-width: 900px) {
  main { padding: 1rem 1rem 5rem; }
  .section { padding: 1.75rem 1.5rem; }
}

@media (max-width: 640px) {
  .hero { padding: 4rem 1.25rem 3rem; }
  .field-row { grid-template-columns: 1fr; gap: 0; }
  .field-row .field > label {
    min-height: auto;
    display: block;
  }
  .checkbox-grid { grid-template-columns: 1fr; }
  .section { padding: 1.5rem 1.25rem; margin-bottom: 1.25rem; }
  .section-title { font-size: 1.2rem; margin-bottom: 1.25rem; }
  main { padding: 0.5rem 0.9rem 4rem; }
  .form-intro { padding: 1.5rem 0 0.75rem; }
  .radio-row { gap: 0.5rem 1.1rem; }
}

@media (max-width: 400px) {
  .hero { padding: 3.25rem 1rem 2.5rem; }
  .section { padding: 1.25rem 1rem; }
}

/* ============================
   Reduced motion
   ============================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .shooting-star {
    animation: none;
    opacity: 0;
  }

  .checkmark-circle,
  .checkmark-check {
    animation: none;
    stroke-dashoffset: 0;
  }

  .btn,
  input,
  textarea,
  .section-title {
    transition: none;
  }

  .btn-primary:hover {
    transform: none;
  }
}
