/* =========================================================
   TOKENS DE MARCA
   ========================================================= */
:root {
  --ink: #1F345B;          /* azul del logo */
  --ink-deep: #152541;     /* azul profundo para secciones oscuras */
  --ink-night: #0F1B31;    /* pie de página */
  --green: #11604F;        /* verde del logo */
  --green-soft: #6CC7A8;   /* verde para fondos oscuros */
  --paper: #FFFFFF;
  --mist: #F2F5F9;
  --text: #1B2740;
  --muted: #56627A;
  --muted-on-dark: #B7C3D8;
  --line: #DCE3ED;
  --line-on-dark: rgba(255, 255, 255, 0.14);

  --serif: "Newsreader", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Public Sans", "Segoe UI", "Helvetica Neue", Arial, sans-serif;

  --container: 1180px;
  --gutter: clamp(20px, 5vw, 48px);
  --section-y: clamp(80px, 11vw, 144px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  color-scheme: light;
  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

*, *::before, *::after { box-sizing: inherit; }
html { scroll-behavior: smooth; scroll-padding-top: calc(84px + env(safe-area-inset-top, 0px)); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; border-radius: 2px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; color: var(--ink); margin: 0; letter-spacing: -0.015em; line-height: 1.2; }
p { margin: 0; }

/* =========================================================
   BOTONES
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--sans); font-weight: 600; font-size: 1rem;
  padding: 15px 26px; border-radius: 6px; text-decoration: none;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
  border: 1.5px solid transparent; cursor: pointer;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--ink); color: #fff; }
.btn--primary:hover { background: var(--green); }
.btn--light { background: #fff; color: var(--ink); }
.btn--light:hover { background: var(--green-soft); color: var(--ink-deep); }
.btn--outline-light { border-color: rgba(255,255,255,.45); color: #fff; }
.btn--outline-light:hover { border-color: #fff; background: rgba(255,255,255,.06); }

.text-link {
  font-weight: 600; color: var(--ink); text-decoration: none;
  background-image: linear-gradient(var(--green), var(--green));
  background-size: 0% 2px; background-repeat: no-repeat; background-position: 0 100%;
  padding-bottom: 3px; transition: background-size .35s var(--ease), color .25s;
}
.text-link:hover { background-size: 100% 2px; color: var(--green); }

/* =========================================================
   ENCABEZADO
   ========================================================= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0px);
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.nav__brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.nav__brand img { height: 44px; width: auto; }
.nav__brand-name { font-family: var(--serif); font-size: 1.15rem; font-weight: 500; color: var(--ink); line-height: 1.1; }
.nav__links { display: flex; align-items: center; gap: 34px; list-style: none; margin: 0; padding: 0; }
.nav__links a:not(.btn) { text-decoration: none; font-size: .95rem; font-weight: 500; color: var(--muted); transition: color .2s; }
.nav__links a:not(.btn):hover { color: var(--ink); }
.nav__links .btn { padding: 11px 20px; font-size: .95rem; }
.nav__toggle { display: none; background: none; border: 0; padding: 10px; margin-right: -10px; cursor: pointer; color: var(--ink); }
.nav__toggle svg { display: block; }

/* =========================================================
   HERO
   ========================================================= */
.hero { padding: clamp(56px, 9vw, 112px) 0 clamp(72px, 10vw, 128px); overflow: hidden; }
.hero__grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(40px, 6vw, 88px); align-items: center; }
.hero__title {
  font-size: clamp(2.5rem, 5.2vw, 4.3rem);
  line-height: 1.04; letter-spacing: -0.025em; font-weight: 600;
  max-width: 14ch;
}
.hero__title span { display: block; }
.hero__title span + span { color: var(--muted); font-weight: 500; }
.hero__lead {
  margin-top: 28px; max-width: 52ch;
  font-size: clamp(1.08rem, 1.4vw, 1.22rem); line-height: 1.7; color: var(--muted);
}
.hero__actions { margin-top: 40px; display: flex; flex-wrap: wrap; align-items: center; gap: 28px; }

/* Las tres barras del logo: la base sobre la que se apoya la empresa */
.pillars { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.pillars__caption { font-family: var(--serif); font-size: 1.05rem; color: var(--muted); margin-bottom: 10px; text-align: center; }
.pillar {
  height: clamp(58px, 6.4vw, 78px);
  background: var(--ink); color: #fff; border-radius: 3px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: clamp(1.15rem, 1.8vw, 1.45rem); font-weight: 500; letter-spacing: .005em;
  transform-origin: center;
}
.pillar:nth-of-type(1) { width: 100%; }
.pillar:nth-of-type(2) { width: 80%; }
.pillar:nth-of-type(3) { width: 63%; }
.pillars__base { width: 34%; height: 4px; background: var(--green); border-radius: 2px; margin-top: 8px; transform-origin: center; }

/* Secuencia de carga: el único momento orquestado de la página */
.js .hero__title span, .js .hero__lead, .js .hero__actions, .js .pillars__caption { opacity: 0; transform: translateY(14px); }
.js .pillar, .js .pillars__base { transform: scaleX(0); }
.js .pillar span { opacity: 0; }
.js.is-loaded .hero__title span, .js.is-loaded .hero__lead, .js.is-loaded .hero__actions, .js.is-loaded .pillars__caption {
  opacity: 1; transform: none; transition: opacity .9s var(--ease), transform .9s var(--ease);
}
.js.is-loaded .hero__title span:nth-child(2) { transition-delay: .12s; }
.js.is-loaded .hero__lead { transition-delay: .24s; }
.js.is-loaded .hero__actions { transition-delay: .36s; }
.js.is-loaded .pillars__caption { transition-delay: .5s; }
.js.is-loaded .pillar { transform: scaleX(1); transition: transform 1s var(--ease); }
.js.is-loaded .pillar:nth-of-type(1) { transition-delay: .55s; }
.js.is-loaded .pillar:nth-of-type(2) { transition-delay: .7s; }
.js.is-loaded .pillar:nth-of-type(3) { transition-delay: .85s; }
.js.is-loaded .pillars__base { transform: scaleX(1); transition: transform 1s var(--ease) 1.05s; }
.js.is-loaded .pillar span { opacity: 1; transition: opacity .6s ease; }
.js.is-loaded .pillar:nth-of-type(1) span { transition-delay: 1.1s; }
.js.is-loaded .pillar:nth-of-type(2) span { transition-delay: 1.2s; }
.js.is-loaded .pillar:nth-of-type(3) span { transition-delay: 1.3s; }

/* =========================================================
   ENFOQUE (sección oscura)
   ========================================================= */
.approach { background: var(--ink-deep); color: #fff; padding: var(--section-y) 0; }
.approach__statement {
  color: #fff; font-size: clamp(2rem, 4vw, 3.3rem); line-height: 1.12; font-weight: 500;
  max-width: 20ch;
}
.approach__grid {
  margin-top: clamp(56px, 7vw, 88px);
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
  border-top: 1px solid var(--line-on-dark);
}
.approach__col { padding-top: 40px; }
.approach__col:first-child { padding-right: clamp(28px, 5vw, 72px); border-right: 1px solid var(--line-on-dark); }
.approach__col:last-child { padding-left: clamp(28px, 5vw, 72px); }
.approach__col h3 { color: #fff; font-size: 1.65rem; font-weight: 500; margin-bottom: 18px; }
.approach__col > p { color: var(--muted-on-dark); max-width: 46ch; }
.approach__col > p + p { margin-top: 16px; }
.promise-list { list-style: none; margin: 0; padding: 0; }
.promise-list li { padding: 18px 0; border-bottom: 1px solid var(--line-on-dark); display: grid; grid-template-columns: 16px 1fr; gap: 16px; }
.promise-list li:first-child { padding-top: 0; }
.promise-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.promise-list li::before { content: ""; width: 16px; height: 3px; background: var(--green-soft); margin-top: .8em; border-radius: 2px; }
.promise-list strong { display: block; color: #fff; font-weight: 600; }
.promise-list span { color: var(--muted-on-dark); font-size: 1rem; }

/* =========================================================
   ÁREAS
   ========================================================= */
.areas { padding: var(--section-y) 0; }
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end; margin-bottom: clamp(44px, 6vw, 72px); }
.section-head h2 { font-size: clamp(2rem, 3.8vw, 3.1rem); line-height: 1.1; max-width: 18ch; }
.section-head p { color: var(--muted); max-width: 44ch; justify-self: end; }

.area-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.area {
  position: relative;
  display: grid; grid-template-columns: minmax(200px, 1fr) 1.4fr; gap: 32px; align-items: baseline;
  padding: clamp(28px, 3.4vw, 40px) 0 clamp(28px, 3.4vw, 40px) 28px;
  border-bottom: 1px solid var(--line);
}
.area::before {
  content: ""; position: absolute; left: 0; top: 50%; width: 4px; height: 0;
  background: var(--green); border-radius: 2px; transform: translateY(-50%);
  transition: height .45s var(--ease);
}
.area:hover::before { height: 56%; }
.area h3 { font-size: clamp(1.7rem, 2.8vw, 2.3rem); font-weight: 500; }
.area p { color: var(--muted); font-size: 1.1rem; max-width: 50ch; }

/* =========================================================
   PROCESO
   ========================================================= */
.process { background: var(--mist); padding: var(--section-y) 0; }
.process .section-head { grid-template-columns: 1fr; gap: 14px; }
.process .section-head p { justify-self: start; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 56px); counter-reset: step; }
.step { counter-increment: step; }
.step__stack { display: flex; flex-direction: column; align-items: center; gap: 7px; width: 120px; margin-bottom: 30px; }
.step__bar { height: 14px; border-radius: 2px; background: #D3DBE6; transform-origin: center; }
.step__bar:nth-child(1) { width: 120px; }
.step__bar:nth-child(2) { width: 96px; }
.step__bar:nth-child(3) { width: 76px; }
.step__bar.is-on { background: var(--ink); }
.step__num { font-family: var(--serif); font-size: 1.05rem; color: var(--green); font-weight: 600; display: block; margin-bottom: 8px; }
.step__num::before { content: "Paso " counter(step); }
.step h3 { font-size: 1.6rem; font-weight: 500; margin-bottom: 12px; }
.step p { color: var(--muted); max-width: 34ch; }

.js .step__bar.is-on { transform: scaleX(0); }
.js .process.is-visible .step__bar.is-on { transform: scaleX(1); transition: transform .9s var(--ease); }
.js .process.is-visible .step:nth-child(1) .step__bar.is-on { transition-delay: .1s; }
.js .process.is-visible .step:nth-child(2) .step__bar.is-on:nth-child(1) { transition-delay: .35s; }
.js .process.is-visible .step:nth-child(2) .step__bar.is-on:nth-child(2) { transition-delay: .45s; }
.js .process.is-visible .step:nth-child(3) .step__bar.is-on:nth-child(1) { transition-delay: .6s; }
.js .process.is-visible .step:nth-child(3) .step__bar.is-on:nth-child(2) { transition-delay: .7s; }
.js .process.is-visible .step:nth-child(3) .step__bar.is-on:nth-child(3) { transition-delay: .8s; }

/* =========================================================
   PRESENTACIÓN
   ========================================================= */
.about { padding: var(--section-y) 0; }
.about__grid { display: grid; grid-template-columns: 300px 1fr; gap: clamp(40px, 7vw, 104px); align-items: start; }
.about__portrait {
  aspect-ratio: 4 / 5; width: 100%; border-radius: 4px;
  background: var(--ink); position: relative; overflow: hidden;
}
.about__photo {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  /* El encuadre es cuadrado: se recorta el lado derecho (pared vacía)
     para que el retrato quede centrado en el formato vertical. */
  object-position: 15% center;
}
/* Velo inferior: apoya la barra verde y ata la foto al azul de marca.
   Necesita z-index porque, sin él, ::before se pinta debajo de la imagen. */
.about__portrait::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 45%; z-index: 1;
  background: linear-gradient(to top, rgba(15, 27, 49, .62), rgba(15, 27, 49, 0));
  pointer-events: none;
}
.about__portrait::after {
  content: ""; position: absolute; left: 28px; right: 28px; bottom: 28px; height: 3px; z-index: 2; background: var(--green-soft); border-radius: 2px;
}
.about__title { font-size: clamp(2.1rem, 4vw, 3.2rem); line-height: 1.08; }
/* El nombre enlaza al perfil de LinkedIn. A diferencia de .text-link, el subrayado
   se ve en reposo: dentro de un título hace falta que se note que es clicable. */
.about__link {
  color: inherit; text-decoration: none;
  background-image: linear-gradient(var(--green), var(--green));
  background-size: 100% 2px; background-repeat: no-repeat; background-position: 0 100%;
  padding-bottom: .06em;
  transition: color .25s var(--ease), background-size .3s var(--ease);
}
.about__link:hover { color: var(--green); background-size: 100% 4px; }
.about__role { margin-top: 10px; color: var(--green); font-weight: 600; }
.about__body { margin-top: 30px; display: grid; gap: 18px; max-width: 60ch; font-family: var(--serif); font-size: 1.28rem; line-height: 1.6; color: var(--text); }
.about__body p:last-child { color: var(--muted); }

/* =========================================================
   CONTACTO
   ========================================================= */
.contact { background: var(--ink); color: #fff; padding: var(--section-y) 0; }
.contact__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(40px, 7vw, 96px); align-items: end; }
.contact h2 { color: #fff; font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.05; max-width: 14ch; }
.contact__lead { margin-top: 24px; color: var(--muted-on-dark); font-size: 1.15rem; max-width: 44ch; }
.contact__actions { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 14px; }
.contact__details { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-on-dark); }
.contact__details li { padding: 24px 0; border-bottom: 1px solid var(--line-on-dark); }
.contact__label { display: block; font-size: .92rem; color: var(--muted-on-dark); margin-bottom: 4px; }
.contact__value {
  font-family: var(--serif); font-size: clamp(1.3rem, 2.2vw, 1.7rem); color: #fff; text-decoration: none; word-break: break-word;
  background-image: linear-gradient(var(--green-soft), var(--green-soft));
  background-size: 0% 2px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size .35s var(--ease);
}
.contact__value:hover { background-size: 100% 2px; }

/* =========================================================
   PRIVACIDAD
   ========================================================= */
.privacy { padding: var(--section-y) 0; background: var(--mist); }
.privacy h2 { font-size: clamp(2rem, 3.8vw, 3.1rem); line-height: 1.1; margin-bottom: 44px; }
.privacy h3 { font-size: 1.5rem; font-weight: 600; color: var(--ink); margin-top: 32px; margin-bottom: 14px; }
.privacy h3:first-child { margin-top: 0; }
.privacy__content { max-width: 70ch; }
.privacy__content > p { color: var(--muted); line-height: 1.8; margin-bottom: 18px; font-size: 1.05rem; }
.privacy__list { list-style: none; margin: 16px 0 20px; padding: 0; }
.privacy__list li { padding: 10px 0 10px 24px; position: relative; color: var(--muted); font-size: 1.05rem; line-height: 1.7; }
.privacy__list li::before { content: ""; position: absolute; left: 0; top: 14px; width: 8px; height: 2px; background: var(--green); border-radius: 1px; }

/* =========================================================
   PIE
   ========================================================= */
.site-footer { background: var(--ink-night); color: var(--muted-on-dark); padding: 48px 0 calc(40px + env(safe-area-inset-bottom, 0px)); font-size: .95rem; }
.footer__row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer__brand { display: flex; align-items: center; gap: 14px; }
.footer__brand img { height: 46px; width: auto; }
.footer__brand span { font-family: var(--serif); color: #fff; font-size: 1.1rem; }
.footer__meta { display: flex; gap: 28px; flex-wrap: wrap; }
/* El .text-link base es azul oscuro: sobre el pie hay que aclararlo para que se lea */
.footer__meta .text-link { font-size: .9rem; color: #fff; background-image: linear-gradient(var(--green-soft), var(--green-soft)); }
.footer__meta .text-link:hover { color: var(--green-soft); }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__title { max-width: 16ch; }
  .pillars { max-width: 460px; margin-top: 8px; }
  .section-head { grid-template-columns: 1fr; gap: 20px; }
  .section-head p { justify-self: start; }
  .approach__grid { grid-template-columns: 1fr; }
  .approach__col:first-child { padding-right: 0; border-right: 0; padding-bottom: 40px; border-bottom: 1px solid var(--line-on-dark); }
  .approach__col:last-child { padding-left: 0; }
  .steps { grid-template-columns: 1fr; gap: 48px; }
  .about__grid { grid-template-columns: 1fr; }
  .about__portrait { max-width: 200px; }
  .about__portrait::after { left: 22px; right: 22px; bottom: 22px; }
  .contact__grid { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 24px;
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .25s var(--ease), transform .25s var(--ease), visibility .25s;
  }
  .nav__links.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__links li a:not(.btn) { display: block; padding: 14px 0; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
  .nav__links .btn { margin-top: 18px; width: 100%; padding: 14px 20px; }
}
@media (max-width: 640px) {
  .nav__brand-name { display: none; }
  .area { grid-template-columns: 1fr; gap: 8px; padding-left: 20px; }
  .hero__actions { gap: 20px; }
  .contact__actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; transition-delay: 0s !important; animation: none !important; }
  .js .hero__title span, .js .hero__lead, .js .hero__actions, .js .pillars__caption,
  .js .pillar, .js .pillars__base, .js .pillar span, .js .step__bar.is-on { opacity: 1 !important; transform: none !important; }
}
