/* SHAKAZAMBA — Contatti
   Page-specific layer for the Contatti page.

   OWN-WORLD: none. The page is composed of components that already exist —
   `.lab-blueprint-hero`, `.lab-section-intro`, `.twiza-field`, `.twiza-section`,
   `.twiza-governance-layout`, `.twiza-governance-list-wrap` (the glass panel that
   holds the form), `.solution-panel__copy` (the aside copy and its bordered list),
   `.foundation-grid` / `.foundation-card`, `.lab-primary`, `.reveal`.

   WHY THIS FILE EXISTS: the static site has no form styling at all — there is no
   input, label, select, textarea, checkbox or form-status rule anywhere in
   css/. Those are added here, and only those, using the existing tokens
   (--lab-accent, --lab-accent-live, --lab-light, --lab-muted, --lab-rule-dark,
   --glass-radius) and the restrained field treatment the previous Contatti page
   already used: transparent control, single bottom rule, accent on focus.
   ========================================================================== */

/* ==========================================================================
   1 — THE PANEL THAT HOLDS THE FORM
   `.twiza-governance-list-wrap` supplies the glass surface, border, radius and
   shadow; its padding normally comes from the `.twiza-governance-item` rows it
   contains. The form is a single block, so it carries the padding itself.
   ========================================================================== */
.contact-panel {
  padding: clamp(26px, 2.6vw, 44px);
}

/* ==========================================================================
   2 — THE ASIDE
   Copy and the bordered list come from `.solution-panel__copy`. Only the
   contact/company block below them is new: a definition list of label + value,
   on the same micro-label treatment the footer already uses for its columns.
   ========================================================================== */
.contact-aside {
  display: grid;
  gap: clamp(28px, 2.6vw, 40px);
  align-content: start;
}

.contact-aside > p {
  margin: 0;
}

.contact-aside > ul {
  margin: 0;
}

.contact-details {
  display: grid;
  gap: 22px;
  margin: 0;
}

.contact-details > div {
  display: grid;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--lab-rule-dark);
}

.contact-details dt {
  color: var(--lab-accent-live);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.contact-details dd {
  margin: 0;
  color: var(--lab-light);
  font-size: 16px;
  line-height: 1.55;
}

.contact-details dd a {
  border-bottom: 1px solid rgba(255, 255, 255, .28);
  transition: color .22s ease, border-color .22s ease;
}

.contact-details dd a:hover {
  color: var(--lab-accent-live);
  border-color: var(--lab-accent-live);
}

.contact-details small {
  display: block;
  margin-top: 6px;
  color: var(--lab-dark-muted);
  font-size: 13px;
  line-height: 1.5;
}

/* ==========================================================================
   3 — THE FORM
   Two columns on wide viewports, one on narrow. Labels are real labels; the
   placeholder is only ever an example, never the field name.
   ========================================================================== */
.contact-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(22px, 2.2vw, 32px);
}

.contact-form__grid > .contact-field--wide {
  grid-column: 1 / -1;
}

