/* ==========================================================================
   CARTA MAGNA — Contacto
   ==========================================================================
   A standalone contact page: the ways to reach the team (phone and WhatsApp
   share the same line) and the shared SDK contact form inside a warm card.
   The form's first field is the "product of interest" selector injected by
   contacto.js; it uses the SDK's own cmf-* classes and is restyled through
   the --cmf-* variables, like every other form on the platform.

   Reuses the marketing tokens (styles.css) and the scene field / light nav
   (escena.css); only adds the page layer it needs.
   ========================================================================== */

.ct-main {
  position: relative;
  padding-top: calc(var(--nav-h) + clamp(40px, 7vh, 88px));
  padding-bottom: clamp(72px, 10vw, 144px);
}

.ct-shell {
  max-width: var(--es-shell);
}

/* --------------------------------------------------------------------------
   Head — the poster title and the invitation
   -------------------------------------------------------------------------- */
.ct-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: clamp(14px, 2vw, 22px);
  max-width: 1000px;
}

.ct-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--magna-600);
}
.ct-eyebrow::before {
  content: "";
  width: 34px;
  height: 1.5px;
  background: currentColor;
}

.ct-title {
  margin: 0;
  font-family: "Anton", var(--font-ui);
  font-size: clamp(2.8rem, 1rem + 7vw, 7rem);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--title-b);
  text-wrap: balance;
  overflow-wrap: break-word;
}

/* A marked phrase reads as selected text: the page red under cream type.
   The band is kept centred on the line, like the home page titles. */
.ct-title mark,
.ct-title .ct-mark {
  background-color: transparent;
  background-image: linear-gradient(var(--magna-600), var(--magna-600));
  background-repeat: no-repeat;
  background-position: 50% 50%;
  background-size: 100% 1.15em;
  color: var(--surface-light);
}
.ct-title .ct-mark .tw {
  color: inherit;
}

/* The painted multi-colour cycle (see paintTitle in contacto.js). */
.ct-title .tw--magna {
  color: var(--title-a);
}
.ct-title .tw--mar {
  color: var(--title-b);
}
.ct-title .tw--terracota {
  color: var(--title-c);
}

.ct-lede {
  margin: 0;
  max-width: 58ch;
  font-size: var(--fs-body-l);
  line-height: 1.55;
  color: var(--text-muted);
  text-wrap: pretty;
}

/* --------------------------------------------------------------------------
   Body — channels on the left, the form on the right
   -------------------------------------------------------------------------- */
.ct-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(32px, 6vw, 96px);
  align-items: start;
  margin-top: clamp(36px, 5vw, 72px);
}

.ct-aside {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2vw, 24px);
}

.ct-channels {
  display: grid;
  gap: 10px;
}

.ct-channel {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid var(--border-light);
  border-radius: var(--r-md);
  background: color-mix(in srgb, var(--surface-light) 74%, transparent);
  transition: border-color 180ms var(--ease-ola), box-shadow 180ms var(--ease-ola),
    transform 180ms var(--ease-ola);
}
.ct-channel:hover,
.ct-channel:focus-visible {
  border-color: var(--border-light-strong);
  box-shadow: var(--sh-2);
  transform: translateY(-2px);
}

.ct-channel-icon {
  display: grid;
  flex: none;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--miel) 30%, var(--surface-light));
  color: var(--magna-700);
}

.ct-channel-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ct-channel-kicker {
  font-family: var(--font-inscription);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--text-muted);
}

.ct-channel-value {
  overflow-wrap: anywhere;
  font-family: var(--font-display);
  font-size: clamp(1.18rem, 1rem + 0.55vw, 1.55rem);
  font-weight: 600;
  line-height: 1.15;
  color: var(--text-strong);
  transition: color 180ms var(--ease-ola);
}
.ct-channel:hover .ct-channel-value,
.ct-channel:focus-visible .ct-channel-value {
  color: var(--magna-600);
}

/* How the demo works — three small steps that fill the left column. */
.ct-steps {
  display: grid;
  gap: 14px;
  margin-top: clamp(4px, 1vw, 10px);
  padding-top: clamp(16px, 2vw, 24px);
  border-top: 1px solid var(--border-light);
}
.ct-steps li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 14px;
  font-size: var(--fs-small);
  line-height: 1.45;
  color: var(--text-muted);
}
.ct-steps b {
  font-weight: 600;
  color: var(--text-strong);
}
.ct-step-n {
  font-family: var(--font-inscription);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  color: var(--magna-600);
}

/* --------------------------------------------------------------------------
   Form card
   -------------------------------------------------------------------------- */
.ct-card {
  position: relative;
  width: 100%;
  padding: clamp(24px, 3.6vw, 44px);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  background: var(--surface-light);
  box-shadow: var(--sh-2);
}

.ct-card-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.3rem + 1vw, 2.15rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.005em;
  color: var(--text-strong);
}

.ct-card-text {
  margin: 8px 0 0;
  max-width: 46ch;
  font-size: var(--fs-small);
  line-height: 1.5;
  color: var(--text-muted);
}

.ct-form {
  margin-top: clamp(20px, 2.6vw, 28px);
}

/* The SDK form, themed with its own custom properties. */
.ct-form .cmf {
  --cmf-gap: 1.05rem;
  --cmf-text: var(--text);
  --cmf-label: var(--text-muted);
  --cmf-input-bg: var(--bg-light);
  --cmf-input-border: var(--border-light);
  --cmf-input-radius: var(--r-sm);
  --cmf-input-pad: 0.8rem 0.95rem;
  --cmf-focus: rgba(158, 31, 34, 0.16);
  --cmf-accent: var(--magna-600);
  --cmf-btn-bg: var(--magna-600);
  --cmf-btn-text: var(--surface-light);
  --cmf-btn-radius: var(--r-sm);
  --cmf-btn-pad: 0.95rem 1.9rem;
  --cmf-box-radius: var(--r-md);
  --cmf-success-bg: #eef3e6;
  --cmf-success-border: rgba(124, 132, 82, 0.35);
  --cmf-success-text: var(--olivo-900);
  --cmf-error-bg: #fbeaea;
  --cmf-error-border: #e7b8b8;
  --cmf-error-text: var(--magna-700);
  /* Opaque: the thank-you screen must fully hide the form behind it. */
  --cmf-overlay-bg: var(--surface-light);
  font-family: var(--font-ui);
}
.ct-form .cmf-overlay {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-radius: 0;
}
.ct-form .cmf-label {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
}
.ct-form .cmf-input,
.ct-form .cmf-select,
.ct-form .cmf-textarea {
  font-family: var(--font-ui);
}
.ct-form .cmf-btn {
  font-family: var(--font-ui);
  letter-spacing: 0.12em;
}
.ct-form .cmf-checkwrap a {
  color: var(--magna-600);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.ct-form .cmf-checkwrap a:hover {
  color: var(--magna-700);
}

/* Fallback when the SDK cannot be loaded. */
.ct-fallback {
  margin: 0;
  font-size: var(--fs-small);
  line-height: 1.6;
  color: var(--text-muted);
}
.ct-fallback a {
  color: var(--magna-700);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 980px) {
  .ct-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(32px, 6vw, 56px);
  }
}

@media (max-width: 560px) {
  .ct-card {
    padding: 22px 18px;
    border-radius: var(--r-md);
  }
  .ct-channel {
    gap: 12px;
    padding: 12px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ct-channel:hover,
  .ct-channel:focus-visible {
    transform: none;
  }
}
