*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #060a14;
  --bg-mid: #0c1224;
  --white: #f8fafc;
  --muted: #94a3b8;
  --blue: #38bdf8;
  --cyan: #00d4ff;
  --purple: #a855f7;
  --violet: #7c3aed;
  --max: 560px;
  --safe-inline: max(1.25rem, env(safe-area-inset-left), env(safe-area-inset-right));
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--white);
  background: var(--bg);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.page {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem var(--safe-inline) 3rem;
  background: radial-gradient(ellipse 120% 80% at 50% 0%, #121a32 0%, var(--bg) 55%);
}

.page__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 100% 60% at 50% 30%, transparent 0%, rgba(6, 10, 20, 0.36) 100%);
  pointer-events: none;
  z-index: 1;
}

.hero {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1180px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  margin: 0 auto;
}

.v3-shell {
  width: 100%;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 560px);
  justify-content: center;
  gap: clamp(1rem, 2.4vw, 2rem);
  align-items: start;
  transition: grid-template-columns 0.45s ease;
  overflow-x: clip;
}

.v3-shell.ai-visible {
  grid-template-columns: minmax(280px, 360px) minmax(0, 560px);
}

.v3-shell:not(.ai-visible) .v3-funnel {
  max-width: 560px;
  margin-inline: auto;
}

.v3-funnel {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.v3-ai-console {
  position: sticky;
  top: 1.25rem;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: linear-gradient(165deg, rgba(8, 14, 28, 0.92) 0%, rgba(15, 23, 42, 0.86) 100%);
  backdrop-filter: blur(10px);
  box-shadow: inset 0 0 26px rgba(56, 189, 248, 0.08), 0 20px 40px rgba(2, 6, 23, 0.45);
  padding: 1rem 0.92rem;
  color: #e2e8f0;
  opacity: 0;
  transform: translateX(-18px) scale(0.985);
  pointer-events: none;
  visibility: hidden;
  display: flex;
  flex-direction: column;
  height: 430px;
  overflow: hidden;
  transition:
    opacity 1.26s cubic-bezier(0.22, 1, 0.36, 1),
    transform 1.26s cubic-bezier(0.22, 1, 0.36, 1),
    visibility 1.26s step-end;
}

.v3-shell:not(.ai-visible) .v3-ai-console {
  position: absolute;
  left: 0;
  top: 0;
  width: min(360px, calc(100% - 2rem));
  transform: translateX(-72px) scale(0.97);
}

.v3-shell.ai-visible .v3-ai-console {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
  visibility: visible;
  transition:
    opacity 1.26s cubic-bezier(0.22, 1, 0.36, 1),
    transform 1.26s cubic-bezier(0.22, 1, 0.36, 1);
}

.v3-ai-console.is-elevated {
  box-shadow: inset 0 0 30px rgba(56, 189, 248, 0.12), 0 22px 46px rgba(2, 6, 23, 0.52);
}

.v3-ai-console__header {
  padding-bottom: 0.62rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.v3-ai-console__title {
  font-size: 0.94rem;
  font-weight: 700;
  color: #f8fafc;
}

.v3-ai-console__status {
  margin-top: 0.3rem;
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  color: #94a3b8;
  font-size: 0.76rem;
}

.v3-ai-console__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  animation: v3-dot-live 1.3s ease-out infinite;
}

.v3-ai-console__feed-wrap {
  margin-top: 0.68rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.5);
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.v3-ai-console__feed-wrap::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}

.v3-ai-feed {
  list-style: none;
  padding: 0.52rem 0.58rem 0.6rem;
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
}

.v3-ai-msg {
  border: 1px solid rgba(56, 189, 248, 0.14);
  border-radius: 10px;
  padding: 0.4rem 0.46rem;
  background: rgba(15, 23, 42, 0.7);
  animation: v3-msg-enter 0.25s ease-out;
}

.v3-ai-msg.is-dim {
  opacity: 0.56;
}

.v3-ai-msg__time {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.05em;
  color: #94a3b8;
  margin-bottom: 0.1rem;
}

.v3-ai-msg__text {
  font-size: 0.76rem;
  line-height: 1.35;
  color: #e2e8f0;
}

.v3-ai-console__meter {
  margin-top: 0.68rem;
}

.v3-ai-console__meter-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.74rem;
  color: #cbd5e1;
}

.v3-ai-console__meter-head strong {
  color: #86efac;
  font-size: 0.82rem;
}

