:root {
  --bg: #f1f1f1;
  --surface: #ffffff;
  --surface-soft: #e6f7f4;
  --ink: #333333;
  --muted: #6b6b6b;
  --line: #d7e7e4;
  --green: #028c72;
  --green-2: #00a98f;
  --teal: #45c2b1;
  --teal-soft: #e1f7f4;
  --danger: #9d2f2f;
  --shadow: 0 24px 70px rgba(51, 51, 51, 0.1);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    linear-gradient(135deg, #ffffff 0%, var(--bg) 54%, #e7f6f3 100%);
  color: var(--ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

button,
input {
  font: inherit;
}

.page-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.58fr);
  grid-template-rows: minmax(0, 1fr);
  grid-template-areas: "form visual";
  gap: clamp(18px, 2vw, 28px);
  min-height: 100vh;
  padding: clamp(18px, 2.6vw, 36px);
}

@media (min-width: 981px) {
  .page-shell {
    height: 100vh;
  }

  .brand-panel,
  .form-panel {
    height: 100%;
    min-height: 0;
  }

  .form-panel {
    overflow-y: auto;
  }

  .brand-panel {
    overflow: hidden;
  }

  .visual-content {
    height: 100%;
    min-height: 0;
  }
}

.brand-panel {
  grid-area: visual;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: auto;
  padding: clamp(24px, 3vw, 46px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(225, 247, 244, 0.94)),
    var(--surface);
  border: 1px solid rgba(0, 169, 143, 0.12);
  border-radius: 28px;
  box-shadow: var(--shadow);
  color: var(--ink);
  position: relative;
  overflow: hidden;
}

.brand-panel::after {
  content: "";
  position: absolute;
  inset: auto 24px 24px 24px;
  height: 22%;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(2, 140, 114, 0.94), rgba(0, 169, 143, 0.9));
  opacity: 0.82;
}

.visual-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: min(640px, calc(100vh - 150px));
  gap: clamp(24px, 4vh, 52px);
}

.car-watermark {
  position: absolute;
  z-index: 1;
  right: -28%;
  top: 18%;
  width: min(860px, 160%);
  max-width: none;
  opacity: 0.28;
  filter: saturate(0.95) contrast(1.02);
  pointer-events: none;
}

.car-watermark img {
  display: block;
  width: 100%;
  height: auto;
}

.brand-mark {
  position: relative;
  z-index: 1;
  width: 116px;
  height: 116px;
  border: 1px solid rgba(0, 169, 143, 0.2);
  border-radius: 28px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--green), var(--green-2));
  box-shadow: 0 18px 42px rgba(0, 169, 143, 0.18);
}

.brand-mark span {
  color: #ffffff;
  font-size: 19px;
  font-weight: 800;
}

.brand-panel h1 {
  position: relative;
  z-index: 1;
  margin: 12px 0 0;
  max-width: 420px;
  font-size: clamp(2.6rem, 4vw, 4.7rem);
  line-height: 0.96;
  font-weight: 800;
}

.brand-panel p {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 430px;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.25vw, 1.1rem);
  line-height: 1.7;
}

.eyebrow {
  text-transform: uppercase;
  font-size: 0.78rem !important;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--green-2) !important;
}

.form-panel {
  grid-area: form;
  display: flex;
  flex-direction: column;
  min-height: auto;
  padding: clamp(14px, 2.2vw, 30px) clamp(10px, 2vw, 28px);
  position: relative;
}

.progress-wrap {
  width: min(700px, 100%);
  margin: 0 auto;
}

.progress-topline {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.progress-track {
  height: 7px;
  border-radius: 999px;
  background: #e3ecea;
  overflow: hidden;
}

.progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green), var(--teal));
  transition: width 420ms ease;
}

.conversation {
  display: grid;
  flex: 1;
  align-items: center;
  width: min(700px, 100%);
  margin: 0 auto;
  padding: clamp(20px, 3.6vh, 38px) 0;
}

#leadForm {
  display: contents;
}

