/* Contact (plan.md): the header as a letterhead (the headline, the ways to reach the team, then the photo with the
   team's reply landing on its clear side), the kit's form in two steps on the riser line (design\components.md, "The
   form box"), and the chat as the faster way. Places, sizes and the form's own look. */

/* ---- hero: a letterhead, then the photo ---- */
.chead { padding-block: clamp(32px, 4vw, 56px) clamp(56px, 6vw, 96px); }
.chead__in { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "copy details" "stage stage"; align-items: end; gap: clamp(28px, 3vw, 40px) clamp(32px, 5vw, 80px); }
.chead__copy { grid-area: copy; display: grid; gap: var(--space-3); max-width: 42rem; }
.chead h1 { font-size: clamp(2.3rem, 1.5rem + 2.6vw, 3.7rem); line-height: 1.06; text-wrap: balance; }
.chead__lead { max-width: 34rem; font-size: clamp(1.08rem, 1rem + 0.35vw, 1.3rem); line-height: 1.5; color: var(--c-ink-soft); }
.cdetails { grid-area: details; display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.cdetails__item { display: flex; align-items: center; gap: 14px; min-height: 52px; margin: 0; color: var(--c-ink); text-decoration: none; }
a.cdetails__item:hover b { text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--c-accent); text-underline-offset: 4px; }
.cdetails__ico { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--c-brand-light); color: var(--c-brand-text); }
.cdetails__ico svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cdetails__item--phone .cdetails__ico { background: var(--c-accent); color: var(--c-on-brand); }
.cdetails__words { display: grid; gap: 1px; min-width: 0; }
.cdetails__words small { font-size: 0.875rem; line-height: 1.3; color: var(--c-ink-soft); }
.cdetails__words b { font: 600 1.0625rem/1.3 var(--font-ui); overflow-wrap: anywhere; }
.cdetails__item--phone b { font: 700 1.375rem/1.2 var(--font-display); }
.chead__stage { grid-area: stage; position: relative; }
.chead__media { height: clamp(340px, min(38vw, 100svh - 320px), 540px); border-radius: var(--radius-l); overflow: hidden; background: var(--c-paper-alt); }
.chead__media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 62% 40%; }
.chead__stop { top: 16px; left: 16px; }

/* the team's reply: typing first (the hold keeps it on), then the card lands over it, on the plants' side */
.cthread { position: absolute; z-index: 2; left: clamp(20px, 3.4vw, 48px); top: 50%; translate: 0 -50%; display: grid; width: min(380px, 46%); }
.cthread > * { grid-area: 1 / 1; }
.cthread__typing { z-index: 0; align-self: end; justify-self: start; display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 9px 18px 9px 9px; border-radius: 999px; background: var(--c-paper); box-shadow: inset 0 0 0 1px var(--c-line), var(--shadow-m); }
.cthread__typing img { width: 26px; height: 26px; margin-right: 6px; padding: 2px; border-radius: 8px; background: var(--c-paper); box-shadow: var(--shadow-s); }
.cthread__typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--c-ink-soft); opacity: 0.5; }
.cthread__card { z-index: 1; display: grid; gap: 10px; padding: 16px 20px 20px; border-radius: var(--radius-l); background: var(--c-paper); color: var(--c-ink); box-shadow: inset 0 0 0 1px var(--c-line), var(--shadow-l); opacity: var(--kit-in, 1); }
.cthread__who { display: flex; align-items: center; gap: 10px; margin: 0; }
.cthread__who img { flex: none; width: 30px; height: 30px; padding: 3px; border-radius: 9px; background: var(--c-paper); box-shadow: var(--shadow-s); }
.cthread__who b { font: 600 0.9375rem/1.25 var(--font-ui); }
.cthread__who small { margin-left: auto; padding-left: 8px; font-size: 0.8125rem; color: var(--c-ink-soft); white-space: nowrap; }
.cthread__text { margin: 0; font-size: 1.0625rem; line-height: 1.45; }
@media (prefers-reduced-motion: no-preference) {
  .cthread__typing i { animation: ctyping 1.2s ease-in-out infinite; }
  .cthread__typing i:nth-of-type(2) { animation-delay: 0.15s; }
  .cthread__typing i:nth-of-type(3) { animation-delay: 0.3s; }
  .chead:has(.chead__stop[aria-pressed="true"]) .cthread__typing i { animation-play-state: paused; }
}
@keyframes ctyping { 0%, 60%, 100% { transform: translateY(0); opacity: 0.45; } 30% { transform: translateY(-4px); opacity: 1; } }

