/* Contact (plan.md, "Contact (Part 2)"). Layout H: the words and the three ways to reach the team at the left, a
   framed photo at the right, the team's reply landing on the laptop's screen. The form in a white card. The quicker
   way: a photo under a paper veil, the words and the main button at the left, `plan-builder` in a rounded frame at the
   right. Tokens only (the form's error red is its own, on white: 6.4:1). */

/* ---------- the header ---------- */
.cnh { padding-block: clamp(1.5rem, 1rem + 2vh, 2.5rem) clamp(3rem, 2rem + 4vh, 5rem); }
.cnh__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; gap: clamp(2rem, 1rem + 4vw, 4.5rem); }
.cnh__words .ph__title { font-size: clamp(2.3rem, 1.5rem + 2.8vw, 3.9rem); }
.cnh__ways { list-style: none; margin: 1.7rem 0 0; padding: 0; display: grid; gap: .65rem; max-width: 30rem; }
.cnh__ways a, .cnh__place { display: flex; align-items: center; gap: .9rem; padding: .8rem 1rem; border: 1px solid var(--c-line); border-radius: var(--radius-m); background: var(--c-card); color: var(--c-ink); text-decoration: none; box-shadow: var(--shadow-s); }
.cnh__ways a { transition: border-color .2s, transform .2s; }
.cnh__ways a:hover { border-color: var(--c-brand); transform: translateY(-1px); }
.cnh__ways svg { flex: none; width: 42px; height: 42px; padding: 10px; border-radius: 50%; background: var(--c-brand); fill: none; stroke: var(--c-on-brand); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cnh__place svg { background: color-mix(in srgb, var(--c-brand) 8%, var(--c-card)); stroke: var(--c-brand); }
.cnh__ways small { display: block; font-size: .84rem; color: var(--c-ink-soft); }
.cnh__ways b { display: block; font-weight: 600; color: var(--c-brand); overflow-wrap: anywhere; }
.cnh__chat { font-weight: 600; color: var(--c-brand); text-decoration-color: var(--c-accent); }

/* the frame: the photo cropped to the laptop, its screen at about the size its thread is designed at */
.cnh__frame { position: relative; height: 600px; overflow: hidden; border-radius: var(--radius-l); box-shadow: var(--shadow-l); background: var(--c-brand-dark); }
.cnh__photo { position: absolute; inset: 0; margin: 0; }
.cnh__photo > img { object-position: 25% 50%; }
.cnh__frame .stop { top: 16px; right: 16px; }

/* the thread on the screen, 340 x 226 */
.cnm { display: flex; flex-direction: column; gap: 7px; width: 100%; height: 100%; padding: 0 12px 10px; background: var(--c-card); color: var(--c-ink); font: 400 14px/1.32 var(--font-text); }
.cnm__bar { display: flex; align-items: center; gap: 8px; margin: 0 -12px 3px; padding: 7px 12px; border-bottom: 1px solid var(--c-line); background: var(--c-paper); }
.cnm__av { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--c-brand); }
.cnm__av svg { width: 14px; height: 14px; fill: var(--c-accent); }
.cnm__bar b { display: block; font-size: 13px; font-weight: 600; color: var(--c-brand); line-height: 1.2; }
.cnm__bar small { display: block; font-size: 13px; color: var(--c-ink-soft); line-height: 1.2; }
.cnm__msg { margin: 0; max-width: 84%; padding: 7px 11px; border-radius: 14px; font-size: 14px; }
.cnm__msg--me { align-self: flex-end; border-bottom-right-radius: 4px; background: var(--c-brand-light); color: var(--c-ink); }
.cnm__msg--us { align-self: flex-start; border-bottom-left-radius: 4px; background: var(--c-brand); color: var(--c-on-brand); }
.cnm__msg--us small { display: block; margin-bottom: 1px; font-size: 13px; font-weight: 600; color: var(--c-accent-on-ink); }
.cnm__read { align-self: flex-end; margin: -3px 2px 0; font-size: 13px; color: var(--c-ink-soft); }

