/* contact.css: the Contact page (plan.md, Contact; src\pages\contact.mjs). The hero: the words on the cream paper and a
   tall rounded frame where a roofer's note is read and answered; the form in three steps inside a teal block, its first
   step as picture tiles; the quicker way: the chat's split of the work over a café owner on her break. */

/* ---- The ink button: the form's own action (the teal pill stays the chat's main button) ---- */
.button--ink { background: var(--c-ink); color: var(--c-on-ink); box-shadow: var(--shadow-m); }
.button--ink:hover { background: var(--c-brand-dark); transform: translateY(-1px); }
.button--ink:active { transform: translateY(2px); box-shadow: var(--shadow-s); }
.button--ink:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 3px; }

/* ---- hero ---- */
.cth { padding-block: clamp(1.75rem, 0.9rem + 2.6vw, 3.25rem) clamp(3rem, 2rem + 3vw, 4.5rem); }
.cth__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.92fr); gap: clamp(32px, 4vw, 72px); align-items: center; }
.cth__title { margin: 0; max-width: 10.5em; font: 800 var(--fs-h1)/1.02 var(--font-display); letter-spacing: -0.03em; text-wrap: balance; }
.cth__line { margin: var(--space-4) 0 0; max-width: 28em; font-size: clamp(1.1rem, 1rem + 0.4vw, 1.3rem); line-height: 1.5; color: var(--c-ink-soft); text-wrap: pretty; }
.cth__acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); margin-top: var(--space-5); }

.cth__frame { position: relative; aspect-ratio: 560 / 660; overflow: hidden; border-radius: var(--radius-xl); background: var(--c-sand); box-shadow: var(--shadow-l); }
.cth__photo { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: 34% 50%; }
/* the messages sit low over the truck door, right of his face; the stop icon stands on their top right */
.cth__msgs { position: absolute; right: clamp(14px, 1.8vw, 24px); bottom: clamp(14px, 1.8vw, 24px); display: grid; justify-items: end; gap: 10px; width: min(330px, calc(100% - 28px)); }
.cth__thread { display: grid; justify-items: end; gap: 8px; width: 100%; }
.cth__thread [data-kit-at] { opacity: var(--kit-in, 1); transform: translateY(calc((1 - var(--kit-in, 1)) * 14px)); }
.cth__note { max-width: 292px; padding: 12px 16px; border-radius: 20px 20px 6px 20px; background: var(--c-brand); color: var(--c-on-brand); box-shadow: var(--shadow-m); }
.cth__note p { margin: 0; font-size: 15px; line-height: 1.4; }
.cth__read { display: inline-flex; align-items: center; gap: 7px; margin: 0; padding: 6px 12px; border-radius: 999px; background: var(--c-paper); color: var(--c-brand-text); font: 700 13px/1.2 var(--font-ui); box-shadow: var(--shadow-s); }
.cth__read svg { width: 19px; height: 13px; }
.cth__reply { justify-self: stretch; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; align-items: start; padding: 14px 16px; border-radius: 20px 20px 20px 6px; background: var(--c-paper); color: var(--c-ink); box-shadow: var(--shadow-l); }
.cth__avatar { box-sizing: border-box; width: 40px; height: 40px; padding: 5px; border-radius: 50%; border: 1px solid var(--c-line); background: var(--c-paper-alt); object-fit: contain; }
.cth__reply b { display: block; font: 800 15px/1.2 var(--font-display); }
.cth__reply p { margin: 4px 0 0; font-size: 15px; line-height: 1.4; }