.screen {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(18px);
  pointer-events: none;
  transition: opacity 320ms ease, transform 320ms ease;
}

.screen.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.screen-content {
  max-width: 680px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--teal-soft);
  color: var(--green);
  font-size: 0.79rem;
  font-weight: 800;
  text-transform: uppercase;
}

.pill.muted {
  background: #f4ece9;
  color: var(--danger);
}

.pill.success.priority {
  background: #028c72;
  color: #ffffff;
}

.question-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--green-2);
  font-size: 0.86rem;
  font-weight: 800;
  margin-bottom: 22px;
}

h2,
label {
  display: block;
  margin: 16px 0 0;
  color: var(--ink);
  font-size: clamp(2rem, 3.1vw, 3.15rem);
  line-height: 1.08;
  font-weight: 800;
}

.lead {
  max-width: 640px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  line-height: 1.7;
}

.microcopy,
.hint,
.submit-state {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.96rem;
}

input {
  width: 100%;
  margin-top: 36px;
  padding: 18px 4px;
  border: 0;
  border-bottom: 2px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-size: clamp(1.35rem, 3vw, 2.2rem);
  outline: none;
  transition: border-color 220ms ease;
}

input:focus {
  border-color: var(--teal);
}

.option-grid {
  display: grid;
  gap: 12px;
  margin-top: 34px;
}

.option-btn {
  width: 100%;
  min-height: 64px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  text-align: left;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(51, 51, 51, 0.04);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.option-btn:hover,
.option-btn.selected {
  transform: translateY(-2px);
  border-color: rgba(0, 169, 143, 0.52);
  background: #f4fffd;
}

.option-btn.selected {
  color: var(--green);
  box-shadow: 0 16px 36px rgba(0, 169, 143, 0.14);
}

.controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  width: min(700px, 100%);
  margin: 0 auto;
}

.primary-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  border-radius: 999px;
  padding: 0 24px;
  border: 0;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.primary-btn {
  margin-top: 28px;
  background: linear-gradient(135deg, var(--green), var(--green-2));
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(0, 169, 143, 0.24);
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-2px);
}

.ghost-btn {
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
}

.ghost-btn:disabled,
.primary-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  transform: none;
}

.error-message {
  min-height: 24px;
  margin: 16px 0 0;
  color: var(--danger);
  font-weight: 700;
}

.is-invalid input {
  border-color: var(--danger);
}

@media (max-width: 980px) {
  .page-shell {
    display: flex;
    flex-direction: column;
    padding: 0;
  }

  .brand-panel {
    order: 2;
    min-height: auto;
    margin: 18px;
    gap: 26px;
    border-radius: 22px;
  }

  .brand-mark {
    width: 88px;
    height: 88px;
    border-radius: 22px;
  }

  .form-panel {
    order: 1;
    min-height: 64vh;
    padding: 22px;
  }

  .visual-content {
    min-height: 360px;
  }

  .car-watermark {
    top: 8%;
    right: -12%;
    width: 108%;
  }

}

@media (max-width: 640px) {
  .brand-panel {
    padding: 22px;
  }

  .brand-panel h1 {
    font-size: 2rem;
    line-height: 1.04;
  }

  .brand-panel p {
    font-size: 0.95rem;
  }

  .visual-content {
    min-height: 250px;
    gap: 22px;
  }

  .car-watermark {
    opacity: 0.16;
    width: 120%;
    top: 20%;
  }

  .form-panel {
    padding: 18px;
  }

  .conversation {
    padding: 36px 0;
  }

  h2,
  label {
    font-size: 1.92rem;
    line-height: 1.12;
  }

  input {
    margin-top: 26px;
    font-size: 1.35rem;
  }

  .option-btn {
    min-height: 58px;
    padding: 16px;
  }

  .controls {
    position: sticky;
    bottom: 0;
    padding: 12px 0 0;
    background: linear-gradient(180deg, rgba(241, 241, 241, 0), var(--bg) 34%);
  }

  .primary-btn,
  .ghost-btn {
    min-height: 52px;
    padding: 0 18px;
  }
}
