:root {
  --forest: #1a3a2e;
  --moss: #4a7c59;
  --sage: #7fa893;
  --mint: #d4e7dc;
  --cream: #f8faf7;
  --amber: #d4a574;
  --amber-dark: #9a6b38;
  --amber-light: #f0c99a;
  --apricot: #fef4e8;
  --charcoal: #2d2d2d;
  --slate: #667085;
  --silver: #98a2b3;
  --white: #fff;
  --danger: #b42318;
  --danger-bg: #fff3f2;
  --shadow-sm: 0 1px 4px rgba(26, 58, 46, 0.08);
  --shadow-md: 0 8px 28px rgba(26, 58, 46, 0.12);
  --radius-sm: 8px;
  --radius: 16px;
  --radius-lg: 24px;
  --ease: cubic-bezier(0.2, 0, 0, 1);
}

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

html {
  min-width: 320px;
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  color: var(--charcoal);
  background:
    radial-gradient(circle at 100% 0, rgba(212, 231, 220, 0.5), transparent 34rem),
    var(--cream);
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}

button,
input,
textarea {
  font: inherit;
}

button,
label {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.quote-shell {
  width: min(100%, 1120px);
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 2rem);
}

.quote-shell--narrow {
  width: min(100%, 720px);
}

.skip-link {
  position: fixed;
  top: -5rem;
  left: 1rem;
  z-index: 100;
  padding: 0.65rem 1rem;
  border-radius: var(--radius-sm);
  color: var(--white);
  background: var(--forest);
  font-weight: 700;
}

.skip-link:focus {
  top: 0.75rem;
}

.quote-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(127, 168, 147, 0.3);
  background: rgba(248, 250, 247, 0.94);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.quote-header__inner {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: env(safe-area-inset-top, 0px);
}

.brand {
  display: inline-flex;
  min-width: 0;
  align-items: center;
  gap: 0.7rem;
  color: var(--forest);
  text-decoration: none;
}

.brand img {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 6px;
  object-fit: cover;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  overflow: hidden;
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.02rem;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand small {
  margin-top: 0.2rem;
  color: var(--slate);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.055em;
  line-height: 1;
  text-transform: uppercase;
}

.exit-link,
.text-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  color: var(--forest);
  background: transparent;
  font-weight: 700;
  text-underline-offset: 3px;
}

.exit-link {
  padding: 0.5rem;
}

.quote-main {
  padding-top: clamp(1.25rem, 4vw, 2.5rem);
  padding-bottom: calc(7.5rem + env(safe-area-inset-bottom, 0px));
}

.progress {
  margin-bottom: clamp(1.5rem, 5vw, 2.4rem);
}

.progress__copy {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
  color: var(--slate);
  font-size: 0.78rem;
  font-weight: 700;
}

.progress__track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--mint);
}

.progress__track span {
  display: block;
  width: 14.285%;
  height: 100%;
  border-radius: inherit;
  background: var(--moss);
  transition: width 240ms var(--ease);
}

.wizard-screen {
  width: 100%;
  padding-bottom: 1rem;
}

.wizard-screen.is-entering {
  animation: screen-in 220ms var(--ease) both;
}

