:root {
  --ink: #10251c;
  --cream: #fffdf5;
  --lime: #d9f480;
  --green: #21583e;
  --muted: rgba(255, 255, 255, 0.76);
  font-family: "DM Sans", system-ui, sans-serif;
  color: var(--cream);
  background: #0e0f0e;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body { margin: 0; }

button, input { font: inherit; }

button { cursor: pointer; }
button:disabled { cursor: wait; opacity: 0.7; }

.hero {
  position: relative;
  min-height: 100svh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  padding: clamp(1rem, 2.2vw, 2rem);
  isolation: isolate;
  overflow: hidden;
  background: #238ed1;
}

.scene,
.scene-layer,
.scene-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.scene { z-index: -2; overflow: hidden; }

.scene-layer {
  object-fit: cover;
  object-position: center bottom;
  pointer-events: none;
  user-select: none;
}

.scene-sky { transform: scale(1.02); }

.scene-clouds {
  --cloud-x: 0px;
  --cloud-y: 0px;
  opacity: 0;
  filter: blur(20px);
  transform: translate3d(var(--cloud-x), var(--cloud-y), 0) scale(1.13);
  transition: opacity 3.5s ease, filter 3.5s ease;
  will-change: transform;
}

.scene-clouds.is-loaded { opacity: 0.92; filter: blur(0); }

.scene-city {
  --city-x: 0px;
  --city-y: 0px;
  top: 14%;
  height: 86%;
  object-fit: fill;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, transparent 18%, #000 44%);
  mask-image: linear-gradient(to bottom, transparent 0%, transparent 18%, #000 44%);
  transform: translate3d(var(--city-x), var(--city-y), 0) scale(1.045);
  will-change: transform;
}

.scene-shade {
  background:
    linear-gradient(180deg, rgba(5, 35, 48, 0.11) 0%, transparent 42%),
    linear-gradient(180deg, transparent 64%, rgba(5, 25, 17, 0.16) 100%);
}

.grain {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.18'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.site-header {
  width: min(1180px, 100%);
  min-height: 4.5rem;
  margin: 0 auto;
  padding: 0.75rem 0.9rem 0.75rem 1.4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(13, 47, 49, 0.48);
  box-shadow: 0 18px 54px rgba(8, 27, 18, 0.18);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
}

.brand {
  width: fit-content;
  color: white;
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.brand span { color: var(--lime); }

.contact-link {
  padding: 0.8rem 1.15rem;
  border-radius: 999px;
  color: var(--ink);
  background: rgba(255, 253, 245, 0.92);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  transition: transform 160ms ease, background 160ms ease;
}

.contact-link:hover { transform: translateY(-1px); background: white; }

.hero-copy {
  width: min(1180px, 100%);
  margin: clamp(4.4rem, 12vh, 9rem) auto auto;
  padding-left: clamp(0rem, 4vw, 3rem);
}

h1 {
  max-width: 920px;
  margin: 0;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(3.6rem, 7.1vw, 7.4rem);
  font-weight: 400;
  line-height: 0.91;
  letter-spacing: -0.045em;
  text-wrap: balance;
  text-shadow: 0 4px 26px rgba(5, 39, 51, 0.22);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: clamp(2rem, 5vw, 3.4rem);
}

.button {
  padding: 1rem 1.5rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.button:hover { transform: translateY(-2px); }
.button:focus-visible, .icon-button:focus-visible, .next-button:focus-visible, input:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.button-primary { color: var(--ink); background: var(--lime); box-shadow: 0 9px 30px rgba(217, 244, 128, 0.22); }
.button-secondary { color: white; border-color: rgba(255, 255, 255, 0.46); background: rgba(255, 255, 255, 0.08); }
.button-secondary:hover { background: rgba(255, 255, 255, 0.16); }
.button-referral { font-size: 1.08rem; }

.form-shell {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--ink);
  background: #f4f7ee;
}

.form-shell::backdrop { background: rgba(6, 20, 14, 0.72); }

.form-topbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 5;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
  height: 76px;
  padding: 0 2rem;
  background: rgba(244, 247, 238, 0.92);
  backdrop-filter: blur(14px);
}

.brand-dark { color: var(--ink); }
.brand-dark span { color: var(--green); }

.progress-track { height: 4px; overflow: hidden; border-radius: 99px; background: #d9e1d4; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--green); transition: width 280ms ease; }

.icon-button {
  display: grid;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  border: 0;
  border-radius: 999px;
  color: var(--ink);
  background: transparent;
  font-size: 2rem;
}

.icon-button:hover { background: #e4eadf; }

#intake-form { min-height: 100%; }

.step-stage {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 7rem 1.5rem 3rem;
}

.form-step {
  width: min(720px, 100%);
  animation: enter-step 260ms ease both;
}

@keyframes enter-step { from { opacity: 0; transform: translateY(16px); } }

.question-number { min-height: 1.4rem; margin-bottom: 0.7rem; color: var(--green); font-size: 0.94rem; font-weight: 700; }
.question-number::after { content: " →"; }

.question-content h3 {
  margin: 0 0 1.6rem;
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.question-content p { max-width: 620px; margin: -0.7rem 0 1.6rem; color: #53665c; font-size: 1.05rem; line-height: 1.55; }

.form-input {
  width: 100%;
  padding: 0.7rem 0;
  border: 0;
  border-bottom: 2px solid #a9b9ae;
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  outline: none;
}

.form-input::placeholder { color: #9aa99f; }
.form-input:focus { border-bottom-color: var(--green); }

.input-stack { display: grid; gap: 1.3rem; }
.input-label { display: grid; gap: 0.25rem; color: #53665c; font-weight: 600; }
.input-label .form-input { font-size: clamp(1.25rem, 3vw, 1.9rem); }

.city-combobox { position: relative; }

.city-suggestions {
  position: absolute;
  z-index: 4;
  inset: calc(100% + 0.5rem) 0 auto;
  max-height: min(19rem, 42vh);
  margin: 0;
  padding: 0.45rem;
  overflow-y: auto;
  border: 1px solid #cdd8c9;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 50px rgba(28, 56, 42, 0.16);
}

.city-suggestion {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 0;
  border-radius: 0.7rem;
  color: var(--ink);
  background: transparent;
  text-align: left;
  font-size: 1.05rem;
}

.city-suggestion:hover,
.city-suggestion.is-active { background: #e9f0e4; }
.city-suggestion strong { display: block; font-weight: 700; }
.city-suggestion span { color: #66766c; font-size: 0.9rem; }
.city-status { min-height: 1.4rem; margin: 0.65rem 0 0; color: #66766c; font-size: 0.9rem; }

.privacy-note {
  padding: 1.2rem 1.35rem;
  border-left: 4px solid var(--green);
  border-radius: 0 1rem 1rem 0;
  background: #e5ecdf;
  color: var(--ink) !important;
}

.field-error { min-height: 1.4rem; margin: 0.9rem 0 0; color: #a22828; font-weight: 600; }

.step-actions { display: flex; align-items: center; gap: 0.9rem; margin-top: 1.15rem; }
.next-button {
  padding: 0.8rem 1.3rem;
  border: 0;
  border-radius: 0.65rem;
  color: white;
  background: var(--green);
  font-weight: 700;
  box-shadow: 0 6px 0 #153b2a;
}
.next-button:hover { transform: translateY(-1px); }
.next-button:active { transform: translateY(3px); box-shadow: 0 3px 0 #153b2a; }
.enter-hint { color: #6d7d73; font-size: 0.82rem; }

.success-mark { display: grid; width: 4.5rem; height: 4.5rem; margin-bottom: 1.5rem; place-items: center; border-radius: 50%; color: white; background: var(--green); font-size: 2rem; }
.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; }

.contact-page {
  min-height: 100svh;
  padding: clamp(1rem, 2.2vw, 2rem);
  display: grid;
  grid-template-rows: auto 1fr;
  color: var(--cream);
  background: var(--ink);
}

.contact-page .site-header { width: min(1180px, 100%); }

.contact-home {
  padding: 0.8rem 1.15rem;
  color: var(--cream);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
}

.contact-content {
  width: min(1180px, 100%);
  margin: auto;
  padding: clamp(3rem, 8vw, 7rem) clamp(0.35rem, 4vw, 3rem);
}

.contact-content h1 { margin-bottom: 1.5rem; }

.contact-email {
  color: var(--lime);
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 600;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.22em;
}

@media (max-width: 640px) {
  .hero { padding: 0.75rem; }
  .site-header { min-height: 4rem; padding: 0.55rem 0.55rem 0.55rem 1rem; }
  .hero-copy { margin-top: 3.5rem; padding: 0 0.35rem; }
  h1 { font-size: clamp(3.35rem, 15.5vw, 5.2rem); }
  .actions { display: grid; }
  .button { width: 100%; }
  .button-referral { font-size: 1.12rem; }
  .form-topbar { grid-template-columns: auto 1fr auto; gap: 0.8rem; padding: 0 1rem; }
  .enter-hint { display: none; }
}

@media (max-width: 640px) and (max-height: 620px) {
  .site-header { min-height: 3.5rem; }
  .hero-copy { margin-top: 1.75rem; }
  h1 { font-size: clamp(2.75rem, 12vw, 4rem); }
  .actions { gap: 0.5rem; margin-top: 1.25rem; }
}

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