@font-face {
  font-family: "Figtree";
  src: url("/assets/fonts/figtree-latin.woff2?v=dc69709b") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  /* Marca */
  --noche: #1B2433;
  --noche-900: #131A26;
  --noche-700: #26324A;
  --amanecer: #F07F1E;
  --amanecer-300: #FFB061;   /* naranja claro, para texto sobre fondo oscuro */
  --amanecer-700: #A9480B;   /* naranja oscuro, para texto sobre fondo claro (contraste AA) */

  /* Superficies claras */
  --arena: #F1EADC;
  --arena-borde: #DCD0BA;
  --papel: #FBF8F2;
  --hoja: #FFFFFF;

  /* Texto */
  --tinta: #1B2433;
  --lapiz: #4A5364;

  --sombra: 0 1px 2px rgba(19, 26, 38, .06), 0 18px 40px -20px rgba(19, 26, 38, .30);
  --sombra-lg: 0 2px 4px rgba(19, 26, 38, .06), 0 32px 64px -28px rgba(19, 26, 38, .42);
  --sombra-xl: 0 4px 10px rgba(0, 0, 0, .22), 0 36px 70px -24px rgba(0, 0, 0, .65);

  --font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 68px;
  background: var(--noche-900);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--tinta);
  background: var(--papel);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.025em; text-wrap: balance; }
h2 { margin-top: 14px; font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 800; }
h3 { font-size: 1.25rem; font-weight: 700; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }

:focus-visible { outline: 3px solid var(--amanecer); outline-offset: 3px; border-radius: 6px; }

.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 40px);
}

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--amanecer);
  color: var(--noche);
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 700;
}
.skip:focus { top: 12px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1;
  text-decoration: none;
  transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease, color .18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn .arrow { transition: transform .18s ease; }
.btn:hover .arrow { transform: translateX(4px); }

.btn-sun { background: var(--amanecer); color: var(--noche); box-shadow: 0 12px 26px -12px rgba(240, 127, 30, .8); }
.btn-sun:hover { background: #F78E33; }
.btn-ghost { color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .42); }
.btn-ghost:hover { box-shadow: inset 0 0 0 2px #fff; }
.btn-ink { background: var(--noche); color: #fff; box-shadow: 0 12px 24px -14px rgba(19, 26, 38, .8); }
.btn-ink:hover { background: var(--noche-700); }
.btn-outline { color: var(--noche); box-shadow: inset 0 0 0 2px var(--noche); padding: 11px 20px 11px 12px; }
.btn-outline:hover { background: var(--arena); }
.btn-night { background: var(--noche); color: #fff; box-shadow: 0 16px 32px -14px rgba(19, 26, 38, .7); }
.btn-night:hover { background: var(--noche-900); }
.btn-lg { padding: 18px 28px; font-size: 1.08rem; }

.link-plain {
  font-weight: 700;
  color: var(--amanecer-700);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
}
.link-plain:hover { color: var(--noche); }

/* ---------- Encabezado fijo ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--noche-900);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 68px; }
.brand img { width: 176px; height: auto; }

nav ul { list-style: none; display: flex; align-items: center; gap: 30px; margin: 0; padding: 0; }
nav a { color: rgba(255, 255, 255, .86); text-decoration: none; font-weight: 600; font-size: .97rem; transition: color .15s ease; }
nav a:hover { color: #fff; }
.nav-cta {
  display: inline-block;
  padding: 9px 18px;
  border-radius: 999px;
  color: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .45);
  transition: background-color .15s ease, color .15s ease;
}
.nav-cta:hover { background: #fff; color: var(--noche); }

/* ---------- Portada ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(180deg, #131A26 0%, #1A2232 50%, #202B3F 100%);
}
/* Trama de puntos, como una placa de circuito, que se desvanece hacia los bordes */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: radial-gradient(rgba(255, 255, 255, .13) 1px, transparent 1.5px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 75% 85% at 75% 45%, #000 0%, transparent 78%);
  mask-image: radial-gradient(ellipse 75% 85% at 75% 45%, #000 0%, transparent 78%);
}
/* Resplandor del amanecer detrás del sol */
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -8%;
  bottom: -42%;
  width: min(900px, 80vw);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(240, 127, 30, .34), rgba(240, 127, 30, .10) 55%, rgba(240, 127, 30, 0));
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 560px);
  gap: clamp(24px, 3.5vw, 56px);
  align-items: end;
  padding-top: clamp(26px, 4.5vh, 60px);
  padding-bottom: 72px; /* la base del escenario queda 8 px sobre la pista */
}
.hero-copy { padding-bottom: clamp(34px, 6vh, 72px); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 15px 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .07);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15);
  font-size: .85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .92);
}
.pill-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amanecer); box-shadow: 0 0 0 4px rgba(240, 127, 30, .28); }

