/* ==========================================================================
   ZOLVIX — Design System
   Landing "coming soon". Modo claro. Tokens derivados de la identidad de
   marca (logo_corporativo/zolvix-brand-guidelines.html): el morado de marca
   pasa a ser acento, y el "Zolvix Midnight" del fondo oscuro del logo se
   reutiliza como color de texto principal sobre blanco.
   ========================================================================== */

:root {
  /* ---- Color — superficie ---- */
  --color-bg:            #FAF9FC;   /* fondo base, blanco con matiz lavanda */
  --color-surface:       #FFFFFF;   /* superficie elevada (inputs, etc.) */
  --color-surface-alt:   #F4F1F9;   /* secciones alternas, tinte de marca */
  --color-border:        #E7E2F0;   /* líneas divisorias */
  --color-border-strong: #D9D2E8;

  /* ---- Color — texto ---- */
  --color-text:          #17102B;   /* = Zolvix Midnight, reutilizado como texto */
  --color-text-muted:    #5C5470;
  --color-text-faint:    #8A8298;

  /* ---- Color — marca ---- */
  --color-brand:        #6D28D9;
  --color-brand-hover:  #7C3AED;
  --color-brand-tint:   #F4F1F9;
  --color-on-brand:     #FFFFFF;

  /* ---- Color — estado ---- */
  --color-success: #157A56;
  --color-danger:  #B3261E;

  /* ---- Tipografía ---- */
  --font-ui:   'Inter', 'Segoe UI', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  --text-xs:   0.75rem;                                   /* 12px */
  --text-sm:   0.875rem;                                  /* 14px */
  --text-base: 1.0625rem;                                 /* 17px */
  --text-md:   1.1875rem;                                 /* 19px */
  --text-lg:   clamp(1.25rem, 1.15rem + 0.4vw, 1.5rem);    /* 20–24px */
  --text-xl:   clamp(1.5rem, 1.3rem + 0.9vw, 1.875rem);    /* 24–30px */
  --text-2xl:  clamp(1.75rem, 1.4rem + 1.6vw, 2.375rem);   /* 28–38px */
  --text-3xl:  clamp(2.125rem, 1.6rem + 2.4vw, 3rem);      /* 34–48px */
  --text-4xl:  clamp(2.5rem, 1.7rem + 3.6vw, 4rem);        /* 40–64px */
  --text-5xl:  clamp(2.75rem, 1.4rem + 6vw, 5.25rem);      /* 44–84px */

  --leading-tight: 1.1;
  --leading-snug:  1.35;
  --leading-body:  1.7;

  --tracking-tight: -0.02em;
  --tracking-wide:  0.06em;
  --tracking-wider: 0.14em;

  /* ---- Espaciado (escala 4px) ---- */
  --space-1: 0.25rem;   /* 4  */
  --space-2: 0.5rem;    /* 8  */
  --space-3: 0.75rem;   /* 12 */
  --space-4: 1rem;      /* 16 */
  --space-5: 1.5rem;    /* 24 */
  --space-6: 2rem;      /* 32 */
  --space-7: 3rem;      /* 48 */
  --space-8: 4rem;      /* 64 */
  --space-9: 6rem;      /* 96 */
  --space-10: 8rem;     /* 128 */
  --space-11: 10rem;    /* 160 */

  /* ---- Radios ---- */
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --radius-full: 999px;

  /* ---- Sombras (sutiles, tintadas con la marca, no negro plano) ---- */
  --shadow-xs: 0 1px 2px rgba(23, 16, 43, 0.04);
  --shadow-sm: 0 2px 8px rgba(23, 16, 43, 0.05), 0 1px 2px rgba(23, 16, 43, 0.04);
  --shadow-md: 0 8px 24px rgba(23, 16, 43, 0.07), 0 2px 6px rgba(23, 16, 43, 0.04);
  --shadow-focus: 0 0 0 3px rgba(109, 40, 217, 0.22);

  /* ---- Movimiento ---- */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast:  150ms;
  --dur-base:  250ms;
  --dur-slow:  550ms;

  /* ---- Layout ---- */
  --container-max: 1200px;
  --container-pad: clamp(20px, 5vw, 64px);
  --section-pad-y: var(--space-9);
}

