/* ==========================================================================
   Contact (contact.html, IDL-06): page layout only. Tokens and components
   come from core.css. Sections: hero + route index, A (brief) / B (write)
   with a live title block on the form, offices with live clocks.
   ========================================================================== */

/* ---------- Hero ------------------------------------------------------- */
.ct-hero { padding-bottom: clamp(56px, 7vw, 104px); }
.ct-hero .colgrid { -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 100%); mask-image: linear-gradient(180deg, #000 0%, #000 45%, transparent 100%); }
.ct-hero__wrap { position: relative; z-index: 1; }
.ct-hero .page-hero__code .rule { flex: 1; }
.ct-hero__grid { align-items: end; row-gap: clamp(40px, 6vw, 72px); }
.ct-hero__main { grid-column: 1 / span 8; }
.ct-hero h1 { max-width: 10.6em; }

.ct-route { grid-column: 9 / span 4; list-style: none; padding: 0; border-top: 1px solid var(--line-2); margin-bottom: 0.4em; }
.ct-route li { border-bottom: 1px solid var(--line-1); }
.ct-route li a {
  display: grid; grid-template-columns: 2.75rem 1fr auto; align-items: center; min-height: 52px;
  font-size: 15px; font-weight: 450; color: var(--tx-2); text-decoration: none; transition: color var(--dur-micro) linear;
}
.ct-route .idx { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; color: var(--tx-3); }
.ct-route .arr { font-family: var(--font-mono); font-size: 13px; color: var(--tx-3); transition: transform var(--dur-ui) var(--ease-out), color var(--dur-micro) linear; }
.ct-route a:hover { color: var(--tx-1); }
.ct-route a:hover .arr { color: var(--tx-1); transform: translateY(3px); }

html.js:not(.reduce-motion):not(.ct-ready) .ct-hero .colgrid span { transform: scaleY(0); animation: ct-failsafe-col 0.4s linear 2.2s forwards; }
@keyframes ct-failsafe-col { to { transform: none; } }

@media (max-width: 1023px) {
  .ct-hero__main { grid-column: 1 / -1; }
  .ct-route { grid-column: 1 / span 8; }
}
@media (max-width: 767px) { .ct-route { grid-column: 1 / -1; } }

/* ---------- A / B ------------------------------------------------------ */
.ct-main { padding-top: clamp(32px, 4vw, 56px); }
.ct-grid { align-items: start; row-gap: clamp(72px, 9vw, 112px); }
.ct-opt { display: flex; align-items: center; gap: var(--s-4); margin-bottom: clamp(24px, 3vw, 36px); }
.ct-opt .rule { flex: 1; }
.ct-opt .idx { color: var(--tx-1); }

.ct-call { grid-column: 1 / span 4; position: sticky; top: calc(var(--header-h) + 40px); }
.ct-call__text { margin-top: var(--s-4); color: var(--tx-2); max-width: 34ch; }
.ct-call__spec { margin-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--line-1); }
.ct-call__spec > div { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: var(--s-4); padding: 14px 0 15px; border-bottom: 1px solid var(--line-1); }
.ct-call__spec dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase; color: var(--tx-3); font-weight: 500; padding-top: 3px; }
.ct-call__spec dd { font-size: var(--t-small); color: var(--tx-2); }
.ct-call__spec dd a { color: var(--tx-1); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.2em; text-decoration-color: var(--ctrl); transition: text-decoration-color var(--dur-micro) linear; }
.ct-call__spec dd a:hover { text-decoration-color: currentColor; }

.ct-write { grid-column: 6 / span 7; }
.ct-form { margin-top: clamp(24px, 3vw, 32px); }
.ct-form__body { display: grid; gap: 28px; padding: clamp(24px, 3vw, 40px); }
.ct-form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px var(--gutter); }
.ct-hint { font-size: 14px; color: var(--tx-3); line-height: 1.45; }
.field[data-invalid] .ct-hint { display: none; }
.ct-topic { row-gap: 8px; }
.ct-topic__err { flex-basis: 100%; margin-top: 6px; }
.ct-topic[data-invalid] label:not(:has(input:checked)) { box-shadow: inset 0 0 0 1px var(--err); }

