/* Contact (plan.md, "Contact"). Only the tokens of design\system.css. Not a page that sells: a person reads every
   message (the team's work, never a stock face as the team), the kit's form in its own white box, and the chat as the
   quicker way. */

/* ---- hero: the words, and an owner reading the team's reply on his laptop at dusk ---- */
.contact-hero { --rise-h: clamp(56px, 9vw, 136px); position: relative; padding: var(--space-5) 0 calc(var(--rise-h) + var(--space-4)); overflow: hidden; }
.contact-hero__in { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-5); align-items: center; }
.contact-hero__words { display: grid; gap: var(--space-2); justify-items: start; }
.contact-hero__title { font-size: var(--fs-display); font-weight: var(--fw-h1); line-height: 1.02; }
.contact-hero__line { margin: 0; font-size: calc(var(--fs-body) * 1.12); color: var(--c-ink-soft); }
.contact-hero__mail { margin: 0; font-weight: 600; }
.contact-hero__mail a { color: var(--c-brand-text); font-weight: 700; }
.contact-hero__stage { position: relative; }
.contact-hero__frame { --edge: clamp(28px, 3.6vw, 52px); position: relative; height: clamp(440px, 40vw, 560px); overflow: hidden; border-radius: var(--radius-l); background: var(--c-paper-alt); clip-path: polygon(0 var(--edge), 100% 0, 100% 100%, 0 100%); }
/* drawn taller than the frame and set on the photo's lower part: his hand on the laptop and the desk, never his face (step 13) */
.contact-hero__img { position: absolute; top: auto; left: 50%; bottom: -1px; width: auto; height: calc((100% + 2px) / .54); max-width: none; translate: -56% 0; }
.contact-hero__stop { position: absolute; z-index: 3; top: calc(clamp(28px, 3.6vw, 52px) * .5 + var(--space-1)); right: var(--space-2); }
.contact-hero .rise--hero { z-index: 1; }

/* the thread: his question, then the team's reply, on a white card over the window and the desk (no face there) */
.contact-thread { position: absolute; z-index: 2; right: var(--space-3); bottom: var(--space-3); box-sizing: border-box; width: min(290px, 44%); display: grid; gap: .55rem; margin: 0; padding: var(--space-2); border-radius: var(--radius-l); background: var(--c-on-brand); color: var(--c-ink); box-shadow: var(--shadow-l); font-size: var(--fs-small); }
.contact-thread__head { display: flex; align-items: baseline; justify-content: space-between; gap: .75rem; margin: 0; padding-bottom: .55rem; border-bottom: 1px solid var(--c-line); }
.contact-thread__head b { font-family: var(--font-display); font-weight: var(--fw-h3); font-size: 1rem; }
.contact-thread__head span { flex: none; color: var(--c-ink-soft); font-size: .8125rem; }
.contact-thread__msg { box-sizing: border-box; max-width: 92%; margin: 0; padding: .55rem .8rem; border-radius: 14px; line-height: 1.35; opacity: var(--kit-in, 1); }
/* a message lands once when its time comes and stays; as the loop starts again it is simply gone, never taken back (step 13) */
.contact-thread__msg[data-kit-on] { opacity: 1; animation: contact-msg-land .5s var(--ease-out) both; }
@keyframes contact-msg-land { from { opacity: 0; transform: translateY(10px); } }
@media (prefers-reduced-motion: reduce) { .contact-thread__msg[data-kit-on] { animation: none; } }
.contact-thread__msg--me { justify-self: end; background: var(--c-brand); color: var(--c-on-brand); font-weight: 600; border-bottom-right-radius: 4px; }
.contact-thread__msg--team { justify-self: start; display: grid; gap: .3rem; background: var(--c-paper); border-bottom-left-radius: 4px; }
.contact-thread__msg--team b { font-size: .8125rem; color: var(--c-brand-text); }