@media (min-width: 640px) {
  :root { --section-pad-y: var(--space-10); }
}
@media (min-width: 1024px) {
  :root { --section-pad-y: 9rem; }
}
@media (min-width: 1440px) {
  :root { --section-pad-y: 10.5rem; }
}

/* ==========================================================================
   Reset / base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-ui);
  font-size: var(--text-base);
  line-height: var(--leading-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

h1, h2, h3, h4, p, figure { margin: 0; }

ul { list-style: none; margin: 0; padding: 0; }

::selection { background: var(--color-brand); color: #fff; }

/* Focus visibility — WCAG 2.4.7 / 2.4.11 */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--color-brand);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  top: -60px;
  left: var(--space-4);
  z-index: 2000;
  background: var(--color-text);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: top var(--dur-base) var(--ease-out);
}
.skip-link:focus { top: var(--space-4); }

/* ==========================================================================
   Layout primitives
   ========================================================================== */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

.section { padding-block: var(--section-pad-y); }
.section--alt { background: var(--color-surface-alt); }
.section--tight-top { padding-top: 0; }

.section-head { max-width: 640px; margin-bottom: var(--space-8); }

/* ==========================================================================
   Typography components
   ========================================================================== */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-brand);
  margin-bottom: var(--space-4);
}

.section-title {
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  line-height: var(--leading-tight);
  color: var(--color-text);
  margin-bottom: var(--space-4);
}

.section-lead {
  font-size: var(--text-md);
  color: var(--color-text-muted);
  max-width: 46ch;
  line-height: var(--leading-snug);
}

/* ==========================================================================
   Components — Button
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1;
  padding: 15px 26px;
  border-radius: var(--radius-full);
  min-height: 24px;
  transition: background var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out),
              color var(--dur-base) var(--ease-out),
              box-shadow var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
}

.btn-icon {
  width: 16px;
  height: 16px;
  transition: transform var(--dur-base) var(--ease-out);
}
.btn:hover .btn-icon { transform: translateX(3px); }

.btn--primary {
  background: var(--color-text);
  color: #fff;
}
.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--color-brand-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}
.btn--primary:active { transform: translateY(0); }
.btn--primary:disabled { opacity: 0.6; cursor: default; transform: none; }

.btn--outline {
  border: 1px solid var(--color-border-strong);
  color: var(--color-text);
  background: transparent;
}
.btn--outline:hover,
.btn--outline:focus-visible {
  border-color: var(--color-brand);
  background: var(--color-brand-tint);
}

/* Text link with animated underline */
.link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--color-text);
  padding-bottom: 2px;
  background-image: linear-gradient(var(--color-text), var(--color-text));
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 100% 1px;
  transition: color var(--dur-base) var(--ease-out), background-size var(--dur-base) var(--ease-out);
}
.link .btn-icon { width: 14px; height: 14px; }
.link:hover, .link:focus-visible {
  color: var(--color-brand-hover);
  background-image: linear-gradient(var(--color-brand-hover), var(--color-brand-hover));
}

/* ==========================================================================
   Components — Badge / Alert
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 9px 16px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-muted);
  background: var(--color-surface);
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-brand);
  box-shadow: 0 0 0 0 rgba(109, 40, 217, 0.55);
  animation: pulse-dot 2.2s infinite;
  flex-shrink: 0;
}
@keyframes pulse-dot {
  0%   { box-shadow: 0 0 0 0 rgba(109, 40, 217, 0.45); }
  70%  { box-shadow: 0 0 0 9px rgba(109, 40, 217, 0); }
  100% { box-shadow: 0 0 0 0 rgba(109, 40, 217, 0); }
}

.alert {
  font-size: var(--text-sm);
  font-weight: 500;
  padding: var(--space-2) 0;
}
.alert[data-state="success"] { color: var(--color-success); }
.alert[data-state="error"] { color: var(--color-danger); }

/* ==========================================================================
   Components — Form
   ========================================================================== */
.field { display: flex; flex-direction: column; gap: var(--space-2); }

.field-label {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-faint);
}