.ct-form__foot { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 22rem); border-top: 1px solid var(--line-2); }
.ct-send { display: grid; align-content: start; justify-items: start; gap: 14px; padding: 24px clamp(24px, 3vw, 40px) 28px; }
.ct-status { display: flex; gap: 10px; align-items: flex-start; min-height: 0; max-width: 36ch; }
.ct-status[data-state]::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 2px; border-radius: 50%; }
.ct-status[data-state="err"]::before { content: "!"; display: inline-grid; place-items: center; font: 600 11px/1 var(--font-mono); color: var(--bg-0); background: var(--err); }
.ct-status[data-state="ok"]::before {
  background: var(--ok) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 8.2l2.3 2.3 4.7-4.9' fill='none' stroke='%230a0c10' stroke-width='1.6'/%3E%3C/svg%3E") center / 16px 16px no-repeat;
}

/* The title block: bottom-right corner of the sheet, like a drawing's */
.ct-tb { position: relative; display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); border-left: 1px solid var(--line-2); align-self: stretch; }
.ct-tb__c { display: grid; gap: 3px; align-content: start; padding: 10px 14px 11px; border-bottom: 1px solid var(--line-2); min-width: 0; }
.ct-tb__c:nth-child(odd) { border-right: 1px solid var(--line-2); }
.ct-tb__c:nth-last-child(-n+3) { border-bottom: 0; }
.ct-tb .k { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--tx-3); font-weight: 500; }
.ct-tb .v { font-size: 13px; line-height: 1.35; color: var(--tx-1); font-weight: 450; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-tb .v.is-empty { color: var(--tx-3); }
.ct-tb [data-tb="date"] { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; }
.ct-stamp {
  position: absolute; right: 14px; bottom: calc(100% + 14px); z-index: 1;
  padding: 8px 10px; font-family: var(--font-mono); font-size: 12px; line-height: 1; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500;
  color: var(--ok); box-shadow: inset 0 0 0 1.5px var(--ok), 0 0 0 4px var(--bg-1); background: var(--bg-1); border-radius: var(--radius);
}
.ct-stamp.is-in { animation: ct-stamp-in 0.36s var(--ease-out); }
@keyframes ct-stamp-in { from { opacity: 0; transform: scale(1.08); } }

@media (max-width: 1023px) {
  .ct-call, .ct-write { grid-column: 1 / -1; }
  .ct-call { position: static; }
  .ct-call__text { max-width: 52ch; }
  .ct-call__spec { max-width: 560px; }
}
@media (max-width: 767px) {
  .ct-form__row { grid-template-columns: 1fr; }
  .ct-form__foot { grid-template-columns: 1fr; }
  .ct-tb { order: -1; border-left: 0; border-bottom: 1px solid var(--line-2); }
}

/* ---------- 02 Offices ------------------------------------------------- */
.ct-offices { padding-top: calc(var(--section) * 0.4); }
.ct-offices__head { align-items: end; row-gap: var(--s-5); margin-bottom: clamp(40px, 5vw, 72px); }
.ct-offices__head h2 { grid-column: 1 / span 7; max-width: 10em; }
.ct-offices__lead { grid-column: 9 / span 4; color: var(--tx-2); max-width: 40ch; padding-bottom: 0.3em; }
.ct-offices__row .office { gap: 8px; padding-top: 24px; padding-bottom: 8px; }
.ct-offices__row .office__role { min-height: 3em; }
.ct-clock { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; margin-top: clamp(24px, 3vw, 40px); }
.ct-offices .office__time { font-size: clamp(2rem, 1.3rem + 2.2vw, 3.25rem); line-height: 1; letter-spacing: -0.03em; color: var(--tx-1); font-weight: 400; }
.ct-off { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; color: var(--tx-3); }
@media (max-width: 1023px) { .ct-offices__head h2, .ct-offices__lead { grid-column: 1 / -1; } }
@media (max-width: 767px) { .ct-offices__row .office { padding-bottom: 24px; } .ct-offices__row .office__role { min-height: 0; } .ct-clock { margin-top: 14px; } }

/* Without JavaScript the form cannot send: hide it and show the <noscript> note instead */
html:not(.js) #contactForm { display: none; }