.v3-ai-console__meter-bar {
  margin-top: 0.35rem;
  height: 8px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.26);
  overflow: hidden;
}

.v3-ai-console__meter-bar span {
  display: block;
  height: 100%;
  width: 24%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8 0%, #22c55e 100%);
}

.v3-ai-console__chips {
  margin-top: 0.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-content: flex-start;
  min-height: 1.5rem;
  max-height: 3.2rem;
  overflow: auto;
}

.v3-ai-chip {
  display: inline-flex;
  align-items: center;
  font-size: 0.67rem;
  color: #d1fae5;
  border: 1px solid rgba(34, 197, 94, 0.35);
  background: rgba(20, 83, 45, 0.35);
  border-radius: 999px;
  padding: 0.18rem 0.46rem;
  animation: v3-chip-enter 0.25s ease-out;
}

.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  margin-bottom: 1.35rem;
}

.logo__img {
  display: block;
  height: clamp(4.25rem, 15vw, 5.75rem);
  width: auto;
  max-width: min(360px, 94vw);
  filter: none;
}

.flow-step--loading-v3 .flow-loading__title,
.flow-step--project-v3 .flow-project__title {
  color: #f1f5f9;
}

.flow-step--loading-v3 .flow-loading__city,
.flow-step--project-v3 .flow-project__location {
  color: #38bdf8;
}

.flow-step--loading-v3 .flow-loading__sub {
  color: #94a3b8;
}

.flow-step--loading-v3 {
  gap: 0.72rem;
}

.v3-area-scan {
  position: relative;
  width: 100%;
  min-height: 188px;
  border-radius: 14px;
  border: 1px solid rgba(56, 189, 248, 0.32);
  overflow: hidden;
  background: radial-gradient(circle at 30% 20%, rgba(14, 116, 144, 0.3) 0%, rgba(7, 14, 28, 0.92) 60%);
}

.v3-scan-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(56, 189, 248, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
  animation: v3-grid-drift 3s linear infinite;
}

.v3-socal-map {
  position: absolute;
  inset: 16px 24px 24px;
  border-radius: 8px;
  background: linear-gradient(150deg, rgba(37, 99, 235, 0.24) 0%, rgba(30, 64, 175, 0.16) 100%);
  clip-path: polygon(8% 12%, 40% 4%, 67% 8%, 84% 20%, 95% 40%, 86% 56%, 72% 66%, 54% 70%, 43% 78%, 27% 74%, 17% 64%, 9% 47%, 4% 28%);
  border: 1.5px solid rgba(56, 189, 248, 0.55);
}

.v3-contractor-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.42);
  animation: v3-dot-pulse 1.1s ease-in-out infinite;
}

.v3-dot-a { left: 22%; top: 24%; animation-delay: 0.05s; }
.v3-dot-b { left: 33%; top: 46%; animation-delay: 0.35s; }
.v3-dot-c { left: 56%; top: 38%; animation-delay: 0.6s; }
.v3-dot-d { left: 66%; top: 58%; animation-delay: 0.9s; }
.v3-dot-e { left: 74%; top: 30%; animation-delay: 1.15s; }
.v3-dot-f { left: 43%; top: 62%; animation-delay: 1.4s; }
.v3-dot-g { left: 17%; top: 54%; animation-delay: 1.7s; }
.v3-dot-h { left: 60%; top: 24%; animation-delay: 2s; }
.v3-dot-i { left: 82%; top: 46%; animation-delay: 2.3s; }

.v3-dot-c,
.v3-dot-f,
.v3-dot-h {
  animation-name: v3-dot-reject;
}

.v3-dot-g,
.v3-dot-i {
  animation-name: v3-dot-fade;
}

.v3-city-pin {
  position: absolute;
  left: 63%;
  top: 51%;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.42);
  animation: v3-pin-pulse 1.05s ease-out infinite;
}

.v3-loading-city {
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: #86efac !important;
  background: rgba(20, 83, 45, 0.45);
  border: 1px solid rgba(134, 239, 172, 0.35);
  border-radius: 999px;
  padding: 0.2rem 0.56rem;
}

@keyframes v3-grid-drift {
  to {
    transform: translateY(20px);
  }
}

@keyframes v3-pin-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.6);
  }
  100% {
    box-shadow: 0 0 0 16px rgba(22, 163, 74, 0);
  }
}

@keyframes v3-dot-pulse {
  0%, 100% {
    transform: scale(0.9);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.12);
    opacity: 1;
  }
}

