/* #contact · the closing film panel + the short form (owner: S3; pass 7: SECTIONS).
   Pass 7: the last window (.end, .end__win …, the film drawn through the giant letters) is retired; its rules left in css/c.css
   are dead (docs/pass7/sections.md). The closing is a film panel (.close*): a dusk room on a poured floor, one screen tall, the
   line at the pass-7 display size on its calm dark side (phones: the bottom; desktops: the right, RTL start) with the sketch CTA
   in paper (.btn--paper, css/hero.css). The form: underlined fields, pill radios in the button language, inline errors in
   Hebrew (js/sections/contact.js). Motion: the line pours in, the CTA block and the form head arrive (the page's one reveal). */

.contact {
  --s3-hair: rgba(20, 18, 16, .16);
  --s3-copper: var(--copper-t, #8A5129);   /* C's copper / ink-3 for small text (AA) */
  --s3-ink3: var(--ink-3t, #686056);
  --s3-err: #8E2B1B;      /* errors: 6.9:1 on paper; always with words, never colour alone */
  position: relative; z-index: 2;
}

/* ---------- the closing film panel ---------- */
.close { position: relative; background: var(--film); color: var(--pearl); }
.close__media { position: relative; height: 100vh; height: 100svh; min-height: 460px; max-height: 1000px; overflow: hidden; overflow: clip; background: #342d31; }
.close__media picture, .close__img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.close__img { object-fit: cover; object-position: 50% 28%; }
/* phones: the calm floor at the bottom carries the type; a scrim keeps it at any crop */
.close__media::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to top, rgba(11, 10, 9, .9), rgba(11, 10, 9, .66) 40%, rgba(11, 10, 9, 0) 66%);
}
.close__tag {
  position: absolute; z-index: 2; top: calc(var(--hdr) + env(safe-area-inset-top) + 12px); left: var(--gut);
  font: 500 var(--fs-xs)/1 var(--text); letter-spacing: .04em; color: var(--pearl);
  background: rgba(12, 11, 10, .72); padding: 6px 9px 5px; pointer-events: none;
}
.close__txt {
  position: absolute; z-index: 2; inset: auto 0 0 0; display: grid; gap: 22px; justify-items: start;
  padding: 0 var(--gut) calc(40px + env(safe-area-inset-bottom));
}
.close__h {
  margin: 0; font-family: var(--display); font-weight: 900; font-stretch: 62.5%; font-synthesis: none;
  font-size: clamp(34px, 3px + 8.6vw, 40px); line-height: 1; color: var(--pearl);
}
.close__l { display: block; }
.close__cta { display: grid; gap: 14px; justify-items: start; max-width: 34rem; }
.close__btn { max-width: 100%; }
.close__line { margin: 0; font: 400 var(--fs-lead)/1.45 var(--text); color: rgba(244, 239, 231, .9); max-width: 30ch; }
.close__alt { margin: 0; font: 400 var(--fs-body)/1.5 var(--text); color: rgba(244, 239, 231, .82); }
.close__alt .lnk { font-size: inherit; padding: 2px 0; margin-inline-start: .2em; color: var(--pearl); background-image: linear-gradient(var(--copper-l), var(--copper-l)); position: relative; }
/* (QA-19) inline links: a 44 px tall hit area around each, nothing visible moves */
.close__alt .lnk::after, .notice .lnk::after { content: ""; position: absolute; inset: -11px -6px; }
@media (max-width: 419px) { .close__btn { width: 100%; } }
/* desktops: the type on the calm dark wall at the right (RTL start), centred on the panel */
@media (min-width: 900px) and (min-aspect-ratio: 1/1) {
  .close__img { object-position: 50% 50%; }
  .close__media::after { background: linear-gradient(to left, rgba(11, 10, 9, .78), rgba(11, 10, 9, .5) 38%, rgba(11, 10, 9, 0) 62%); }
  .close__txt { inset: 0 0 0 auto; width: min(48%, 680px); align-content: center; padding: var(--hdr) var(--gut) 0; gap: 28px; }
  .close__h { font-size: clamp(56px, 24px + 2.5vw, 72px); }
  .close__btn { min-height: 64px; padding: 0 36px; }
}

/* ---------- the short form: its head and the fields side by side, tight (pass 2) ---------- */
.cb {
  position: relative; margin: 0 var(--gut); padding: 10svh 0 15svh;
  display: grid; gap: 36px;
}
.cb__head { display: grid; gap: 16px; align-content: start; min-width: 0; }
.cb__h {
  font-family: var(--display); font-weight: 900; font-stretch: 62.5%; font-synthesis: none;
  margin: 0; font-size: clamp(34px, 3px + 8.6vw, 40px); line-height: 1; color: var(--ink);
}
.cb__l { display: block; width: max-content; max-width: 100%; }
.cb__sub { margin: 0; font: 400 var(--fs-lead)/1.5 var(--text); color: var(--ink-2); max-width: 26ch; --i: 2; }
@media (min-width: 900px) {
  /* the head takes its own width; the form sits 5vw beside it (no stretched gap), the pair hugs the start (right) side */
  .cb { grid-template-columns: auto minmax(0, 54rem); justify-content: start; column-gap: 5vw; align-items: start; padding-top: 11svh; }
  .cb__head { position: sticky; top: calc(var(--hdr) + 36px); }
  .cb__h { font-size: clamp(56px, 24px + 2.5vw, 72px); }
}

.form { position: relative; min-width: 0; }
.form__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
@media (min-width: 720px) {
  .form__body { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 32px; }
  .fld--set, .optin, .notice, .form__go, .form__fail { grid-column: 1 / -1; }
}

.fld { display: grid; gap: 8px; align-content: start; min-width: 0; margin: 0; padding: 0; border: 0; }
.fld__l { font: 500 var(--fs-s)/1.35 var(--text); color: var(--ink); padding: 0; }
.fld__m { color: var(--s3-ink3); font-weight: 400; }
.fld__i {
  -webkit-appearance: none; appearance: none; border-radius: 0; width: 100%; min-height: 52px; margin: 0;
  padding: 12px 0 10px; border: 0; border-bottom: 1px solid rgba(20, 18, 16, .42); background: transparent;
  color: var(--ink); font: 400 var(--fs-body)/1.3 var(--text);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.fld__i[dir="ltr"] { text-align: right; }
.fld__i:focus { outline: none; border-bottom-color: var(--copper); box-shadow: 0 1px 0 0 var(--copper); }
.fld__i[aria-invalid="true"] { border-bottom-color: var(--s3-err); box-shadow: 0 1px 0 0 var(--s3-err); }
.fld__i:-webkit-autofill, .fld__i:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 60px var(--paper) inset; -webkit-text-fill-color: var(--ink); }
.fld__help { font: 400 var(--fs-xs)/1.5 var(--text); color: var(--s3-ink3); }
.fld__err { font: 500 var(--fs-s)/1.5 var(--text); color: var(--s3-err); }
.fld__err::before { content: "— "; }
fieldset.fld { display: block; }
.fld--set legend { display: block; float: none; width: 100%; margin-bottom: 12px; }
.fld--set .fld__help { margin: -6px 0 12px; }

/* the radios: pills in the button language; the real input covers its pill (keyboard and screen readers use it as is) */
.fopts { display: flex; flex-wrap: wrap; gap: 8px; }
.fopt { position: relative; display: inline-flex; }
.fopt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.fopt span {
  display: inline-block; padding: calc((48px - 1.2em) / 2) 1.2em; border-radius: 999px;
  box-shadow: inset 0 0 0 1px rgba(20, 18, 16, .32); font: 400 var(--fs-s)/1.2 var(--text); color: var(--ink); white-space: nowrap;
  transition: background-color .25s var(--ease), color .25s var(--ease), box-shadow .25s var(--ease), transform var(--t-press) var(--ease-out);
}
/* (motion sweep plan 008) a press answers under the finger at once */
.fopt:active span { transform: scale(.97); }
.fopt input:checked + span { background: var(--ink); color: var(--paper); box-shadow: inset 0 0 0 1px var(--ink); }
.fopt input:focus-visible + span { outline: 2px solid var(--copper); outline-offset: 3px; }
@media (hover: hover) { .fopt:hover input:not(:checked) + span { box-shadow: inset 0 0 0 1px var(--ink); } }

/* the honeypot: out of sight and out of the tab order (never off-screen to the side: in RTL that would add a scroll) */
.hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hp > * { display: block; width: 1px; max-width: 1px; }

/* the marketing opt-in: its own box, never pre-ticked */
.optin {
  position: relative; display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 12px; align-items: start;
  min-height: 44px; padding: 20px 0 6px; border-top: 1px solid var(--s3-hair); cursor: pointer; font: 400 var(--fs-s)/1.6 var(--text); color: var(--ink-2);
}
.optin__t { max-width: 66ch; }
.optin input { position: absolute; top: 20px; inset-inline-start: 0; width: 22px; height: 22px; margin: 0; opacity: 0; cursor: pointer; }
.optin__box { position: relative; width: 20px; height: 20px; margin-top: 2px; box-shadow: inset 0 0 0 1px rgba(20, 18, 16, .5); transition: background-color .2s; }
.optin input:checked + .optin__box { background: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.optin input:checked + .optin__box::after {
  content: ""; position: absolute; left: 7px; top: 3px; width: 5px; height: 10px;
  border: solid var(--paper); border-width: 0 1.6px 1.6px 0; transform: rotate(45deg);
}
.optin input:focus-visible + .optin__box { outline: 2px solid var(--copper); outline-offset: 3px; }

.notice { font: 400 var(--fs-xs)/1.7 var(--text); color: var(--ink-2); max-width: 72ch; }
.notice .lnk { font-size: inherit; padding: 1px 0; position: relative; }

.form__go { display: grid; gap: 12px; justify-items: start; }
.form__send { border: 0; margin: 0; cursor: pointer; -webkit-appearance: none; appearance: none; }
.form__send:disabled { cursor: progress; }
.form__send.is-busy { opacity: .72; cursor: progress; }
.form__send.is-busy::after { animation: s3Pulse 1s ease-in-out infinite alternate; }
@keyframes s3Pulse { from { transform: scale(.7); opacity: .5; } to { transform: scale(1.35); opacity: 1; } }
.form__status { font: 500 var(--fs-s)/1.5 var(--text); color: var(--s3-err); min-height: 0; }
.form__status:empty { display: none; }
.form__fail { display: grid; gap: 10px; justify-items: start; }
.form__fail[hidden] { display: none; }
.form__fail-t { font: 500 var(--fs-body)/1.6 var(--text); color: var(--s3-err); max-width: 46ch; }
@media (max-width: 719px) { .form__send { width: 100%; } }
@media (min-width: 720px) { .form__send { min-width: 240px; } }

/* sent */
.form__done { display: grid; gap: 18px; justify-items: start; padding: 4px 0 8px; }
.form__done[hidden] { display: none; }
.done__h {
  font-family: var(--display); font-weight: 900; font-stretch: 62.5%; font-synthesis: none;
  font-size: clamp(40px, 4px + 10vw, 56px); line-height: .96; color: var(--ink); outline: none; transform-origin: 50% 0;
}
.done__t { font: 400 var(--fs-body)/1.65 var(--text); color: var(--ink-2); max-width: 42ch; }
.form__done:not([hidden]) .done__h { animation: pourDrop var(--t-word) both; }   /* (the page's pour drop, css/c.css) */


/* arrivals (motion sweep plan 006): the page's one reveal (data-in / data-in="group", js/motion.js). Reduced motion: in place. */
html.rm .contact *, html.a11y-nomotion .contact * { animation: none !important; transition: none !important; }

/* high contrast: no picture behind the closing line (it stands on black) */
html.a11y-contrast .close__media { height: auto; min-height: 0; max-height: none; background: #000 !important; }
html.a11y-contrast .close__media picture, html.a11y-contrast .close__media::after, html.a11y-contrast .close__tag { display: none; }
html.a11y-contrast .close__txt { position: static; width: auto; padding: 12svh var(--gut) 8svh; }