.hero h1 {
  margin-top: 20px;
  font-size: clamp(2.2rem, 3.6vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.032em;
  line-height: 1.06;
}
.h1-line { display: block; }
.hl { color: var(--amanecer-300); }

.lead {
  margin-top: 20px;
  font-size: clamp(1.06rem, 1.5vw, 1.22rem);
  color: rgba(255, 255, 255, .82);
  max-width: 37ch;
  text-wrap: balance;
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* Escenario: el sol sale detrás de las pantallas de los productos */
.stage { position: relative; margin: 0; width: 100%; aspect-ratio: 600 / 400; }

.sun-clip { position: absolute; right: -2%; bottom: 0; width: 72%; aspect-ratio: 2 / 1; overflow: hidden; }
.sun {
  width: 100%;
  height: 200%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 30%, #FFB866 0%, #F78E33 42%, #F07F1E 72%);
}

.frame { border-radius: 12px; overflow: hidden; background: #fff; box-shadow: var(--sombra-xl); }
.frame-bar { display: flex; align-items: center; gap: 6px; height: 26px; padding: 0 12px; background: #E7EAF0; }
.frame-bar i { width: 8px; height: 8px; border-radius: 50%; background: #BFC6D2; }
.frame-bar span {
  margin-left: 10px;
  padding: 2px 12px;
  border-radius: 6px;
  background: #fff;
  color: #5B6577;
  font-size: .66rem;
  font-weight: 600;
  line-height: 1.5;
}
.frame img { width: 100%; height: auto; }

.stage-frame { position: absolute; left: 0; top: 4%; width: 71%; }

/* Teléfono: marco oscuro alrededor de una captura de celular */
.phone {
  border: 5px solid #0B1220;
  border-radius: 22px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 26px 44px -14px rgba(0, 0, 0, .6);
}
.phone img { width: 100%; height: auto; }
.stage-phone { position: absolute; left: -5%; bottom: 2%; width: 27%; }

.stage figcaption {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 24px;
  font-size: .72rem;
  color: rgba(255, 255, 255, .6);
}

/* La pista: nodo abajo a la izquierda, tramo plano y subida final */
.ground {
  position: absolute;
  left: clamp(10px, 2vw, 40px);
  right: clamp(8px, 1.4vw, 28px);
  bottom: 12px;
  height: 110px;
  pointer-events: none;
}
.g-line { position: absolute; left: 72px; right: 94px; top: 58px; height: 6px; background: #fff; transform-origin: left center; }
.g-left { position: absolute; left: 0; top: 53px; }
.g-right { position: absolute; right: 0; top: 0; }

/* ---------- Secciones ---------- */
.section { padding-block: clamp(64px, 9vw, 112px); }
.section-sand { background: var(--arena); }
.section-white { background: var(--hoja); }
.section-night { background: var(--noche); color: #fff; }

.section-head { max-width: 860px; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--amanecer-700);
}
.eyebrow::before { content: ""; flex: none; width: 26px; height: 3px; border-radius: 2px; background: var(--amanecer); }
.section-night .eyebrow { color: var(--amanecer-300); }
.section-lead { margin-top: 14px; font-size: 1.12rem; color: var(--lapiz); }
.section-night .section-lead { color: rgba(255, 255, 255, .76); }

/* ---------- Productos ---------- */
.product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr);
  margin-top: 44px;
  background: var(--hoja);
  border: 1px solid var(--arena-borde);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--sombra-lg);
}
.product + .product { margin-top: 36px; }
.product-flip .product-visual { order: -1; }

.product-recontrata { --check-bg: #DBE7FF; --check-fg: #1D4ED8; }
.product-nidia { --check-bg: #D3EFE0; --check-fg: #0E6B40; }

.product-body { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(28px, 3.6vw, 48px); }
.product-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; width: 100%; }
.product-logo { width: 210px; height: auto; }
.nidia-mark { display: inline-flex; align-items: center; gap: 10px; }
.nidia-mark img { width: 48px; height: 48px; }
.nidia-name { font-size: 2.05rem; font-weight: 800; letter-spacing: -0.02em; color: #121513; line-height: 1; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}
.badge::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.badge-live { color: #0B6B3D; background: #DDF3E7; box-shadow: inset 0 0 0 1px #A9DDC2; }
.badge-early { color: #8A4A00; background: #FFEDD6; box-shadow: inset 0 0 0 1px #F3CB98; }

.product h3 { margin-top: 22px; font-size: clamp(1.4rem, 2.2vw, 1.8rem); font-weight: 800; line-height: 1.15; }
.product-body > p { margin-top: 14px; color: var(--lapiz); }

.checks { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.checks li { position: relative; padding-left: 34px; }
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .18em;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--check-bg);
}
.checks li::after {
  content: "";
  position: absolute;
  left: 8px;
  top: calc(.18em + 5px);
  width: 6px;
  height: 10px;
  border: solid var(--check-fg);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg);
}

.product-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 22px; margin-top: 26px; padding-top: 2px; }

.product-visual {
  position: relative;
  margin: 0;
  display: grid;
  place-items: center;
  min-height: 400px;
  padding: clamp(30px, 4vw, 52px) clamp(22px, 3.4vw, 44px) 56px;
}
.product-recontrata .product-visual { background: radial-gradient(120% 105% at 88% 0%, #5E96FF 0%, #2563EB 44%, #1A44BE 100%); }
.product-nidia .product-visual { background: radial-gradient(110% 90% at 20% 0%, #25503A 0%, #16261D 48%, #101411 100%); }
.product-visual figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  text-align: center;
  font-size: .76rem;
  color: rgba(255, 255, 255, .95);
}

.visual-stack { position: relative; width: 100%; max-width: 540px; padding: 0 7% 7% 0; }
.visual-stack .phone { position: absolute; right: 0; bottom: 0; width: 26%; }
.phones { display: flex; justify-content: center; align-items: flex-start; gap: 6%; width: 100%; max-width: 440px; }
.phones .phone { width: 47%; }
.phone-shift { margin-top: 10%; }

/* ---------- Cómo trabajamos ---------- */
.steps {
  position: relative;
  list-style: none;
  margin: 56px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 30px);
}
/* La pista que une los tres pasos */
.steps::before {
  content: "";
  position: absolute;
  left: 27px;
  right: 0;
  top: 25px;
  height: 4px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, .55) 0%, rgba(255, 255, 255, .55) 68%, rgba(255, 255, 255, 0) 100%);
}
.steps li { position: relative; display: flex; flex-direction: column; padding-top: 82px; }
.step-node {
  position: absolute;
  left: 0;
  top: 0;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--noche);
  border: 3px solid var(--amanecer);
  box-shadow: 0 0 0 7px var(--noche);
  color: #fff;
  font-weight: 800;
  font-size: .98rem;
  letter-spacing: .02em;
}
.step-card {
  flex: 1;
  padding: 28px;
  border-radius: 20px;
  background: linear-gradient(180deg, #33415E 0%, #2A3650 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), 0 24px 40px -24px rgba(0, 0, 0, .55);
}
.step-icon { width: 40px; height: 40px; }
.step-card h3 { margin-top: 18px; }
.step-card p { margin-top: 8px; color: rgba(255, 255, 255, .78); }

/* ---------- Quién está detrás ---------- */
.person {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: clamp(40px, 7vw, 96px);
  align-items: center;
}
.portrait { position: relative; isolation: isolate; margin: 0 22px 22px 0; }
.portrait::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 22px -22px -22px 22px;
  border-radius: 30px;
  background: linear-gradient(160deg, #FFA94F, #F07F1E);
}
.portrait img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 30px; box-shadow: var(--sombra-lg); }

.role { margin-top: 8px; font-size: 1.1rem; font-weight: 700; color: var(--lapiz); }
.facts { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 4px; padding: 0; }
.facts li {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--arena);
  box-shadow: inset 0 0 0 1px var(--arena-borde);
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.3;
}
.person-body > p:not(.eyebrow):not(.role) { margin-top: 16px; max-width: 60ch; }
.person-body .btn { margin-top: 28px; }
.in-icon { width: 24px; height: 24px; }

/* ---------- Contacto ---------- */
.contact {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(60px, 8vw, 100px);
  color: var(--noche);
  background: linear-gradient(120deg, #F8933A 0%, #F07F1E 55%, #E9700F 100%);
}
/* Anillos del sol */
.contact::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: -150px;
  bottom: -350px;
  width: 580px;
  height: 580px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .17);
  box-shadow: 0 0 0 80px rgba(255, 255, 255, .10), 0 0 0 160px rgba(255, 255, 255, .06);
}
.contact-inner { display: flex; align-items: center; justify-content: space-between; gap: 28px 40px; flex-wrap: wrap; }
.contact h2 { margin-top: 0; font-size: clamp(2rem, 4vw, 3rem); }
.contact p { margin-top: 12px; max-width: 46ch; font-size: 1.12rem; font-weight: 500; }
.mail-icon { width: 22px; height: 22px; }

/* ---------- Pie ---------- */
.footer { background: var(--noche-900); color: rgba(255, 255, 255, .74); font-size: .94rem; }
.footer-grid { display: grid; grid-template-columns: 1.3fr .7fr 1.4fr; gap: 32px 48px; padding-block: 56px 40px; }
.footer-brand img { width: 150px; height: auto; }
.footer-brand p { margin-top: 14px; }
.footer-title {
  margin: 0 0 12px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  line-height: 1.4;
  text-transform: uppercase;
  color: #fff;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer a { text-decoration: none; transition: color .15s ease; }
.footer a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .1); padding-block: 20px; font-size: .85rem; }