@keyframes v3-dot-reject {
  0%, 42% {
    transform: scale(1);
    opacity: 1;
    background: #22c55e;
  }
  55% {
    background: #ef4444;
  }
  100% {
    transform: scale(0.4);
    opacity: 0.16;
    background: #ef4444;
  }
}

@keyframes v3-dot-fade {
  0%, 45% {
    background: #22c55e;
    opacity: 1;
  }
  100% {
    background: #94a3b8;
    opacity: 0.28;
  }
}

.flow-step--project-v3 .project-type-card {
  border-color: rgba(56, 189, 248, 0.35);
  background: rgba(15, 23, 42, 0.6);
  color: #e2e8f0;
}

.flow-step--project-v3 .project-type-card.selected {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
}

.headline {
  font-size: clamp(1.625rem, 5.5vw, 2.375rem);
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -0.03em;
  color: var(--white);
  margin-bottom: 1rem;
  max-width: 22ch;
}

.headline__gradient {
  background: linear-gradient(90deg, var(--cyan) 0%, #60a5fa 45%, var(--purple) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.steps {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.65rem;
  font-size: clamp(0.95rem, 2.9vw, 1.08rem);
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 2rem;
  max-width: none;
  line-height: 1.5;
  white-space: nowrap;
}

.steps__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.8);
  flex-shrink: 0;
}

.cta-form {
  width: 100%;
  margin-bottom: 1.5rem;
}

.zip-bar {
  position: relative;
  width: 100%;
  padding: 2px;
  clip-path: polygon(
    14px 0,
    calc(100% - 14px) 0,
    100% 50%,
    calc(100% - 14px) 100%,
    14px 100%,
    0 50%
  );
  filter: drop-shadow(0 0 16px rgba(0, 212, 255, 0.2)) drop-shadow(0 0 24px rgba(168, 85, 247, 0.15));
}

.zip-bar__glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, var(--cyan), #6366f1 50%, var(--purple));
  opacity: 0.85;
  filter: blur(0.5px);
}

.zip-bar__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.5rem 0.5rem 0.875rem;
  background: rgba(8, 14, 28, 0.92);
  clip-path: polygon(
    13px 0,
    calc(100% - 13px) 0,
    100% 50%,
    calc(100% - 13px) 100%,
    13px 100%,
    0 50%
  );
  box-shadow: inset 0 0 24px rgba(0, 212, 255, 0.06);
}

.zip-bar__hex {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.25);
}

.zip-bar__hex svg {
  width: 18px;
  height: 18px;
}

.zip-bar input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  color: var(--white);
  padding: 0.7rem 0;
  outline: none;
}

.zip-bar input::placeholder {
  color: #64748b;
  font-weight: 400;
}

.zip-bar__submit {
  flex-shrink: 0;
  width: 48px;
  height: 44px;
  border: none;
  cursor: pointer;
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 50%, #c084fc 100%);
  clip-path: polygon(20% 0%, 80% 0%, 100% 50%, 80% 100%, 20% 100%, 0% 50%);
  box-shadow:
    0 0 20px rgba(168, 85, 247, 0.55),
    0 0 40px rgba(124, 58, 237, 0.25);
  transition: transform 0.12s, box-shadow 0.15s, filter 0.15s;
}

.zip-bar__submit svg {
  width: 22px;
  height: 22px;
}

.zip-bar__submit:hover {
  filter: brightness(1.1);
  box-shadow:
    0 0 28px rgba(168, 85, 247, 0.7),
    0 0 48px rgba(124, 58, 237, 0.35);
}

.zip-bar__submit:active {
  transform: scale(0.96);
}

.trust {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-evenly;
  gap: 0.5rem 2rem;
  width: 100%;
  padding: 0 0.25rem;
}

.trust li:not(.trust__divider) {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #a8b8d4;
}

.trust svg {
  width: 16px;
  height: 16px;
  color: var(--blue);
  flex-shrink: 0;
  opacity: 0.9;
}

.trust__divider {
  width: 1px;
  height: 16px;
  background: rgba(148, 163, 184, 0.25);
}

@keyframes v3-dot-live {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
  }
  100% {
    box-shadow: 0 0 0 11px rgba(34, 197, 94, 0);
  }
}

