/* =============================================================
   KIMÜN CREATIVO — LANDING PAGE
   Hoja de estilos organizada por módulos:
   1. Tokens (colores, tipografía, espaciados)
   2. Reset base
   3. Utilidades (container, botones, secciones)
   4. Header / Nav
   5. Hero
   6. Quiénes somos
   7. Servicios
   8. Proceso
   9. Por qué Kimün / audiencias
   10. Contacto / formulario
   11. Footer
   12. CTA flotante
   13. Animaciones / scroll-reveal
   14. Responsive
   ============================================================= */


/* -------------------------------------------------------------
   1. TOKENS
   Paleta: negro tinta cálido + papel hueso + un único acento
   "señal" (índigo eléctrico) que representa la comunicación /
   la transmisión de un mensaje. Un solo acento, usado con
   disciplina, tal como pide el sistema.
   ------------------------------------------------------------- */
:root {
  /* Color base */
  --ink: #15140F;
  --ink-soft: #221F17;
  --paper: #F4F0E4;
  --paper-dim: #E7E0CE;
  --signal: #3B49E8;
  --signal-dim: #2531AE;
  --signal-tint: #DEE1FB;

  /* Colores contextuales (se sobreescriben por sección) */
  --bg: var(--paper);
  --fg: var(--ink);
  --muted: #59543F;
  --line: rgba(21, 20, 15, 0.14);

  /* Tipografía */
  --font-display: 'Archivo', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Escala de espaciado */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: 6rem;
  --space-7: 9rem;

  /* Layout */
  --container-w: 1180px;
  --radius: 2px; /* geometría dura, en sintonía con el isotipo */
}

/* Secciones sobre fondo oscuro (tinta) */
.section--ink {
  --bg: var(--ink);
  --fg: var(--paper);
  --muted: #B9B39D;
  --line: rgba(244, 240, 228, 0.16);
}

/* Secciones sobre fondo claro (papel) */
.section--paper {
  --bg: var(--paper);
  --fg: var(--ink);
  --muted: #59543F;
  --line: rgba(21, 20, 15, 0.14);
}


/* -------------------------------------------------------------
   2. RESET BASE
   ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

ul, ol { margin: 0; padding: 0; list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.01em;
}

p { margin: 0; }

button { font-family: inherit; cursor: pointer; }

/* Foco visible para accesibilidad de teclado */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}


/* -------------------------------------------------------------
   3. UTILIDADES
   ------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

.section {
  background: var(--bg);
  color: var(--fg);
  padding: var(--space-6) 0;
  transition: background 0.3s ease;
}

.section-head {
  max-width: 760px;
  margin-bottom: var(--space-5);
}

.section-title {
  font-size: clamp(1.75rem, 3.2vw, 2.75rem);
  line-height: 1.12;
}

/* Eyebrow: etiqueta mono + tres puntos, eco del isotipo (la Ü) */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: var(--space-2);
}

.eyebrow--ink { color: var(--muted); }

.dots {
  display: inline-flex;
  gap: 4px;
}
.dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--signal);
  display: block;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.8rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }

.btn--signal {
  background: var(--signal);
  color: var(--paper);
}
.btn--signal:hover { background: var(--signal-dim); }

.btn--ghost-ink {
  background: transparent;
  color: var(--paper);
  border-color: rgba(244, 240, 228, 0.35);
}
.btn--ghost-ink:hover { border-color: var(--paper); }

.btn--full { width: 100%; }


/* -------------------------------------------------------------
   4. HEADER / NAV
   Fijo, siempre sobre fondo tinta con leve blur, para que el
   contraste con el logo (versión papel) sea constante.
   ------------------------------------------------------------- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(21, 20, 15, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(244, 240, 228, 0.1);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 74px;
}

.header__logo {
  height: 22px;
  width: auto;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.header__link {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--paper);
  opacity: 0.85;
  transition: opacity 0.15s ease;
}
.header__link:hover { opacity: 1; }

.header__link--cta {
  opacity: 1;
  padding: 0.6rem 1.2rem;
  background: var(--signal);
  border-radius: var(--radius);
  font-weight: 600;
}
.header__link--cta:hover { background: var(--signal-dim); }

.header__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
}
.header__toggle span {
  width: 22px;
  height: 2px;
  background: var(--paper);
}


/* -------------------------------------------------------------
   5. HERO
   ------------------------------------------------------------- */
.hero {
  padding-top: calc(74px + var(--space-6));
  min-height: 92vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: var(--space-5);
}

.hero__title {
  font-size: clamp(2.6rem, 6vw, 4.6rem);
  line-height: 0.98;
  margin-bottom: var(--space-3);
}

.hero__subtitle {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 46ch;
  margin-bottom: var(--space-4);
}

.hero__actions {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  margin-bottom: var(--space-5);
}

.hero__audience {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.6rem;
  padding-top: var(--space-3);
  border-top: 1px solid var(--line);
}
.hero__audience li {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.hero__visual {
  position: relative;
  height: 480px;
}
#constellation {
  width: 100%;
  height: 100%;
  display: block;
}


/* -------------------------------------------------------------
   6. QUIÉNES SOMOS
   ------------------------------------------------------------- */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  align-items: start;
}

.about__text p {
  font-size: 1.08rem;
  color: var(--muted);
  margin-bottom: var(--space-3);
}
.about__text strong { color: var(--fg); }

.about__pillars {
  display: grid;
  gap: var(--space-3);
}

.pillar {
  border-top: 1px solid var(--line);
  padding-top: var(--space-2);
}
.pillar__mark {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal);
  margin-bottom: 0.8rem;
}
.pillar h3 {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}
.pillar p {
  color: var(--muted);
  font-size: 0.98rem;
}


