/* ───────────────────────────────────────────────────────────────
   Start Your Project — form styles.
   Relies on the design tokens already defined in :root in style.css
   (--rust-accent, --timber-bark, --cream-canvas, etc.), so it stays
   in sync with your brand automatically. Load this AFTER style.css.
   ─────────────────────────────────────────────────────────────── */

.start-section {
  background: var(--light-sage);
  /* Clear the fixed 72px nav (matches the offset your legal pages use). */
  padding-top: 120px;
}

.start-section .sp-shell {
  max-width: 760px;
}

.sp-form {
  margin-top: 40px;
  background: var(--white-clean);
  border: 1px solid rgba(181, 164, 146, 0.3);
  border-radius: 4px;
  padding: clamp(28px, 4vw, 44px);
  box-shadow: 0 12px 40px rgba(44, 26, 14, 0.06);
}

.sp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}

.sp-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.sp-field-full {
  margin-top: 22px;
}

.sp-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--timber-bark);
}

.sp-req {
  color: var(--rust-accent);
}

.sp-input,
.sp-textarea {
  width: 100%;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: var(--charcoal-ink);
  background: var(--cream-canvas);
  border: 1px solid rgba(181, 164, 146, 0.5);
  border-radius: 4px;
  padding: 12px 14px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  appearance: none;
}

.sp-textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

.sp-input::placeholder,
.sp-textarea::placeholder {
  color: var(--warm-stone);
}

.sp-input:focus,
.sp-textarea:focus {
  outline: none;
  background: var(--white-clean);
  border-color: var(--rust-accent);
  box-shadow: 0 0 0 3px rgba(166, 75, 42, 0.12);
}

select.sp-input {
  cursor: pointer;
  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 fill='%23B5A492' d='M6 8 0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* Submit button reuses .btn-primary from style.css; these are just the
   resets a <button> needs (vs. the <a> the class was written for). */
.sp-submit {
  margin-top: 28px;
  border: none;
  cursor: pointer;
  font-size: 14px;
}

.sp-submit:disabled {
  opacity: 0.6;
  cursor: progress;
}

.sp-error {
  margin-top: 16px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  color: #b23b2e;
}

.sp-error:empty {
  display: none;
}

/* Success state */
.sp-success {
  margin-top: 40px;
  background: var(--white-clean);
  border: 1px solid rgba(181, 164, 146, 0.3);
  border-left: 4px solid var(--golden-grain);
  border-radius: 4px;
  padding: clamp(28px, 4vw, 44px);
}

.sp-success h3 {
  font-family: 'Playfair Display', serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--timber-bark);
  margin-bottom: 10px;
  line-height: 1.2;
}

.sp-success p {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: #5c4f44;
  line-height: 1.65;
  margin-bottom: 20px;
}

/* Honeypot — hidden from people, never focusable. Do not remove. */
.sp-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 700px) {
  .sp-grid { grid-template-columns: 1fr; gap: 18px; }
  .sp-field-full { margin-top: 18px; }
  .sp-submit { width: 100%; justify-content: center; }
}


/* ─── PAGE LOAD ANIMATIONS ─── */

/* Base state — everything starts invisible */
.sp-animate {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.sp-animate.sp-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays for sequential reveal */
.sp-delay-1 { transition-delay: 0.05s; }
.sp-delay-2 { transition-delay: 0.15s; }
.sp-delay-3 { transition-delay: 0.28s; }
.sp-delay-4 { transition-delay: 0.42s; }
.sp-delay-5 { transition-delay: 0.58s; }

/* Nav fades in from top */
@keyframes navSlideDown {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}

nav {
  animation: navSlideDown 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Overline line draws in left to right */
@keyframes lineGrow {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

.section-overline::before {
  transform-origin: left center;
  animation: lineGrow 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.3s both;
}

/* Form card lifts in with slight scale */
@keyframes cardReveal {
  from { opacity: 0; transform: translateY(32px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.sp-form {
  animation: cardReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.55s both;
}

/* Individual form rows cascade in */
.sp-grid .sp-field:nth-child(1) { animation: cardReveal 0.6s cubic-bezier(0.22,1,0.36,1) 0.7s both; }
.sp-grid .sp-field:nth-child(2) { animation: cardReveal 0.6s cubic-bezier(0.22,1,0.36,1) 0.78s both; }
.sp-grid .sp-field:nth-child(3) { animation: cardReveal 0.6s cubic-bezier(0.22,1,0.36,1) 0.86s both; }
.sp-grid .sp-field:nth-child(4) { animation: cardReveal 0.6s cubic-bezier(0.22,1,0.36,1) 0.94s both; }
.sp-grid .sp-field:nth-child(5) { animation: cardReveal 0.6s cubic-bezier(0.22,1,0.36,1) 1.02s both; }
.sp-grid .sp-field:nth-child(6) { animation: cardReveal 0.6s cubic-bezier(0.22,1,0.36,1) 1.10s both; }
.sp-grid .sp-field:nth-child(7) { animation: cardReveal 0.6s cubic-bezier(0.22,1,0.36,1) 1.18s both; }
.sp-grid .sp-field:nth-child(8) { animation: cardReveal 0.6s cubic-bezier(0.22,1,0.36,1) 1.26s both; }
.sp-field-full:nth-of-type(1)   { animation: cardReveal 0.6s cubic-bezier(0.22,1,0.36,1) 1.34s both; }
.sp-field-full:nth-of-type(2)   { animation: cardReveal 0.6s cubic-bezier(0.22,1,0.36,1) 1.42s both; }

/* Respect user preference */
@media (prefers-reduced-motion: reduce) {
  nav, .sp-form, .sp-grid .sp-field,
  .sp-field-full, .section-overline::before {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .sp-animate { opacity: 1; transform: none; transition: none; }
}