@keyframes screen-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.intro-screen {
  min-height: calc(100dvh - 64px - 10rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
  color: var(--amber-dark);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow::before {
  width: 1.25rem;
  height: 2px;
  border-radius: 2px;
  background: var(--amber);
  content: "";
}

h1,
h2,
fieldset > legend {
  margin: 0;
  color: var(--forest);
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.12;
}

h1 {
  max-width: 13ch;
  font-size: clamp(2.35rem, 11vw, 4rem);
}

h2,
fieldset > legend {
  width: 100%;
  padding: 0;
  font-size: clamp(1.85rem, 8vw, 2.8rem);
}

.screen-lead,
.question-help {
  max-width: 52ch;
  color: var(--slate);
}

.screen-lead {
  margin: 0.85rem 0 1.6rem;
  font-size: 1.04rem;
}

.question-help {
  margin: 0.65rem 0 1.25rem;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.trust-row {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 1.2rem;
  color: var(--forest);
  font-size: 0.88rem;
  font-weight: 650;
}

.trust-row > span {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.trust-row > span > span {
  width: 1.35rem;
  height: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--forest);
  background: var(--mint);
  font-size: 0.74rem;
}

.choice-grid,
.choice-stack {
  display: grid;
  gap: 0.75rem;
}

.choice-grid--services {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice-card {
  position: relative;
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 2.4rem 0.85rem 0.9rem;
  overflow: hidden;
  border: 1.5px solid rgba(127, 168, 147, 0.48);
  border-radius: var(--radius);
  color: var(--charcoal);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  user-select: none;
  transition: border-color 160ms var(--ease), background 160ms var(--ease), box-shadow 160ms var(--ease), transform 160ms var(--ease);
}

.choice-grid--services .choice-card {
  min-height: 86px;
  align-items: flex-start;
  flex-direction: column;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.8rem 2rem 0.8rem 0.8rem;
}

.choice-input {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  opacity: 0;
}

.choice-card:focus-within {
  outline: 3px solid rgba(74, 124, 89, 0.38);
  outline-offset: 2px;
}

.choice-card.is-selected,
.choice-card:has(.choice-input:checked) {
  border-color: var(--moss);
  background: rgba(212, 231, 220, 0.48);
  box-shadow: 0 0 0 1px var(--moss), var(--shadow-sm);
}

.choice-card__icon {
  width: 1.8rem;
  height: 1.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 9px;
  color: var(--forest);
  background: var(--apricot);
  font-size: 1.1rem;
  font-weight: 700;
}

.choice-card__body {
  min-width: 0;
}

.choice-card__body strong,
.choice-card__body small {
  display: block;
}

.choice-card__body strong {
  color: var(--forest);
  font-size: 0.94rem;
  line-height: 1.25;
}

.choice-card__body small {
  margin-top: 0.18rem;
  color: var(--slate);
  font-size: 0.8rem;
}

.choice-card__check {
  position: absolute;
  top: 50%;
  right: 0.8rem;
  width: 1.35rem;
  height: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--mint);
  border-radius: 50%;
  color: transparent;
  background: var(--white);
  font-size: 0.75rem;
  transform: translateY(-50%);
}

.choice-card.is-selected .choice-card__check,
.choice-input:checked ~ .choice-card__check {
  border-color: var(--moss);
  color: var(--white);
  background: var(--moss);
}

.choice-card--described {
  min-height: 74px;
}

.choice-stack--compact .choice-card {
  min-height: 58px;
}

.field-group {
  margin-top: 1.3rem;
}

.field-group label,
.field-group > legend {
  display: block;
  margin-bottom: 0.48rem;
  color: var(--forest);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.4;
}

.field-group label > span {
  color: var(--slate);
  font-size: 0.78rem;
  font-weight: 500;
}

input[type="text"],
input[type="tel"],
input[type="email"],
textarea {
  width: 100%;
  min-height: 54px;
  padding: 0.85rem 0.95rem;
  border: 1.5px solid var(--mint);
  border-radius: 12px;
  outline: none;
  color: var(--charcoal);
  background: var(--white);
  font-size: 1rem;
  transition: border-color 150ms, box-shadow 150ms;
}

textarea {
  min-height: 108px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: var(--silver);
}

input:focus,
textarea:focus {
  border-color: var(--moss);
  box-shadow: 0 0 0 4px rgba(74, 124, 89, 0.14);
}

input.is-invalid,
textarea.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.1);
}

.field-group > small {
  display: block;
  margin-top: 0.4rem;
  color: var(--slate);
  font-size: 0.76rem;
}

.field-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.35rem;
  color: var(--slate);
  font-size: 0.76rem;
}

.field-error {
  display: block;
  min-height: 1.2em;
  margin: 0.4rem 0 0;
  color: var(--danger);
  font-size: 0.82rem;
  font-weight: 600;
}

.segmented-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.segmented-choices label {
  margin: 0;
  cursor: pointer;
}

