/*
 * Variant C port of design/coming-soon-c.dc.html.
 * Values (colors, timings, sizes) are copied verbatim from the design;
 * do not tweak them here without updating the design source.
 */

@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/montserrat-latin-wght.woff2') format('woff2');
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --navy: #0d1b2a;
  --blue-mid: #0a3e75;
  --blue: #0a66c2;
  --gray: #6b7280;
  --dev-light: #bfe0ff;
  --line: rgba(255, 255, 255, 0.55);
}

body {
  margin: 0;
  background: var(--navy);
}

/* ---------- Page shell ---------- */

.c-page {
  position: relative;
  width: 100%;
  min-height: 100vh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  background-image: linear-gradient(
    120deg,
    var(--navy) 0%,
    var(--blue-mid) 35%,
    var(--blue) 65%,
    var(--navy) 100%
  );
  font-family: 'Montserrat', system-ui, sans-serif;
  color: #fff;
  overflow: hidden;
}

.c-bg {
  background-size: 300% 300%;
  animation: cGrad 18s ease-in-out infinite;
}

/* ---------- Decoration: hexagons and waves ---------- */

.c-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.c-hex {
  position: absolute;
  animation: cFloat 9s ease-in-out infinite alternate;
}

.c-hex svg {
  display: block;
}

.c-hex--1 {
  left: 6%;
  top: 22%;
  width: 120px;
  height: 120px;
  animation-duration: 8s;
}

.c-hex--2 {
  left: 78%;
  top: 14%;
  width: 180px;
  height: 180px;
  animation-duration: 11s;
  animation-delay: -4s;
}

.c-hex--3 {
  left: 88%;
  top: 56%;
  width: 90px;
  height: 90px;
  animation-duration: 7s;
  animation-delay: -2s;
}

.c-hex--4 {
  left: 14%;
  top: 62%;
  width: 150px;
  height: 150px;
  animation-duration: 10s;
  animation-delay: -6s;
}

.c-hex--5 {
  left: 46%;
  top: 8%;
  width: 70px;
  height: 70px;
  animation-duration: 9s;
  animation-delay: -1s;
}

.c-waves {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 140px;
  overflow: hidden;
}

.c-wave {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 200%;
}

.c-wave1 {
  height: 140px;
  animation: cWave 22s linear infinite;
}

.c-wave2 {
  height: 110px;
  animation: cWave 14s linear infinite;
}

/* ---------- Header ---------- */

.c-main {
  position: relative;
  z-index: 1;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.c-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 32px 56px;
}

.c-logo {
  display: block;
  fill: #fff;
}

.c-ship {
  animation: cBob 3.4s ease-in-out infinite alternate;
}

