/* /contact: the consultation steps as a flow, then a five-question form, one question a page, that ends by opening
   WhatsApp with the answers. Built on approach.css and drawn with its pieces: the centred section heading, thin gold
   lines, the turquoise button of the service pages. */

.cf-hero { padding-bottom: 0; }
.cf-h { margin: max(3rem, 10vh) var(--cv-gut) 0; font-size: min(12vw, 9rem); line-height: 1; }

.cf { padding: 8rem 0 10rem; }
/* the small text in normal case here: the steps and the form are read, not scanned */
.cf .cv-up { text-transform: none; font-size: 1rem; letter-spacing: .2px; }

/* ── the steps as a flow: four nodes on one thin gold line, across on a desktop and down on a phone. Each node draws
   the stretch of line to the next one, so the line grows node by node as the section comes into view. ── */
.cf-flow__h { max-width: 9em; }
.cf-path { margin: 9rem var(--cv-gut) 0 11vw; }
.cf-nodes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 2.5rem; margin: 0; padding: 0; list-style: none; }
.cf-node { position: relative; }
.cf-node::after {   /* the stretch of line from this node to the next */
  content: ""; position: absolute; left: 1.6rem; top: 1.6rem; width: calc(100% + 2.5rem); height: 1px;
  background: var(--cv-kh); opacity: .7; transform-origin: 0 50%;
}
.cf-node:last-child::after { display: none; }
.cf-node__dot {
  position: relative; z-index: 1; display: grid; place-items: center; width: 3.2rem; height: 3.2rem;
  border: 1px solid var(--cv-kh); border-radius: 50%; background: var(--cv-ground); color: var(--cv-kh);
}
.cf-node__n { display: block; margin-top: 1.8rem; color: var(--cv-kh); }
.cf-node .cv-h3 { margin-top: .5rem; font-size: 2.1rem; }
.cf-node p.cv-up { margin-top: .9rem; max-width: 17rem; opacity: .85; }
/* the fork after step 3: a dashed branch that leaves the line between 3 and 4 */
.cf-fork { position: absolute; left: calc(1.6rem + (100% + 2.5rem) / 2); bottom: calc(100% - 1.6rem); margin: 0; }
.cf-fork__l {
  position: absolute; left: 0; bottom: 0; width: 1.4rem; height: 3rem;
  border-left: 1px dashed var(--cv-kh); border-top: 1px dashed var(--cv-kh); border-top-left-radius: 1rem; opacity: .7;
}
.cf-node .cf-fork .cv-up { display: block; width: 12rem; margin: 0 0 2.4rem 1.9rem; font-size: .9rem; line-height: 1.45; opacity: .75; }

/* drawing it: hidden until the section is in view, then each stretch of line grows and each node fades in as the
   line reaches it (about 1.2 s in all) */
.cf-node, .cf-fork { transition: opacity .6s var(--cv-out) calc(var(--i) * .36s), transform .6s var(--cv-out) calc(var(--i) * .36s); }
.cf-node::after { transition: transform .36s linear calc(var(--i) * .36s + .1s); }
.cf-node:nth-child(3)::after { transition-timing-function: var(--cv-out); }
.cf-path.is-wait:not(.is-in) .cf-node { opacity: 0; transform: translateY(.6rem); }
.cf-path.is-wait:not(.is-in) .cf-node::after { transform: scaleX(0); }

/* ── the form ── */
.cf-main { margin: 8rem var(--cv-gut) 0 11vw; max-width: 46rem; }
.cf-bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: .4rem; margin-bottom: 3rem; }
.cf-bar i { height: 2px; background: var(--cv-rule); transition: background-color .4s ease; }
.cf-bar i.is-on { background: var(--cv-kh); }

.cf-step { min-width: 0; margin: 0; padding: 0; border: 0; }
.cf-q {
  padding: 0; font-family: var(--cv-display); font-weight: 595; font-stretch: normal; font-optical-sizing: auto;
  font-size: 2.6rem; line-height: 1.1; outline: none;
}
.cf-count { display: block; margin-bottom: 1.2rem; color: var(--cv-kh); font-family: var(--cv-text); }
.cf-hint { margin: 1rem 0 2rem; opacity: .7; }
.cf-sub { margin: 2.2rem 0 1rem; }

.cf-opts { display: grid; gap: .6rem; }
.cf-opts--two { grid-template-columns: 1fr 1fr; }
.cf-opt {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1.1rem 1.2rem; cursor: pointer; border: 1px solid var(--cv-rule);
  transition: background-color .15s ease, border-color .15s ease, transform .1s ease;
}
.cf-opt:active { transform: scale(.985); }
.cf-opt input { position: absolute; opacity: 0; pointer-events: none; }
.cf-opt__t { font-size: 1rem; font-weight: 280; line-height: 1.4; letter-spacing: .2px; }
.cf-opt__box { flex: none; width: .8rem; height: .8rem; border: 1px solid var(--cv-kh); transition: background-color .15s ease; }
.cf-opt--radio .cf-opt__box { border-radius: 50%; }
.cf-opt:hover { background: rgba(0, 65, 55, .42); }
.cf-opt:has(input:checked) { background: rgba(0, 65, 55, .42); border-color: var(--cv-kh); }
/* a picked answer answers back: its box pops past full size and settles */
.cf-opt input:checked ~ .cf-opt__box { background: var(--cv-kh); animation: cf-pop .22s cubic-bezier(.34, 1.56, .64, 1); }
@keyframes cf-pop { from { transform: scale(.4); } }
.cf-opt:has(input:focus-visible) { outline: 2px solid var(--cv-kh); outline-offset: 3px; }

