/* Contact and thank-you pages */

/* ---------- Headline (the thank-you page keeps the large one; the Contact page carries it as a running title) ---------- */
.od-contact-hero { padding-top: calc(var(--od-header-h) + clamp(40px, 7.5vw, 108px)); }
.od-contact-hero__inner { position: relative; }
.od-contact-hero__title { font-weight: 600; }
/* The last words stay together while they fit; a longer translation, a narrow screen or wider letter spacing
   lets them wrap inside the page instead of running past its edge. The headline begins with the prompt (base.css). */
.od-contact-hero__last { display: inline-block; max-width: 100%; }
.od-contact-hero__corner {
	position: absolute; top: 0.22em; right: var(--od-inset); width: 26px; height: 26px; font-size: var(--od-fs-d2);
	color: var(--od-brand); background: var(--od-corner); transform: scaleX(-1);
}
.od-contact-hero--thanks .od-contact-hero__inner { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.od-contact-hero--thanks .od-contact-hero__title { max-width: 14em; line-height: 1.1; }
.od-contact-hero--thanks .od-contact-hero__corner { top: 0; }

/* ---------- Thank-you page: label beside a tinted block ---------- */
.od-contact-block { padding-block: clamp(100px, 8.33vw, 120px); }
.od-contact-thanks { padding-top: clamp(60px, 41.4px + 4.76vw, 110px); padding-bottom: var(--od-section); }
.od-contact-grid {
	display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 8fr);
	column-gap: clamp(20px, 6.95vw, 100px); row-gap: clamp(40px, 4.5vw, 64px); align-items: start;
}
.od-contact-grid > .od-label { margin-top: 12px; }
.od-contact-card { padding: clamp(20px, 2.8vw, 40px); background: var(--od-grey-20); }
.od-contact-card__big { margin-top: 8px; font-size: var(--od-fs-h5); font-weight: 500; line-height: 1.4; color: var(--od-grey-900); }
.od-contact-card__big:first-child { margin-top: 0; }
.od-contact-card__big + p { margin-top: 12px; }
.od-contact-card__actions { margin-top: 40px; }

/* ---------- Contact page: headline, direct routes, the two offices ---------- */
.od-contact-stage { position: relative; background: var(--od-bg); padding-bottom: clamp(20px, 2.8vw, 40px); }
.od-contact-top { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding-top: calc(var(--od-header-h) + clamp(12px, 2.2vw, 32px)); }
.od-contact-top__title { font-size: var(--od-fs-h4); font-weight: 600; line-height: 1.05; letter-spacing: var(--od-track-display); }
.od-contact-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 0 clamp(18px, 2.2vw, 32px); margin: 0; }
.od-contact-quick > li { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; }
.od-contact-quick__mail { font-size: var(--od-fs-btn); font-weight: 500; line-height: 1.6; transition: color 0.2s; }
.od-contact-quick__mail:hover { color: var(--od-brand-text); }
.od-contact-copy::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FF4500' stroke-width='1.6'%3E%3Cpath d='M8.5 8.5h11v11h-11z'/%3E%3Cpath d='M15.5 8.5v-4h-11v11h4'/%3E%3C/svg%3E"); }
.od-contact-copy.is-done::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FF4500' stroke-width='1.8'%3E%3Cpath d='M4.5 12.5l5 5 10-11'/%3E%3C/svg%3E"); }

