/* =========================================================
   CONTACTO — dos columnas
   Izquierda: título gigante, texto y canales directos (fija
   al hacer scroll). Derecha: formulario en tarjeta compacta
   con etiquetas arriba de cada campo, para verlo completo
   sin tanto scroll.
========================================================= */

.ct {
  position: relative;
  z-index: 2;
  background: var(--color-bg);
  color: var(--color-text);
  padding: clamp(88px, 7vw, 104px) var(--ozz-pad) clamp(48px, 6vw, 96px);
}

/* Barra de etiquetas (misma del resto del sitio) */
.ct-bar {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 14px;
  margin-bottom: clamp(18px, 2vw, 28px);
  border-top: 1px solid var(--ozz-line);
}

.ct-bar span:nth-child(2) {
  text-align: center;
}

.ct-body {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--ozz-gutter);
  row-gap: 40px;
  align-items: start;
}

/* ---------- Columna izquierda ---------- */

.ct-intro {
  grid-column: 1 / span 5;
  position: sticky;
  top: 110px;
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 2vw, 28px);
  min-height: min(680px, calc(100svh - 150px));
}

.ct-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(4rem, 11vw, 12rem);
  font-weight: 400;
  line-height: 0.84;
  letter-spacing: -0.005em;
  text-transform: uppercase;
}

.ct-lead {
  margin: 0;
  max-width: 40ch;
  font-family: var(--font-paragraph-light);
  font-size: clamp(1rem, 0.88rem + 0.4vw, 1.25rem);
  line-height: 1.45;
}

.ct-subtitle {
  margin: 0 0 6px;
  color: var(--ozz-muted);
}

/* Canales: al fondo de la columna, compactos */
.ct-channels {
  margin-top: auto;
  display: flex;
  flex-direction: column;
}

.ct-channel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "label arrow"
    "value arrow";
  row-gap: 4px;
  padding: 14px 0;
  border-top: 1px solid var(--ozz-line);
  color: var(--color-text);
  text-decoration: none;
}

.ct-channel:last-of-type {
  border-bottom: 1px solid var(--ozz-line);
}

.ct-channel__label {
  grid-area: label;
  color: var(--ozz-muted);
  font-size: clamp(0.85rem, 0.7rem + 0.35vw, 1.05rem);
}

.ct-channel__value {
  grid-area: value;
  min-width: 0;
  overflow-wrap: anywhere;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 0.9rem + 1.3vw, 2.3rem);
  line-height: 1;
  text-transform: uppercase;
  transition: transform 0.5s var(--ozz-ease);
}

.ct-channel__arrow {
  grid-area: arrow;
  align-self: center;
  width: clamp(22px, 1.8vw, 30px);
  height: clamp(22px, 1.8vw, 30px);
  transition: transform 0.5s var(--ozz-ease);
}

.ct-channel__arrow svg {
  width: 100%;
  height: 100%;
  fill: var(--color-orange);
}

.ct-channel:hover .ct-channel__value,
.ct-channel:focus-visible .ct-channel__value {
  transform: translateX(8px);
}

.ct-channel:hover .ct-channel__arrow,
.ct-channel:focus-visible .ct-channel__arrow {
  transform: rotate(-45deg);
}

.ct-social {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 14px;
}

.ct-social ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ct-social a {
  display: inline-block;
  padding: 0.5em 0.95em 0.4em;
  border: 1px solid var(--ozz-line);
  border-radius: 999px;
  color: var(--color-text);
  text-decoration: none;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition:
    background 0.3s ease,
    color 0.3s ease;
}

.ct-social a:hover {
  background: var(--color-text);
  color: var(--color-bg);
}

/* ---------- Formulario en tarjeta ---------- */

.ct-form {
  grid-column: 7 / -1;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(20px, 2.2vw, 34px);
  border: 1px solid var(--ozz-line);
  border-radius: 8px;
  background: rgba(var(--color-text-rgb), 0.04);
}

.ct-form__title {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 1.6rem + 1.8vw, 3.6rem);
  font-weight: 400;
  line-height: 0.9;
  text-transform: uppercase;
}

.ct-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.ct-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Campo: etiqueta arriba, caja rellena abajo */
.ct-field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.ct-label {
  order: -1;
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 0.75rem + 0.3vw, 1.05rem);
  letter-spacing: 0.035em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--color-text);
}

.ct-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid transparent;
  border-radius: 4px;
  outline: 0;
  background: rgba(var(--color-text-rgb), 0.07);
  color: var(--color-text);
  font-family: var(--font-paragraph-light);
  font-size: 1rem;
  line-height: 1.4;
  transition:
    border-color 0.3s ease,
    background 0.3s ease;
  -webkit-appearance: none;
  appearance: none;
}

.ct-input::placeholder {
  color: var(--ozz-muted);
  opacity: 1;
}