/* ---------- the form ---------- */
.cfs .head { margin-bottom: clamp(1.6rem, 1rem + 2vw, 2.6rem); }
.cf { --c-error: #A3312A; max-width: 920px; margin-inline: auto; padding: clamp(1.4rem, 1rem + 2vw, 2.6rem); border: 1px solid var(--c-line); border-radius: var(--radius-l); background: var(--c-card); box-shadow: var(--shadow-l); }
.cf__marks { list-style: none; margin: 0 0 1.6rem; padding: 0; display: flex; gap: .6rem; flex-wrap: wrap; }
.cf__marks li { display: inline-flex; align-items: center; gap: .5rem; padding: .35rem .9rem .35rem .4rem; border-radius: 999px; background: var(--c-paper); color: var(--c-ink-soft); font-size: .92rem; font-weight: 600; }
.cf__marks span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--c-card); border: 1px solid var(--c-line); color: var(--c-brand); font-size: .85rem; }
.cf__marks li[aria-current="step"] { background: var(--c-brand); color: var(--c-on-brand); }
.cf__marks li[aria-current="step"] span { background: var(--c-accent); border-color: var(--c-accent); color: var(--c-on-accent); }
.cf__marks li[data-kit-past] span { background: var(--c-brand); border-color: var(--c-brand); color: var(--c-on-brand); }
.cf__step { margin: 0; padding: 0; border: 0; min-width: 0; }
.cf__legend { padding: 0; margin-bottom: 1.1rem; font: 600 clamp(1.25rem, 1.1rem + .5vw, 1.5rem)/1.25 var(--font-display); color: var(--c-brand); }

/* step 1: the tiles */
.cf__tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }
.cf__tile { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: .8rem; align-items: start; padding: 1rem 2.4rem 1rem 1rem; border: 1.5px solid var(--c-line); border-radius: var(--radius-m); background: var(--c-card); cursor: pointer; transition: border-color .2s, background-color .2s, box-shadow .2s; }
.cf__tile:hover { border-color: color-mix(in srgb, var(--c-brand) 45%, var(--c-line)); }
.cf__tile input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cf__tile:has(input:focus-visible) { outline: 3px solid color-mix(in srgb, var(--c-brand) 35%, transparent); outline-offset: 2px; }
.cf__tile-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: color-mix(in srgb, var(--c-brand) 8%, var(--c-card)); }
.cf__tile-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--c-brand); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cf__tile b { display: block; font-weight: 600; color: var(--c-brand); line-height: 1.25; }
.cf__tile small { display: block; margin-top: .25rem; font-size: .9rem; line-height: 1.35; color: var(--c-ink-soft); }
.cf__tile-tick { position: absolute; top: .8rem; right: .8rem; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid var(--c-line); }
.cf__tile-tick svg { width: 14px; height: 14px; fill: none; stroke: var(--c-on-accent); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.cf__tile[data-kit-on] { border-color: var(--c-brand); background: color-mix(in srgb, var(--c-brand) 5%, var(--c-card)); box-shadow: var(--shadow-s); }
.cf__tile[data-kit-on] .cf__tile-icon { background: var(--c-brand); }
.cf__tile[data-kit-on] .cf__tile-icon svg { stroke: var(--c-on-brand); }
.cf__tile[data-kit-on] .cf__tile-tick { background: var(--c-accent); border-color: var(--c-accent); }
.cf__tile[data-kit-on] .cf__tile-tick svg { opacity: 1; }
.cf__tiles .cf__error { grid-column: 1 / -1; }

/* step 2: the fields */
.cf__picked { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; margin: -.3rem 0 1.2rem; color: var(--c-ink-soft); }
.cf__picked b { color: var(--c-brand); }
.cf__change { padding: .2rem .1rem; border: 0; background: none; color: var(--c-brand); font: 600 .95rem/1.2 var(--font-text); text-decoration: underline; text-decoration-color: var(--c-accent); text-underline-offset: 3px; cursor: pointer; }
.cf__fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.2rem; }
.cf__field--wide { grid-column: 1 / -1; }
.cf__field label { display: block; margin-bottom: .4rem; font-weight: 600; font-size: .98rem; color: var(--c-ink); }
.cf__opt { font-weight: 400; color: var(--c-ink-soft); }
.cf__field input, .cf__field textarea { width: 100%; min-height: 52px; padding: .8rem 1rem; border: 1.5px solid var(--c-line); border-radius: var(--radius-m); background: var(--c-card); color: var(--c-ink); font: 400 1.02rem/1.4 var(--font-text); }
.cf__field textarea { min-height: 120px; resize: vertical; }
.cf__field input::placeholder, .cf__field textarea::placeholder { color: var(--c-ink-soft); opacity: 1; }
.cf__field input:focus-visible, .cf__field textarea:focus-visible { outline: none; border-color: var(--c-brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-brand) 20%, transparent); }
.cf__field[data-kit-invalid] input, .cf__field[data-kit-invalid] textarea, .cf__tiles[data-kit-invalid] .cf__tile { border-color: var(--c-error); }
.cf__error { margin: .45rem 0 0; font-size: .92rem; font-weight: 600; color: var(--c-error); }
.cf__nav { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: flex-end; margin-top: 1.5rem; }
.cf__note { margin-top: .9rem; text-align: right; font-size: .9rem; color: var(--c-ink-soft); }
.cf[data-kit-sending] [type="submit"] { opacity: .7; pointer-events: none; }

