/* site\assets\css\pages\contact.css: the Contact page (plan.md, Contact), the director's. Tokens from design\system.css
   only. Grounds (D1): the header green, the form on the tint, the quicker way dark. The work order (.wo) is in
   design\components.css. */

#hero, #form, #skip { scroll-margin-top: calc(var(--bar-h) + 16px); }
[data-kit-scene="sequence"] [data-kit-at] { opacity: var(--kit-in, 1); transform: translateY(calc((1 - var(--kit-in, 1)) * 12px)); }

/* ---------- hero: the ways in on a white work order; Greg framed, his reply landing beside him ---------- */
/* At least the first screen tall on a laptop, so the form's words start below the cookie notice. */
.ct-hero { display: grid; align-items: center; min-height: min(calc(100svh - var(--bar-h)), 860px); box-sizing: border-box; padding-block: clamp(2.25rem, 1.5rem + 3vw, 4.5rem) clamp(2.5rem, 1.5rem + 3.5vw, 5rem); }
.ct-hero__in { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); align-items: center; gap: clamp(2rem, 1rem + 4vw, 5rem); }
.ct-hero__title { font-size: var(--fs-display); text-wrap: balance; }
.ct-hero__line { max-width: 46ch; margin-top: var(--space-3); font-size: calc(var(--fs-body) * 1.12); }
.ct-ways { max-width: 560px; margin-top: var(--space-5); overflow: hidden; color: var(--c-ink); box-shadow: var(--shadow-l); }
.ct-ways__blk { width: 18px; height: 18px; }
.ct-ways__row { display: grid; justify-items: start; gap: 8px; padding: 20px 22px 0; }
.ct-ways__line { max-width: 44ch; font-size: var(--fs-small); color: var(--c-ink-soft); }
.ct-ways__direct { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 20px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--c-line); }
.ct-ways__direct li + li { border-left: 1px solid var(--c-line); }
.ct-direct { display: flex; align-items: center; gap: 12px; min-height: 64px; box-sizing: border-box; height: 100%; padding: 12px 20px; color: var(--c-ink); font-family: var(--font-ui); font-weight: 700; text-decoration: none; transition: background-color var(--dur-fast); }
.ct-direct:hover { background: var(--c-paper-alt); }
.ct-direct span { display: grid; line-height: 1.35; overflow-wrap: anywhere; }
.ct-direct small { font-size: var(--fs-label); font-weight: 600; letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--c-ink-soft); }
.ct-direct__ico { flex: none; width: 22px; height: 22px; fill: none; stroke: var(--c-brand-text); stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.ct-greg { position: relative; justify-self: end; width: min(380px, 100%); margin: 0; }
.ct-greg__frame { aspect-ratio: 752 / 867; box-shadow: var(--shadow-l); }
.ct-greg__frame img { object-position: 50% 30%; }
.ct-greg__cap { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 10px; padding: 12px 16px; border-radius: var(--radius-m); background: var(--c-paper); color: var(--c-ink); box-shadow: var(--shadow-m); }
.ct-greg__cap b { font-family: var(--font-display); font-stretch: var(--stretch-display); font-size: 1.15rem; font-weight: 800; line-height: 1.3; }
.ct-greg__cap span { font-family: var(--font-ui); font-size: var(--fs-label); font-weight: 700; letter-spacing: var(--track-caps); text-transform: uppercase; color: var(--c-brand-text); }
/* the reply lands beside him: over the frame's left edge, low, clear of his face (the cap is 58 px under the frame) */
.ct-greg__reply { position: absolute; z-index: 2; left: -120px; bottom: 96px; width: 300px; }
.ct-sent { display: inline-flex; margin: 0 0 10px; }
.ct-reply { margin: 0; }
.ct-reply__sign { margin-top: 4px; }
/* the stop icon just above the reply, beside the photo */
.ct-greg__stop { left: -120px; bottom: 268px; }

/* ---------- form: the kit's form as a work order, its next steps lighting as it advances ---------- */
.ct-form__head { margin-bottom: clamp(1.5rem, 1rem + 1.5vw, 2.25rem); }
.ct-form__head .head__title { font-size: var(--fs-h2); }
.ct-form__grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); align-items: start; gap: clamp(1.5rem, 1rem + 3vw, 4rem); }
.ct-card { position: relative; overflow: hidden; counter-reset: at var(--kit-at, 1); box-shadow: var(--shadow-m); }
.ct-card__strip { border-radius: 0; }
.ct-card__count { display: inline-flex; align-items: center; gap: 10px; }
.ct-marks { display: flex; gap: 5px; margin: 0; padding: 0; list-style: none; }
.ct-marks li { width: 12px; height: 12px; border-radius: 2px; background: var(--c-line); transition: background-color var(--dur-med) var(--ease-out), transform var(--dur-med) var(--ease-out); }
.ct-marks li[data-kit-past] { background: var(--c-brand); }
.ct-marks li[aria-current="step"] { background: var(--c-accent); transform: translateY(-2px); }
.ct-card__of::after { content: counter(at) " of 4"; }
.ct-step { min-width: 0; margin: 0; padding: clamp(18px, 0.9rem + 1vw, 28px); border: 0; }
.ct-step[hidden] { display: none; }
.ct-step__q { float: left; width: 100%; margin: 0 0 18px; padding: 0; font-family: var(--font-display); font-stretch: var(--stretch-display); font-size: var(--fs-h3); font-weight: 800; line-height: 1.25; color: var(--c-ink); }
.ct-step__q + * { clear: both; }