/* ---- form: the kit's form in a box on the paper-alt, its two markers on a rising line ---- */
.form { --form-edge: color-mix(in srgb, var(--c-ink) 52%, var(--c-paper)); --form-error: #B3261E; box-sizing: border-box; position: relative; max-width: 880px; margin-inline: auto; padding: clamp(24px, 4vw, 48px); border-radius: var(--radius-l); background: var(--c-paper); color: var(--c-ink); box-shadow: inset 0 0 0 1px var(--c-line), var(--shadow-m); }
.form__top { position: relative; margin-bottom: clamp(26px, 3vw, 36px); }
.form__line { position: absolute; top: 7px; left: 7px; width: 50%; height: 14px; overflow: visible; }
.form__line path { fill: none; stroke: var(--c-dash); stroke-width: 2; stroke-dasharray: 7 9; stroke-linecap: round; }
.form__line--done { clip-path: inset(-6px 100% -6px -6px); transition: clip-path 0.7s var(--ease-out); }
.form__line--done path { stroke: var(--c-accent); stroke-width: var(--riser-w); stroke-dasharray: none; }
.form[data-kit-at="2"] .form__line--done { clip-path: inset(-6px -6px -6px -6px); }
.form__marks { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; margin: 0; padding: 0; list-style: none; }
.form__marks li { display: grid; grid-template-rows: 28px auto; justify-items: start; gap: 8px; font: 600 0.9375rem/1.3 var(--font-ui); color: var(--c-ink-soft); }
.form__marks li:first-child .riser__node { align-self: end; }
.form__marks li:last-child .riser__node { align-self: start; }
.form__marks li[aria-current="step"] { color: var(--c-ink); }
.form__marks li[aria-current="step"] .riser__node { border-color: var(--c-ink); background: var(--c-accent); }
.form__marks li[data-kit-past] .riser__node { border-color: var(--c-accent); background: var(--c-accent); }
.form__step { display: grid; gap: clamp(18px, 2vw, 24px); min-width: 0; margin: 0; padding: 0; border: 0; }
.form__legend { float: left; width: 100%; padding: 0; font: 600 clamp(1.35rem, 1.15rem + 0.6vw, 1.7rem)/1.25 var(--font-display); color: var(--c-ink); }
.form__field { display: grid; gap: 8px; min-width: 0; }
.form__field > label { font: 600 0.9375rem/1.3 var(--font-ui); color: var(--c-ink); }
.form__field > label small { font-size: inherit; font-weight: 400; color: var(--c-ink-soft); }
.form input:not([type="radio"]), .form textarea { box-sizing: border-box; width: 100%; min-height: 52px; margin: 0; padding: 13px 16px; border: 0; border-radius: var(--radius-m); background: var(--c-paper); box-shadow: inset 0 0 0 1.5px var(--form-edge); font: 400 1.0625rem/1.4 var(--font-text); color: var(--c-ink); transition: box-shadow var(--dur-fast) var(--ease-out); }
.form input:not([type="radio"]):focus, .form textarea:focus { box-shadow: inset 0 0 0 2px var(--c-ink); }
.form textarea { min-height: 132px; resize: vertical; }
.form [data-kit-invalid] input:not([type="radio"]), .form [data-kit-invalid] textarea, .form input[data-kit-invalid]:not([type="radio"]), .form textarea[data-kit-invalid] { box-shadow: inset 0 0 0 2px var(--form-error); }
.form__error { margin: 0; font: 600 0.9375rem/1.35 var(--font-ui); color: var(--form-error); }
.form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.form__field--wide { grid-column: 1 / -1; }
.form__nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 14px 24px; }
.form__back { margin-right: auto; }
.form[data-kit-sending] [type="submit"] { opacity: 0.7; pointer-events: none; }