@keyframes v3-msg-enter {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes v3-chip-enter {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 768px) {
  .page {
    align-items: center;
    justify-content: center;
    padding: max(1rem, env(safe-area-inset-top)) var(--safe-inline) max(1rem, env(safe-area-inset-bottom));
    min-height: 100dvh;
  }

  .hero {
    min-width: 0;
    width: 100%;
    margin: auto;
  }

  .v3-shell {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
  }

  .v3-shell,
  .v3-shell.ai-visible {
    grid-template-columns: 1fr;
  }

  .v3-shell:not(.ai-visible) .v3-ai-console {
    display: none;
  }

  .v3-shell.ai-visible .v3-ai-console {
    order: -1;
    position: sticky;
    top: max(0.35rem, env(safe-area-inset-top));
    z-index: 20;
    width: 100%;
    height: auto;
    max-height: none;
    padding: 0.62rem 0.72rem;
    border-radius: 12px;
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    box-shadow: inset 0 0 18px rgba(56, 189, 248, 0.08), 0 8px 24px rgba(2, 6, 23, 0.4);
  }

  .v3-ai-console__feed-wrap,
  .v3-ai-console__chips {
    display: none !important;
  }

  .v3-ai-console__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0;
    border-bottom: none;
  }

  .v3-ai-console__title {
    font-size: 0.82rem;
  }

  .v3-ai-console__status {
    margin-top: 0;
    font-size: 0.68rem;
    white-space: nowrap;
  }

  .v3-ai-console__meter {
    margin-top: 0.45rem;
  }

  .v3-ai-console__meter-head {
    font-size: 0.68rem;
  }

  .v3-ai-console__meter-head strong {
    font-size: 0.78rem;
  }

  .v3-funnel {
    order: 1;
    width: 100%;
    min-width: 0;
  }

  .v3-shell:not(.ai-visible) .v3-funnel,
  .v3-shell.ai-visible .v3-funnel {
    max-width: none;
    margin-inline: 0;
  }

  .logo {
    margin-bottom: 0.85rem;
  }

  .logo__img {
    height: clamp(2.75rem, 11vw, 3.5rem);
    max-width: min(260px, 82vw);
  }

  .headline {
    font-size: clamp(1.35rem, 6.8vw, 1.65rem);
    line-height: 1.28;
    max-width: none;
    margin-bottom: 0.65rem;
  }

  .steps {
    flex-direction: column;
    align-items: center;
    gap: 0.2rem;
    margin-bottom: 1.1rem;
    font-size: 0.84rem;
    white-space: normal;
    line-height: 1.4;
  }

  .steps__dot {
    display: none;
  }

  .zip-bar,
  .zip-bar__inner {
    clip-path: none;
    border-radius: 14px;
  }

  .zip-bar {
    filter: none;
    padding: 1px;
    background: linear-gradient(90deg, var(--cyan), #6366f1 50%, var(--purple));
  }

  .zip-bar__glow {
    display: none;
  }

  .zip-bar__inner {
    border-radius: 13px;
    gap: 0.5rem;
    padding: 0.4rem 0.4rem 0.4rem 0.65rem;
  }

  .zip-bar__hex {
    clip-path: none;
    border-radius: 8px;
    width: 32px;
    height: 32px;
  }

  .zip-bar__hex svg {
    width: 16px;
    height: 16px;
  }

  .zip-bar input {
    font-size: 16px;
    padding: 0.55rem 0;
  }

  .zip-bar__submit {
    clip-path: none;
    border-radius: 10px;
    width: 44px;
    height: 44px;
  }

  .cta-form {
    margin-bottom: 1rem;
  }

  .trust,
  #step-footer.trust,
  ul#step-footer.trust {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 0.35rem !important;
    overflow: visible !important;
    padding: 0;
    margin-top: 1rem;
  }

  .trust__divider {
    display: none !important;
  }

  .trust li:not(.trust__divider) {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.28rem;
    font-size: 0.62rem;
    line-height: 1.25;
    text-align: center;
  }

  .trust svg {
    width: 14px;
    height: 14px;
  }

  .v3-area-scan {
    min-height: 148px;
  }

  .v3-socal-map {
    inset: 12px 14px 18px;
  }
}

@media (max-width: 380px) {
  .headline {
    font-size: 1.3rem;
  }

  .trust,
  #step-footer.trust,
  ul#step-footer.trust {
    grid-template-columns: 1fr !important;
    gap: 0.55rem !important;
  }

  .trust li:not(.trust__divider) {
    flex-direction: row;
    justify-content: center;
    font-size: 0.7rem;
  }
}