/* the choices, shown as white tiles with their icons; a green ring when chosen */
.ct-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ct-tile { position: relative; display: flex; align-items: center; gap: 12px; min-height: 72px; box-sizing: border-box; padding: 14px 40px 14px 16px; border: 1.5px solid var(--c-line); border-radius: var(--radius-m); background: var(--c-paper); color: var(--c-ink); font-family: var(--font-ui); font-size: 1.05rem; font-weight: 700; line-height: 1.3; cursor: pointer; transition: border-color var(--dur-fast), box-shadow var(--dur-fast), transform var(--dur-fast) var(--ease-out); }
.ct-tile input { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.ct-tile:hover { border-color: var(--c-brand); box-shadow: var(--shadow-s); transform: translateY(-2px); }
.ct-tile:has(input:focus-visible) { outline: 3px solid var(--c-brand-text); outline-offset: 2px; }
.ct-tile[data-kit-on] { border-color: var(--c-brand-text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-brand) 45%, transparent); }
.ct-tile[data-kit-on]::after { content: ""; position: absolute; top: 50%; right: 12px; width: 20px; height: 20px; margin-top: -10px; border-radius: 50%; background: var(--c-brand-text) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.6 6.3l2.2 2.2 4.6-4.8' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 12px no-repeat; }
.ct-tile__ico { flex: none; width: 30px; height: 30px; fill: none; stroke: var(--c-brand-text); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ct-tile__blk { stroke: none; }
.ct-tile__code { flex: none; display: grid; place-items: center; width: 36px; height: 30px; border-radius: var(--radius-s); background: var(--c-brand-light); color: var(--c-brand-text); font-size: 0.85rem; font-weight: 800; letter-spacing: 0.04em; }
.ct-error { grid-column: 1 / -1; margin: 0; color: var(--c-accent-text); font-family: var(--font-ui); font-size: var(--fs-small); font-weight: 700; }

/* the fields */
.ct-field { display: grid; gap: 6px; }
.ct-field + .ct-field, .ct-pair + .ct-field { margin-top: 16px; }
.ct-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ct-pair > .ct-field + .ct-field { margin-top: 0; }
.ct-field__label { font-family: var(--font-ui); font-weight: 700; color: var(--c-ink); }
.ct-field__opt { font-weight: 500; color: var(--c-ink-soft); }
.ct-input { box-sizing: border-box; width: 100%; min-height: 52px; padding: 12px 14px; border: 1.5px solid color-mix(in srgb, var(--c-ink) 55%, var(--c-paper)); border-radius: var(--radius-m); background: var(--c-paper); color: var(--c-ink); font: 500 1.05rem/1.35 var(--font-text); transition: border-color var(--dur-fast), box-shadow var(--dur-fast); }
.ct-input::placeholder { color: var(--c-ink-soft); opacity: 1; }
.ct-input:focus { outline: none; border-color: var(--c-brand-text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-brand) 40%, transparent); }
.ct-input[aria-invalid="true"] { border-color: var(--c-accent-text); }
.ct-input--area { min-height: 96px; resize: vertical; }
.ct-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; }
.ct-actions--end { justify-content: flex-end; }
/* the privacy note beside "Send my message" (Greg, Nov 20): under the button, at its side */
.ct-privacy { margin: 12px 0 0; font-size: 0.875rem; line-height: 1.5; color: var(--c-ink-soft); text-align: right; text-wrap: pretty; }
.ct-privacy a { color: var(--c-brand-text); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.ct-privacy a:hover { color: var(--c-ink); }
@media (max-width: 599px) { .ct-privacy { text-align: left; } }
.ct-back { min-height: 44px; padding: 0 6px; border: 0; background: none; color: var(--c-ink-soft); font-family: var(--font-ui); font-size: 1rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.ct-back:hover { color: var(--c-ink); }
.ct-card[data-kit-sending] button[type="submit"] { opacity: 0.7; pointer-events: none; }

/* what happens next: three blocks on a line, each lighting as the form reaches the next screen */
.ct-next { padding-top: 6px; }
.ct-next__title { font-size: var(--fs-h3); }
.ct-next__list { position: relative; display: grid; gap: 14px; margin: 18px 0 0; padding: 0; list-style: none; }
.ct-next__list::before { content: ""; position: absolute; left: 27px; top: 32px; bottom: 32px; width: 2px; background: color-mix(in srgb, var(--c-brand) 40%, transparent); }
.ct-next__item { position: relative; display: flex; align-items: center; gap: 14px; min-height: 64px; box-sizing: border-box; padding: 12px 16px 12px 12px; border: 1px solid var(--c-line); border-radius: var(--radius-m); background: var(--c-paper); box-shadow: var(--shadow-s); font-family: var(--font-ui); font-weight: 700; line-height: 1.3; }
.ct-next__blk { width: 32px; height: 32px; filter: grayscale(calc(1 - var(--lit, 0))); opacity: calc(0.45 + var(--lit, 0) * 0.55); transform: translateY(calc((1 - var(--lit, 0)) * -5px)); transition: filter 0.5s var(--ease-out), opacity 0.5s var(--ease-out), transform 0.6s var(--ease-out); }
.ct-form__grid:has(.ct-card[data-kit-at="2"]) .ct-next__item:nth-child(-n+1),
.ct-form__grid:has(.ct-card[data-kit-at="3"]) .ct-next__item:nth-child(-n+2),
.ct-form__grid:has(.ct-card[data-kit-at="4"]) .ct-next__item,
.ct-form__grid:has(.ct-card[data-kit-sending]) .ct-next__item { --lit: 1; }

/* ---------- skip: the chat building a plan on the owner's own phone, over his hands at the wheel ---------- */
.ct-skip__in { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: center; gap: clamp(2rem, 1rem + 4vw, 5rem); }
.ct-skip__pic { position: relative; height: clamp(500px, 42vw, 580px); }
.ct-skip__frame { position: absolute; inset: 0; }
.ct-skip__frame video { object-position: 62% 50%; }
.ct-skip__stop { right: 14px; bottom: 14px; }
.ct-skip__words { display: grid; justify-items: start; gap: var(--space-3); }
.ct-skip__words .head__title { font-size: var(--fs-h2); text-wrap: balance; }
.ct-skip__words .part-cta { margin-top: var(--space-2); }
.ct-skip__blk { width: 30px; height: 30px; }

/* the phone (the chat in a phone, components.css .cp), on the left over the wheel (his hands and phone are
   center-right in the clip); its min-height holds the whole story, so the chat starts at its top and is never cut */
.ct-skip__phone { position: absolute; z-index: 2; left: clamp(20px, 3vw, 40px); top: 50%; width: 290px; min-height: 430px; transform: translateY(-50%); }

/* ---------- smaller screens ---------- */
@media (max-width: 1200px) {
  .ct-greg__reply { left: -60px; width: 290px; }
  .ct-greg__stop { left: -60px; }
}
@media (max-width: 1000px) {
  .ct-hero { min-height: 0; }
  .ct-hero__in { grid-template-columns: minmax(0, 1fr); }
  .ct-greg { justify-self: center; }
}
@media (max-width: 900px) {
  .ct-form__grid { grid-template-columns: minmax(0, 1fr); }
  .ct-skip__in { grid-template-columns: minmax(0, 1fr); }
  /* the clip, the phone laid over its lower part (more than half on it), its words under it */
  .ct-skip__pic { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: var(--top) var(--o) minmax(var(--rest), auto); height: auto; --top: 220px; --o: 270px; --rest: 160px; }
  .ct-skip__frame { position: relative; inset: auto; grid-row: 1 / 3; grid-column: 1; }
  .ct-skip__phone { position: relative; top: auto; left: auto; transform: none; grid-row: 2 / 4; grid-column: 1; justify-self: center; width: min(300px, calc(100% - 24px)); }
  .ct-skip__stop { top: 14px; right: auto; bottom: auto; left: 14px; }
}
@media (max-width: 760px) {
  .ct-hero__title { font-size: clamp(2.1rem, 1.2rem + 4.6vw, 2.6rem); }
  .ct-ways { margin-top: var(--space-4); }
  .ct-ways__row { padding: 16px 16px 0; }
  .ct-direct { padding: 12px 16px; }
  .ct-greg { width: min(340px, 100%); }
}
@media (max-width: 600px) {
  .ct-ways__direct { grid-template-columns: minmax(0, 1fr); }
  .ct-ways__direct li + li { border-left: 0; border-top: 1px solid var(--c-line); }
  .ct-greg__reply { left: 12px; bottom: 74px; width: min(270px, calc(100% - 24px)); }
  .ct-greg__stop { left: auto; right: 12px; bottom: 197px; }
  /* on the phone each tile stands its icon over its words, so the words keep one line; the tick in its corner */
  .ct-tiles { gap: 10px; }
  .ct-tile { flex-direction: column; justify-content: center; gap: 8px; min-height: 96px; padding: 14px 10px; font-size: 1rem; text-align: center; }
  .ct-tile[data-kit-on]::after { top: 8px; right: 8px; margin-top: 0; }
  .ct-pair { grid-template-columns: minmax(0, 1fr); }
}