/* The offices as they stand without the opening scene: phones, touch screens, reduced motion, no scripts. */
.od-contact-cities { margin-top: clamp(20px, 3.3vw, 48px); }
.od-contact-city { display: flex; align-items: flex-end; gap: clamp(16px, 3.3vw, 48px); }
.od-contact-city--b { flex-direction: row-reverse; }
.od-contact-city__name { flex: none; font-size: var(--od-fs-d1); font-weight: 700; line-height: 0.92; letter-spacing: var(--od-track-display); white-space: nowrap; }
.od-contact-city__size { display: none; }
.od-contact-city__meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-bottom: clamp(6px, 1.25vw, 18px); }
.od-contact-city--b .od-contact-city__meta { align-items: flex-end; text-align: right; }
.od-contact-city__role { display: flex; flex-wrap: wrap; column-gap: 0.3em; font-size: var(--od-fs-b2); line-height: 1.4; }
.od-contact-city--b .od-contact-city__role { justify-content: flex-end; }
.od-contact-city__role > :first-child { font-weight: 500; }
.od-contact-city__role > :last-child { color: var(--od-fg-soft); }
.od-contact-city__role > :last-child::before { content: "\00B7\00A0"; }
.od-contact-city__tel { font-size: var(--od-fs-b3); line-height: 1.5; font-variant-numeric: tabular-nums; color: var(--od-fg-soft); }
.od-contact-clock { display: flex; align-items: center; gap: clamp(12px, 1.4vw, 20px); margin-block: clamp(12px, 1.9vw, 28px); }
.od-contact-clock::before, .od-contact-clock::after { content: ""; flex: 1 1 0; height: 1px; background: var(--od-line); }
.od-contact-clock__time { flex: none; min-width: 2.3em; min-height: 1.2em; font-size: var(--od-fs-h6); font-weight: 500; line-height: 1.2; font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
.od-contact-clock__time time { display: inline-block; min-width: 2.3em; }
.od-contact-clock__time time:first-child:not(:only-child) { text-align: right; }
.od-contact-clock__time time:last-child:not(:only-child) { text-align: left; }
.od-contact-clock__sep { margin-inline: 0.4em; font-weight: 400; color: var(--od-fg-mute); }
/* Where the words take two lines they break evenly, so the name of a city is not cut in two. */
.od-contact-clock__text { font-size: var(--od-fs-b4); line-height: 1.5; color: var(--od-fg-soft); text-wrap: balance; }
/* On a narrow screen the two times stand on the line and the words under them. */
@media (max-width: 520px) {
	.od-contact-clock { flex-wrap: wrap; row-gap: 2px; }
	.od-contact-clock::before { display: none; }
	.od-contact-clock__text { flex: 0 0 100%; order: 3; }
}
.od-contact-cue { display: none; }
/* Without scripts there is no clock: the line between the two names stays, the words go. */
html:not(.od-js) .od-contact-clock { gap: 0; }
html:not(.od-js) .od-contact-clock > * { display: none; }
@media (max-width: 860px) {
	.od-contact-city, .od-contact-city--b { flex-direction: column; align-items: flex-start; gap: 8px; }
	.od-contact-city__meta { padding-bottom: 0; }
	.od-contact-city--b .od-contact-city__meta { align-items: flex-start; text-align: left; }
	.od-contact-city--b .od-contact-city__role { justify-content: flex-start; }
}

/* ---------- The opening scene ----------
   On a wide screen with a pointer the two names fill the first screen and fold into one line as the page
   scrolls, while the form rises into the room they leave. The first frame is laid out here, so the page
   opens on it; the script (contact.js) moves it with the scroll. od-contact-live is set in the head and
   dropped again if the script never arrives; is-still is the script's own way out when the room is too small. */
@media (min-width: 1000px) and (min-height: 600px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
	.od-contact-live .od-contact-scene:not(.is-still) {
		--od-ct-final: clamp(44px, 6.6vw, 96px);
		--od-ct-edge: max(var(--od-inset), calc((100vw - var(--od-content)) / 2));
		--od-ct-top: calc(var(--od-header-h) + clamp(12px, 2.2vw, 32px) + var(--od-fs-h4) * 1.05 + 54px + clamp(20px, 3.3vw, 48px));
		--od-ct-big: max(var(--od-ct-final), min(16.5vw, 240px, calc((100vh - var(--od-ct-top) - 110px) / 1.84)));
		--od-ct-off: max(0px, calc((100vh - var(--od-ct-top) - var(--od-ct-big) * 1.84 - 110px) / 2));
	}
	.od-contact-live .od-contact-scene:not(.is-still) .od-contact-track { min-height: 100vh; }
	.od-contact-live .od-contact-scene:not(.is-still) .od-contact-stage { position: sticky; top: 0; z-index: 2; }
	.od-contact-live .od-contact-scene:not(.is-still) .od-contact-quick { flex-wrap: nowrap; white-space: nowrap; }
	.od-contact-live .od-contact-scene:not(.is-still) .od-contact-cities { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: clamp(16px, 2.8vw, 40px); }
	.od-contact-live .od-contact-scene:not(.is-still) .od-contact-city { position: relative; flex-direction: column; align-items: flex-start; gap: clamp(8px, 1vw, 14px); }
	.od-contact-live .od-contact-scene:not(.is-still) .od-contact-city--b { align-items: flex-end; }
	.od-contact-live .od-contact-scene:not(.is-still) .od-contact-city__size { display: block; visibility: hidden; font-size: var(--od-ct-final); font-weight: 700; line-height: 0.92; letter-spacing: var(--od-track-display); white-space: nowrap; }
	.od-contact-live .od-contact-scene:not(.is-still) .od-contact-city__name { position: absolute; top: 0; font-size: var(--od-ct-big); }
	.od-contact-live .od-contact-scene:not(.is-still) .od-contact-city--a .od-contact-city__name { left: 0; transform: translate(calc(var(--od-gutter) - var(--od-ct-edge)), var(--od-ct-off)); }
	.od-contact-live .od-contact-scene:not(.is-still) .od-contact-city--b .od-contact-city__name { right: 0; transform: translate(calc(var(--od-ct-edge) - var(--od-gutter)), calc(var(--od-ct-off) + var(--od-ct-big) * 0.92)); }
	.od-contact-live .od-contact-scene:not(.is-still) .od-contact-city__meta { padding-bottom: 0; }
	.od-contact-live .od-contact-scene:not(.is-still) .od-contact-clock { flex-wrap: wrap; justify-content: center; gap: 6px clamp(12px, 1.4vw, 20px); margin-block: 0; padding-top: calc(var(--od-ct-final) * 0.46 - var(--od-fs-h6) * 0.6); }
	.od-contact-live .od-contact-scene:not(.is-still) .od-contact-clock > .od-contact-clock__time { text-align: center; }
	.od-contact-live .od-contact-scene:not(.is-still) .od-contact-clock > .od-contact-clock__text { flex: 0 0 100%; order: 3; text-align: center; }
	.od-contact-live .od-contact-scene:not(.is-still) [data-od-contact-fade] { opacity: 0; }
	.od-contact-live .od-contact-scene:not(.is-still) .od-contact-cue {
		position: absolute; top: calc(100vh - 64px); left: var(--od-ct-edge); right: var(--od-ct-edge);
		display: flex; align-items: center; gap: clamp(24px, 4vw, 56px); pointer-events: none;
	}
	.od-contact-cue__now { display: inline-flex; align-items: baseline; gap: 12px; }
	.od-contact-cue .od-contact-clock__time { text-align: left; }
}
/* Narrower wide screens: the line of direct routes is set a size smaller so a longer language still fits on it. */
@media (min-width: 1000px) and (max-width: 1180px) and (min-height: 600px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
	.od-contact-live .od-contact-scene:not(.is-still) .od-contact-quick { gap: 0 16px; }
	.od-contact-live .od-contact-scene:not(.is-still) .od-contact-quick > li { gap: 8px; }
	.od-contact-live .od-contact-scene:not(.is-still) .od-contact-quick .od-btn, .od-contact-live .od-contact-scene:not(.is-still) .od-contact-quick__mail { font-size: var(--od-fs-b3); }
}

/* ---------- The form ---------- */
.od-contact-write { padding-top: clamp(40px, 5vw, 72px); padding-bottom: var(--od-section); scroll-margin-top: var(--od-header-h); }
.od-contact-write .od-form { margin-top: clamp(28px, 3.9vw, 56px); }
.od-contact-form.od-contact-form { gap: clamp(28px, 3.3vw, 48px); }
.od-contact-form__groups { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 3.9vw, 56px) clamp(32px, 6.95vw, 100px); align-items: start; }
.od-contact-form .od-form__fields { gap: 32px; }
.od-contact-form__group > .od-label { align-self: flex-start; margin-bottom: -8px; }
.od-contact-form__end { display: flex; flex-direction: column; gap: clamp(20px, 2.2vw, 32px); padding-top: clamp(20px, 2.2vw, 32px); border-top: 1px solid var(--od-line); }
.od-contact-form .od-field select { background-image: url(../../img/contact-icon-chevron-down.svg); cursor: pointer; }
.od-contact-form .od-field select:invalid, .od-contact-form .od-field select:has(option[value=""]:checked) { color: var(--od-field-hint); }
.od-contact-form .wpcf7-submit:disabled { color: var(--od-fg-mute); cursor: not-allowed; }
@media (max-width: 860px) { .od-contact-form__groups { grid-template-columns: minmax(0, 1fr); } }