.contact-field {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.contact-field > label {
  color: var(--lab-dark-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.contact-field > label span {
  color: var(--lab-accent-live);
}

.contact-field input,
.contact-field select,
.contact-field textarea {
  width: 100%;
  padding: 12px 2px;
  border: 0;
  border-bottom: 1px solid var(--lab-rule-dark);
  border-radius: 0;
  background: transparent;
  color: var(--lab-light);
  font: inherit;
  font-size: 16px;
  outline: 0;
  transition: border-color .22s ease, background .22s ease;
}

.contact-field input,
.contact-field select {
  min-height: 48px;
}

.contact-field textarea {
  min-height: 132px;
  padding: 14px 2px;
  line-height: 1.55;
  resize: vertical;
}

.contact-field input::placeholder,
.contact-field textarea::placeholder {
  color: #6f666c;
}

/* The chevron is the one the header's nav group already draws, inlined so the
   select does not depend on a new asset or a new shape. */
.contact-field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 28px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ef1873' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
  background-size: 16px;
  cursor: pointer;
}

.contact-field select option {
  background: #14111a;
  color: var(--lab-light);
}

.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
  border-color: var(--lab-accent-live);
  background: rgb(211 15 99 / 4%);
}

.contact-field input:focus-visible,
.contact-field select:focus-visible,
.contact-field textarea:focus-visible {
  outline: 2px solid var(--lab-accent-live);
  outline-offset: 3px;
}

.contact-field [aria-invalid="true"] {
  border-color: var(--lab-accent-live);
}

.contact-field__error {
  margin: 0;
  color: var(--lab-accent-live);
  font-size: 13px;
  line-height: 1.45;
}

.contact-field__error[hidden] {
  display: none;
}

/* ==========================================================================
   3b — THE CHOICE GROUP
   One question whose answer is a set rather than a value ("dove vive oggi la
   conoscenza?"). It is a <fieldset> so the question is announced with each
   option; the browser's own fieldset chrome is removed and the legend takes
   the same micro-label treatment every other field label already has.
   ========================================================================== */
.contact-choice {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

/* A <legend> sits outside the fieldset's normal flow, so the grid `gap` that
   separates every other label from its control does not reach it — the options
   were landing flush against the question. The distance is set on the legend
   itself instead. */
.contact-choice legend {
  padding: 0 0 14px;
  color: var(--lab-dark-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.contact-choice__list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px clamp(22px, 2.2vw, 32px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-choice__list label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  color: var(--lab-light);
  font-size: 15px;
  line-height: 1.45;
  cursor: pointer;
}

/* `.contact-choice` also carries `.contact-field`, so these checkboxes inherit
   the text-input treatment — 48px tall, padded, with a bottom rule. All of it
   has to come back off before the box can sit on its own label's first line. */
.contact-choice__list input {
  width: 18px;
  height: 18px;
  min-height: 0;
  margin: 1px 0 0;
  padding: 0;
  border: 0;
  background: none;
  accent-color: var(--lab-accent);
  cursor: pointer;
}

.contact-choice__list input:focus-visible {
  outline: 2px solid var(--lab-accent-live);
  outline-offset: 3px;
}

/* ==========================================================================
   4 — CONSENT, SUBMIT, STATUS
   ========================================================================== */
/* No rule of its own: the last field already ends on one, and two hairlines a
   few pixels apart read as a mistake. The space does the separating. */
.contact-consent {
  display: grid;
  gap: 10px;
  margin-top: clamp(30px, 2.8vw, 42px);
}

.contact-consent label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  color: var(--lab-dark-muted);
  font-size: 14px;
  line-height: 1.55;
  cursor: pointer;
}

.contact-consent input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--lab-accent);
  cursor: pointer;
}

.contact-consent input:focus-visible {
  outline: 2px solid var(--lab-accent-live);
  outline-offset: 3px;
}

.contact-consent span b {
  color: var(--lab-accent-live);
  font-weight: 400;
}

.contact-form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: clamp(26px, 2.4vw, 36px);
}

.contact-form__foot button {
  border: 1px solid var(--lab-accent);
  cursor: pointer;
}

.contact-form__required {
  margin: 0;
  color: var(--lab-dark-muted);
  font-size: 13px;
}

.contact-form__required span {
  color: var(--lab-accent-live);
}

.contact-status {
  margin: clamp(22px, 2vw, 30px) 0 0;
  padding: 18px 20px;
  border: 1px solid var(--lab-rule-dark);
  border-radius: var(--glass-radius);
  color: var(--lab-light);
  font-size: 15px;
  line-height: 1.6;
}

.contact-status[hidden] {
  display: none;
}

.contact-status[data-state="success"],
.contact-status[data-state="error"] {
  border-color: var(--lab-accent-live);
}

.contact-status a {
  color: var(--lab-accent-live);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==========================================================================
   5 — RESPONSIVE
   The site's named steps: 1100px (foundation grid), 960px, 720px.
   On narrow viewports the aside comes first and the form second, which is the
   source order, so no reordering is needed.
   ========================================================================== */
@media (max-width: 1100px) {
  .contact-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(40px, 5vw, 64px);
  }
}

@media (max-width: 720px) {
  .contact-form__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact-choice__list {
    grid-template-columns: minmax(0, 1fr);
  }

  .contact-form__foot {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .contact-form__foot button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {

  .contact-field input,
  .contact-field select,
  .contact-field textarea,
  .contact-details dd a {
    transition: none;
  }
}