.cf-field { display: grid; gap: .7rem; margin-top: 1.6rem; max-width: 22rem; }
.cf-step > .cf-field:first-of-type { margin-top: 0; }
.cf-field[hidden] { display: none; }
.cf-field select, .cf-field input {
  padding: 1rem 1.1rem; border: 1px solid var(--cv-rule); border-radius: 0; background: var(--cv-ground); color: var(--cv-ink);
  font: 280 1rem/1.3 var(--cv-text); font-stretch: 125%;
}
.cf-field select:focus-visible, .cf-field input:focus-visible { outline: 2px solid var(--cv-kh); outline-offset: 2px; }

.cf-nav { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-top: 3rem; }
.cf-back { flex: none; min-height: 2.75rem; padding: .8rem 1rem .8rem 0; border: 0; background: none; cursor: pointer; white-space: nowrap; }
.cf-back[hidden] { display: inline-block; visibility: hidden; }
/* the service pages' button */
.cf-btn {
  display: flex; justify-content: space-between; align-items: center; gap: 2.5rem; min-width: 14rem; padding: 1.2rem 1.6rem;
  border: 0; background: var(--cv-nt); color: var(--cv-ink); text-decoration: none; cursor: pointer;
  font: 400 1rem/1 var(--cv-text); font-stretch: 125%; letter-spacing: .5px; text-transform: uppercase;
  transition: background-color .2s ease, opacity .2s ease, transform .1s ease;
}
.cf-btn:active { transform: scale(.97); }
/* tapped: the arrow turns into a tick while WhatsApp opens */
.cf-btn.is-sent::after { content: "\2713"; content: "\2713" / ""; }
.cf-btn::after { content: "\2197"; content: "\2197" / ""; font-size: 1.15rem; line-height: .8; }
.cf-btn:hover { background: #00574a; }
.cf-btn[hidden] { display: none; }
.cf-btn:disabled, .cf-btn[aria-disabled="true"] { opacity: .35; cursor: default; background: var(--cv-nt); }
.cf-nav .cf-btn { margin-left: auto; }
.cf-note { margin-top: 2rem; max-width: 30rem; opacity: .7; }
.cf-alt { margin-top: 3rem; opacity: .8; }
.cf-alt a { color: var(--cv-kh); text-transform: none; }

.cf-step:not([hidden]) { animation: cf-in .3s var(--cv-out) both; }
@keyframes cf-in { from { opacity: 0; transform: translateY(.8rem); } }

/* with no script: only the WhatsApp button */
.cf-box:not(.cf-js) > :not(.cf-nojs) { display: none; }
.cf-js .cf-nojs { display: none; }
.cf-nojs .cf-btn { display: inline-flex; }

/* on a tablet or phone the line runs down the left, and the fork branches off to the right of it */
@media (max-width: 991px) {
  .cf-path { margin: 5rem var(--cv-gut) 0; }
  .cf-nodes { display: block; }
  .cf-node { padding: 0 0 3rem 4.8rem; min-height: 3.2rem; }
  .cf-node:last-child { padding-bottom: 0; }
  .cf-node__dot { position: absolute; left: 0; top: 0; }
  .cf-node::after { width: 1px; height: 100%; transform-origin: 50% 0; }
  .cf-path.is-wait:not(.is-in) .cf-node::after { transform: scaleY(0); }
  .cf-node__n { margin-top: .3rem; }
  .cf-node .cv-h3 { margin-top: .2rem; font-size: 1.9rem; }
  .cf-node p.cv-up { max-width: none; }
  .cf-fork { position: relative; left: auto; bottom: auto; margin-top: 1.4rem; }
  .cf-fork__l { left: -3.2rem; bottom: auto; top: .75em; width: 2.6rem; height: 0; border-left: 0; border-radius: 0; }
  .cf-node .cf-fork .cv-up { width: auto; margin: 0; }
}
@media (max-width: 640px) {
  .cf { padding-top: 5rem; }
  .cf-h { margin-top: 2.2rem; }
  .cf-main { margin: 5rem var(--cv-gut) 0; }
  .cf-q { font-size: 2.1rem; }
  .cf-opt { padding: 1rem; }
  .cf-opts--two .cf-opt__t { font-size: .9rem; }
  .cf-field { max-width: none; }
  .cf-btn { min-width: 0; gap: 1.5rem; }
  .cf-alt { overflow-wrap: anywhere; }
}
@media (prefers-reduced-motion: reduce) {
  .cf-step:not([hidden]), .cf-opt input:checked ~ .cf-opt__box { animation: none; }
  .cf-node, .cf-fork, .cf-node::after { transition: none; }
  .cf-path.is-wait:not(.is-in) .cf-node { opacity: 1; transform: none; }
  .cf-path.is-wait:not(.is-in) .cf-node::after { transform: none; }
}