/* ---- the form, in a teal block ---- */
.ctf__block { position: relative; isolation: isolate; overflow: hidden; padding: 56px; border-radius: var(--radius-xl); background: var(--c-brand); color: var(--c-on-ink); }
/* the motif: the ring's arc, open at its top right, in mint behind the card */
.ctf__block::after { content: ""; position: absolute; z-index: -1; right: -170px; top: -200px; width: 560px; height: 560px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400'%3E%3Cpath d='M268 70A150 150 0 1 0 330 140' fill='none' stroke='%23DDF3EF' stroke-opacity='.16' stroke-width='22' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / contain; }
.ctf__head { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: var(--space-3) var(--space-6); align-items: end; margin-bottom: clamp(1.75rem, 1rem + 2vw, 2.75rem); }
.ctf__head .lead { color: var(--c-on-ink); }

.ctf__form { padding: 40px; border-radius: var(--radius-l); background: var(--c-paper); color: var(--c-ink); box-shadow: var(--shadow-l); }
.ctf__marks { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 30px; padding: 0; list-style: none; }
.ctf__mark { display: inline-flex; align-items: center; gap: 10px; padding: 5px 16px 5px 5px; border-radius: 999px; background: var(--c-paper-alt); color: var(--c-ink-soft); font: 700 15px/1.2 var(--font-ui); transition: background-color var(--dur-fast); }
.ctf__num { display: grid; place-items: center; width: 30px; height: 30px; border: 1.5px solid var(--c-line); border-radius: 50%; background: var(--c-paper); color: var(--c-ink); font: 800 14px/1 var(--font-display); }
.ctf__mark[aria-current="step"] { background: var(--c-brand-light); color: var(--c-ink); }
.ctf__mark[aria-current="step"] .ctf__num { border-color: var(--c-brand); background: var(--c-brand); color: var(--c-on-brand); }
.ctf__mark[data-kit-past] .ctf__num { border-color: var(--c-accent); background: var(--c-accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3.2 3.2L15 7' fill='none' stroke='%230B2421' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / 18px; color: transparent; }

.ctf__step { min-width: 0; margin: 0; padding: 0; border: 0; }
.ctf__legend { float: left; width: 100%; margin: 0 0 20px; padding: 0; font: 800 clamp(1.45rem, 1.2rem + 0.9vw, 1.95rem)/1.1 var(--font-display); letter-spacing: -0.02em; color: var(--c-ink); }
.ctf__legend + * { clear: both; }

/* step 1: the choices, each in its own photo; the chosen one rings teal and takes the sunflower tick */
.ctf__tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.ctf__tiles > .ctf__error { grid-column: 1 / -1; }
.ctf__tile { position: relative; display: grid; align-content: start; gap: 12px; padding: 8px 8px 16px; border: 1.5px solid var(--c-line); border-radius: 20px; background: var(--c-paper); cursor: pointer; transition: border-color var(--dur-fast), box-shadow var(--dur-fast), transform var(--dur-fast) var(--ease-out); }
.ctf__tile:hover { border-color: color-mix(in srgb, var(--c-brand) 55%, var(--c-line)); box-shadow: var(--shadow-m); transform: translateY(-2px); }
.ctf__radio { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ctf__tile:has(.ctf__radio:focus-visible) { outline: 3px solid var(--c-brand); outline-offset: 3px; }
.ctf__pic { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 13px; background: var(--c-sand); }
.ctf__photo { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; transition: transform var(--dur-med) var(--ease-out); }
.ctf__photo--tile-customers { object-position: 72% 50%; }
.ctf__photo--tile-reviews { object-position: 38% 35%; }
.ctf__photo--tile-website { object-position: 50% 60%; }
.ctf__photo--tile-else { object-position: 50% 30%; }
.ctf__tile:hover .ctf__photo { transform: scale(1.04); }
.ctf__check { position: absolute; top: 10px; right: 10px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--c-accent); color: var(--c-ink); box-shadow: var(--shadow-m); opacity: 0; transform: scale(0.5); transition: opacity var(--dur-fast), transform var(--dur-med) var(--ease-out); }
.ctf__check svg { width: 18px; height: 18px; }
.ctf__name { padding-inline: 6px; font: 800 1.08rem/1.2 var(--font-display); letter-spacing: -0.01em; color: var(--c-ink); }
.ctf__tile[data-kit-on] { border-color: var(--c-brand); box-shadow: 0 0 0 2px var(--c-brand), var(--shadow-m); }
.ctf__tile[data-kit-on] .ctf__check { opacity: 1; transform: scale(1); }
.ctf__tile[data-kit-on] .ctf__name { color: var(--c-brand-text); }

/* the fields */
.ctf__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 22px; }
.ctf__field { display: grid; align-content: start; gap: 8px; }
.ctf__field--other { max-width: 560px; margin-top: 22px; }
.ctf__label { font: 700 15px/1.3 var(--font-ui); color: var(--c-ink); }
.ctf__opt { font-weight: 400; color: var(--c-ink-soft); }
.ctf__input { box-sizing: border-box; width: 100%; min-height: 56px; padding: 14px 16px; border: 1.5px solid var(--c-line); border-radius: 14px; background: var(--c-paper); color: var(--c-ink); font: 400 17px/1.4 var(--font-text); transition: border-color var(--dur-fast), box-shadow var(--dur-fast); }
.ctf__input::placeholder { color: var(--c-ink-soft); opacity: 1; }
.ctf__input:hover { border-color: color-mix(in srgb, var(--c-brand) 45%, var(--c-line)); }
.ctf__input:focus { outline: none; border-color: var(--c-brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-brand) 20%, transparent); }
.ctf__area { min-height: 172px; resize: vertical; }
.ctf__field[data-kit-invalid] .ctf__input, .ctf__input[aria-invalid="true"] { border-color: var(--c-error); }
.ctf__error { margin: 0; font: 700 14px/1.35 var(--font-ui); color: var(--c-error); }

/* the answer to the first tap, and the greeting by name */
.ctf__picked { display: inline-flex; align-items: center; gap: 9px; margin: 0 0 22px; padding: 5px 16px 5px 5px; border-radius: 999px; background: var(--c-brand-light); font: 700 15px/1.2 var(--font-ui); color: var(--c-ink); }
.ctf__picked-tick { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--c-brand); color: var(--c-on-brand); }
.ctf__picked-tick svg { width: 16px; height: 16px; }
.ctf__hello { max-width: 40em; margin: 0 0 22px; color: var(--c-ink-soft); }

