/* ============================================================================
 * ZeGu — Coming Soon
 * Landing pública mínima servida en el apex zegu.app + misspell zeguapp.com
 * (via host-router del backend). NO carga el MVP. Captura un email y nada más.
 *
 * Reglas del proyecto:
 *  - Border-radius = 0 (ángulos rectos absolutos).
 *  - Tipografía: Space Grotesk (titulares), Mulish (cuerpo), JetBrains Mono (eyebrows).
 *  - Cero emojis, cero cursivas.
 *  - WCAG 2.1 AA contraste 4.5:1 mínimo.
 * ============================================================================ */

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--zegu-sand, #FAF6F1);
  color: var(--zegu-night, #161838);
  font-family: 'Mulish', system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
}

a {
  color: var(--zegu-purple, #4742B0);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}
a:hover { color: var(--zegu-cyan-accessible, #0072B0); }
a:focus-visible {
  outline: 3px solid var(--zegu-cyan, #0FB4FF);
  outline-offset: 3px;
  border-radius: 0;
}

/* ---------------------------------------------------------------------------
 * Skip link (a11y)
 * --------------------------------------------------------------------------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--zegu-night, #161838);
  color: var(--zegu-sand, #FAF6F1);
  padding: 0.75rem 1rem;
  font-weight: 700;
  z-index: 1000;
}
.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
  outline: 3px solid var(--zegu-cyan, #0FB4FF);
}

/* ---------------------------------------------------------------------------
 * Layout
 * --------------------------------------------------------------------------- */
.cs-layout {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  min-height: 100vh;
  min-height: 100dvh;
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  gap: clamp(2rem, 6vw, 4rem);
}

/* ---------------------------------------------------------------------------
 * Top bar
 * --------------------------------------------------------------------------- */
.cs-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.cs-brand {
  text-decoration: none;
  color: var(--zegu-night, #161838);
}
.cs-wordmark {
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  letter-spacing: -0.02em;
}
.cs-badge {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.4rem 0.7rem;
  background: var(--zegu-night, #161838);
  color: var(--zegu-sand, #FAF6F1);
}

/* ---------------------------------------------------------------------------
 * Hero
 * --------------------------------------------------------------------------- */
.cs-hero {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(1rem, 3vw, 1.5rem);
  max-width: 760px;
}

.cs-kicker {
  margin: 0;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--zegu-slate, #5A5E6B);
}

.cs-headline {
  margin: 0;
  font-family: 'Space Grotesk', system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(2.25rem, 7vw, 4.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--zegu-night, #161838);
}
.cs-accent { color: var(--zegu-purple, #4742B0); }

.cs-lead {
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 1.6;
  max-width: 60ch;
  color: var(--zegu-night, #161838);
}
.cs-lead strong { font-weight: 800; }

/* ---------------------------------------------------------------------------
 * Form
 * --------------------------------------------------------------------------- */
.cs-form {
  margin-top: clamp(1rem, 3vw, 1.5rem);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 560px;
}

.cs-label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--zegu-night, #161838);
  font-weight: 600;
}

.cs-field {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  border: 2px solid var(--zegu-night, #161838);
  background: #fff;
  padding: 0.25rem;
}
.cs-field:focus-within {
  outline: 3px solid var(--zegu-cyan, #0FB4FF);
  outline-offset: 2px;
}

.cs-field input[type="email"] {
  flex: 1 1 260px;
  min-height: 48px;
  padding: 0.5rem 1rem;
  border: none;
  outline: none;
  font-family: inherit;
  font-size: 1rem;
  color: var(--zegu-night, #161838);
  background: transparent;
}
.cs-field input[type="email"]::placeholder {
  color: var(--zegu-slate, #5A5E6B);
}

.cs-submit {
  flex: 0 0 auto;
  min-height: 48px;
  padding: 0 1.25rem;
  border: none;
  background: var(--zegu-purple, #4742B0);
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.cs-submit:hover:not(:disabled) { background: var(--zegu-night, #161838); }
.cs-submit:focus-visible {
  outline: 3px solid var(--zegu-cyan, #0FB4FF);
  outline-offset: 2px;
}
.cs-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

.cs-consent {
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--zegu-slate, #5A5E6B);
  max-width: 56ch;
}
.cs-consent a {
  color: var(--zegu-slate, #5A5E6B);
  text-decoration-color: var(--zegu-slate, #5A5E6B);
}
.cs-consent a:hover { color: var(--zegu-purple, #4742B0); }

/* ---------------------------------------------------------------------------
 * Status message (aria-live)
 * --------------------------------------------------------------------------- */
.cs-status {
  min-height: 1.5em;
  font-size: 0.95rem;
  font-weight: 600;
  max-width: 60ch;
}
.cs-status:empty { min-height: 0; }
.cs-status--ok    { color: #107C10; }
.cs-status--error { color: #B00020; }
.cs-status--info  { color: var(--zegu-slate, #5A5E6B); }

/* ---------------------------------------------------------------------------
 * Pillars
 * --------------------------------------------------------------------------- */
.cs-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: clamp(1rem, 3vw, 2rem);
  padding-top: clamp(1.5rem, 4vw, 2rem);
  border-top: 1px solid var(--zegu-glacier, #E8EAF6);
}
.cs-pillar-eyebrow {
  margin: 0 0 0.4rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--zegu-purple, #4742B0);
  font-weight: 700;
}
.cs-pillar-text {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--zegu-night, #161838);
}

/* ---------------------------------------------------------------------------
 * Footer
 * --------------------------------------------------------------------------- */
.cs-foot {
  border-top: 1px solid var(--zegu-glacier, #E8EAF6);
  padding-top: clamp(1rem, 3vw, 1.5rem);
  color: var(--zegu-slate, #5A5E6B);
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.cs-foot-line { margin: 0; }
.cs-foot-line a {
  color: var(--zegu-slate, #5A5E6B);
  text-decoration-color: var(--zegu-slate, #5A5E6B);
}
.cs-foot-line a:hover { color: var(--zegu-purple, #4742B0); }
.cs-foot-line span { margin: 0 0.5rem; }

/* ---------------------------------------------------------------------------
 * Consent banner (Ley 1581 / GDPR) — aparece sobre el contenido
 * --------------------------------------------------------------------------- */
.cs-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  background: var(--zegu-night, #161838);
  color: var(--zegu-sand, #FAF6F1);
  border-top: 3px solid var(--zegu-cyan, #0FB4FF);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: none;
}
.cs-consent-banner:not([hidden]) {
  pointer-events: auto;
}
.cs-consent-banner--visible {
  opacity: 1;
  transform: translateY(0);
}

.cs-consent-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(0.9rem, 2.5vw, 1.25rem) clamp(1rem, 4vw, 2.5rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1rem, 3vw, 2rem);
  flex-wrap: wrap;
}

.cs-consent-text { flex: 1 1 280px; min-width: 260px; }

.cs-consent-title {
  margin: 0 0 0.25rem;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--zegu-cyan, #0FB4FF);
  font-weight: 700;
}

.cs-consent-desc {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--zegu-sand, #FAF6F1);
  max-width: 62ch;
}

.cs-consent-actions {
  display: flex;
  gap: 0.5rem;
  flex: 0 0 auto;
  flex-wrap: wrap;
}

.cs-consent-btn {
  min-height: 44px;
  padding: 0.5rem 1.1rem;
  border: 2px solid transparent;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.cs-consent-btn:focus-visible {
  outline: 3px solid var(--zegu-cyan, #0FB4FF);
  outline-offset: 2px;
}

.cs-consent-btn--reject {
  background: transparent;
  color: var(--zegu-sand, #FAF6F1);
  border-color: var(--zegu-slate, #5A5E6B);
}
.cs-consent-btn--reject:hover {
  border-color: var(--zegu-sand, #FAF6F1);
}

.cs-consent-btn--accept {
  background: var(--zegu-cyan, #0FB4FF);
  color: var(--zegu-night, #161838);
  border-color: var(--zegu-cyan, #0FB4FF);
}
.cs-consent-btn--accept:hover {
  background: #fff;
  border-color: #fff;
}

/* Al estar el banner visible, añadir padding-bottom al layout para que el
   contenido no quede tapado en mobile donde el banner puede ocupar más. */
.cs-consent-banner--visible ~ main .cs-layout,
body:has(.cs-consent-banner--visible) .cs-layout {
  padding-bottom: 180px;
}

/* ---------------------------------------------------------------------------
 * Prefers-reduced-motion: ya hay pocas animaciones, pero respetar
 * --------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------------------------------------------------------------------------
 * Print: minimal (nadie debería imprimir un coming-soon, pero por si acaso)
 * --------------------------------------------------------------------------- */
@media print {
  .cs-form, .cs-status, .cs-badge, .cs-consent-banner { display: none; }
  .cs-headline { font-size: 2rem; }
}
