/* Contact block (ct-): message, quote, newsletter, card. Tokens only; phone breakpoint 720. */
.ct { --ct-col: clamp(32px, 5vw, 72px); }
.ct-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--ct-col); align-items: start;
  grid-template-areas: "head sheet" "act sheet" "side sheet"; grid-template-rows: auto auto 1fr; }
.ct-head { grid-area: head; display: flex; flex-direction: column; gap: 12px; max-width: var(--w-prose); }
.ct-head:empty { display: none; }
.ct-act { grid-area: act; margin-top: 28px; }
.ct-sheet { grid-area: sheet; }
.ct-side { grid-area: side; margin-top: 36px; min-width: 0; }
.ct-hint { margin: 0; font-size: 14px; color: var(--muted); }

/* no side column: the form sits alone, centred and narrow */
.ct-grid:not([data-side]) { grid-template-columns: minmax(0, 640px); justify-content: center; grid-template-areas: "head" "sheet"; grid-template-rows: auto; row-gap: 28px; }
/* newsletter: the heading and one line beside each other; the side, if any, runs beneath */
.ct[data-variant="newsletter"] .ct-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; grid-template-areas: "head sheet" "act act" "side side"; grid-template-rows: auto; justify-content: stretch; }
.ct[data-variant="newsletter"] .ct-act { margin-top: 36px; }
.ct[data-variant="newsletter"] .ct-side { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); column-gap: 40px; row-gap: 28px; align-items: start; }
.ct[data-variant="newsletter"] .ct-hours, .ct[data-variant="newsletter"] .ct-map { margin-top: 0; }
.ct[data-variant="newsletter"] .ct-sheet { background: none; box-shadow: none; padding: 0; border-radius: 0; }
/* card: no form, so the details become the second column */
.ct[data-variant="card"] .ct-grid { grid-template-areas: "head side" "act side"; grid-template-rows: auto 1fr; }
.ct[data-variant="card"] .ct-side { margin-top: 0; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(20px, 3vw, 32px); }
.ct[data-variant="card"] .ct-grid:not([data-side]) { grid-template-areas: "head"; }

/* the sheet and the form */
.ct-sheet { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(20px, 3vw, 36px); min-width: 0; }
.ct-form { display: grid; gap: 16px; position: relative; }
.ct-opt { font-weight: 400; }
.k-field label .ct-opt { color: var(--muted); font-size: 13px; }
.k-err:not(:empty) { animation: k-fade var(--d) ease; }
.ct-consent { margin: 0; font-size: 14px; color: var(--muted); max-width: 56ch; }
.ct-consent a { color: inherit; text-decoration-color: color-mix(in srgb, var(--ink) 35%, transparent); }
.ct-send { width: 100%; }
.ct-send .k-spin { display: none; }
.ct-t-busy { display: none; }
.ct[data-state="busy"] .ct-send { opacity: .85; cursor: progress; }
.ct[data-state="busy"] .ct-send .k-spin { display: inline-block; }
.ct[data-state="busy"] .ct-t-idle { display: none; }
.ct[data-state="busy"] .ct-t-busy { display: inline; }
.ct-form.ct-leave { animation: k-out .2s var(--ease) forwards; }

/* the honeypot: out of sight and out of the tab order, but present for anything that fills every field */
.ct-hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* error state: the form stays, an alert with a retry sits above the button */
.ct-status { display: grid; }
.ct-fail { display: none; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ct[data-state="error"] .ct-fail { display: flex; animation: k-fade var(--d) ease; }
.ct-fail-msg { flex: 1 1 220px; }

/* newsletter: one line */
.ct-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; row-gap: 6px; align-items: start; }
.ct-line .k-field { display: contents; }
.ct-line label { grid-column: 1 / -1; grid-row: 1; }
.ct-line input { grid-column: 1; grid-row: 2; min-height: 56px; }
.ct-line .ct-send { grid-column: 2; grid-row: 2; width: auto; }
.ct-line .k-err { grid-column: 1 / -1; grid-row: 3; }
.ct[data-variant="newsletter"] .ct-form { gap: 12px; }