/* ---------- Movimiento ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* Al cargar: la pista se dibuja, el sol sale y las pantallas aparecen */
  .g-left { animation: fade-in .3s ease both; }
  .g-line { animation: draw-line .9s cubic-bezier(.3, .6, .2, 1) both .15s; }
  .g-right { animation: fade-in .35s ease both .95s; }
  .sun { animation: sun-rise 1.5s cubic-bezier(.2, .7, .2, 1) both .45s; }
  .stage-frame { animation: float-in .8s cubic-bezier(.2, .7, .2, 1) both .25s; }
  .stage-phone { animation: float-in .8s cubic-bezier(.2, .7, .2, 1) both .5s; }

  @keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
  @keyframes draw-line { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  @keyframes sun-rise { from { transform: translateY(52%); } to { transform: translateY(0); } }
  @keyframes float-in { from { opacity: 0; translate: 0 26px; } to { opacity: 1; translate: 0 0; } }

  .product { transition: transform .25s ease, box-shadow .25s ease; }
  .product:hover { transform: translateY(-4px); box-shadow: 0 2px 4px rgba(19, 26, 38, .06), 0 44px 80px -30px rgba(19, 26, 38, .5); }
  .step-card { transition: transform .25s ease; }
  .steps li:hover .step-card { transform: translateY(-4px); }

  /* Al bajar: cada bloque aparece cuando entra en pantalla (solo en navegadores que lo permiten) */
  @supports (animation-timeline: view()) {
    @media screen {
    .reveal {
      animation: reveal linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 42%;
    }
    }
    @keyframes reveal { from { opacity: 0; translate: 0 30px; } to { opacity: 1; translate: 0 0; } }
  }
}