.field-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--color-border-strong);
  border-radius: 0;
  padding: var(--space-2) 2px;
  font-family: var(--font-ui);
  font-size: var(--text-base);
  color: var(--color-text);
  transition: border-color var(--dur-base) var(--ease-out);
}
.field-input::placeholder { color: var(--color-text-faint); }
.field-input:focus {
  outline: none;
  border-color: var(--color-brand);
}
.field-input:focus-visible {
  outline: none;
  border-color: var(--color-brand);
  box-shadow: 0 1px 0 0 var(--color-brand);
}

textarea.field-input { resize: vertical; min-height: 84px; }

.field-error {
  font-size: var(--text-xs);
  color: var(--color-danger);
  min-height: 1em;
}

.field[data-error="true"] .field-input { border-color: var(--color-danger); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  padding-top: var(--space-10);
  padding-bottom: var(--space-9);
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(109, 40, 217, 0.16) 1px, transparent 1.6px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 40%, transparent 92%);
  mask-image: linear-gradient(to bottom, black 0%, black 40%, transparent 92%);
  pointer-events: none;
}

.hero-content { position: relative; max-width: 840px; }

.hero-mark {
  font-size: clamp(2.25rem, 1.5rem + 3.5vw, 4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.05em;
  color: var(--color-brand);
  margin-bottom: var(--space-5);
  cursor: default;
  display: inline-block;
}

/* Especificidad p.hero-mark a propósito: [data-reveal] define su propio
   shorthand `transition` (opacity, transform) más abajo en este archivo;
   por ser shorthand, reemplazaría cualquier `transition` declarada aquí
   con la misma especificidad. Sumar el tipo de elemento garantiza que
   esta regla gane sin importar el orden en el archivo. */
p.hero-mark {
  transition: color var(--dur-base) var(--ease-out),
              letter-spacing var(--dur-base) var(--ease-out);
}

p.hero-mark:hover {
  color: var(--color-brand-hover);
  letter-spacing: 0.08em;
}

.hero-title {
  font-size: var(--text-5xl);
  font-weight: 800;
  letter-spacing: var(--tracking-tight);
  line-height: 1.06;
  color: var(--color-text);
  margin-bottom: var(--space-6);
}

.highlight { position: relative; display: inline; }
.highlight-underline {
  position: absolute;
  left: 0;
  bottom: -0.06em;
  width: 100%;
  height: 0.22em;
  overflow: visible;
}
.highlight-underline path {
  fill: none;
  stroke: var(--color-brand-hover);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  animation: draw-underline 900ms var(--ease-out) 700ms forwards;
}
@keyframes draw-underline { to { stroke-dashoffset: 0; } }

.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-muted);
  max-width: 56ch;
  margin-bottom: var(--space-6);
}

.hero-social { margin-top: var(--space-7); }

.hero-social-label {
  font-size: var(--text-sm);
  color: var(--color-text-faint);
  margin-bottom: var(--space-3);
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-6);
  margin-top: var(--space-7);
}

/* ==========================================================================
   Icons
   ========================================================================== */
.icon {
  width: 26px;
  height: 26px;
  color: var(--color-brand);
  stroke-width: 1.5;
}

/* ==========================================================================
   Pillars — "Qué estamos preparando"
   ========================================================================== */
.pillars-grid {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--color-border);
}

.pillar {
  padding: var(--space-6) 0;
  border-bottom: 1px solid var(--color-border);
  transition: background var(--dur-base) var(--ease-out);
}

.pillar-icon-wrap { margin-bottom: var(--space-5); }

.pillar h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.pillar p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: var(--leading-body);
  max-width: 40ch;
}

/* ==========================================================================
   Benefits — numbered editorial list
   ========================================================================== */
.benefits-list { border-top: 1px solid var(--color-border); }

.benefit-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: var(--space-5);
  padding: var(--space-6) 0;
  border-bottom: 1px solid var(--color-border);
}

.benefit-num {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  color: var(--color-text-faint);
  padding-top: 3px;
}

.benefit-row h3 {
  font-size: var(--text-md);
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: var(--space-2);
}

.benefit-row p {
  color: var(--color-text-muted);
  max-width: 62ch;
  margin: 0;
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-border);
}

.contact-intro .section-lead { max-width: 100%; margin-bottom: var(--space-6); }

.contact-fact {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  padding-top: var(--space-5);
  margin-top: var(--space-5);
  border-top: 1px solid var(--color-border);
}
.contact-fact strong {
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  color: var(--color-text);
}
.contact-fact span {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.contact-form-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
}