/* step 1's choices, each a small drawn card of what it brings */
.form__choices { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.choice { position: relative; display: grid; justify-items: center; align-content: start; gap: 12px; padding: 20px 10px 18px; border-radius: var(--radius-m); background: var(--c-paper); box-shadow: inset 0 0 0 1.5px var(--form-edge); font: 600 1rem/1.25 var(--font-ui); color: var(--c-ink); text-align: center; cursor: pointer; transition: box-shadow var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out); }
.choice:hover { box-shadow: inset 0 0 0 2px var(--c-ink); transform: translateY(-2px); }
.choice input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.choice:has(input:focus-visible) { outline: 3px solid var(--c-brand-text); outline-offset: 3px; }
.choice__pic { width: 88px; height: auto; }
.choice__pic .c-card { fill: var(--c-paper-alt); stroke: var(--c-line); stroke-width: 1.2; }
.choice__pic .c-lime { fill: var(--c-accent); }
.choice__pic .c-ink { fill: var(--c-ink); }
.choice__pic .c-soft { fill: var(--c-ink-soft); opacity: 0.6; }
.choice__pic .c-faint { fill: color-mix(in srgb, var(--c-ink) 16%, var(--c-paper)); }
.choice__pic .c-tick { fill: none; stroke: var(--c-on-brand); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.choice[data-kit-on] { background: color-mix(in srgb, var(--c-accent) 14%, var(--c-paper)); box-shadow: inset 0 0 0 2px var(--c-ink); }
.choice[data-kit-on]::before { content: ""; position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--c-accent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-ink) 16%, transparent); }
.choice[data-kit-on]::after { content: ""; position: absolute; top: 12px; right: 16px; width: 5px; height: 10px; border: solid var(--c-on-brand); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.form__field[data-kit-invalid] .choice, .form__field:has(input[type="radio"][data-kit-invalid]) .choice { box-shadow: inset 0 0 0 2px var(--form-error); }

/* ---- skip: the chat's first question, in its card over hands at work ---- */
.cskip__in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: center; gap: clamp(32px, 5vw, 80px); }
.cskip__copy { display: grid; gap: var(--space-3); max-width: 30rem; }
.cskip__line { font-size: clamp(1.08rem, 1rem + 0.35vw, 1.3rem); line-height: 1.5; color: var(--c-ink-soft); }
.cskip__cta { display: grid; justify-items: start; gap: 4px; margin-top: var(--space-3); }
.cskip__stage { position: relative; min-height: clamp(460px, 40vw, 540px); }
.cskip__media { position: absolute; top: 0; bottom: 0; left: 34%; right: 0; border-radius: var(--radius-l); overflow: hidden; background: var(--c-paper-alt); }
.cskip__media img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 52% 50%; }
.cskip__stage .scene.cskip__scene { position: absolute; z-index: 1; left: 0; top: 50%; translate: 0 -50%; width: min(340px, 50%); box-shadow: var(--shadow-l); }
.cskip__stop { top: 16px; right: 16px; }

/* ---- the tablet and the phone ---- */
@media (max-width: 999px) {
  .chead__in { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "stage" "details"; align-items: start; }
  .cdetails { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 8px 24px; }
}
@media (max-width: 900px) {
  .cskip__in { grid-template-columns: minmax(0, 1fr); }
  .cskip__copy { max-width: 36rem; }
  .cskip__stage { display: grid; min-height: 0; }
  .cskip__media { position: relative; inset: auto; grid-area: 1 / 1; align-self: start; height: clamp(260px, 60vw, 420px); }
  .cskip__stage .scene.cskip__scene { position: relative; top: auto; left: auto; translate: none; grid-area: 1 / 1; width: auto; max-width: 420px; margin: clamp(190px, 46vw, 330px) 12px 0; }
}
@media (max-width: 760px) {
  .chead__media { height: auto; aspect-ratio: 1 / 1; }
  .chead__media img { object-position: 74% 30%; }
  .cthread { position: relative; left: auto; top: auto; translate: none; width: auto; margin: -128px 12px 0; }
  .cdetails { grid-template-columns: minmax(0, 1fr); }
  .form__choices { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form__grid { grid-template-columns: minmax(0, 1fr); }
  .form__nav .button--main { flex: 1 1 auto; }
}
@media (prefers-reduced-motion: reduce) {
  .choice, .choice:hover { transform: none; transition: none; }
  .form__line--done { transition: none; }
}
