/* Shared colors/fonts/ease/mx come from /tokens.css. Only this
   page's own overrides live here. The form styles below moved out
   of ombre1.html's #contact section when the form got its own page. */
:root {
  --sp: clamp(64px, 12vw, 160px);
}
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  background: var(--ombra);
  color: var(--luce);
  font-family: var(--text);
  padding-top: 116px;
  -webkit-font-smoothing: antialiased;
}
@media (max-width: 900px) {
  body {
    padding-top: 96px;
  }
}
.wrap {
  max-width: 2200px;
  margin: 0 auto;
  padding: 0 var(--mx);
  width: 100%;
}

/* ── TYPE ─────────────────────────────────────────────────────────── */
.eyebrow {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--oro);
}
.h1 {
  font-family: var(--display-xl);
  text-transform: uppercase;
  overflow-wrap: anywhere;
  hyphens: auto;
  font-weight: 700;
  letter-spacing: -0.015em;
  line-height: 1.05;
  font-size: clamp(21.6px, 3vw, 38.4px);
}
.lede {
  color: var(--cenere);
  font-size: 18px;
  line-height: 1.6;
  max-width: 56ch;
  margin-top: 18px;
}

/* ── CONTACT ──────────────────────────────────────────────────────── */
#contact {
  background: var(--notte);
  padding: clamp(48px, 8vw, 96px) 0 var(--sp);
}
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 48px;
  margin-top: 40px;
}
/* 3-up field grid, textarea spanning the row */
.form-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.form-fields textarea.field {
  grid-column: 1 / -1;
}
.field {
  width: 100%;
  border: 1px solid var(--grafite);
  background: var(--ombra);
  color: var(--luce);
  padding: 11px 14px;
  border-radius: 2px;
  font-family: var(--text);
  font-size: 16px;
  outline: none;
  transition: border-color 250ms;
}
.field::placeholder {
  color: var(--cenere);
}
.field:focus {
  border-color: var(--luce);
}
.field:focus-visible {
  outline: 2px solid var(--luce);
  outline-offset: 2px;
}
textarea.field {
  resize: vertical;
  min-height: 92px;
}
select.field {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a8a8a' stroke-width='2'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 38px;
  cursor: pointer;
}
.form-success {
  font-family: var(--text);
  font-size: 22px;
  color: var(--luce);
}
/* Submit failed. Kept in the flow above the button so it cannot be
   missed, and announced via role="alert" for screen readers. */
.form-error {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
  color: #ff8a7a;
  border-left: 2px solid #ff8a7a;
  padding-left: 12px;
}
/* Honeypot. Moved off-screen rather than display:none, because a bot
   that parses CSS skips display:none but still fills this one. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: right;
  align-items: flex-end;
}
.contact-info p {
  font-family: var(--mono);
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--cenere);
}
.contact-info p.white {
  color: var(--luce);
}
.contact-info a {
  color: inherit;
  text-decoration: none;
  transition: color 200ms var(--ease);
}
@media (hover: hover) {
  .contact-info a:hover {
    color: var(--oro);
  }
}
.contact-social {
  display: flex;
  gap: 16px;
  margin-top: 16px;
}
.contact-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: -6px;
  color: var(--cenere);
  transition: color 200ms var(--ease);
}
@media (hover: hover) {
  .contact-social a:hover {
    color: var(--luce);
  }
}

.form-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--cenere);
  line-height: 1.5;
  cursor: pointer;
}
.form-check input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 1px solid #3a3a3a;
  border-radius: 3px;
  background: #000;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
  position: relative;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.form-check input[type="checkbox"]:checked {
  background: var(--luce);
  border-color: var(--luce);
}
.form-check input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 0px;
  width: 5px;
  height: 10px;
  border: solid #000;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.form-check a {
  color: var(--luce);
  border-bottom: 1px solid #444;
  text-decoration: none;
}
@media (hover: hover) {
  .form-check a:hover {
    border-color: var(--luce);
  }
}
.btn-primary {
  font-family: var(--text);
  font-weight: 600;
  font-size: 18px;
  background: var(--bianco);
  color: var(--ombra);
  border: none;
  padding: 14px 28px;
  border-radius: 2px;
  cursor: pointer;
  text-decoration: none;
  transition: background 250ms;
}
@media (hover: hover) {
  .btn-primary:hover {
    background: var(--nebbia);
  }
}
.btn-primary[disabled] {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

@media (max-width: 1024px) {
  .form-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    margin-top: 40px;
  }
  .contact-info {
    text-align: left;
    align-items: flex-start;
  }
}
/* Touch sizing, carried over from the home page's mobile pass */
@media (max-width: 768px) {
  .form-check {
    font-size: 13px;
    gap: 12px;
    padding: 4px 0;
    min-height: 44px;
    align-items: center;
  }
  .form-check input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin-top: 0;
  }
  .form-check input[type="checkbox"]:checked::after {
    left: 7px;
    top: 2px;
    width: 6px;
    height: 12px;
  }
  /* the Privacy Policy link sits inside the checkbox's own label, so a
     near-miss toggles the box instead of opening the page */
  .form-check a {
    display: inline-block;
    padding: 4px 0;
  }
  select.field {
    background-position: right 12px center;
  }
}
@media (max-width: 480px) {
  .form-fields {
    grid-template-columns: 1fr;
  }
}

/*
 * Consent controls on touch, at any width.
 *
 * The max-width: 768px block above already does this for a phone, where the
 * label is the target and a 44px row is what a finger gets. A tablet never
 * reaches that block -- an iPad is 820px in portrait and 1024px or 1366px in
 * landscape -- so it renders the mouse-sized 16px box and a row shorter than
 * the minimum target. Keyed on the pointer, this covers every touch device at
 * every width and cannot match a desktop.
 */
@media (pointer: coarse) {
  .form-check {
    min-height: 44px;
    align-items: center;
  }
  .form-check input[type="checkbox"] {
    width: 22px;
    height: 22px;
    margin-top: 0;
  }
  .form-check input[type="checkbox"]:checked::after {
    left: 7px;
    top: 2px;
    width: 6px;
    height: 12px;
  }
  /* the Privacy Policy link sits inside the checkbox's own label, so a
     near-miss toggles the box instead of opening the page. Deliberately left
     short of 44px: filling the row would mean every tap meant to tick the
     consent box opened the policy in a new tab instead. */
  .form-check a {
    display: inline-block;
    padding: 4px 0;
  }
  .contact-social a {
    width: 44px;
    height: 44px;
  }
}

/* Big titles are wide capitals: on phones keep them to ~8% of the
   screen width so long words (MONTERIGGIONI, COLLABORAZIONI) still fit. */
@media (max-width: 600px) {
  .h1 {
    font-size: min(21.6px, 4.8vw);
  }
}