/* ---------- the quicker way ---------- */
.cns { position: relative; isolation: isolate; overflow: hidden; padding-block: clamp(4rem, 2.5rem + 5vw, 7rem); }
.cns__media { position: absolute; inset: 0; z-index: -2; }
.cns__media img { --pos: 50% 50%; }
.cns__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, color-mix(in srgb, var(--c-paper) 96%, transparent) 0%, color-mix(in srgb, var(--c-paper) 90%, transparent) 42%, color-mix(in srgb, var(--c-paper) 40%, transparent) 100%); }
.cns__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 1rem + 3vw, 4rem); align-items: center; }
.cns__words .head { margin-bottom: 1.6rem; }
.cns__words .picker { max-width: 30rem; }
.cns__frame { position: relative; justify-self: end; width: min(100%, 720px); }
.scene.cns__scene { width: 100%; height: 560px; border-radius: var(--radius-l); }
.cns__stop { top: 14px; right: 14px; }

/* ---------- narrower ---------- */
@media (max-width: 1099.98px) {
  .cns__grid { grid-template-columns: minmax(0, 1fr); }
  .cns__frame { justify-self: center; }
  /* the photo only behind the frame, fading in from the paper above it, so its file stays its own size */
  .cns { padding-bottom: 0; }
  .cns__grid { padding-bottom: 70px; }
  .cns__media { top: auto; height: 700px; -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 140px); mask-image: linear-gradient(180deg, transparent 0, #000 140px); }
  .cns__media::after { background: color-mix(in srgb, var(--c-paper) 70%, transparent); }
}
@media (max-width: 899.98px) {
  .cnh__grid { grid-template-columns: minmax(0, 1fr); }
  /* the photo larger than its frame, the laptop's screen in the middle, so the thread stays readable */
  .cnh__frame { height: 380px; }
  .cnh__photo { inset: auto; left: calc(50% - 377px); top: calc(50% - 309px); width: 932px; height: 520px; }
  .cnh__photo > img { object-position: 50% 50%; }
  .cf__tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 599.98px) {
  .scene.cns__scene { width: min(100%, 360px); height: 700px; margin-inline: auto; }
  .cns__frame { width: 100%; }
  .cns__stop { right: max(14px, calc(50% - 166px)); }
  .cns__media { height: 760px; }
  .cf__tiles, .cf__fields { grid-template-columns: minmax(0, 1fr); }
  .cf__nav { justify-content: stretch; }
  .cf__nav .button { flex: 1 1 auto; }
  .cf__note { text-align: left; }
}