/* services: dropdown with multiple choices */
.od-pick { border-bottom: 1px solid var(--od-field-line); transition: border-color 0.2s, box-shadow 0.2s; }
.od-pick[open], .od-pick:focus-within { border-bottom-color: var(--od-brand); }
.od-pick:focus-within { box-shadow: 0 1px 0 var(--od-brand); }
.od-pick:has(.wpcf7-not-valid) { border-bottom-color: var(--od-error); }
.od-pick__summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; font-size: var(--od-fs-b2); line-height: 1.6; cursor: pointer; list-style: none; }
.od-pick__summary::-webkit-details-marker { display: none; }
.od-pick__summary:focus-visible { outline: 2px solid var(--od-brand); outline-offset: 4px; }
.od-pick__summary::after { content: ""; flex: none; width: 24px; height: 24px; background: url(../../img/contact-icon-chevron-down.svg) center / 24px no-repeat; transition: transform 0.35s var(--od-ease); }
.od-pick[open] .od-pick__summary::after { transform: rotate(180deg); }
.od-pick__label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--od-field-hint); }
.od-pick.has-value .od-pick__label { color: var(--od-fg); }
.od-pick__panel { padding: 4px 0 20px; }
.od-pick[open] .od-pick__panel { animation: od-pick-in 0.4s var(--od-ease); }
@keyframes od-pick-in { from { opacity: 0; transform: translateY(-8px); } }
.od-pick .wpcf7-checkbox { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 32px; }
.od-pick .wpcf7-list-item { margin: 0; }
.od-pick .wpcf7-list-item label { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 10px 0; cursor: pointer; }
.od-pick .wpcf7-list-item input { flex: none; appearance: none; -webkit-appearance: none; width: 20px; height: 20px; margin: 0; border: 1px solid var(--od-field-line); background: var(--od-white) center / 14px no-repeat; cursor: pointer; transition: border-color 0.2s, background-color 0.2s; }
.od-pick .wpcf7-list-item input:checked { border-color: var(--od-brand); background-color: var(--od-brand); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' d='M2.5 7.5l3 3 6-7'/%3E%3C/svg%3E"); }
.od-pick .wpcf7-list-item input:focus-visible { outline: 2px solid var(--od-brand); outline-offset: 2px; }
.od-pick .wpcf7-list-item-label { font-size: var(--od-fs-b3); line-height: 1.4; transition: color 0.2s; }
.od-pick .wpcf7-list-item label:hover .wpcf7-list-item-label { color: var(--od-brand-text); }
.od-pick + .wpcf7-not-valid-tip, .od-pick .wpcf7-not-valid-tip { display: block; margin-top: 6px; font-size: var(--od-fs-b5); color: var(--od-error-text); }
@media (max-width: 600px) { .od-pick .wpcf7-checkbox { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 400px) { .od-pick__label { white-space: normal; } }
@media (prefers-reduced-motion: reduce) { .od-pick[open] .od-pick__panel { animation: none; } }

/* NDA and consent */
.od-contact-form__checks { display: flex; flex-direction: column; gap: 16px; }
.od-contact-form .wpcf7-acceptance .wpcf7-list-item { display: block; margin: 0; }
.od-contact-form .wpcf7-acceptance label { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; }
.od-contact-form .wpcf7-acceptance input {
	flex: none; width: 20px; height: 20px; margin: 2px 0 0; border: 1px solid var(--od-field-line); border-radius: 0; background: var(--od-white);
	appearance: none; -webkit-appearance: none; cursor: pointer; transition: border-color 0.2s, background-color 0.2s;
}
.od-contact-form .wpcf7-acceptance input:checked {
	border-color: var(--od-brand);
	background: var(--od-brand) 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 6.8' fill='none' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") center / 100% no-repeat;
}
.od-contact-form .wpcf7-acceptance input:focus-visible { outline: 2px solid var(--od-brand); outline-offset: 2px; }
.od-contact-form .wpcf7-acceptance input[aria-invalid="true"] { border-color: var(--od-error); }
.od-contact-form .wpcf7-acceptance .wpcf7-list-item-label { font-size: var(--od-fs-b4); line-height: 1.6; color: var(--od-fg-soft); }
.od-contact-form .wpcf7-acceptance strong { font-weight: 500; color: var(--od-black); }
.od-contact-form .wpcf7-acceptance a { color: var(--od-black); text-decoration: underline; text-underline-offset: 3px; }
.od-contact-form .wpcf7-acceptance a:hover { color: var(--od-brand-text); }

/* ---------- Tablet and phone: thank-you page ---------- */
@media (max-width: 1024px) {
	.od-contact-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 60.4%); column-gap: 40px; row-gap: 56px; }
}
@media (max-width: 600px) {
	.od-contact-grid { grid-template-columns: minmax(0, 1fr); row-gap: 48px; }
	.od-contact-grid > .od-label { padding-top: 0; margin-top: 0; }
	.od-contact-thanks .od-contact-grid { row-gap: 32px; }
	.od-contact-form .wpcf7-acceptance input { width: 24px; height: 24px; margin-top: 0; }
}
/* Very narrow screens (a page zoomed to 400%): the large title steps down */
@media (max-width: 400px) {
	.od-contact-hero__title { font-size: clamp(34px, 11.5vw, 50px); }
}

