/* contact.css - the contact page (/contact/, /it/contatti/; plan site/plan/contact.md). Loaded by those two pages
   only. Tokens from site.css and the kit; no new colour. Every class here starts with ct- or is scoped to a ct- section.
   1. the hero's collage pieces (hero--triptych from the kit; the crossfade is layout.js's)
   2. the address chapters (the kit's pinned-chapters moment): the frame and the three pictures
   3. the form section: the partial (.cf) laid out as a head row over a full-width field grid
   No effect follows the pointer or the scroll here except the dealt moment inside its own section. */

/* ================================================================ 1. hero collage */
.ct-hero .ly-collage { container-type: inline-size; }
.ct-hero .ly-collage .ly-piece.ct-pc {
  --fx-bg: var(--p-surface); --fx-surface: var(--p-bg); --fx-ink: var(--p-ink); --fx-muted: #9aa1ab;
  --fx-accent: var(--p-accent); --fx-accent-ink: var(--p-accent-ink);
  background: var(--p-surface); color: var(--p-ink);
  border: 1px solid rgb(233 237 243 / .1); border-radius: 12px;
  box-shadow: 0 30px 60px -30px rgb(0 0 0 / .75), 0 0 0 1px rgb(233 237 243 / .03);
  font: 400 max(13px, 2.1cqw)/1.4 var(--font-text);
}
/* set 1, piece A: the study view's document (bar, toolbar, white page), as the home's window draws it */
.ct-pc--doc { display: flex; flex-direction: column; }
.ct-bar { display: flex; align-items: center; gap: 8px; flex: none; height: max(34px, 6cqw); padding: 0 max(12px, 2.2cqw);
  border-bottom: 1px solid rgb(233 237 243 / .08); color: #9aa1ab; white-space: nowrap; min-width: 0; }
.ct-bar img { width: 15px; height: 14px; flex: none; }
.ct-bar b { font-weight: 500; color: var(--p-ink); overflow: hidden; text-overflow: ellipsis; }
.ct-tools { display: flex; align-items: center; gap: 6px; flex: none; padding: max(8px, 1.4cqw) max(12px, 2.2cqw); color: #9aa1ab; white-space: nowrap; min-width: 0; }
.ct-tools__c { display: inline-flex; align-items: center; height: max(24px, 4cqw); padding: 0 max(8px, 1.4cqw); border-radius: 6px; box-shadow: inset 0 0 0 1px rgb(233 237 243 / .15); }
.ct-tools__n { padding: 0 6px; color: var(--p-ink); font-variant-numeric: tabular-nums; }
.ct-tools__sp { flex: 1; }
.ct-paper { flex: 1 1 auto; min-height: 0; margin: 0 max(12px, 2.2cqw); padding: max(14px, 3cqw) max(14px, 3cqw) 0;
  border-radius: 6px 6px 0 0; background: #ffffff; color: #15181d; display: grid; align-content: start; gap: max(8px, 1.6cqw); overflow: hidden; }
.ct-paper__h { font-weight: 500; font-size: max(14px, 2.6cqw); line-height: 1.3; letter-spacing: -0.01em; }
.ct-paper__s { font-weight: 500; }
.ct-paper__t { color: #4b525c; }
.ct-sel { color: inherit; background: rgb(15 181 168 / .2); box-shadow: inset 0 -1.5px 0 #0fb5a8; border-radius: 3px; padding: 0 2px; margin: 0 -2px;
  -webkit-box-decoration-break: clone; box-decoration-break: clone; }
/* piece B: the selection menu the app opens on selected text (white, over the page's empty lower part) */
.ct-hero .ly-collage .ly-piece.ct-pc--menu { background: #ffffff; color: #15181d; border-color: rgb(0 0 0 / .08); display: grid; gap: 2px; padding: max(6px, 1cqw); }
.ct-menu__i { display: flex; align-items: center; gap: 8px; padding: max(6px, 1cqw) max(8px, 1.4cqw); border-radius: 6px; white-space: nowrap; }
.ct-menu__i.is-on { background: rgb(15 181 168 / .14); }
.ct-menu__i svg { width: 15px; height: 15px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
/* piece C: the tutor panel, MMAI tutor open; the input's right end stays clear for the pause disc */
.ct-pc--tutor { display: flex; flex-direction: column; }
.ct-tabs { display: flex; flex-wrap: wrap; gap: 2px; padding: max(10px, 1.6cqw); border-bottom: 1px solid rgb(233 237 243 / .08); color: #9aa1ab; white-space: nowrap; }
.ct-tabs span { padding: 3px max(7px, 1.2cqw); border-radius: 6px; }
.ct-tabs .is-on { background: rgb(233 237 243 / .11); color: var(--p-ink); font-weight: 500; }
.ct-tutor__line { padding: max(14px, 2.6cqw) max(12px, 2.2cqw); color: color-mix(in oklab, var(--p-ink) 80%, var(--p-surface)); }
.ct-input { margin: auto max(10px, 1.6cqw) max(10px, 1.6cqw); padding: 0 52px 0 max(10px, 1.6cqw); height: max(36px, 6cqw); display: flex; align-items: center;
  border-radius: 10px; background: color-mix(in oklab, var(--p-ink) 4%, var(--p-surface)); box-shadow: inset 0 0 0 1px rgb(233 237 243 / .15); color: #9aa1ab; white-space: nowrap; overflow: hidden; }
/* set 2: the proof cards (a 13px label over one sentence) */
.ct-pc--proof { display: grid; align-content: start; gap: max(8px, 1.4cqw); padding: max(14px, 3.6cqw); }
.ct-proof__l { display: flex; align-items: center; gap: 8px; font: 500 13px/1.4 var(--font-mono); letter-spacing: .02em; color: var(--src); }
.ct-proof__t { font-size: max(15px, 2.9cqw); line-height: 1.35; color: var(--p-ink); text-wrap: pretty; }
.ct-big { display: block; margin-bottom: max(4px, .6cqw); font: var(--display-weight) max(28px, 6.6cqw)/1 var(--font-display); letter-spacing: var(--display-tracking-xl); color: var(--p-ink); }
.ct-pc--end { padding-right: max(56px, 9cqw); }   /* the pause disc sits on this piece's lower-right corner */
.ct-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--p-accent); flex: none; }
/* set 3: the form drawing, the sent line, the company card */
.ct-pc--form { display: flex; flex-direction: column; gap: max(6px, 1cqw); padding: max(14px, 3.2cqw); }
.ct-f__l { color: #9aa1ab; font-size: 13px; }
.ct-f__box { flex: none; height: max(32px, 5.6cqw); border-radius: 8px; background: var(--p-bg); box-shadow: inset 0 0 0 1px rgb(233 237 243 / .15); margin-bottom: max(4px, .8cqw); }
.ct-f__box--area { flex: 1 1 auto; min-height: max(48px, 8cqw); }
.ct-f__btn { align-self: flex-start; display: inline-flex; align-items: center; height: max(36px, 6cqw); padding: 0 max(14px, 2.6cqw); border-radius: var(--r-btn, 8px);
  background: rgb(233 237 243 / .12); color: var(--p-ink); font-weight: 500; }
.ct-pc--sent { display: flex; align-items: flex-start; gap: 10px; padding: max(14px, 3cqw); font-size: max(14px, 2.5cqw); line-height: 1.4; }
.ct-sent__ic { width: 20px; height: 20px; flex: none; margin-top: 1px; fill: none; stroke: var(--p-accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ct-pc--co { display: flex; align-items: center; gap: max(10px, 2cqw); padding-left: max(14px, 3.6cqw); font-size: max(14px, 2.6cqw); font-weight: 500; }
/* the mark keeps a small fixed size (the kit's .ly-piece > img fills the piece: this selector outranks it) */
.ct-hero .ly-collage .ly-piece.ct-pc--co > img { width: 28px; height: auto; object-fit: contain; flex: none; }
.ct-pc--co > span { min-width: 0; flex: 1 1 auto; }
/* 1024 to 1279 the collage is narrower: the document keeps its first and last sections, so the menu (top 58%)
   never lies over a line of the page */
@media (max-width: 1279px) { .ct-paper__b--2 { display: none; } }
/* a phone holds set 1 only (layout.js): the document keeps its heading and the selected section, the menu moves
   under it, the panel shows its open tab and the start line */
@media (max-width: 639px) {
  .ct-tools, .ct-paper__b--1 { display: none; }
  .ct-hero .ly-collage .ly-piece.ct-pc--menu { left: 4% !important; top: auto !important; bottom: 4%; width: 52% !important; }
  .ct-menu__i { white-space: normal; }
  .ct-tabs span:not(.is-on) { display: none; }
  .ct-tutor__line { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 8; overflow: hidden; padding-inline: 10px; }
  .ct-input { padding-right: 10px; white-space: normal; height: auto; min-height: 36px; padding-block: 6px; line-height: 1.25; }
}

/* ================================================================ 2. the address chapters */
.ct-addr__head { display: grid; gap: var(--s-4); }
.ct-addr__lead { font-size: var(--t-lead); line-height: 1.5; color: var(--ink); max-width: 46ch; }
/* the addresses are links of their own, outside the step's p, always visible and focusable */
.ct-addr .mo-pc__step > .link { justify-self: start; font-family: var(--font-mono); font-size: var(--t-small); overflow-wrap: anywhere; }
.ct-addr .mo-pc__step > .ct-more { font-family: var(--font-text); font-size: var(--t-body); }
@media (min-width: 640px) {
  .ct-addr:not(.is-live) .mo-pc__step > :not(.mo-pc__visual) { grid-column: 1; }
  .ct-addr:not(.is-live) .mo-pc__step .mo-pc__visual { grid-row: 1 / span 4; align-self: start; }
  .ct-addr:not(.is-live) .mo-pc__step h3 { align-self: start; }
}
/* the shared frame (live) and each picture at rest: the home window's dark surface with a soft teal light */
.ct-frame, .ct-vis {
  background: radial-gradient(120% 90% at 70% 0%, rgb(23 234 217 / .08), rgb(23 234 217 / 0) 60%), var(--p-surface);
  border: 1px solid var(--line);
}
.ct-addr.is-live .ct-frame { border-radius: var(--r-lg); overflow: hidden; }
.ct-vis { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: var(--r-md); }
@media (min-width: 640px) { .ct-addr:not(.is-live) .ct-vis { max-height: 30svh; min-height: 200px; } }
/* in the live frame each picture fills the frame (kit: absolute, inset 0) on the frame's own ground */
.ct-addr.is-live .ct-vis { aspect-ratio: auto; border: 0; border-radius: 0; max-height: none; min-height: 0; }
/* the fragment rises from 40px under the picture's top and runs past its foot, fading out there */
.ct-stage { position: absolute; left: 50%; top: 40px; bottom: -40px; width: min(400px, calc(100% - 48px)); transform: translateX(-50%);
  -webkit-mask-image: linear-gradient(to bottom, #000 72%, transparent 96%); mask-image: linear-gradient(to bottom, #000 72%, transparent 96%); }
.ct-stage--doc { width: min(440px, calc(100% - 48px)); }
/* at rest (phone, tablet, reduced motion, no script) the picture is 16:9 and short: the fragment is drawn at 82%
   from 14px under the top, so the question and the answer (or the page's lines) stay in view above the fade */
.ct-addr:not(.is-live) .ct-stage {
  top: 14px; bottom: -56px; transform: translateX(-50%) scale(.82); transform-origin: 50% 0;
  width: min(488px, calc((100% - 48px) / .82));
  -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent 100%); mask-image: linear-gradient(to bottom, #000 80%, transparent 100%);
}
.ct-addr:not(.is-live) .ct-stage--doc { width: min(536px, calc((100% - 48px) / .82)); }
/* the tutor chat: the home window's dark look */
.ct-chat.ui, .ct-note.ui {
  --fx-bg: #1b2231; --fx-surface: var(--p-bg); --fx-ink: var(--p-ink); --fx-muted: #9aa1ab;
  --fx-accent: var(--p-accent); --fx-accent-ink: var(--p-accent-ink); --ui-font: var(--font-text); --ui-radius: 12px;
}
.ct-chat.ui-chat { width: 100%; height: 100%; }
.ct-chat .ui-head { gap: 10px; }
.ct-chat .ui-meta { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.ct-av { width: 20px; height: 19px; flex: none; }
.ct-chat .ui-msg--me { max-width: 85%; }
.ct-chat .ui-msg--bot { max-width: 100%; }
.ct-chat .ui-msg__av { margin-top: 2px; }
/* the privacy page: white paper, the address the one mark */
.ct-doc.ui {
  --fx-bg: #ffffff; --fx-ink: #15181d; --fx-muted: #5f6670; --fx-accent: #0fb5a8; --fx-accent-ink: #ffffff; --ui-font: var(--font-text);
  width: 100%; height: 100%; padding-right: 0;
}
.ct-doc .ui-doc__text b { font-weight: 600; color: #15181d; }
/* the note beside the page: only in the live frame, where the picture is tall enough to hold it clear of the lines */
.ct-note.ui-doc__note { position: absolute; top: auto; right: 24px; bottom: 32px; width: min(240px, calc(100% - 48px)); z-index: 2; display: none; }
.ct-addr.is-live .ct-note { display: block; }
/* the business diagram: held still (pulse none); the list under it is the picture without JavaScript */
.ct-dg { position: absolute; inset: 16px; }
/* a phone: the diagram turns vertical, so its picture is square there (five sources and business@ in view) */
@media (max-width: 639px) { .ct-addr:not(.is-live) .ct-vis--dg { aspect-ratio: 1 / 1; } }
.ct-fan { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-content: center; gap: 12px 8px; padding: 8px; text-align: center; }
.ct-fan span { display: flex; align-items: center; justify-content: center; min-height: 36px; padding: 6px 8px; border-radius: 8px; font-size: 13px; line-height: 1.3;
  background: color-mix(in oklab, var(--p-ink) 6%, var(--p-surface)); box-shadow: inset 0 0 0 1px var(--line); color: var(--p-ink); overflow-wrap: anywhere; }
.ct-fan .ct-fan__to { grid-column: 2 / span 3; background: var(--p-accent); color: var(--p-accent-ink); font-weight: 500; box-shadow: none; }
.ct-fan .ct-fan__then { grid-column: 2 / span 3; }
@media (max-width: 639px) { .ct-fan { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; } .ct-fan .ct-fan__to, .ct-fan .ct-fan__then { grid-column: 1 / -1; } .ct-fan span { min-height: 28px; padding: 4px 6px; } }

/* ================================================================ 3. the form: head row over a full-width field grid
   The partial (src/partials/contact-form.*.html) is pasted unchanged; contact-form.css gives it the site's tokens,
   this lays it out on the kit grid. No panel behind it: the section's surface ground is the only box. */
/* the section's .wrap is the 12-column grid; the pasted .cf is display: contents, so its parts and the page's own
   note line (.ct-msg__note, outside the partial) share that grid: title, intro, note, then the rest (order) */
main > section.ct-msg.ct-msg > .wrap.grid { row-gap: 0; }
.ct-msg .cf { display: contents; }
.ct-msg .cf > *, .ct-msg__grid > .ct-msg__note { grid-column: 1 / -1; min-width: 0; }
.ct-msg .cf > :nth-child(n+3) { order: 2; }
.ct-msg__grid > .ct-msg__note { order: 1; margin: var(--s-3) 0 0; font-size: var(--t-small); line-height: 1.5; color: var(--src); }
@media (min-width: 1024px) { .ct-msg__grid > .ct-msg__note { grid-column: 1 / span 6; } }
.ct-msg .cf-title { margin: 0; font: var(--display-weight) var(--t-h2)/1.1 var(--font-display); letter-spacing: var(--display-tracking-xl); color: var(--ink); }
.ct-msg .cf-intro { margin: var(--s-4) 0 0; font-size: var(--t-lead); line-height: 1.5; color: var(--ink); max-width: 46ch; }
.ct-msg .cf-notice { margin: var(--s-6) 0 0; }
.ct-msg .cf-form { margin-top: 48px; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); row-gap: var(--s-6); }
.ct-msg .cf-form > * { grid-column: 1 / -1; min-width: 0; }
.ct-msg .cf-label, .ct-msg .cf-check-label { font-size: 14px; font-weight: 500; }
.ct-msg .cf-check-label { font-weight: 400; font-size: var(--t-small); }
.ct-msg .cf-input { min-height: 48px; font-size: 16px; border-radius: var(--r-sm); background: var(--p-bg); }
.ct-msg .cf-textarea { min-height: 140px; }
.ct-msg .cf-actions { align-self: start; }
.ct-msg .cf-submit { min-height: 48px; padding: 0 var(--s-6); border-radius: var(--r-btn, 8px); font-weight: 500; font-size: var(--t-body);
  background: var(--action); color: var(--action-ink); }
.ct-msg .cf-fallback { margin-top: var(--s-6); color: var(--ink); }
/* two-up from 640; four across (Name, Email, Organisation, Topic) only from 1280, where the longest label
   (Italian "Scuola, azienda o ente (facoltativo)") stays on one line in a span-3 field */
@media (min-width: 640px) {
  .ct-msg .cf-form > .cf-field:nth-child(-n+4) { grid-column: span 6; }
}
@media (min-width: 1280px) {
  .ct-msg .cf-form > .cf-field:nth-child(-n+4) { grid-column: span 3; }
}
@media (min-width: 1024px) {
  .ct-msg .cf-title, .ct-msg .cf-intro { grid-column: 1 / span 6; }
  .ct-msg .cf-form > .cf-field--check { grid-column: 1 / span 8; align-self: center; }
  .ct-msg .cf-form > .cf-actions { grid-column: 9 / span 4; justify-content: flex-end; align-self: center; }
  .ct-msg .cf-actions .cf-status { flex: 1 1 100%; text-align: right; }
}
@media (max-width: 639px) {
  .ct-msg .cf-form { margin-top: var(--s-7); row-gap: var(--s-5); }
  .ct-msg .cf-submit { width: 100%; }
}