.segmented-choices input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.segmented-choices span {
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 0.35rem;
  border: 1.5px solid var(--mint);
  border-radius: 12px;
  color: var(--forest);
  background: var(--white);
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
}

.segmented-choices input:checked + span {
  border-color: var(--moss);
  color: var(--white);
  background: var(--moss);
}

.segmented-choices input:focus-visible + span {
  outline: 3px solid rgba(74, 124, 89, 0.35);
  outline-offset: 2px;
}

.notice {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 1rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--mint);
  border-radius: 12px;
  color: var(--forest);
  background: rgba(212, 231, 220, 0.4);
  font-size: 0.85rem;
}

.notice--success {
  border-color: rgba(74, 124, 89, 0.35);
}

.notice--error {
  border-color: rgba(180, 35, 24, 0.25);
  color: var(--danger);
  background: var(--danger-bg);
}

.upload-button {
  width: 100%;
  min-height: 90px;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem;
  border: 2px dashed var(--sage);
  border-radius: var(--radius);
  color: var(--forest);
  background: rgba(255, 255, 255, 0.76);
  text-align: left;
}

.upload-button:focus-visible,
.button:focus-visible,
.text-button:focus-visible,
.exit-link:focus-visible,
.review-edit:focus-visible,
.photo-remove:focus-visible {
  outline: 3px solid rgba(74, 124, 89, 0.42);
  outline-offset: 2px;
}

.upload-button__icon {
  width: 2.75rem;
  height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--white);
  background: var(--forest);
  font-size: 1.5rem;
  line-height: 1;
}

.upload-button strong,
.upload-button small {
  display: block;
}

.upload-button small {
  margin-top: 0.2rem;
  color: var(--slate);
  font-size: 0.72rem;
}

.visually-hidden-file {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.photo-summary {
  margin: 0.8rem 0 0;
  color: var(--moss);
  font-size: 0.85rem;
  font-weight: 700;
}

.upload-errors {
  margin-top: 0.5rem;
  color: var(--danger);
  font-size: 0.8rem;
}

.upload-errors:empty {
  display: none;
}

.photo-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.photo-item {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--mint);
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.photo-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--mint);
}

.photo-item__footer {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  padding: 0.35rem 0.4rem 0.35rem 0.6rem;
}