/* ---------- Pantallas medianas y chicas ---------- */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-copy { padding-bottom: 0; }
  .lead { max-width: 46ch; }
  .stage { max-width: 540px; margin: 44px auto 0; }
  .stage-phone { left: 0; }
  .sun-clip { right: 0; }

  .product { grid-template-columns: minmax(0, 1fr); }
  .product-flip .product-visual { order: 0; }
  .product-visual { min-height: 0; }
}

@media (max-width: 860px) {
  .nav-wide { display: none; }

  .steps { grid-template-columns: minmax(0, 1fr); gap: 22px; margin-top: 44px; }
  .steps::before { display: none; }
  .steps li { padding-top: 27px; }
  .step-node { left: 22px; }
  .step-card { padding-top: 46px; }

  .person { grid-template-columns: minmax(0, 1fr); }
  .portrait { max-width: 260px; }

  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
}

/* En celular el escenario deja libre la esquina donde la pista vuelve a subir */
@media (max-width: 640px) {
  .stage { margin: 44px 44px 0 0; width: auto; }
  .sun-clip { right: 6%; width: 64%; }
  .g-line { top: 59px; height: 4px; }
  .g-left { transform: scale(.667); transform-origin: 74px 8px; }
  .g-right { transform: scale(.667); transform-origin: 0 61px; }
  .stage figcaption { right: -44px; }
}

@media (max-width: 560px) {
  .brand img { width: 150px; }
  .h1-line { display: inline; }
  .pill { font-size: .78rem; }
  .stage-frame { width: 82%; }
  .stage-phone { width: 30%; }
  .product-logo { width: 180px; }
  .btn-lg { padding: 16px 22px; font-size: 1rem; }
}

@media (max-width: 380px) {
  .pill { font-size: .72rem; padding: 6px 12px 6px 10px; gap: 8px; }
}

/* ---------- Página 404 ---------- */
.notfound-inner { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 20px; }
.notfound-inner img { width: 220px; height: auto; margin-bottom: 12px; }
.notfound-inner h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.notfound-inner p { color: var(--lapiz); }
