/* Landing de Moov. Sistema visual de Moov Meet (docs/propuesta-visual.md de ese repo):
   Fraunces para títulos, Hanken Grotesk para texto, papel y tinta como pareja de lectura y
   el azul Moov como único acento. Radios: 8px en todo lo interactivo y en los íconos. */

@font-face {
  font-family: Fraunces;
  src: url("/brand/fonts/fraunces-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/brand/fonts/hanken-grotesk-latin.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --serif: Fraunces, Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --paper: #f3f5f8;
  --surface: #fbfcfe;
  --sand: #e6ebf2;
  --carbon: #0f1217;
  --ink: #3a4252;
  --muted: #5f6979;
  --line: #dae0e9;
  --line-strong: #c3cad6;
  --clay: #2f6bff;
  --clay-strong: #1f55e0;
  --clay-hover: #1a46bd;
  --accent-text: #1f55e0;
  --mark: #1f55e0;
  --venn-fill: rgb(15 18 23 / 0.025);

  /* El bloque de contacto y el pie van siempre en tinta, como la sala de Moov Meet. */
  --block: #0f1217;
  --block-text: #f3f5f8;
  --block-muted: #a6afbe;
  --block-line: #222833;
  --block-accent: #8eadff;
  --ring-faint: rgb(243 245 248 / 0.07);

  --gutter: clamp(20px, 5vw, 64px);
  --radius: 8px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* Modo oscuro: la paleta de la sala de Moov Meet (branding.json). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --paper: #0f1217;
    --surface: #141820;
    --sand: #171b22;
    --carbon: #f3f5f8;
    --ink: #c3cad6;
    --muted: #a6afbe;
    --line: #222833;
    --line-strong: #3a4252;
    --accent-text: #8eadff;
    --mark: #2f6bff;
    --venn-fill: rgb(243 245 248 / 0.03);
    /* Más hondo que el papel: si no, el contacto se funde con la frase (sand). */
    --block: #0a0c10;
    --block-line: #1c212b;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0f1217;
  --surface: #141820;
  --sand: #171b22;
  --carbon: #f3f5f8;
  --ink: #c3cad6;
  --muted: #a6afbe;
  --line: #222833;
  --line-strong: #3a4252;
  --accent-text: #8eadff;
  --mark: #2f6bff;
  --venn-fill: rgb(243 245 248 / 0.03);
  --block: #0a0c10;
  --block-line: #1c212b;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 24px;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
p,
figure {
  margin: 0;
}
h1,
h2 {
  font-family: var(--serif);
  font-weight: 400;
  color: var(--carbon);
  text-wrap: balance;
}
p {
  text-wrap: pretty;
}
a {
  color: inherit;
}
ul,
ol {
  list-style: none;
  margin: 0;
  padding: 0;
}
img,
svg {
  display: block;
}
svg {
  flex-shrink: 0;
}
button {
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: none;
  border: 0;
}
[hidden] {
  display: none !important;
}
:focus-visible {
  outline: 2px solid var(--clay-strong);
  outline-offset: 4px;
  border-radius: 2px;
}
.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;
}
.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 10;
  background: var(--carbon);
  color: var(--paper);
  padding: 12px 16px;
  border-radius: var(--radius);
  text-decoration: none;
}
.skip-link:focus {
  top: 16px;
}
.wrap {
  width: min(100% - 2 * var(--gutter), 1240px);
  margin-inline: auto;
}

/* --- Botones ------------------------------------------------------------------------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 12px 22px;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}
.button:active {
  transform: translateY(1px);
}
.button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s var(--ease-out);
}
.button-solid {
  background: var(--clay-strong);
  color: #fbfcfe;
}
.button-solid:hover {
  background: var(--clay-hover);
}
.button-solid:hover svg {
  transform: translateX(3px);
}
.button-quiet {
  border: 1px solid var(--line-strong);
  color: var(--carbon);
}
.button-quiet:hover {
  background: var(--surface);
  border-color: var(--muted);
}
.button-compact {
  min-height: 42px;
  padding: 9px 18px;
  font-size: 15px;
}

/* --- Encabezado ---------------------------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: 88px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--carbon);
  text-decoration: none;
}
.brand strong {
  display: block;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.1;
}
.brand small {
  display: block;
  margin-top: 5px;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.15em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--muted);
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 36px;
  margin-left: auto;
}
.nav-links {
  display: flex;
  gap: 32px;
}
.nav-links a {
  display: inline-block;
  padding: 8px 0;
  font-size: 15px;
  color: var(--ink);
  text-decoration: none;
  transition: color 0.2s ease;
}
.nav-links a:hover {
  color: var(--accent-text);
}

/* --- Hero ---------------------------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(40px, 5vw, 80px);
  align-items: center;
  padding-block: clamp(56px, 7vw, 96px);
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.7;
  text-transform: uppercase;
  color: var(--accent-text);
}
.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--clay);
}
/* Escala atada al ancho de la columna: «Somos inteligencia aplicada.» mide ~11,3 em y tiene
   que entrar en un renglón desde 960px (abajo de eso el renglón largo puede partirse). */