/* -------------------------------------------------------------
   7. SERVICIOS
   ------------------------------------------------------------- */
.services__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.service-card {
  background: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-4);
}

.service-card__head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--line);
}

.service-card__icon {
  flex: none;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(59, 73, 232, 0.16);
}
.service-card__icon svg {
  width: 24px;
  height: 24px;
  stroke: var(--signal);
  fill: none;
}

.service-card h3 {
  font-size: 1.3rem;
}

.service-card__list li {
  position: relative;
  padding-left: 1.3rem;
  margin-bottom: 0.85rem;
  color: var(--muted);
  font-size: 0.98rem;
}
.service-card__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--signal);
}
.service-card__list li:last-child { margin-bottom: 0; }


/* -------------------------------------------------------------
   8. PROCESO
   Única lista numerada del sitio: aquí el orden es información.
   ------------------------------------------------------------- */
.process {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-3);
}

.process__step {
  border-top: 2px solid var(--fg);
  padding-top: var(--space-2);
}

.process__number {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--signal);
  margin-bottom: var(--space-2);
}

.process__step h3 {
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.process__step p {
  font-size: 0.92rem;
  color: var(--muted);
}


/* -------------------------------------------------------------
   9. POR QUÉ KIMÜN + AUDIENCIAS
   ------------------------------------------------------------- */
.value-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.value-card {
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.value-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.6rem;
}
.value-card p {
  font-size: 0.92rem;
  color: var(--muted);
}

.audience-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--muted);
}
.audience-band__dot { color: var(--signal); }


/* -------------------------------------------------------------
   10. CONTACTO / FORMULARIO
   ------------------------------------------------------------- */
.contact__inner {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: var(--space-5);
  align-items: start;
}

.contact__text {
  font-size: 1.05rem;
  color: var(--muted);
  margin: var(--space-2) 0 var(--space-4);
  max-width: 42ch;
}

.contact__direct p {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: var(--space-2);
}
.contact__direct span {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.contact__direct a {
  font-size: 1.05rem;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  width: fit-content;
}
.contact__direct a:hover { border-color: var(--signal); color: var(--signal); }

.form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-4);
  display: grid;
  gap: var(--space-3);
}

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.form__field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.form__field span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
}
.form__field--full { grid-column: 1 / -1; }

.form__field input,
.form__field select,
.form__field textarea {
  font-family: var(--font-body);
  font-size: 0.98rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid rgba(21, 20, 15, 0.22);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
}
.form__field textarea { resize: vertical; }

/* El estado de error solo se muestra después de un intento de
   envío fallido (clase agregada por JS), nunca en un campo
   virgen que el usuario todavía no completó. */
.form.was-validated .form__field input:invalid,
.form.was-validated .form__field select:invalid {
  border-color: #C0392B;
}

.form__status {
  min-height: 1.2em;
  font-size: 0.92rem;
  font-weight: 600;
}
.form__status[data-state="success"] { color: #1E7A46; }
.form__status[data-state="error"] { color: #C0392B; }


/* -------------------------------------------------------------
   11. FOOTER
   ------------------------------------------------------------- */
.footer {
  background: var(--ink);
  color: var(--paper);
  padding: var(--space-5) 0 var(--space-3);
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid rgba(244, 240, 228, 0.14);
}

.footer__logo {
  height: 20px;
  margin-bottom: var(--space-2);
}
.footer__brand p {
  color: #B9B39D;
  font-size: 0.92rem;
}

.footer__col {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.footer__col h4 {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #B9B39D;
  margin-bottom: 0.2rem;
}
.footer__col a,
.footer__col span {
  font-size: 0.92rem;
  color: var(--paper);
  opacity: 0.9;
}
.footer__col a:hover { color: var(--signal-tint); }

.footer__legal {
  padding-top: var(--space-3);
  font-size: 0.8rem;
  color: #8B8567;
}


/* -------------------------------------------------------------
   12. CTA FLOTANTE
   ------------------------------------------------------------- */
.floating-cta {
  position: fixed;
  right: var(--space-3);
  bottom: var(--space-3);
  z-index: 90;
  background: var(--signal);
  color: var(--paper);
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.9rem 1.3rem;
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease, background 0.2s ease;
}
.floating-cta.is-visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.floating-cta:hover { background: var(--signal-dim); }


/* -------------------------------------------------------------
   13. ANIMACIONES / SCROLL-REVEAL
   ------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}


/* -------------------------------------------------------------
   14. RESPONSIVE
   ------------------------------------------------------------- */
@media (max-width: 1024px) {
  .services__grid,
  .about__grid,
  .contact__inner { grid-template-columns: 1fr; }

  .value-grid { grid-template-columns: repeat(2, 1fr); }

  .process { grid-template-columns: repeat(3, 1fr); }

  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { height: 280px; order: -1; }
}

@media (max-width: 720px) {
  :root { --space-6: 4rem; --space-7: 5rem; }

  .header__nav {
    position: absolute;
    top: 74px;
    left: 0; right: 0;
    background: var(--ink);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--space-3);
    gap: var(--space-2);
    border-bottom: 1px solid rgba(244,240,228,0.1);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
  }
  .header__nav.is-open {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
  }
  .header__toggle { display: flex; }

  .hero { min-height: auto; padding-bottom: var(--space-5); }

  .value-grid { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr 1fr; }

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

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

@media (max-width: 460px) {
  .process { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr; }
  .hero__actions .btn { width: 100%; }
}