.ct-input:hover {
  background: rgba(var(--color-text-rgb), 0.1);
}

.ct-input:focus {
  border-color: var(--color-orange);
  background: rgba(var(--color-text-rgb), 0.1);
}

textarea.ct-input {
  resize: vertical;
  min-height: 108px;
}

select.ct-input {
  padding-right: 36px;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 50%,
    calc(100% - 14px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}

select.ct-input option {
  background: var(--color-bg);
  color: var(--color-text);
}

/* Estado de error */
.ct-field.is-invalid .ct-input {
  border-color: var(--color-orange);
}

.ct-field.is-invalid .ct-label {
  color: var(--color-orange);
}

/* Chips de servicio */
.ct-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}

.ct-fieldset legend {
  padding: 0;
  margin-bottom: 8px;
  font-size: clamp(0.9rem, 0.75rem + 0.3vw, 1.05rem);
}

.ct-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ct-chip {
  position: relative;
  cursor: pointer;
}

.ct-chip input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}

.ct-chip span {
  display: inline-block;
  padding: 0.55em 0.95em 0.45em;
  border: 1px solid var(--ozz-line);
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.98rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition:
    background 0.3s ease,
    color 0.3s ease,
    border-color 0.3s ease;
}

.ct-chip:hover span {
  border-color: var(--color-text);
}

.ct-chip input:checked + span {
  background: var(--color-orange);
  border-color: var(--color-orange);
  color: #000;
}

.ct-chip input:focus-visible + span {
  outline: 2px solid var(--color-orange);
  outline-offset: 2px;
}

/* Consentimiento */
.ct-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-family: var(--font-paragraph-light);
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--ozz-muted);
  cursor: pointer;
}

.ct-consent input {
  flex: none;
  width: 17px;
  height: 17px;
  margin: 1px 0 0;
  accent-color: var(--color-orange);
  cursor: pointer;
}

.ct-consent a {
  color: var(--color-text);
}

.ct-consent.is-invalid {
  color: var(--color-orange);
}

/* Envío */
.ct-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ct-submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.8em;
  padding: 0.85em 1.3em 0.75em;
  overflow: hidden;
  isolation: isolate;
  border: 1px solid var(--color-orange);
  border-radius: 4px;
  background: var(--color-orange);
  color: #000;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 0.9rem + 0.4vw, 1.3rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    color 0.45s var(--ozz-ease),
    border-color 0.45s ease;
}

.ct-submit::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--color-text);
  transform: scaleY(0);
  transform-origin: 50% 100%;
  transition: transform 0.5s var(--ozz-ease);
}

.ct-submit:hover,
.ct-submit:focus-visible {
  border-color: var(--color-text);
  color: var(--color-bg);
}

.ct-submit:hover::before,
.ct-submit:focus-visible::before {
  transform: scaleY(1);
}

.ct-submit svg {
  width: 1em;
  height: 1em;
  fill: currentColor;
  transition: transform 0.45s var(--ozz-ease);
}

.ct-submit:hover svg {
  transform: translateX(4px) rotate(-45deg);
}

.ct-submit:focus-visible {
  outline: 2px solid var(--color-orange);
  outline-offset: 3px;
}

/* Barra de progreso mientras se envía */
.ct-submit::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 0;
  background: var(--color-bg);
}

.ct-form.is-sending .ct-submit {
  pointer-events: none;
}

.ct-form.is-sending .ct-submit::after {
  animation: ct-progress 2.4s var(--ozz-ease) forwards;
}

@keyframes ct-progress {
  to {
    width: 92%;
  }
}

.ct-required {
  margin: 0;
  color: var(--ozz-muted);
}

.ct-status:empty {
  display: none;
}

.ct-status {
  padding: 14px 16px;
  border: 1px solid var(--ozz-line);
  border-radius: 4px;
  font-family: var(--font-paragraph-light);
  line-height: 1.45;
}

.ct-status.is-success {
  border-color: var(--color-text);
}

.ct-status.is-error {
  border-color: var(--color-orange);
  color: var(--color-orange);
}

/* ---------- Responsive ---------- */

@media (max-width: 1099px) {
  .ct-intro {
    grid-column: 1 / span 5;
  }

  .ct-form {
    grid-column: 6 / -1;
  }
}

@media (max-width: 899px) {
  .ct-intro,
  .ct-form {
    grid-column: 1 / -1;
  }

  .ct-intro {
    position: static;
    min-height: 0;
  }

  .ct-channels {
    margin-top: 8px;
  }
}

@media (max-width: 560px) {
  .ct-row {
    grid-template-columns: 1fr;
  }

  .ct-bar span:nth-child(2) {
    display: none;
  }

  .ct-form {
    padding: 18px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ct-submit,
  .ct-submit::before,
  .ct-channel__value,
  .ct-channel__arrow {
    transition: none;
  }
}