.hero h1 {
  margin-top: 28px;
  font-size: clamp(2.375rem, 4.2vw, 3.65rem);
  line-height: 1.1;
  letter-spacing: -0.042em;
}
.hero h1 .line {
  display: block;
}
.accent {
  color: var(--accent-text);
}
.lead {
  max-width: 32rem;
  margin-top: 28px;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.6;
  color: var(--ink);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}
.hero-visual {
  justify-self: end;
  width: 100%;
  max-width: 460px;
}
.venn {
  width: 100%;
  height: auto;
  overflow: visible;
}
.venn circle {
  fill: var(--venn-fill);
  stroke: var(--carbon);
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
}
.venn-label {
  fill: var(--muted);
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-anchor: middle;
}
.venn-lens path {
  fill: var(--clay);
}
.venn-core {
  fill: #f3f5f8;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.035em;
  text-anchor: middle;
}
.venn .venn-node {
  fill: var(--paper);
  stroke: var(--mark);
  stroke-width: 1.5;
}

/* --- Secciones ----------------------------------------------------------------------- */
.section {
  padding-block: clamp(80px, 10vw, 136px);
}
.section-ruled {
  border-top: 1px solid var(--line);
}
.section-surface {
  background: var(--surface);
  border-block: 1px solid var(--line);
}
.section-head {
  max-width: 40rem;
  margin-bottom: clamp(40px, 5vw, 64px);
}
.section-head h2 {
  font-size: clamp(2.125rem, 1.4rem + 2vw, 3.25rem);
  line-height: 1.1;
  letter-spacing: -0.04em;
}
.section-head p {
  margin-top: 20px;
  font-size: 18px;
  color: var(--ink);
}

/* Quiénes somos: el eslogan desplegado, un renglón por idea. */
.pillar {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 16px clamp(32px, 6vw, 96px);
  align-items: baseline;
  padding-block: clamp(28px, 3.5vw, 44px);
  border-top: 1px solid var(--line);
}
.pillar:last-child {
  border-bottom: 1px solid var(--line);
}
.pillar h3 {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 1.15rem + 1.6vw, 2.5rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.035em;
  color: var(--carbon);
  text-wrap: balance;
}
.pillar p {
  max-width: 36rem;
  font-size: 17px;
  line-height: 1.65;
}

/* Qué hacemos: título fijo a la izquierda, servicios en dos columnas. */
.services {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(40px, 6vw, 96px);
}
.services .section-head {
  position: sticky;
  top: 40px;
  align-self: start;
  margin-bottom: 0;
}
.service-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(28px, 4vw, 56px);
}
.service {
  padding-block: 32px 40px;
  border-top: 1px solid var(--line);
}
.icon-badge {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--sand);
  color: var(--accent-text);
}
.icon-badge svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.service h3 {
  margin-top: 22px;
  font-size: 19px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--carbon);
}
.service p {
  margin-top: 10px;
  font-size: 16px;
}

/* Cómo trabajamos: cuatro verbos sobre una línea, con un nodo por etapa. */
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 48px);
}
.steps::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line-strong);
}
.step {
  position: relative;
  padding-top: 48px;
}
.step::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 17px;
  height: 17px;
  border: 1.5px solid var(--mark);
  border-radius: 50%;
  background: var(--paper);
}
.step:last-child::before {
  background: var(--mark);
}
.step h3 {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 1.2rem + 0.8vw, 1.875rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: var(--carbon);
}
.step p {
  margin-top: 12px;
  font-size: 16px;
}

/* La frase que resume la propuesta. */
.statement {
  background: var(--sand);
  text-align: center;
}
.statement-mark {
  width: 64px;
  height: 40px;
  margin: 0 auto 36px;
  fill: none;
  stroke: var(--mark);
  stroke-width: 1.5;
}
.statement h2 {
  max-width: 24ch;
  margin-inline: auto;
  font-size: clamp(2rem, 1.2rem + 2.6vw, 3.375rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
}
.statement h2 span {
  display: block;
}
.statement p {
  max-width: 40rem;
  margin: 28px auto 0;
  font-size: 18px;
}

/* --- Contacto y pie: siempre en tinta ------------------------------------------------ */
.contact,
.site-footer {
  background: var(--block);
  color: var(--block-text);
}
.contact {
  position: relative;
  overflow: hidden;
}
.contact :focus-visible,
.site-footer :focus-visible {
  outline-color: var(--block-accent);
}
.contact-rings {
  position: absolute;
  top: 50%;
  right: -10%;
  width: min(70vw, 820px);
  height: auto;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--ring-faint);
  stroke-width: 1.5;
  pointer-events: none;
}
.contact-inner {
  position: relative;
  padding-block: clamp(88px, 11vw, 152px) clamp(80px, 9vw, 120px);
}
.contact h2 {
  font-size: clamp(3rem, 1.6rem + 5vw, 6rem);
  line-height: 1;
  letter-spacing: -0.045em;
  color: var(--block-text);
}
.contact p {
  max-width: 34rem;
  margin-top: 28px;
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  color: var(--block-muted);
}
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-top: 48px;
}
.mail-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(1.375rem, 1rem + 1.6vw, 2.25rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--block-text);
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.22em;
  text-decoration-color: rgb(142 173 255 / 0.55);
  overflow-wrap: anywhere;
  transition:
    color 0.2s ease,
    text-decoration-color 0.2s ease;
}
.mail-link:hover {
  color: var(--block-accent);
  text-decoration-color: currentColor;
}
.mail-link svg {
  width: 0.9em;
  height: 0.9em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s var(--ease-out);
}
.mail-link:hover svg {
  transform: translate(2px, -2px);
}
.copy-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid #3a4252;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  color: #c3cad6;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}
.copy-button:hover {
  background: #222833;
  color: var(--block-text);
}
.copy-button svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.copy-button .icon-check,
.copy-button.is-done .icon-copy {
  display: none;
}
.copy-button.is-done .icon-check {
  display: block;
}
.copy-button.is-done {
  border-color: rgb(125 211 168 / 0.45);
  color: #7dd3a8;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: 28px 36px;
  border-top: 1px solid var(--block-line);
  font-size: 13px;
  color: var(--block-muted);
}
.footer-brand {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}
.footer-brand img {
  width: auto;
  height: 26px;
}