.photo-item__status {
  min-width: 0;
  overflow: hidden;
  color: var(--moss);
  font-size: 0.69rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-item.is-failed .photo-item__status {
  color: var(--danger);
}

.photo-remove {
  min-width: 48px;
  min-height: 48px;
  border: 0;
  border-radius: 9px;
  color: var(--danger);
  background: var(--danger-bg);
  font-size: 0.75rem;
  font-weight: 700;
}

.text-button {
  width: 100%;
  margin-top: 0.65rem;
  text-decoration: underline;
}

.review-summary {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.review-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  padding: 0.95rem;
  border: 1px solid rgba(127, 168, 147, 0.45);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.review-card__label {
  display: block;
  margin-bottom: 0.22rem;
  color: var(--slate);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.review-card__value,
.review-card__detail {
  display: block;
}

.review-card__value {
  color: var(--forest);
  font-weight: 700;
}

.review-card__detail {
  margin-top: 0.18rem;
  color: var(--slate);
  font-size: 0.82rem;
  white-space: pre-line;
}

.review-edit {
  min-width: 48px;
  min-height: 48px;
  align-self: start;
  border: 0;
  border-radius: 10px;
  color: var(--forest);
  background: var(--cream);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.consent-row {
  display: grid;
  grid-template-columns: 1.625rem minmax(0, 1fr);
  gap: 0.7rem;
  margin-top: 1.25rem;
  color: var(--slate);
  cursor: pointer;
  font-size: 0.78rem;
}

.consent-row input {
  width: 1.625rem;
  height: 1.625rem;
  margin: 0.08rem 0 0;
  accent-color: var(--moss);
}

.consent-row a {
  color: var(--forest);
  font-weight: 700;
  text-underline-offset: 2px;
}

.honeypot {
  position: fixed;
  top: -100vh;
  left: -100vw;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.wizard-actions {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 15;
  border-top: 1px solid rgba(127, 168, 147, 0.35);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 -6px 24px rgba(26, 58, 46, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.wizard-actions__inner {
  display: flex;
  gap: 0.65rem;
  padding-top: 0.75rem;
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
}

.button {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.78rem 1rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-size: 0.94rem;
  font-weight: 750;
  line-height: 1.1;
  transition: background 160ms, border-color 160ms, opacity 160ms, transform 160ms;
}

.button--primary {
  flex: 1;
  color: var(--white);
  background: var(--forest);
  box-shadow: var(--shadow-md);
}

.button--secondary {
  flex: 0 0 auto;
  min-width: 84px;
  border-color: var(--mint);
  color: var(--forest);
  background: var(--white);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
  box-shadow: none;
}

.button.is-sending::before {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
  content: "";
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Confirmation page */
.thanks-main {
  min-height: calc(100dvh - 64px);
  display: grid;
  align-items: center;
  padding: 2rem 0;
}

.thanks-card {
  padding: clamp(1.25rem, 5vw, 2.25rem);
  border: 1px solid rgba(127, 168, 147, 0.38);
  border-radius: var(--radius-lg);
  background: var(--white);
  box-shadow: var(--shadow-md);
  text-align: center;
}

.thanks-icon {
  width: 4rem;
  height: 4rem;
  display: grid;
  place-items: center;
  margin: 0 auto 1rem;
  border-radius: 50%;
  color: var(--white);
  background: var(--moss);
  font-size: 1.8rem;
  font-weight: 700;
}

.thanks-card h1 {
  max-width: none;
  font-size: clamp(2rem, 9vw, 3rem);
}

.thanks-card > p {
  max-width: 48ch;
  margin: 0.75rem auto 0;
  color: var(--slate);
}

.thanks-summary {
  display: grid;
  gap: 0.45rem;
  margin: 1.5rem 0 0;
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--cream);
  color: var(--forest);
  font-size: 0.9rem;
  text-align: left;
}

.thanks-summary__heading {
  display: block;
  margin-bottom: 0.15rem;
}

.thanks-summary__list {
  display: grid;
  gap: 0.45rem;
  margin: 0;
}

.thanks-summary__list > div {
  display: grid;
  grid-template-columns: minmax(5.4rem, auto) 1fr;
  gap: 0.65rem;
}

.thanks-summary__list dt {
  color: var(--slate);
  font-weight: 700;
}

.thanks-summary__list dd {
  margin: 0;
  font-weight: 600;
}

.thanks-reference {
  margin: 1rem 0 0;
  color: var(--forest);
  font-weight: 800;
}

.thanks-actions {
  display: grid;
  gap: 0.7rem;
  margin-top: 1.5rem;
}

.button--whatsapp {
  color: #103c22;
  background: #56e58c;
}

.button--link {
  color: var(--forest);
  background: var(--cream);
  text-decoration: none;
}

@media (hover: hover) {
  .choice-card:hover,
  .upload-button:hover {
    border-color: var(--moss);
    transform: translateY(-1px);
  }

  .button:not(:disabled):hover {
    transform: translateY(-1px);
  }

  .button--primary:hover {
    background: #244c3d;
  }
}

@media (min-width: 560px) {
  .choice-grid:not(.choice-grid--services) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .choice-grid--services {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .photo-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .trust-row {
    flex-flow: row wrap;
    gap: 0.8rem 1.25rem;
  }

  .thanks-actions {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 768px) {
  .quote-main {
    padding-top: 3rem;
  }

  .choice-grid--services {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wizard-screen {
    padding: 1.25rem 1.5rem 2rem;
    border: 1px solid rgba(127, 168, 147, 0.25);
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.58);
  }

  .intro-screen {
    min-height: min(610px, calc(100dvh - 12rem));
  }

  .wizard-actions__inner {
    justify-content: flex-end;
  }

  .button--primary {
    flex: 0 1 330px;
  }

  .button--secondary {
    min-width: 110px;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
