/* Contact Us (ct-, cf-). Concept: the conversation, light. Field basics (.field, .input, .check) live in system.css. */

/* ---------- Page ---------- */
.ct { position: relative; isolation: isolate; overflow-x: clip; padding: clamp(124px, 16vh, 164px) 0 calc(var(--section-y) + clamp(48px, 7vw, 104px)); background: radial-gradient(60% 60% at 85% 25%, #fff 0%, rgba(255, 255, 255, 0) 70%), var(--paper-soft); }
.ct::before { content: ""; position: absolute; z-index: -1; top: 10%; inset-inline-end: -8%; width: 44%; height: 70%; border-radius: 56px; background: linear-gradient(160deg, rgba(128, 188, 0, .14), rgba(128, 188, 0, 0) 70%); transform: skewX(-24deg); }
.ct__grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(32px, 5vw, 80px); align-items: start; }
.ct-side { display: grid; gap: 16px; justify-items: start; }
.ct-side .t-display { font-size: clamp(2.125rem, min(3.8vw, 7vh), 3.25rem); }
.ct-side .t-lead { max-width: 56ch; }
.ct-side .t-body { max-width: 58ch; color: var(--ink-body); }
.ct-h { margin-top: 10px; font-size: .8125rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-mute); }
/* direct ways to reach the team */
.ct-reach { list-style: none; width: 100%; display: grid; gap: 10px; }
.ct-reach li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 12px 14px; border-radius: 18px; background: #fff; border: 1px solid var(--line); }
.ct-reach .card__ic { width: 44px; height: 40px; margin-inline-start: 6px; }
.ct-reach li > span { display: grid; min-width: 0; }
/* final brief §19: Call and WhatsApp beside the same number */
.ct-reach li:has(> .ct-minis) { grid-template-columns: auto minmax(0, 1fr); } /* the number keeps its line; the buttons sit under it */
.ct-reach li > .ct-minis { grid-column: 2; display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 6px; }
.ct-mini--wa .ic { color: var(--lime-strong); }
.ct-reach b { font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-mute); }
.ct-reach a:not(.ct-mini) { font-weight: 800; color: var(--navy); overflow-wrap: anywhere; }
.ct-reach a:not(.ct-mini):hover { color: var(--lime-strong); text-decoration: underline; text-underline-offset: 3px; }
.ct-mini { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; background: var(--paper-soft); font-size: .8125rem; font-weight: 700; color: var(--navy); white-space: nowrap; transition: background-color .2s, color .2s; }
.ct-mini .ic { width: 16px; height: 16px; }
.ct-mini:hover { background: var(--navy); color: #fff; }
.ct-mini.is-done { background: var(--lime); color: var(--navy); }
.ct-market { display: flex; align-items: center; gap: 8px; font-size: .9375rem; color: var(--ink-soft); }
.ct-market .ic { color: var(--lime-strong); }
.ct-market b { color: var(--navy); }

/* ---------- The app window ---------- */
/* min-width 0: the one-line name in the header must not widen the window past its column (it ellipsises instead) */
.ct-side, .ct-app { min-width: 0; }
.ct-app { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); height: clamp(600px, calc(100svh - 150px), 740px); border-radius: 32px; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 50px 100px -40px rgba(6, 43, 85, .45); overflow: hidden; }
.ct-app__head { display: flex; align-items: center; gap: 14px; padding: 14px 16px 14px 20px; background: radial-gradient(90% 140% at 100% 0%, #0D427C 0%, transparent 70%) var(--navy); color: #fff; }
.ct-avatar { display: grid; place-items: center; flex: none; width: 46px; height: 40px; margin-inline-start: 6px; border-radius: 10px; background: var(--lime); transform: skewX(-24deg); }
.ct-avatar i { width: 18px; height: 9px; border-radius: 2px; background: var(--navy); }
.ct-app__who { flex: 1; min-width: 0; }
.ct-app__who strong { display: block; font-size: 1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-app__who > span { font-size: .8125rem; color: var(--lime-glow); }
.ct-short { display: none; }
.ct-switch { display: flex; margin-inline-start: auto; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid var(--glass-line); }
.ct-switch button { padding: 8px 16px; border-radius: 999px; font-size: .875rem; font-weight: 800; color: var(--ink-on-dark-soft); transition: background-color .25s, color .25s; }
.ct-switch button:hover { color: #fff; }
.ct-switch button[aria-selected="true"] { background: var(--lime); color: var(--navy); }
.ct-pane { min-height: 0; }
.ct-pane[hidden] { display: none; }

/* chat */
.ct-chat { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; }
.ct-prog { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.ct-prog ol { list-style: none; display: flex; flex: 1; gap: 6px; }
.ct-prog li { flex: 1; height: 6px; border-radius: 3px; background: var(--line); transform: skewX(-24deg); transition: background-color .4s; }
.ct-prog li.is-done { background: var(--navy); }
.ct-prog li.is-on { background: var(--lime); }
.ct-prog span { font-size: .75rem; font-weight: 800; color: var(--ink-mute); white-space: nowrap; }
.ct-log { display: flex; flex-direction: column; gap: 12px; overflow-y: auto; padding: 22px 20px; background: var(--paper-soft); overscroll-behavior: contain; }
.ct-row { display: flex; align-items: flex-end; gap: 10px; animation: ct-in .4s var(--ease-out); }
.ct-row--me { justify-content: flex-end; }
@keyframes ct-in { from { opacity: 0; translate: 0 10px; } }
.ct-av { flex: none; width: 30px; height: 26px; margin-inline-start: 4px; border-radius: 7px; background: linear-gradient(90deg, var(--navy) 66%, var(--lime) 66%); transform: skewX(-24deg); }
.ct-msg { max-width: min(84%, 460px); padding: 12px 16px; border-radius: 18px; font-size: .9375rem; line-height: 1.5; overflow-wrap: anywhere; }
.ct-row--bot .ct-msg { background: #fff; color: var(--ink-body); border-end-start-radius: 6px; box-shadow: var(--shadow-1); }
.ct-row--me .ct-msg { background: var(--navy); color: #fff; border-end-end-radius: 6px; }
.ct-typing { display: flex; gap: 5px; padding: 15px 16px; }
.ct-typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-mute); animation: ct-dot .9s ease-in-out infinite; }
.ct-typing i:nth-child(2) { animation-delay: .15s; } .ct-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes ct-dot { 50% { opacity: .3; translate: 0 -3px; } }
/* review card: every answer, each with Edit */
.ct-row--bot .ct-msg--card { max-width: min(92%, 540px); padding: 18px 18px 10px; }
.ct-sum { display: grid; margin: 12px 0 0; }
.ct-sum > div { display: grid; grid-template-columns: 124px minmax(0, 1fr) auto; align-items: baseline; gap: 4px 12px; padding: 9px 0; border-top: 1px solid var(--line); font-size: .875rem; }
.ct-sum dt { font-weight: 700; color: var(--ink-mute); }
.ct-sum dd { margin: 0; font-weight: 700; color: var(--navy); }
.ct-edit { font-size: .8125rem; font-weight: 800; color: var(--lime-strong); text-decoration: underline; text-underline-offset: 3px; }
.ct-edit:hover { color: var(--lime-deep); }
.ct-edit:disabled { opacity: .35; cursor: default; text-decoration: none; }
/* endings */
.ct-row--bot .ct-msg--sent { display: grid; gap: 8px; justify-items: start; padding: 18px; }
.ct-ok { display: grid; place-items: center; width: 42px; height: 36px; margin-inline-start: 6px; border-radius: 9px; background: var(--lime); color: var(--navy); transform: skewX(-24deg); }
.ct-ok .ic { transform: skewX(24deg); stroke-width: 2.6; }
.ct-done { font-weight: 700; color: var(--navy); }
.ct-next { padding-top: 8px; border-top: 1px solid var(--line); font-size: .875rem; color: var(--ink-soft); }
.ct-next b { display: block; color: var(--navy); }
.ct-row--bot .ct-msg--fail { display: flex; gap: 10px; background: var(--danger-soft); color: var(--danger); font-weight: 700; box-shadow: none; }
.ct-msg--fail .ic { flex: none; margin-top: 2px; }

/* composer */
.ct-composer { padding: 14px 16px 16px; border-top: 1px solid var(--line); background: #fff; }
.ct-composer:empty { padding: 0; border: 0; }
.ct-paths { display: grid; gap: 8px; }
.ct-path { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; width: 100%; padding: 12px 16px 12px 12px; border-radius: 18px; border: 1.5px solid var(--line); text-align: start; transition: border-color .2s, background-color .2s; }
.ct-path .card__ic { width: 42px; height: 38px; margin-inline-start: 6px; }
.ct-path strong { display: block; font-size: .9375rem; font-weight: 800; color: var(--navy); }
.ct-path small { display: block; margin-top: 2px; font-size: .8125rem; line-height: 1.45; color: var(--ink-soft); }
.ct-path > .ic { color: var(--lime-strong); transition: translate .25s var(--ease-out); }
.ct-path:hover, .ct-path:focus-visible { border-color: var(--navy); background: var(--paper-soft); }
.ct-path:hover > .ic { translate: 4px 0; }
[dir="rtl"] .ct-path:hover > .ic { translate: -4px 0; }
.ct-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ct-chip { justify-self: start; padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--navy); font-size: .875rem; font-weight: 700; color: var(--navy); transition: background-color .2s, color .2s; }
.ct-chip:hover { background: var(--navy); color: #fff; }
.ct-ask { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 6px 10px; }
.ct-ask .input { min-height: 50px; border-radius: 26px; padding-inline: 20px; }
.ct-ask textarea.input { min-height: 50px; max-height: 140px; border-radius: 20px; padding-block: 13px; resize: none; }
.ct-send { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--lime); color: var(--navy); box-shadow: 0 10px 24px -10px rgba(128, 188, 0, .8); transition: background-color .2s, translate .2s; }
.ct-send:hover { background: var(--lime-glow); }
.ct-send .ic { width: 22px; height: 22px; stroke-width: 2.2; }
.ct-send:focus-visible { outline: 3px solid var(--lime-strong); outline-offset: 3px; }
.ct-hint { grid-column: 1 / -1; padding-inline: 20px; font-size: .75rem; color: var(--ink-mute); }
.ct-err { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; padding-inline: 16px; font-size: .8125rem; font-weight: 700; color: var(--danger); }
.ct-err .ic { width: 16px; height: 16px; }
.ct-err[hidden] { display: none; }
.ct-final { display: grid; gap: 12px; }
.ct-final .check span { font-size: .875rem; }
.ct-final__btns { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.ct-link { font-size: .875rem; font-weight: 700; color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.ct-link:hover { color: var(--lime-strong); }
.calm .ct-row, .calm .ct-typing i { animation: none; }

/* ---------- The form view ---------- */
.ct-formpane { overflow-y: auto; padding: 24px 26px 28px; overscroll-behavior: contain; }
/* final brief §20: the two inquiry forms in tabs; the window grows with its form (no inner scrolling) */
.ct-app.ct-app--forms { height: auto; grid-template-rows: auto auto auto; align-self: start; } /* over the chat window's fixed heights, at every width */
.ct-app--forms .ct-formpane { overflow: visible; }
.ct-tabs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; padding: 16px 18px 0; }
.ct-tab { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; border: 1.5px solid var(--line); background: #fff; color: var(--navy); text-align: start; transition: border-color .2s, background-color .2s, color .2s; }
.ct-tab:hover { border-color: var(--navy); }
.ct-tab .card__ic { flex: none; width: 40px; height: 36px; margin-inline-start: 6px; }
.ct-tab .card__ic .ic { width: 20px; height: 20px; }
.ct-tab > span { display: grid; gap: 2px; min-width: 0; }
.ct-tab strong { font-size: .9375rem; font-weight: 800; line-height: 1.25; }
.ct-tab small { font-size: .8125rem; color: var(--ink-mute); }
.ct-tab[aria-selected="true"] { border-color: var(--navy); background: var(--navy); color: #fff; box-shadow: var(--shadow-2); }
.ct-tab[aria-selected="true"] small { color: var(--ink-on-dark-soft); }
.ct-tab[aria-selected="true"] .card__ic { background: var(--lime); color: var(--navy); }
.field__opt { font-size: .8125rem; font-weight: 600; color: var(--ink-mute); }
@media (max-width: 600px) { .ct-tabs { grid-template-columns: minmax(0, 1fr); padding: 12px 12px 0; } }
.cf { display: grid; gap: 18px; }
.cf-head { display: grid; gap: 4px; }
.cf-head .t-h4 { color: var(--navy); }
.cf-head p { font-size: .8125rem; color: var(--ink-mute); }
.cf-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 18px; }
.field--wide { grid-column: 1 / -1; }
.cf-send { margin-top: 20px; }
.cf-alert { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-radius: 14px; background: var(--danger-soft); color: var(--danger); font-weight: 700; }
.cf-done, .cf-fail { display: grid; gap: 12px; justify-items: start; padding: 28px; border-radius: 22px; background: var(--paper-soft); }
.cf-done p, .cf-fail p { color: var(--ink-soft); }
.cf-done:focus, .cf-fail:focus { outline: none; }
.cf-fail { background: var(--danger-soft); }
.cf-done__ic { display: grid; place-items: center; width: 56px; height: 50px; margin-inline-start: 8px; border-radius: 12px; background: var(--lime); color: var(--navy); transform: skewX(-24deg); }
.cf-done__ic .ic { transform: skewX(24deg); width: 26px; height: 26px; stroke-width: 2.4; }
.cf-fail .cf-done__ic { background: var(--danger); color: #fff; }
.cf-alert[hidden], .cf-done[hidden], .cf-fail[hidden], .cf-body[hidden] { display: none; }

/* ---------- Tablets and phones ---------- */
@media (max-width: 900px) {
  .ct__grid { grid-template-columns: minmax(0, 1fr); }
  .ct-app { height: 640px; }
}
@media (max-width: 760px) {
  .ct { padding-top: 100px; }
  .ct-side .t-display { font-size: clamp(1.75rem, 7.8vw, 2.25rem); }
  .ct-app { height: min(620px, calc(100svh - 120px)); border-radius: 26px; margin-inline: -6px; }
  .ct-app__head { padding: 12px 12px 12px 14px; gap: 10px; }
  .ct-app__who > span { display: none; }
  .ct-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .ct-short { display: inline !important; }
  .ct-switch button { padding: 7px 12px; }
  .ct-log { padding: 16px 12px; }
  .ct-msg { max-width: 88%; }
  .ct-sum > div { grid-template-columns: minmax(0, 1fr) auto; }
  .ct-sum dd { grid-column: 1; }
  .ct-sum .ct-edit { grid-row: 1 / 3; grid-column: 2; align-self: center; }
  .ct-composer { padding: 12px; }
  .ct-path small { display: none; }
  .ct-reach li { grid-template-columns: auto minmax(0, 1fr); }
  .ct-reach .ct-mini { grid-column: 2; justify-self: start; }
  .ct-reach li > .ct-minis { grid-column: 2; justify-content: flex-start; }
  .ct-reach .ct-minis .ct-mini { grid-column: auto; }
  .cf-grid { grid-template-columns: minmax(0, 1fr); }
  .ct-formpane { padding: 18px 16px 22px; }
  .cf-send { width: 100%; }
}
