/* Asteria contact section: the invitation on one side, the form on a paper card on the other.
   Tokens live in proto.css. */
.contact { --bad: #9b3b2c; background: var(--paper); padding-block: clamp(90px, 11vw, 150px); overflow-x: clip; }
.contact .inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 96px); align-items: start; }
.ct-head h2 { margin: 10px 0 16px; font-size: clamp(40px, 5.6vw, 88px); }
.ct-lead { margin: 0; max-width: 34ch; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.6; color: var(--taupe); }
.ct-facts { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 14px; }
.ct-facts li { display: grid; gap: 2px; padding-top: 14px; border-top: 1px solid var(--line); }
.ct-facts strong { font-size: 13px; font-weight: 500; color: var(--clay); }
.ct-facts span { font-size: 15px; }

.ct-card { position: relative; padding: clamp(22px, 3vw, 40px); border-radius: 32px; background: var(--sand); border: 1px solid var(--line); box-shadow: 0 30px 70px -40px rgba(47, 34, 27, 0.4); }
.ct-form[hidden], .ct-err[hidden] { display: none; }
.ct-form { display: grid; gap: 18px; }
.ct-field { display: grid; gap: 6px; }
.ct-field label, .ct-topics legend { font-size: 14px; font-weight: 500; color: var(--cocoa); }
.ct-field small { font-weight: 400; color: var(--taupe); }
.ct-field input, .ct-field textarea { width: 100%; min-height: 50px; padding: 12px 16px; border-radius: 16px; border: 1px solid var(--line); background: var(--paper); font: inherit; font-size: 16px; color: var(--cocoa); transition: border-color 0.25s, box-shadow 0.3s var(--ease); }
.ct-field textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
.ct-field input:focus-visible, .ct-field textarea:focus-visible { outline: none; border-color: var(--clay); box-shadow: 0 0 0 4px rgba(160, 99, 74, 0.16); }
#site[dir="rtl"] #ct-reach { text-align: end; }
.ct-field.is-bad input { border-color: var(--bad); }
.ct-err { margin: 0; font-size: 13px; color: var(--bad); }

.ct-topics { margin: 0; padding: 0; border: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ct-topics legend { padding: 0; margin-bottom: 8px; }
.ct-topics label { position: relative; cursor: pointer; }
.ct-topics input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.ct-topics span { display: inline-flex; align-items: center; min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font-size: 14px; transition: background 0.3s, color 0.3s, border-color 0.3s, scale 0.2s var(--ease); }
.ct-topics label:hover span { border-color: var(--taupe); }
.ct-topics input:checked + span { background: var(--cocoa); border-color: var(--cocoa); color: var(--paper); }
.ct-topics input:active + span { scale: 0.95; }
.ct-topics input:focus-visible + span { outline: 2px solid var(--clay); outline-offset: 2px; }

.ct-hp { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.ct-send { justify-self: start; display: inline-flex; align-items: center; gap: 10px; min-height: 54px; padding: 0 26px; border: 0; border-radius: 999px; background: var(--cocoa); color: var(--paper); font: inherit; font-size: 16px; cursor: pointer; transition: background 0.3s, scale 0.2s var(--ease); }
.ct-send:hover { background: var(--clay); }
.ct-send:active { scale: 0.96; }
.ct-send svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: translate 0.35s var(--ease); }
.ct-send:hover svg { translate: 4px 0; }
#site[dir="rtl"] .ct-send svg { transform: scaleX(-1); }
#site[dir="rtl"] .ct-send:hover svg { translate: -4px 0; }
.ct-send.is-busy { cursor: progress; background: var(--taupe); }
.ct-send.is-busy svg { animation: ctPulse 0.9s ease-in-out infinite; }
@keyframes ctPulse { 50% { opacity: 0.3; } }
.ct-note { margin: -6px 0 0; font-size: 13px; color: var(--taupe); }

.ct-done { display: grid; justify-items: center; text-align: center; gap: 8px; padding-block: clamp(30px, 5vw, 60px); outline: none; }
.ct-done[hidden] { display: none; }
.ct-done svg { width: 72px; height: 72px; margin-bottom: 8px; fill: none; stroke: var(--forest); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.ct-done circle { stroke: var(--sage); stroke-dasharray: 151; stroke-dashoffset: 151; }
.ct-done path { stroke-dasharray: 36; stroke-dashoffset: 36; }
.ct-done.is-drawn circle { animation: ctDraw 0.7s var(--ease) forwards; }
.ct-done.is-drawn path { animation: ctDraw 0.45s var(--ease) 0.45s forwards; }
@keyframes ctDraw { to { stroke-dashoffset: 0; } }
.ct-done h3 { margin: 0; font: 400 clamp(28px, 3vw, 38px)/1.1 var(--brand, var(--display)); }
.ct-done p { margin: 0; color: var(--taupe); }
.ct-again { margin-top: 14px; min-height: 46px; padding: 0 20px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font: inherit; font-size: 15px; color: var(--cocoa); cursor: pointer; transition: background 0.25s, scale 0.2s var(--ease); }
.ct-again:hover { background: var(--linen); }
.ct-again:active { scale: 0.95; }

@media (max-width: 860px) {
  .contact .inner { grid-template-columns: 1fr; }
  .ct-head h2 { font-size: 40px; }
  .ct-send { justify-self: stretch; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .ct-done circle, .ct-done path { stroke-dashoffset: 0; animation: none !important; }
}
