/* ---------- Contact form (Tally-style, one question per screen) ----------
   Reuses :root vars + fluid --t from css/style.css (loaded before this file)
   — same 761px breakpoint and calc(mobile + range * var(--t)) pattern as
   every other section on the site, just without a Figma frame to match
   pixel-for-pixel since this page doesn't have one. */

.contact-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.contact__header {
  width: 100%;
  max-width: 1512px;
  margin: 0 auto;
  box-sizing: border-box;
  padding: calc(20px + 20px * var(--t)) calc(20px + 94px * var(--t)) 0;
}

.contact__logo {
  display: inline-block;
  width: calc(77px + 28px * var(--t));
}

.contact__logo img {
  width: 100%;
  height: auto;
}

/* Slim progress bar — hidden on the intro/done bookend screens (see
   js/contact-form.js), visible only while moving through the 4 questions. */
.contact__progress {
  width: 100%;
  max-width: calc(353px + 287px * var(--t));
  margin: calc(20px + 12px * var(--t)) auto 0;
  padding: 0 20px;
  box-sizing: border-box;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.contact__progress.is-hidden {
  opacity: 0;
}

.contact__progress-track {
  width: 100%;
  height: 4px;
  border-radius: 2px;
  background: rgba(22, 64, 63, 0.12);
  overflow: hidden;
}

.contact__progress-fill {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  background: var(--color-gold);
  transition: width 0.4s ease;
}

.contact__stage {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: calc(32px + 24px * var(--t)) 20px;
}

#contact-form {
  width: 100%;
  display: flex;
  justify-content: center;
}

.contact__screen {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  /* 353px mobile matches the site's standard mobile content width (20px
     side margins within the 393px frame, see CLAUDE.md) — keeps the
     Continue/Submit/Let's start buttons the same real width as the
     Hero/Solution/Final CTA buttons elsewhere on the site, since .cta-button
     is width:100% of this column. Desktop endpoint (640px) unchanged. */
  width: calc(353px + 287px * var(--t));
}

.contact__screen.is-active {
  display: flex;
  animation: contact-fade-in 0.5s ease;
}

@keyframes contact-fade-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.contact__question {
  margin: 0;
  width: 100%;
  text-align: left;
  font-family: "Unbounded", sans-serif;
  font-weight: 500;
  font-size: calc(24px + 20px * var(--t));
  line-height: 1.2;
  color: var(--color-green);
}

.contact__helper {
  margin: calc(10px + 6px * var(--t)) 0 0;
  width: 100%;
  text-align: left;
  font-family: "DM Sans", sans-serif;
  font-weight: 500;
  font-style: italic;
  font-size: calc(14px + 3px * var(--t));
  line-height: 1.4;
  color: rgba(22, 64, 63, 0.55);
}

/* Used where the helper line itself carries the Call/WhatsApp links (intro +
   done screens) — only the <em> phrase inside it is italic, not the whole
   line, so the base italic is turned back off here. */
.contact__helper--plain {
  font-style: normal;
}

.contact__helper--plain a {
  color: var(--color-green);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.contact__field {
  margin-top: calc(24px + 16px * var(--t));
  width: 100%;
}

.contact__field--line {
  text-align: left;
}

.contact__field--line + .contact__field--line {
  margin-top: calc(16px + 8px * var(--t));
}

.contact__label {
  display: block;
  margin: 0 0 8px;
  font-family: "DM Sans", sans-serif;
  font-weight: 600;
  font-size: calc(11px + 1px * var(--t));
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-green);
  opacity: 0.65;
}

.contact__input {
  box-sizing: border-box;
  width: 100%;
  border: 1.5px solid rgba(234, 185, 92, 0.4);
  border-radius: calc(12px + 8px * var(--t));
  background: var(--color-card-cream);
  font-family: "DM Sans", sans-serif;
  font-weight: 400;
  font-size: calc(15px + 3px * var(--t));
  color: var(--color-green);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact__input:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(234, 185, 92, 0.15);
}

.contact__input::placeholder {
  color: rgba(22, 64, 63, 0.35);
  font-style: italic;
}

textarea.contact__input {
  min-height: calc(120px + 60px * var(--t));
  padding: calc(16px + 8px * var(--t));
  line-height: 1.5;
  resize: vertical;
  font-family: inherit;
}

.contact__input--line {
  height: calc(46px + 10px * var(--t));
  padding: 0 calc(14px + 6px * var(--t));
}

.contact__phone-row {
  display: flex;
  gap: 10px;
}

.contact__country-select {
  flex: 0 0 auto;
  width: calc(88px + 18px * var(--t));
  cursor: pointer;
}

.contact__phone-number {
  flex: 1;
  min-width: 0;
}

.contact__form-error {
  margin: calc(16px + 8px * var(--t)) 0 0;
  width: 100%;
  text-align: left;
  font-family: "DM Sans", sans-serif;
  font-weight: 500;
  font-size: calc(13px + 2px * var(--t));
  line-height: 1.4;
  color: #b3261e;
}

.contact__form-error a {
  color: #b3261e;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.contact__actions {
  margin-top: calc(28px + 16px * var(--t));
  width: 100%;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  gap: calc(12px + 4px * var(--t));
}

.contact__actions .cta-button {
  margin: 0;
}

.contact__back {
  border: none;
  background: none;
  padding: 8px;
  font-family: "DM Sans", sans-serif;
  font-weight: 500;
  font-size: calc(13px + 2px * var(--t));
  color: var(--color-green);
  opacity: 0.6;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.contact__back:hover {
  opacity: 1;
}

@media (min-width: 761px) {
  .contact__actions {
    flex-direction: row;
    justify-content: center;
  }

  .contact__actions .cta-button {
    width: auto;
    min-width: 220px;
  }
}

/* Intro + done screens: their (short) headlines are meant to read as one
   line at every width, bookend-style, rather than wrapping like the
   question screens. Desktop: the shared .contact__screen width above is
   sized for the question/textarea screens, too narrow for either headline
   at 44px — widened via --t-desktop-side (0 at 761px, 1 at 1512px, same
   variable the Hero/Solution sections use for their own hard-breakpoint
   fluid ranges) instead of a generic clamp, to stay consistent with the
   site's existing method. */
@media (min-width: 761px) {
  .contact__screen[data-step="intro"],
  .contact__screen[data-step="done"] {
    width: calc(520px + 380px * var(--t-desktop-side));
  }

  .contact__screen[data-step="intro"] .contact__question,
  .contact__screen[data-step="done"] .contact__question {
    white-space: nowrap;
  }
}

/* Mobile: rather than force nowrap (which would clip on a narrow phone),
   these two headlines get a smaller mobile-only font endpoint so the real
   copy fits one line at the 353px content width — same desktop value as
   the shared .contact__question (19 + 25 = 44, matching 24 + 20 = 44)
   so desktop is untouched. */
.contact__screen[data-step="intro"] .contact__question,
.contact__screen[data-step="done"] .contact__question {
  font-size: calc(19px + 25px * var(--t));
}

/* Intro + done screens read as centered bookends (per direct feedback) —
   the shared left-align above is for the vision/status/location/details
   question screens only. */
.contact__screen[data-step="intro"] .contact__question,
.contact__screen[data-step="intro"] .contact__helper,
.contact__screen[data-step="done"] .contact__question,
.contact__screen[data-step="done"] .contact__helper {
  text-align: center;
}