.c-wordmark {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.c-wordmark span {
  color: var(--dev-light);
}

/* ---------- Hero ---------- */

.c-hero {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 24px 24px 140px;
  text-align: center;
}

.c-tag {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.c-title {
  margin: 0;
  max-width: 880px;
  font-size: clamp(40px, 5.6vw, 76px);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: #fff;
}

.c-lead {
  margin: 0;
  max-width: 560px;
  font-size: 20px;
  line-height: 1.55;
  font-weight: 400;
  color: #fff;
}

.c-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: min(480px, 100%);
  margin-top: 8px;
}

.c-bar {
  width: 100%;
  height: 12px;
  box-sizing: border-box;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: linear-gradient(
    135deg,
    var(--blue) 25%,
    var(--navy) 25%,
    var(--navy) 50%,
    var(--blue) 50%,
    var(--blue) 75%,
    var(--navy) 75%
  );
  background-size: 28px 28px;
  animation: cBar 1.6s linear infinite;
}

.c-bar-label {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #fff;
}

/* ---------- Footer ---------- */

.c-footer {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
  padding: 24px 56px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
}

.c-claim {
  margin: 0;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

/*
 * The footer only shows when it fits on one row. It wraps below ~540px with
 * Montserrat; 560px leaves a margin for font rendering differences. On narrow
 * screens the contact modal is still reachable from the hero button.
 */
@media (max-width: 559px) {
  .c-footer {
    display: none;
  }

  /* Narrow (vertical) layout: center the header like the rest of the page. */
  .c-header {
    justify-content: center;
    padding-inline: 24px;
  }
}

/*
 * Replaces the [CORREO DE CONTACTO] placeholder: outlined envelope icon, no
 * visible label (accessible name via aria-label). Opens the contact modal.
 */
.c-contact {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  /* Negative margins keep the 44px tap target without growing the footer row
     and align the icon with the right page gutter. */
  margin: -14px -10px -14px 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

.c-contact svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.c-contact:focus-visible {
  outline: 2px solid var(--dev-light);
  outline-offset: 0;
}

/* ---------- Animations ---------- */

@keyframes cGrad {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes cFloat {
  from {
    transform: translateY(0) rotate(0deg);
  }
  to {
    transform: translateY(-32px) rotate(14deg);
  }
}

@keyframes cWave {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

@keyframes cBar {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 28px 0;
  }
}

@keyframes cBob {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-22px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .c-bg,
  .c-hex,
  .c-wave1,
  .c-wave2,
  .c-bar,
  .c-ship {
    animation: none;
    transition: none;
  }
}

/* ---------- Secondary contact button under the bar (opens the contact modal) ---------- */

.c-cta {
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 12px 24px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.c-cta:hover {
  background-color: rgba(255, 255, 255, 0.12);
}

.c-cta:focus-visible {
  outline: 2px solid var(--dev-light);
  outline-offset: 3px;
}

/* ---------- Contact modal ---------- */

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

html:has(.modal[open]) {
  overflow: hidden;
}

.modal {
  box-sizing: border-box;
  width: min(600px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: #fff;
  color: var(--navy);
  font-family: 'Montserrat', system-ui, sans-serif;
  box-shadow: 0 24px 64px rgba(13, 27, 42, 0.45);
  overflow: auto;
  overscroll-behavior: contain;
}

.modal[open] {
  animation: modalIn 0.2s ease-out;
}

.modal::backdrop {
  background: rgba(13, 27, 42, 0.72);
}

.modal__inner {
  padding: 28px 32px 32px;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.modal__title {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--navy);
}

.modal__close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
}

.modal__close:hover {
  background: #eef2f7;
}

.modal__intro {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.55;
  color: var(--gray);
}

.modal__success {
  padding: 16px 0 4px;
}

.modal__success-title {
  margin: 0 0 12px;
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
}

.modal__success-title:focus {
  outline: none;
}

/* ---------- Form ---------- */

.form-alert {
  margin: 0 0 20px;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #f3b4b4;
  background: #fdf2f2;
  color: #9b1c1c;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

.form-alert:empty {
  display: none;
}

/* Focused programmatically on phones; not an interactive control. */
.form-alert:focus {
  outline: none;
}

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

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.field--full {
  grid-column: 1 / -1;
}

.field__label {
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
}

.field__optional {
  font-weight: 400;
  color: var(--gray);
}

.field__input {
  box-sizing: border-box;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--gray);
  border-radius: 8px;
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-size: 16px; /* 16px avoids iOS zoom on focus */
  line-height: 1.4;
}

.field__input--area {
  min-height: 132px;
  resize: vertical;
}

.field__input:focus-visible,
.field__check:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
  border-color: var(--blue);
}

.field__input[aria-invalid='true'] {
  border-color: #b91c1c;
  border-width: 2px;
  padding: 9px 11px;
}

.field__hint {
  margin: 0;
  font-size: 13px;
  color: var(--gray);
}

.field__error {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: #b91c1c;
}

.field__error:empty {
  display: none;
}

.field--check {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  column-gap: 10px;
  row-gap: 6px;
}

.field__check {
  width: 20px;
  height: 20px;
  margin: 1px 0 0;
  accent-color: var(--blue);
}

.field__check-label {
  font-size: 14px;
  line-height: 1.45;
  color: var(--navy);
}

.field--check .field__error {
  grid-column: 1 / -1;
}

.form__hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__turnstile:not(:empty) {
  margin-top: 20px;
}

.form__actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 24px;
}

.btn {
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  min-height: 48px;
  padding: 12px 28px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
}

.btn--primary {
  background: var(--blue);
  color: #fff;
}

.btn--primary:hover {
  background: #0857a6;
}

.btn--primary:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}

.btn:disabled {
  cursor: progress;
  opacity: 0.7;
}

/* Full-screen sheet on phones. */
@media (max-width: 600px) {
  .modal {
    width: 100%;
    height: 100%;
    max-height: none;
    margin: 0;
    border-radius: 0;
  }

  .modal__inner {
    padding: 16px 20px 28px;
  }

  .form__grid {
    grid-template-columns: 1fr;
  }

  .form__actions .btn {
    width: 100%;
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .modal[open] {
    animation: none;
  }

  .c-cta {
    transition: none;
  }
}