/* ---- the form: the kit's two steps in a white box, the other ways beside it ---- */
.contact-form__in { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: var(--space-4); align-items: start; }
.contact-form__box { box-sizing: border-box; padding: var(--space-4); border-radius: var(--radius-l); background: var(--c-on-brand); box-shadow: var(--shadow-m); }
.contact-form__head { margin-bottom: var(--space-3); }
.contact-form__head .h2 { margin: 0; }
.contact-form__head .lede { margin: .5rem 0 0; }
.cform__marks { display: flex; flex-wrap: wrap; gap: var(--space-1) var(--space-3); margin: 0 0 var(--space-3); padding: 0; list-style: none; }
.cform__marks li { display: flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--c-ink-soft); }
.cform__marks li span { display: grid; place-items: center; width: 1.9rem; height: 1.9rem; border: 2px solid var(--c-line); border-radius: 50%; font-size: .875rem; }
.cform__marks li[aria-current="step"] { color: var(--c-ink); }
.cform__marks li[aria-current="step"] span { border-color: var(--c-brand); background: var(--c-brand); color: var(--c-on-brand); }
.cform__marks li[data-kit-past] span { border-color: var(--c-brand); background: var(--c-brand-light); color: var(--c-brand-text); }
.cform__step { min-width: 0; margin: 0; padding: 0; border: 0; }
.cform__legend { margin-bottom: var(--space-2); padding: 0; font-family: var(--font-display); font-size: var(--fs-h3); font-weight: var(--fw-h3); }
.cform__choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .75rem; }
.cform__choices .cform__error { grid-column: 1 / -1; }
.cform__choice { position: relative; display: grid; align-content: start; gap: .35rem; padding: var(--space-2); border: 2px solid var(--c-line); border-radius: var(--radius-m); background: var(--c-paper); cursor: pointer; transition: border-color .2s, background-color .2s, transform .2s; }
.cform__choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.cform__pic svg { display: block; width: 48px; height: 48px; }
.cform__choice b { font-family: var(--font-display); font-size: 1.05rem; font-weight: var(--fw-h4); line-height: 1.2; }
.cform__sub { font-size: var(--fs-small); color: var(--c-ink-soft); }
.cform__choice:hover { border-color: var(--c-brand); }
.cform__choice:has(input:focus-visible) { outline: 3px solid var(--c-accent-text); outline-offset: 2px; }
.cform__choice[data-kit-on] { border-color: var(--c-brand); background: var(--c-brand-light); transform: rotate(-1deg); }
.cform__choice[data-kit-on]::after { content: ""; position: absolute; top: .7rem; right: .7rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; background: var(--c-brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 70% no-repeat; }
.cform__error { margin: .5rem 0 0; color: var(--c-accent-text); font-size: var(--fs-small); font-weight: 700; }
.cform__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-2); }
.cform__field { display: grid; gap: .4rem; margin-top: var(--space-2); }
.cform__field label { font-weight: 700; }
.cform__opt { font-weight: 400; color: var(--c-ink-soft); }
.cform__field input, .cform__field textarea { box-sizing: border-box; width: 100%; min-height: 52px; padding: .7rem .9rem; border: 2px solid var(--c-line); border-radius: var(--radius-s); background: var(--c-on-brand); color: var(--c-ink); font: inherit; }
.cform__field textarea { min-height: 120px; resize: vertical; }
.cform__field input:focus-visible, .cform__field textarea:focus-visible { outline: 3px solid var(--c-accent-text); outline-offset: 1px; border-color: var(--c-brand); }
.cform__field [aria-invalid="true"] { border-color: var(--c-accent-text); }
.cform__nav { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); margin-top: var(--space-3); }
.cform__back { min-height: 52px; padding: .6rem 1.3rem; border: 2px solid var(--c-line); border-radius: var(--radius-m); background: transparent; color: var(--c-ink); font: inherit; font-weight: 700; cursor: pointer; }
.cform__back:hover { border-color: var(--c-brand); }
.cform__back:focus-visible { outline: 3px solid var(--c-accent-text); outline-offset: 2px; }
.cform[data-kit-sending] [type="submit"] { opacity: .7; }
.contact-aside { display: grid; gap: var(--space-3); }
.contact-aside__card { display: grid; gap: .6rem; justify-items: start; padding: var(--space-3); border-radius: var(--radius-l); background: var(--c-paper-alt); }
.contact-aside__card p { margin: 0; }
.contact-aside__card--chat { background: var(--c-brand-light); }
.contact-aside__title { font-size: var(--fs-h3); font-weight: var(--fw-h3); }
.contact-aside__mail { color: var(--c-brand-text); font-weight: 700; overflow-wrap: anywhere; }
.contact-aside__note { color: var(--c-ink-soft); }

/* ---- skip: an HVAC technician at work, his company's plan building beside him on a white card ---- */
.contact-skip__in { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: var(--space-5); align-items: center; }
.contact-skip__stage { position: relative; height: 720px; }
.contact-skip__frame { --edge: clamp(28px, 3.6vw, 52px); position: absolute; top: 0; right: 0; bottom: 0; left: 180px; overflow: hidden; border-radius: var(--radius-l); background: var(--c-paper-alt); clip-path: polygon(0 var(--edge), 100% 0, 100% 100%, 0 100%); }
.contact-skip__img { position: absolute; inset: -1px; width: calc(100% + 2px); height: calc(100% + 2px); max-width: none; object-fit: cover; object-position: 39% 30%; }
.contact-skip__stop { position: absolute; z-index: 3; top: calc(clamp(28px, 3.6vw, 52px) * .5 + var(--space-1)); right: var(--space-2); }
.contact-skip__scene { --pb-card: var(--c-on-brand); position: absolute; z-index: 2; left: 0; top: 10px; width: 360px; height: 700px; }
.contact-skip__words { display: grid; gap: var(--space-2); justify-items: start; }
.contact-skip__words .h2, .contact-skip__words .lede { margin: 0; }
.contact-skip__cta { display: grid; justify-items: start; margin-top: var(--space-1); }

@media (max-width: 1100px) {
  .contact-skip__in { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
  .contact-skip__words { order: -1; max-width: 40rem; }
}

@media (max-width: 860px) {
  .contact-hero__in, .contact-form__in { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
}

@media (max-width: 760px) {
  .contact-hero { padding-top: var(--space-4); }
  .contact-hero__stage { margin-bottom: 70px; }
  .contact-hero__frame { height: 420px; }
  .contact-thread { left: .75rem; right: .75rem; bottom: -70px; width: auto; }
  .contact-form__box { padding: var(--space-3) var(--space-2); }
  .cform__choices { grid-template-columns: minmax(0, 1fr); }
  .cform__choice { grid-template-columns: 48px minmax(0, 1fr); column-gap: .9rem; align-items: center; }
  .cform__pic { grid-row: span 2; }
  .cform__grid { grid-template-columns: minmax(0, 1fr); }
  .contact-skip__stage { height: auto; }
  .contact-skip__frame { position: relative; left: auto; height: 420px; }
  .contact-skip__img { object-position: 50% 30%; }
  .contact-skip__scene { position: relative; left: auto; top: auto; width: min(360px, 100%); height: 700px; margin: -80px auto 0; }
  /* the stop icon sits on the card's top corner, over the photo's foot, so the two fit in one view together */
  .contact-skip__stop { top: 310px; right: .75rem; }
}