/* --- Página de error ----------------------------------------------------------------- */
.error-page {
  display: grid;
  align-content: center;
  min-height: calc(100dvh - 89px);
  padding-block: 64px 96px;
}
.error-page h1 {
  margin-top: 24px;
  font-size: clamp(2.375rem, 1.4rem + 3vw, 3.75rem);
  line-height: 1.1;
  letter-spacing: -0.042em;
}
.error-page p:not(.eyebrow) {
  max-width: 32rem;
  margin-top: 20px;
  font-size: 18px;
}

/* --- Movimiento ---------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  /* Entrada del hero: el texto en orden de lectura y los dos anillos que se encuentran. */
  .hero-copy > * {
    animation: rise 0.8s var(--ease-out) both;
  }
  .hero h1 .line {
    animation: rise 0.8s var(--ease-out) both;
  }
  .hero-copy > :nth-child(1) {
    animation-delay: 0.05s;
  }
  .hero h1 {
    animation: none;
  }
  .hero h1 .line:nth-child(1) {
    animation-delay: 0.12s;
  }
  .hero h1 .line:nth-child(2) {
    animation-delay: 0.22s;
  }
  .hero h1 .line:nth-child(3) {
    animation-delay: 0.32s;
  }
  .hero-copy > :nth-child(3) {
    animation-delay: 0.44s;
  }
  .hero-copy > :nth-child(4) {
    animation-delay: 0.52s;
  }
  .venn-ring-left {
    animation: ring-from-left 1.3s var(--ease-out) 0.15s both;
  }
  .venn-ring-right {
    animation: ring-from-right 1.3s var(--ease-out) 0.15s both;
  }
  .venn-lens {
    animation: fade 0.8s ease-out 1s both;
  }

  /* Revelado al entrar en pantalla: main.js marca .is-pending solo lo que está más abajo. */
  [data-reveal] {
    transition:
      opacity 0.8s var(--ease-out),
      transform 0.8s var(--ease-out);
  }
  [data-reveal].is-pending {
    opacity: 0;
    transform: translateY(18px);
  }
  .service-grid > :nth-child(even),
  .steps > :nth-child(2) {
    transition-delay: 0.08s;
  }
  .steps > :nth-child(3) {
    transition-delay: 0.16s;
  }
  .steps > :nth-child(4) {
    transition-delay: 0.24s;
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}
@keyframes ring-from-left {
  from {
    opacity: 0;
    transform: translateX(-56px);
  }
}
@keyframes ring-from-right {
  from {
    opacity: 0;
    transform: translateX(56px);
  }
}
@keyframes fade {
  from {
    opacity: 0;
  }
}

/* --- Responsive ---------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .services {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .services .section-head {
    position: static;
    margin-bottom: clamp(40px, 5vw, 64px);
  }
}
@media (max-width: 960px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
  }
  .hero-visual {
    justify-self: start;
    max-width: 400px;
  }
  .steps {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .steps::before {
    top: 8px;
    bottom: 8px;
    left: 8px;
    right: auto;
    width: 1px;
    height: auto;
  }
  .step {
    padding: 0 0 40px 48px;
  }
  .step:last-child {
    padding-bottom: 0;
  }
  .step::before {
    top: 6px;
  }
}
@media (max-width: 860px) {
  .nav-links {
    display: none;
  }
  .pillar {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 640px) {
  .header-inner {
    min-height: 72px;
    gap: 16px;
  }
  .brand img {
    width: 32px;
    height: 32px;
  }
  .brand strong {
    font-size: 23px;
  }
  .brand small {
    display: none;
  }
  .hero h1 {
    margin-top: 22px;
  }
  .actions .button {
    flex: 1 1 auto;
  }
  .service-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .contact-rings {
    top: auto;
    bottom: -12%;
    right: -40%;
    width: 130vw;
    transform: none;
  }
}
