/* =========================================================
   CONTACTO
   Solo contiene los estilos propios de la página de contacto.
   ========================================================= */

/* 01) BASE EDITORIAL -------------------------------------- */

/* La base editorial, el contenedor y el enlace de salto se cargan desde los módulos compartidos. */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 02) ÍNDICE INTERNO -------------------------------------- */

/* 03) CABECERA Y DISTRIBUCIÓN ----------------------------- */

.contact-hero {
  max-width: 76rem;
  padding-block: clamp(4.5rem, 9vw, 8rem) clamp(3rem, 6vw, 5rem);
}

.contact-hero h1 {
  margin-bottom: 1.25rem;
}

.contact-hero > p:not(.eyebrow) {
  max-width: 65ch;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(18rem, 0.85fr);
  gap: clamp(3rem, 7vw, 7rem);
  align-items: start;
  padding-bottom: clamp(5rem, 10vw, 9rem);
}

.contact-form-section,
.contact-privacy {
  padding-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--v4-petrol-border);
}

.contact-form-section > h2,
.contact-privacy > h2 {
  max-width: 22ch;
}

/* 04) FORMULARIO ----------------------------------------- */

.contact-form {
  display: grid;
  gap: 1.55rem;
  margin-top: 2rem;
}

.form-field {
  display: grid;
  gap: 0.45rem;
}

.form-field label {
  color: var(--v4-text);
  font-family: var(--v4-font-heading);
  font-weight: 700;
}

.form-field .optional {
  color: var(--v4-text-secondary);
  font-size: 0.88em;
  font-weight: 400;
}

.field-hint,
.field-error {
  margin: 0;
  font-family: var(--v4-font-heading);
  font-size: 0.88rem;
}

.field-hint {
  color: var(--v4-text-secondary);
}

.field-error {
  color: #f0b6a9;
  font-weight: 700;
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--v4-petrol-border);
  border-radius: 0;
  color: var(--v4-text);
  background: var(--v4-bg-deep);
  font: inherit;
}

.form-field textarea {
  min-height: 13rem;
  resize: vertical;
}

.form-field input:focus-visible,
.form-field textarea:focus-visible {
  border-color: var(--v4-petrol);
  outline: 2px solid var(--v4-petrol-hover);
  outline-offset: 2px;
}

.form-field [aria-invalid="true"] {
  border-color: #f0b6a9;
}

/* Los botones se cargan desde `v4-interfaz.css`. */

.contact-submit {
  justify-self: start;
  border: 0;
  cursor: pointer;
}

.contact-submit:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.contact-trap {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

/* 05) ESTADOS DEL FORMULARIO ----------------------------- */

.form-status {
  padding: 1.25rem 1.4rem;
  margin-block: 1.75rem;
  border-left: 4px solid var(--v4-ochre);
  background: var(--v4-bg-deep);
}

.form-status:focus {
  outline: 3px solid var(--v4-ochre-light);
  outline-offset: 3px;
}

.form-status h3,
.form-status p:last-child {
  margin-bottom: 0;
}

.form-status-error {
  border-left-color: #f0b6a9;
}

.form-status a,
.contact-privacy a {
  color: var(--v4-ochre-light);
  text-underline-offset: 0.18em;
}

/* 06) INFORMACIÓN DE PRIVACIDAD -------------------------- */

.contact-privacy {
  position: sticky;
  top: 2rem;
}

.cookie-facts {
  margin-block: 1.75rem;
}

.cookie-facts > div {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.35rem;
  padding-block: 1rem;
  border-top: 1px solid var(--v4-petrol-border);
}

.cookie-facts > div:last-child {
  border-bottom: 1px solid var(--v4-petrol-border);
}

.cookie-facts dt {
  color: var(--v4-text);
  font-weight: 700;
}

.cookie-facts dd {
  margin: 0;
}

/* 07) ADAPTACIÓN ----------------------------------------- */

@media (max-width: 50rem) {
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .contact-privacy {
    position: static;
  }
}