.ctf__nav { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 28px; }
.ctf__back { min-height: 52px; padding: 0 22px; border: 0; border-radius: 999px; background: none; color: var(--c-brand-text); font: 700 var(--fs-ui)/1 var(--font-ui); cursor: pointer; transition: background-color var(--dur-fast); }
.ctf__back:hover { background: var(--c-brand-light); }
.ctf__back:focus-visible { outline: 3px solid var(--c-brand); outline-offset: 2px; }
.ctf__form[data-kit-sending] .ctf__send { opacity: 0.7; cursor: progress; }

/* ---- skip: the quicker way ---- */
.cts__side { display: grid; gap: 0; }
.cts__cta { margin-top: var(--space-4); }
.cts__frame { position: relative; container-type: inline-size; }
.cts__pic { position: relative; height: clamp(620px, 48vw, 700px); overflow: hidden; border-radius: var(--radius-xl); background: var(--c-paper-alt); box-shadow: var(--shadow-l); }
.cts__photo { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: 0% 50%; }
/* the split of the work, in glass over the sofa and the lights, clear of her face */
.cts__frame .cts__scene { position: absolute; top: 50%; left: clamp(16px, 2vw, 28px); width: 360px; transform: translateY(-50%); }
.cts__stop { position: absolute; top: 18px; left: calc(clamp(16px, 2vw, 28px) + 372px); }

/* ---- tablet ---- */
@media (max-width: 1099px) {
  .ctf__block { padding: 36px; }
  .ctf__form { padding: 32px; }
  .cts__pic { height: 700px; }
}
@media (max-width: 960px) {
  .ctf__head { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 899px) {
  .ctf__tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .cth__grid { grid-template-columns: minmax(0, 1fr); }
  .cth__frame { aspect-ratio: 5 / 4; }
}

/* ---- phone ---- */
@media (max-width: 760px) {
  .cth__frame { aspect-ratio: 4 / 5; border-radius: var(--radius-l); }
  .cth__acts { gap: var(--space-3); }
  .cth__note p, .cth__reply p { font-size: 14px; }

  .ctf__block { padding: 28px 16px 16px; border-radius: var(--radius-l); }
  .ctf__head { padding-inline: 6px; }
  .ctf__form { padding: 22px 18px 20px; border-radius: 20px; }
  .ctf__marks { gap: 6px; margin-bottom: 22px; }
  .ctf__mark:not([aria-current="step"]) { padding: 5px; gap: 0; font-size: 0; }
  .ctf__tiles { gap: 12px; }
  .ctf__tile { gap: 10px; padding: 6px 6px 12px; border-radius: 16px; }
  .ctf__pic { border-radius: 11px; }
  .ctf__check { top: 7px; right: 7px; width: 28px; height: 28px; }
  .ctf__name { padding-inline: 4px; font-size: 1rem; }
  .ctf__fields { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .ctf__nav { margin-top: 22px; }
  .ctf__nav .button { flex: 1 1 auto; }

  /* the photo tall, her face in its top part; the split of the work hangs over its foot, more than half on it */
  .cts__pic { height: auto; aspect-ratio: 2 / 3; border-radius: var(--radius-l); }
  .cts__photo { object-position: 45% 50%; }
  .cts__frame .cts__scene { position: relative; top: auto; left: auto; width: auto; margin: -84% 12px 0; transform: none; }
  .cts__stop { top: calc(66cqw - 54px); left: auto; right: 12px; }
}