/* ---------- The form on one screen ----------
   On a wide screen the form shows whole when the page comes to rest on it (contact.js, "The way to the
   form"): from the label "Your move" to the send button. Up to 1000 px of window height the room between
   the parts and the height of the fields follow the window, the name fields stand two to a line and the
   message field is shorter; the text keeps its size. In low windows the introduction stands beside the
   title instead of under the label. Checked at 1280 x 600, 1366 x 657, 1440 x 650, 1440 x 900 and
   1920 x 1080 in four languages: measure again after any change to the form or its texts. */
#contact-message-title:focus { outline: 0; }
@media (min-width: 1000px) and (max-height: 1000px) {
	.od-contact-write { padding-top: clamp(24px, 6vh, 72px); }
	.od-contact-write .od-section-head--rule { gap: clamp(8px, 2vh, 20px) 40px; padding-top: clamp(10px, 2vh, 18px); }
	.od-contact-write .od-section-head__title { font-size: min(var(--od-fs-h2), 6.4vh); }
	.od-contact-write .od-form { margin-top: clamp(16px, 3.6vh, 56px); }
	.od-contact-form.od-contact-form { gap: clamp(14px, 3vh, 48px); }
	.od-contact-form .od-form__fields { gap: clamp(12px, 3vh, 32px); }
	.od-contact-form__group:first-child { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(20px, 2.2vw, 32px); }
	.od-contact-form__group > .od-label { grid-column: 1 / -1; margin-bottom: clamp(-8px, -0.9vh, -4px); }
	.od-contact-form .od-field input, .od-contact-form .od-field select, .od-contact-form .od-field textarea, .od-contact-form .od-pick__summary { padding-block: clamp(9px, 1.6vh, 12px); }
	.od-contact-form .od-field textarea { height: clamp(76px, 13vh, 152px); min-height: 0; }
	.od-contact-form__end { gap: clamp(12px, 2.4vh, 32px); padding-top: clamp(12px, 2.4vh, 32px); }
	.od-contact-form__checks { gap: clamp(6px, 1.6vh, 16px); }
}
@media (min-width: 1000px) and (max-height: 760px) {
	.od-contact-write .od-section-head__meta { grid-column: 1; }
	.od-contact-write .od-section-head__side { grid-column: 2; grid-row: 1 / span 2; padding-bottom: 0.2em; }
	.od-contact-write .od-section-head__side .od-section-head__text { max-width: none; font-size: var(--od-fs-b3); }
}

/* The form while an assistant in the browser fills it in (WebMCP): a brand line instead of the browser's dashed one. Kept apart: other browsers drop a rule with a selector they do not know. */
form:tool-form-active { outline: 2px solid var(--od-brand); outline-offset: 12px; }
:tool-submit-active { outline: 2px solid var(--od-brand); outline-offset: 4px; }