.contact-submit {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  flex-wrap: wrap;
  margin-top: var(--space-3);
}

/* ==========================================================================
   Social — monogram badges
   ========================================================================== */
.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.social-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px 18px 10px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  transition: border-color var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.social-badge:hover, .social-badge:focus-visible {
  border-color: var(--color-brand);
  background: var(--color-brand-tint);
  transform: translateY(-2px);
}

.social-mono {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--color-text);
  color: #fff;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.social-name {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-text-muted);
}
.social-badge:hover .social-name { color: var(--color-text); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-8) var(--space-6);
}

.footer-top {
  display: flex;
  flex-direction: column;
  gap: var(--space-7);
  padding-bottom: var(--space-7);
}

.footer-nav-label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-bottom: var(--space-4);
}

.footer-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-6);
}

.footer-ghost-link {
  font-size: var(--text-sm);
  color: var(--color-text-faint);
  cursor: default;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-2);
  padding-top: var(--space-5);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-xs);
  color: var(--color-text-faint);
}

/* ==========================================================================
   Reveal on scroll (bespoke, replaces AOS)
   ========================================================================== */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out);
  transition-delay: var(--reveal-delay, 0ms);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* ==========================================================================
   Breakpoints — cada sección repensada, no solo reescalada
   ========================================================================== */

/* ---- Tablet (≥640px) ---- */
@media (min-width: 640px) {
  .hero-actions { gap: var(--space-7); }

  .pillars-grid { grid-template-columns: repeat(2, 1fr); border-top: none; }
  .pillar {
    padding: var(--space-7) var(--space-6);
    border: 1px solid var(--color-border);
    border-top: none;
    border-right: none;
  }
  .pillar:nth-child(-n+2) { border-top: 1px solid var(--color-border); }
  .pillar:nth-child(even) { border-right: 1px solid var(--color-border); }

  .contact-grid { grid-template-columns: 1fr; }
  .contact-form-grid { grid-template-columns: 1fr 1fr; }
  .contact-form-grid .field--full { grid-column: 1 / -1; }

  .footer-top { flex-direction: row; justify-content: space-between; align-items: flex-start; }
}

/* ---- Laptop (≥1024px) ---- */
@media (min-width: 1024px) {
  .section-head { margin-bottom: var(--space-9); }

  .hero-content { max-width: 900px; }

  /* Composición asimétrica: primer pilar destacado, resto en trama 2x2 */
  .pillars-grid {
    grid-template-columns: 1.15fr 1fr 1fr;
    grid-template-rows: auto auto;
    grid-template-areas: "a b c" "a d e";
    border-top: 1px solid var(--color-border);
  }
  .pillar {
    border: none;
    border-right: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
    padding: var(--space-8) var(--space-7);
  }
  .pillar:nth-child(1) { grid-area: a; padding-right: var(--space-8); }
  .pillar:nth-child(2) { grid-area: b; }
  .pillar:nth-child(3) { grid-area: c; border-right: none; }
  .pillar:nth-child(4) { grid-area: d; }
  .pillar:nth-child(5) { grid-area: e; border-right: none; }
  .pillar:nth-child(1) h3 { font-size: var(--text-xl); }
  .pillar:nth-child(1) p { max-width: 34ch; }
  .pillar-icon-wrap { margin-bottom: var(--space-6); }
  .pillar:nth-child(1) .icon { width: 32px; height: 32px; }

  .contact-grid { grid-template-columns: 0.85fr 1.15fr; gap: var(--space-9); }

  .footer-nav ul { max-width: 460px; }
}

/* ---- Desktop (≥1440px) ---- */
@media (min-width: 1440px) {
  .hero { padding-top: var(--space-11); }
  .hero-content { max-width: 980px; }
}

/* ---- Mobile refinements (<640px) ---- */
@media (max-width: 639px) {
  .hero { padding-bottom: var(--space-8); }
  .btn { width: auto; }
  .hero-actions { flex-direction: column; align-items: flex-start; gap: var(--space-5); }
  .contact-form-grid { gap: var(--space-4); }
}

/* ==========================================================================
   Accesibilidad — reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .badge-dot { animation: none; }
  .highlight-underline path { animation: none; stroke-dashoffset: 0; }
  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