/* photos */
.ct-photos { display: grid; gap: 10px; justify-items: start; }
.ct-photos[hidden] { display: none; }
.ct-lab { font-size: 14px; font-weight: 500; color: var(--muted); }
.ct-thumbs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; width: 100%; }
.ct-thumbs:empty { display: none; }
.ct-thumb { display: grid; grid-template-columns: 56px minmax(0, 1fr) 44px; gap: 12px; align-items: center; padding: 6px 4px 6px 6px; border: 1px solid var(--line); border-radius: var(--radius-sm); animation: k-in var(--d-enter) var(--ease) backwards; }
.ct-th { width: 56px; height: 56px; border-radius: 8px; overflow: hidden; background: var(--placeholder); display: grid; place-items: center; color: var(--muted); }
.ct-th img { width: 100%; height: 100%; object-fit: cover; }
.ct-th-meta { display: flex; flex-direction: column; min-width: 0; }
.ct-th-name { font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-th-size { font-size: 13px; color: var(--muted); }
.ct-rm { width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); display: grid; place-items: center; transition: background-color var(--d-fast) ease, color var(--d-fast) ease; }
.ct-add { cursor: pointer; position: relative; }
.ct-add[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.ct-add:has(input:focus-visible) { outline: 2px solid var(--brand); outline-offset: 3px; }
.ct-photos .k-err { margin: 0; }

/* success: replaces the form; the mark springs (base .k-mark.celebrate), then the words rise */
.ct-done { display: none; flex-direction: column; align-items: flex-start; gap: 28px; padding: 14px 0 6px; }
.ct[data-state="sent"] .ct-form { display: none; }
.ct[data-state="sent"] .ct-done { display: flex; }
.ct-done .k-mark { margin: 10px; flex: none; }
.ct-done-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ct-done-body > * { animation: k-in var(--d-enter) .4s var(--ease) backwards; }
.ct-done-body > :nth-child(2) { animation-delay: .5s; }
.ct-done-body > :nth-child(3) { animation-delay: .6s; }
.ct-done-t { font-size: clamp(26px, 3vw, 32px); line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; outline: none; }
.ct-done-p { color: var(--muted); font-size: var(--t-lead); max-width: 40ch; }
.ct-faster { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-top: 14px; padding-top: 20px; border-top: 1px solid var(--line); }
.ct-faster p { margin: 0; font-weight: 600; }
.ct[data-variant="newsletter"] .ct-done { flex-direction: row; align-items: center; gap: 22px; padding: 0; }
.ct[data-variant="newsletter"] .ct-done .k-mark { width: 56px; height: 56px; margin: 8px; box-shadow: 0 0 0 8px var(--brand-soft); }
.ct[data-variant="newsletter"] .ct-done-t { font-size: 22px; }
.ct[data-variant="newsletter"] .ct-done-p { font-size: 16px; }

/* WhatsApp */
.ct-wa .ct-wa-mark { flex: none; }
.ct-act .ct-wa { width: 100%; max-width: 380px; }

/* side: a ruled directory, not a stack of cards */
.ct-list { list-style: none; margin: 0; padding: 0; display: grid; border-bottom: 1px solid var(--line); }
.ct-list li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 14px; padding: 12px 0 4px; border-top: 1px solid var(--line); }
.ct[data-variant="card"] .ct-list li:first-child { border-top: 0; padding-top: 0; }
.ct[data-state="sent"]:not([data-variant="newsletter"]) .ct-act { display: none; } /* the sent panel offers WhatsApp itself */
.ct-ico { color: var(--brand); display: grid; height: 24px; place-items: center; margin-top: 1px; }
.ct-key { display: block; font-size: 14px; font-weight: 500; color: var(--muted); }
.ct-val { display: flex; align-items: center; min-height: 44px; font-size: 17px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; text-decoration: none; }
a.ct-val { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; text-decoration-color: color-mix(in srgb, var(--ink) 30%, transparent); transition: text-decoration-color var(--d-fast) ease, color var(--d-fast) ease; }
span.ct-val { min-height: 0; padding-bottom: 8px; align-items: flex-start; }
.ct-sub { font-size: 14px; font-weight: 500; color: var(--muted); letter-spacing: 0; margin: 0 0 6px; }
.ct-hours { margin-top: 28px; }
.ct-hours dl { margin: 0; display: grid; }
.ct-hr { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.ct-hr:last-child { border-bottom: 1px solid var(--line); }
.ct-hr dt { color: var(--ink); }
.ct-hr dd { margin: 0; color: var(--muted); text-align: right; }
.ct-empty { margin: 0; color: var(--muted); padding: 20px; border: 1px dashed var(--field); border-radius: var(--radius-sm); }

/* map: nothing is requested from Google until the tap */
.ct-map { margin-top: 28px; display: grid; gap: 8px; }
.ct-map-slot, .ct-map-frame { aspect-ratio: 4 / 3; width: 100%; border-radius: var(--radius); }
.ct-map-slot { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; background: var(--placeholder); color: var(--ink); font-weight: 600; text-decoration: none; transition: background-color var(--d) ease; }
.ct-map-slot strong { font-size: 17px; }
.ct-map-slot svg { color: var(--brand); }
.ct-map-frame { border: 0; display: block; background: var(--placeholder); animation: k-fade .4s ease; }
.ct[data-variant="card"] .ct-map-slot, .ct[data-variant="card"] .ct-map-frame { aspect-ratio: 16 / 10; }

@media (hover: hover) and (pointer: fine) {
  a.ct-val:hover { color: var(--brand); text-decoration-color: currentColor; }
  .ct-map-slot:hover { background: color-mix(in srgb, var(--placeholder) 78%, var(--ink)); }
  .ct-rm:hover { background: var(--line); color: var(--ink); }
}

@media (max-width: 720px) {
  .ct-grid, .ct[data-variant="newsletter"] .ct-grid, .ct[data-variant="card"] .ct-grid { grid-template-columns: minmax(0, 1fr); row-gap: 24px; grid-template-rows: auto;
    grid-template-areas: "head" "act" "sheet" "side"; }
  .ct-grid:not([data-side]), .ct[data-variant="card"] .ct-grid:not([data-side]) { grid-template-areas: "head" "sheet"; }
  .ct[data-variant="card"] .ct-grid { grid-template-areas: "head" "act" "side"; }
  .ct[data-variant="card"] .ct-grid:not([data-side]) { grid-template-areas: "head"; }
  .ct-act, .ct-side, .ct[data-variant="newsletter"] .ct-act { margin-top: 0; }
  .ct-act .ct-wa { max-width: none; }
  .ct-sheet { padding: 20px; }
  .ct[data-variant="newsletter"] .ct-sheet { padding: 0; }
  .ct-line { grid-template-columns: minmax(0, 1fr); }
  .ct-line .ct-send { grid-column: 1; grid-row: 3; width: 100%; margin-top: 6px; }
  .ct-line .k-err { grid-row: 4; }
  .ct[data-variant="newsletter"] .ct-side { display: block; }
  .ct[data-variant="newsletter"] .ct-hours, .ct[data-variant="newsletter"] .ct-map { margin-top: 28px; }
  .ct[data-variant="card"] .ct-side { padding: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  .ct-done-body > *, .ct-thumb { animation: k-fade .3s ease backwards; }
  .ct-form.ct-leave { animation: none; }
}
