/* Rive AI & Cloud — sistema visual v4
   Estructura inspirada en un sitio de consultoría editorial: menú en píldora flotante, hero a pantalla
   completa, tarjetas montadas sobre el borde del hero, declaraciones grandes, slider a pantalla completa
   y banda de contacto.
   Marca: logo oficial plateado (#BDC3C8 → #767A7B) sobre carbón (#393B3C). Magenta de carta = acción.
   Tintes de carta náutica: papel (agua profunda) y azul de bajío (agua poco profunda).
   Tipografía: Geist (OFL), una sola familia. */

@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/geist-latin.woff2") format("woff2");
}

:root {
  --paper: #f4f5f3;
  --card: #fbfbfa;
  --shoal: #c9dce8;
  --shoal-soft: #e2ecf2;
  --shoal-line: rgba(57, 59, 60, 0.14);
  --line: #dfe3e3;
  --ink: #222426;
  --ink-2: #4b5055;
  --ink-3: #686e74;

  --charcoal: #393b3c;
  --charcoal-2: #2f3133;
  --charcoal-line: #54585b;
  --night: #1d2428;
  --silver: #bdc3c8;
  --on-dark: #f3f5f6;
  --on-dark-2: #c6ccd0;
  --on-dark-3: #9aa1a6;

  --magenta: #a8156f;
  --magenta-2: #8c0f5b;
  --magenta-glow: #e0489f;
  --port: #c2362d;
  --starboard: #1d7f55;

  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max: 1320px;
  --gutter: clamp(20px, 3.4vw, 48px);
  --section: clamp(88px, 9.5vw, 136px);
  --overlap: clamp(120px, 14vw, 190px);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --ease-slide: cubic-bezier(0.7, 0, 0.25, 1);

  --fs-display: clamp(2.875rem, 1.6rem + 4.6vw, 5.25rem);
  --fs-page: clamp(2.75rem, 1.7rem + 4.1vw, 5.125rem);
  --fs-statement: clamp(1.625rem, 1.22rem + 1.45vw, 2.375rem);
  --fs-h2: clamp(1.75rem, 1.4rem + 1.2vw, 2.5rem);
  --fs-h3: clamp(1.5rem, 1.32rem + 0.6vw, 1.875rem);

  color-scheme: light;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body.nav-open { overflow: hidden; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 420;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-weight: 500; text-wrap: balance; }
p { text-wrap: pretty; }

:focus-visible { outline: 2px solid var(--magenta-glow); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 999px;
  background: var(--magenta); color: #fff;
}
.skip-link:focus { top: 12px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.icon { width: 20px; height: 20px; flex: none; }

/* ---------- Tipos ---------- */
.display {
  font-weight: 600;
  font-size: var(--fs-display);
  line-height: 0.98;
  letter-spacing: -0.042em;
  color: #e6e9eb;
}
.statement {
  max-width: 820px;
  font-weight: 500;
  font-size: var(--fs-statement);
  line-height: 1.24;
  letter-spacing: -0.022em;
}
.h2 { font-size: var(--fs-h2); line-height: 1.12; letter-spacing: -0.028em; }
.h3 { font-size: var(--fs-h3); line-height: 1.14; letter-spacing: -0.022em; }
.lead { font-size: 1.1875rem; line-height: 1.5; color: var(--ink-2); }

/* Etiqueta de sección: filete corto encima y texto pequeño en caja normal */
.label {
  display: inline-block;
  padding-top: 12px;
  border-top: 1px solid currentColor;
  min-width: 92px;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: -0.005em;
}
.label { border-top-color: color-mix(in srgb, currentColor 55%, transparent); }

/* ---------- Botón píldora ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 16px;
  min-height: 44px; padding: 0 16px 0 22px;
  border: 1px solid transparent; border-radius: 999px;
  background: var(--magenta); color: #fff;
  font-size: 0.9375rem; font-weight: 520; letter-spacing: -0.005em; white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.25s, border-color 0.25s, color 0.25s;
}
.pill .icon { width: 24px; height: 24px; transition: transform 0.35s var(--ease); }
.pill:hover { background: var(--magenta-2); }
.pill:hover .icon { transform: translateX(4px); }
.pill--sm { min-height: 40px; padding: 0 12px 0 18px; font-size: 0.875rem; gap: 12px; }
.pill--sm .icon { width: 20px; height: 20px; }
.pill--ghost { background: transparent; border-color: rgba(243, 245, 246, 0.42); color: var(--on-dark); }
.pill--ghost:hover { background: rgba(243, 245, 246, 0.1); border-color: var(--on-dark); }
.pill--outline { background: transparent; border-color: rgba(34, 36, 38, 0.3); color: var(--ink); }
.pill--outline:hover { background: rgba(34, 36, 38, 0.05); border-color: var(--ink); }

.link-arrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 520; border-bottom: 1px solid currentColor; padding-bottom: 2px;
}
.link-arrow .icon { width: 18px; height: 18px; transition: transform 0.35s var(--ease); }
.link-arrow:hover .icon { transform: translateX(3px); }

/* Botón circular (slider y carrusel) */
.round {
  display: grid; place-items: center;
  width: 48px; height: 48px; padding: 0;
  border: 1px solid rgba(243, 245, 246, 0.72); border-radius: 50%;
  background: transparent; color: var(--on-dark);
  cursor: pointer; transition: background-color 0.25s, color 0.25s, opacity 0.25s;
}
.round .icon { width: 22px; height: 22px; }
.round:hover { background: var(--on-dark); color: var(--ink); }
.round--ink { border-color: rgba(34, 36, 38, 0.5); color: var(--ink); }
.round--ink:hover { background: var(--ink); color: var(--paper); }
.round[disabled] { opacity: 0.35; cursor: default; pointer-events: none; }
.round--prev .icon { transform: scaleX(-1); }

/* ---------- Encabezado: logo + menú en píldora ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  pointer-events: none;
}
.site-header__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-top: 26px;
}
.site-header a, .site-header button { pointer-events: auto; }
.brand { display: inline-flex; align-items: center; gap: 14px; color: var(--on-dark); transition: opacity 0.4s, transform 0.4s var(--ease); }
.brand__logo { width: 134px; height: auto; }
.brand__sub { padding-left: 14px; border-left: 1px solid rgba(189, 195, 200, 0.35); color: var(--on-dark-3); font-size: 0.875rem; font-weight: 500; }

.nav {
  display: flex; align-items: center; gap: 6px;
  padding: 5px 5px 5px 14px;
  border: 1px solid rgba(243, 245, 246, 0.14); border-radius: 999px;
  background: rgba(33, 38, 42, 0.38);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  pointer-events: auto;
  transition: background-color 0.4s, border-color 0.4s, box-shadow 0.4s;
}
.nav__links { display: flex; gap: 2px; }
.nav__links a, .nav__lang {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px;
  border-radius: 999px; color: var(--on-dark);
  font-size: 0.90625rem; font-weight: 480;
  transition: background-color 0.25s, color 0.25s;
}
.nav__links a:hover, .nav__lang:hover { background: rgba(243, 245, 246, 0.1); }
.nav__links a[aria-current="page"] { background: rgba(243, 245, 246, 0.14); }
.nav__lang { color: var(--on-dark-2); font-size: 0.8125rem; font-weight: 560; letter-spacing: 0.02em; margin-right: 4px; }
.nav__cta { margin-left: 4px; }

.site-header.is-scrolled .brand { opacity: 0; transform: translateY(-8px); pointer-events: none; }
.site-header.is-scrolled .nav { background: rgba(57, 59, 60, 0.62); border-color: rgba(243, 245, 246, 0.16); box-shadow: 0 14px 34px -18px rgba(20, 24, 27, 0.55); }

.nav-toggle {
  display: none; align-items: center; justify-content: center;
  width: 48px; height: 48px; padding: 0;
  border: 1px solid rgba(243, 245, 246, 0.16); border-radius: 50%;
  background: rgba(33, 38, 42, 0.45);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  cursor: pointer; pointer-events: auto;
}
.nav-toggle__lines { position: relative; width: 20px; height: 8px; }
.nav-toggle__lines::before, .nav-toggle__lines::after {
  content: ""; position: absolute; left: 0; width: 100%; height: 1.6px; border-radius: 2px; background: var(--on-dark);
  transition: transform 0.35s var(--ease), top 0.35s var(--ease);
}
.nav-toggle__lines::before { top: 0; }
.nav-toggle__lines::after { top: 6.4px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__lines::before { top: 3.2px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__lines::after { top: 3.2px; transform: rotate(-45deg); }

/* ---------- Hero del home ---------- */
.hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center;
  min-height: max(660px, 94svh);
  padding: 150px 0 calc(var(--overlap) + 64px);
  background: var(--charcoal); color: var(--on-dark);
  isolation: isolate;
}
.hero__chart { position: absolute; inset: 0; z-index: -2; }
.hero__chart svg { width: 100%; height: 100%; }
.hero__chart::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(47, 49, 51, 0.94) 0%, rgba(47, 49, 51, 0.8) 34%, rgba(47, 49, 51, 0.12) 68%, rgba(47, 49, 51, 0.05) 100%),
    linear-gradient(0deg, rgba(47, 49, 51, 0.7) 0%, rgba(47, 49, 51, 0) 32%);
}
/* luz que se mueve despacio sobre el agua (equivalente al video del hero) */
.hero__light { position: absolute; inset: -20%; z-index: -1; pointer-events: none; mix-blend-mode: screen; }
.hero__light::before, .hero__light::after {
  content: ""; position: absolute; border-radius: 50%;
  filter: blur(60px);
}
.hero__light::before {
  width: 62vw; height: 46vw; left: 46%; top: 22%;
  background: radial-gradient(closest-side, rgba(170, 196, 214, 0.22), rgba(170, 196, 214, 0));
}
.hero__light::after {
  width: 40vw; height: 30vw; left: 62%; top: 44%;
  background: radial-gradient(closest-side, rgba(224, 72, 159, 0.12), rgba(224, 72, 159, 0));
}
.hero__inner { position: relative; }
.hero__text { max-width: 780px; }
.hero__sub { max-width: 600px; margin-top: 30px; font-size: 1.25rem; line-height: 1.45; color: var(--on-dark); font-weight: 430; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; margin-top: 40px; }
.hero__proof { display: flex; gap: 10px; max-width: 520px; color: var(--on-dark-2); font-size: 0.9375rem; line-height: 1.45; }
.hero__proof .icon { width: 18px; height: 18px; margin-top: 2px; color: var(--magenta-glow); }
.hero__proof strong { color: var(--on-dark); font-weight: 600; }

/* Capa de la carta: rumbo, boyas, peligros */
.chart-label { font-family: var(--font); fill: var(--on-dark); }
.chart-label--buoy { font-weight: 560; font-size: 17px; letter-spacing: -0.01em; }
.chart-label--hazard { font-style: italic; font-weight: 400; font-size: 15px; fill: #a3aaaf; }
.chart-label--bearing { fill: var(--magenta-glow); font-weight: 600; font-size: 13px; letter-spacing: 0.04em; }
.chart-label--port { font-weight: 620; font-size: 21px; letter-spacing: -0.01em; }
.soundings text { font-family: var(--font); font-style: italic; font-size: 13px; fill: #7f878c; }
.danger { fill: none; stroke: #b2b9be; stroke-width: 1.1; stroke-dasharray: 2 4; }
.rock { fill: none; stroke: #c9ced2; stroke-width: 1.8; stroke-linecap: round; }
.rock-dot { fill: #c9ced2; }
.course {
  fill: none; stroke: var(--magenta-glow); stroke-width: 3; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 0;
  filter: drop-shadow(0 0 6px rgba(224, 72, 159, 0.55));
}
.buoy__pos { fill: var(--charcoal); stroke: var(--silver); stroke-width: 1.3; }
.buoy__body { stroke: #1f2123; stroke-width: 1; stroke-linejoin: round; }
.buoy--g .buoy__body { fill: #2aa36e; }
.buoy--r .buoy__body { fill: #e0483e; }
.buoy__flare { fill: var(--magenta-glow); opacity: 0.92; transform-box: fill-box; transform-origin: 0% 100%; }
.harbor__ring { fill: var(--charcoal); stroke: var(--magenta-glow); stroke-width: 2.4; }
.harbor__anchor { fill: none; stroke: var(--on-dark); stroke-width: 2; stroke-linecap: round; }

/* ---------- Tres tarjetas montadas sobre el borde del hero ---------- */
.trio { position: relative; z-index: 2; margin-top: calc(-1 * var(--overlap)); }
.trio__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.tile {
  position: relative; display: flex; flex-direction: column;
  min-height: 560px; overflow: hidden;
  background: var(--card); color: var(--ink);
}
.tile__text { position: relative; z-index: 1; padding: 34px 32px 34px; }
.tile__title { display: flex; justify-content: space-between; gap: 16px; font-size: 1.625rem; line-height: 1.15; letter-spacing: -0.02em; }
.tile__title .icon { width: 22px; height: 22px; margin-top: 6px; color: var(--magenta); transition: transform 0.4s var(--ease); }
.tile p { margin-top: 16px; max-width: 34ch; color: var(--ink-2); }
.tile__media { position: relative; flex: 1; min-height: 240px; overflow: hidden; }
.tile__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: center bottom; transition: transform 1.4s var(--ease); }
.tile--dark .tile__media img { object-fit: cover; object-position: center bottom; }
.tile:hover .tile__media img { transform: scale(1.045); }
.tile:hover .tile__title .icon { transform: translate(3px, -3px); }
.tile--dark { background: var(--night); color: var(--on-dark); }
.tile--dark .tile__media { position: absolute; inset: 0; min-height: 0; }
.tile--dark .tile__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 26, 31, 0.78) 0%, rgba(20, 26, 31, 0.15) 46%, rgba(20, 26, 31, 0) 100%); }
.tile--dark p { color: var(--on-dark-2); }
.tile--dark .tile__title .icon { color: var(--magenta-glow); }

/* ---------- Declaración con marca de agua ---------- */
.manifest { position: relative; overflow: hidden; padding: var(--section) 0; }
.manifest__inner { position: relative; }
.manifest .label { color: var(--ink); }
.manifest .statement { margin-top: 44px; }
.manifest .pill { margin-top: 40px; }
.watermark {
  position: absolute; right: var(--gutter); top: 50%; z-index: -1;
  width: clamp(240px, 30vw, 420px); height: auto;
  transform: translateY(-50%);
  color: var(--shoal);
}
.manifest { isolation: isolate; }

/* ---------- Pilares en azul de bajío ---------- */
.pillars { padding-bottom: var(--section); }
.pillars__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); background: var(--shoal); }
.pillars__head { padding-bottom: 64px; }
.pillars__head .label { color: var(--ink); }
.pillars__head .statement { margin-top: 40px; }
.pillars__lead { margin-top: 20px; max-width: 60ch; color: var(--ink-2); font-size: 1.125rem; }
.pillar { padding: 40px 34px 56px; }
.pillar + .pillar { border-left: 1px solid var(--shoal-line); }
.pillar__icon { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: #fff; color: var(--ink); }
.pillar__icon .icon { width: 32px; height: 32px; stroke-width: 1.25; }
.pillar h3 { margin-top: 72px; font-size: clamp(1.5rem, 1.3rem + 0.5vw, 1.8125rem); line-height: 1.12; letter-spacing: -0.022em; }
.pillar p { margin-top: 22px; color: var(--ink-2); font-size: 0.96875rem; }

/* ---------- Slider de resultados a pantalla completa ---------- */
.slider { position: relative; overflow: hidden; height: min(100svh, 880px); min-height: 620px; background: var(--night); color: var(--on-dark); }
.slider__track { display: flex; height: 100%; transition: transform 1.25s var(--ease-slide); will-change: transform; }
.slide { position: relative; flex: 0 0 100%; height: 100%; display: flex; align-items: center; }
.slide__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 72% center; }
.slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(17, 22, 26, 0.84) 0%, rgba(17, 22, 26, 0.55) 42%, rgba(17, 22, 26, 0.1) 78%); }
.slide__content { position: relative; z-index: 1; }
.slide__body { max-width: 640px; }
.slide .label { color: var(--on-dark); }
.slide__metric {
  margin-top: 44px;
  font-weight: 500; font-size: clamp(3.5rem, 1.6rem + 6vw, 7rem);
  line-height: 0.92; letter-spacing: -0.05em;
  white-space: nowrap;
}
.slide__title { margin-top: 26px; font-size: 1.5rem; line-height: 1.2; letter-spacing: -0.018em; }
.slide__text { margin-top: 14px; max-width: 52ch; color: var(--on-dark-2); }
.slider__controls { position: absolute; z-index: 2; right: var(--gutter); top: 50%; display: grid; gap: 14px; transform: translateY(-50%); }
.slider__foot {
  position: absolute; z-index: 2; left: 0; right: 0; bottom: 40px;
}
.slider__foot .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; color: var(--on-dark-2); font-size: 0.9375rem; }
.slider__count b { color: var(--on-dark); font-weight: 560; }
.slider__note { flex: 1; max-width: 520px; color: var(--on-dark-3); font-size: 0.8125rem; line-height: 1.4; }
.slider__foot .link-arrow { color: var(--on-dark); }

/* ---------- Fundador (home) ---------- */
.crew { padding: var(--section) 0 calc(var(--section) - 20px); background: var(--shoal); overflow: hidden; }
.crew .label { color: var(--ink); }
.crew .statement { margin-top: 44px; }
.crew .pill { margin-top: 40px; }
.crew__track {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: clamp(250px, 23vw, 318px);
  gap: 18px; margin-top: 72px; margin-right: calc(50% - 50vw); padding-right: var(--gutter);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none; overscroll-behavior-x: contain;
}
.crew__track::-webkit-scrollbar { display: none; }
.member { scroll-snap-align: start; }
.member__media { display: grid; place-items: center; aspect-ratio: 4 / 4.4; overflow: hidden; background: var(--shoal-soft); }
.member__media img { width: 100%; height: 100%; object-fit: cover; }
.member__media--photo img { object-position: center 30%; }
.member__media--badge img { width: 46%; height: auto; object-fit: contain; filter: drop-shadow(0 18px 24px rgba(34, 36, 38, 0.18)); }
.member__media--oci { color: #c74634; }
.member__media--oci .icon { width: 34%; height: auto; aspect-ratio: 1; }
.member__media--mono { background: var(--charcoal); }
.member__media--mono img { width: 48%; height: auto; object-fit: contain; }
.member__plate { position: relative; margin: -58px 14px 0; padding: 16px 18px 18px; background: var(--card); }
.member__plate b { display: block; font-weight: 540; font-size: 1.0625rem; line-height: 1.3; letter-spacing: -0.012em; }
.member__plate span { display: block; margin-top: 4px; color: var(--ink-3); font-size: 0.875rem; line-height: 1.35; }
.crew__controls { display: flex; gap: 12px; margin-top: 32px; }

/* ---------- Banda de contacto ---------- */
.band {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; place-items: center;
  min-height: clamp(460px, 58vw, 620px); padding: 96px 0;
  background: var(--night); color: var(--on-dark); text-align: center;
}
.band__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.band::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 70% at 50% 50%, rgba(17, 22, 26, 0.55) 0%, rgba(17, 22, 26, 0.25) 100%); }
.band .statement { margin: 0 auto; max-width: 760px; color: var(--on-dark); }
.band .pill { margin-top: 40px; }

/* ---------- Pie ---------- */
.site-footer { padding: 80px 0 40px; background: var(--charcoal); color: var(--on-dark); }
.site-footer__grid { display: grid; grid-template-columns: 1fr 1fr; }
.site-footer__col { display: flex; flex-direction: column; min-height: 380px; }
.site-footer__col + .site-footer__col { padding-left: clamp(32px, 4vw, 64px); border-left: 1px solid var(--charcoal-line); }
.site-footer__title { color: var(--on-dark-2); font-size: 0.875rem; font-weight: 500; }
.site-footer__contact { display: grid; gap: 14px; margin-top: 28px; }
.site-footer__contact a { width: fit-content; font-size: 1.25rem; border-bottom: 1px solid rgba(243, 245, 246, 0.45); transition: border-color 0.25s; }
.site-footer__contact a:hover { border-color: var(--on-dark); }
.site-footer__contact p { color: var(--on-dark-3); }
.site-footer__home { width: fit-content; margin-top: auto; padding-top: 48px; }
.site-footer__logo { width: 150px; }
.site-footer__map { margin-top: 24px; }
.site-footer__map a { display: inline-block; font-size: clamp(1.75rem, 1.4rem + 1vw, 2.25rem); line-height: 1.32; letter-spacing: -0.022em; color: var(--on-dark); transition: color 0.25s; }
.site-footer__map a:hover { color: var(--silver); }
.site-footer__meta { margin-top: auto; padding-top: 48px; display: grid; gap: 6px; color: var(--on-dark-3); font-size: 0.8125rem; }
.site-footer__meta a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Páginas internas ---------- */
.page-hero {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; align-items: flex-end;
  min-height: clamp(440px, 62svh, 600px); padding: 160px 0 76px;
  background: var(--night); color: var(--on-dark);
}
.page-hero__bg { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 78% center; }
.page-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(17, 22, 26, 0.72) 0%, rgba(17, 22, 26, 0.3) 60%, rgba(17, 22, 26, 0.1) 100%); }
.page-hero h1 { font-weight: 600; font-size: var(--fs-page); line-height: 1; letter-spacing: -0.04em; color: #e6e9eb; }
.page-hero p { max-width: 620px; margin-top: 22px; font-size: 1.25rem; line-height: 1.45; }

.crumbs { padding: 18px 0; border-bottom: 1px solid var(--line); font-size: 0.8125rem; color: var(--ink-3); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; }
.crumbs li + li::before { content: "›"; margin-right: 8px; color: var(--ink-3); }
.crumbs a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.intro-band { padding: clamp(56px, 6vw, 84px) 0; background: var(--shoal); }
.intro-band .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px clamp(40px, 6vw, 96px); align-items: start; }
.intro-band p { font-size: 1.125rem; line-height: 1.55; color: var(--ink); }

/* Filas alternadas texto / imagen */
/* .rows va junto a .wrap: solo padding vertical para no pisar el padding lateral de .wrap */
.rows { padding-top: clamp(40px, 5vw, 72px); padding-bottom: var(--section); }
.row {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px clamp(48px, 8vw, 128px); align-items: center;
  padding: clamp(40px, 5vw, 72px) 0;
}
.row__media { position: relative; }
.row__media > img { width: 100%; aspect-ratio: 1 / 0.86; object-fit: cover; box-shadow: 0 0 0 1px var(--line); }
.row:nth-child(even) .row__media, .row--flip .row__media { order: -1; }
.rows--tight { padding-top: 0; }
.row__icon { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: #fff; color: var(--ink); box-shadow: 0 0 0 1px var(--line); }
.row__icon .icon { width: 32px; height: 32px; stroke-width: 1.25; }
.row h2 { margin-top: 32px; }
.row__when { margin-top: 18px; font-size: 1.125rem; line-height: 1.45; color: var(--ink); }
.row__desc { margin-top: 14px; max-width: 56ch; color: var(--ink-2); }
.row .pill, .row .link-arrow { margin-top: 30px; }

.stack { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.stack li {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 32px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--card);
  font-size: 0.8125rem; font-weight: 500; color: var(--ink-2);
}
.stack .icon { width: 15px; height: 15px; }

/* Pasos del proceso (secuencia real: se numeran) */
.steps-section { padding: var(--section) 0; background: var(--card); }
.steps-section .h2 { margin-top: 36px; max-width: 760px; }
.steps-section__lead { margin-top: 16px; max-width: 56ch; color: var(--ink-2); font-size: 1.125rem; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; margin-top: 64px; counter-reset: step; }
.step { padding-top: 22px; border-top: 1px solid var(--ink); counter-increment: step; }
.step::before { content: counter(step); display: block; font-size: 0.9375rem; font-weight: 560; color: var(--magenta); }
.step h3 { margin-top: 40px; font-size: 1.375rem; line-height: 1.2; letter-spacing: -0.018em; }
.step p { margin-top: 12px; color: var(--ink-2); font-size: 0.96875rem; }
.step__out { display: flex; gap: 8px; margin-top: 18px; font-size: 0.875rem; font-weight: 520; color: var(--ink); }
.step__out .icon { width: 17px; height: 17px; margin-top: 2px; color: var(--starboard); }

/* Resultados */
.featured { padding: var(--section) 0 clamp(48px, 5vw, 72px); }
.featured__panel {
  display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 40px clamp(40px, 6vw, 96px); align-items: end;
  padding: clamp(32px, 5vw, 64px);
  background: var(--night); color: var(--on-dark);
}
.featured .label { color: var(--on-dark); }
.metric { font-weight: 500; font-size: clamp(3.5rem, 2rem + 5vw, 6.5rem); line-height: 0.95; letter-spacing: -0.05em; white-space: nowrap; }
.featured .metric { margin-top: 40px; }
.featured h2 { margin-top: 22px; font-size: 1.5rem; line-height: 1.2; letter-spacing: -0.018em; }
.featured p { margin-top: 12px; color: var(--on-dark-2); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 22px; }
.tags li { padding: 3px 10px; border: 1px solid currentColor; border-radius: 999px; font-size: 0.75rem; font-weight: 500; opacity: 0.75; }

.gauge__scale { position: relative; padding-top: 52px; }
.gauge__track { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); }
.gauge__before, .gauge__gain { position: absolute; top: 52px; height: 10px; }
.gauge__before { left: 0; width: 52%; border-radius: 999px 0 0 999px; background: rgba(189, 195, 200, 0.5); }
.gauge__gain { left: 52%; width: 28%; border-radius: 0 999px 999px 0; background: linear-gradient(90deg, var(--magenta), var(--magenta-glow)); box-shadow: 0 0 18px rgba(224, 72, 159, 0.45); transform-origin: left; }
.gauge__pin { position: absolute; top: 0; transform: translateX(-50%); text-align: center; line-height: 1.15; }
.gauge__pin b { display: block; font-weight: 600; font-size: 1.125rem; color: var(--on-dark); }
.gauge__pin span { font-size: 0.75rem; color: var(--on-dark-3); white-space: nowrap; }
.gauge__pin--before { left: 52%; }
.gauge__pin--after { left: 80%; }
.gauge__ticks { display: flex; justify-content: space-between; margin-top: 10px; font-size: 0.75rem; color: var(--on-dark-3); }

.cases { padding-bottom: var(--section); }
.cases__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.case { display: flex; flex-direction: column; padding: clamp(28px, 3.5vw, 44px); background: var(--card); }
.case .metric { font-size: clamp(3rem, 2rem + 3vw, 4.5rem); }
.case h2 { margin-top: 22px; font-size: 1.375rem; line-height: 1.22; letter-spacing: -0.018em; }
.case p { margin-top: 12px; color: var(--ink-2); }
.case .tags { margin-top: auto; padding-top: 26px; color: var(--ink-2); }

/* Nosotros */
.collage { position: relative; padding-bottom: 18%; }
.collage > .collage__main { width: 78%; aspect-ratio: 4 / 4.6; object-fit: cover; }
.collage > .collage__main--mono { display: grid; place-items: center; background: var(--charcoal); }
.collage__main--mono img { width: 44%; }
.collage > .collage__detail { position: absolute; right: 0; bottom: 0; width: 44%; aspect-ratio: 1; object-fit: cover; box-shadow: 0 0 0 10px var(--paper); }
.checks { display: grid; gap: 14px; margin-top: 28px; }
.checks li { display: flex; gap: 14px; align-items: flex-start; }
.checks .icon { width: 26px; height: 26px; padding: 5px; border: 1px solid var(--ink); border-radius: 50%; }
.quote { margin-top: 28px; padding-left: 20px; border-left: 2px solid var(--magenta); font-size: 1.1875rem; line-height: 1.45; color: var(--ink); }
.certs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-top: 36px; }
.cert { display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--card); }
.cert img, .cert .icon { width: 56px; height: 56px; flex: none; }
.cert .icon { color: #c74634; padding: 8px; }
.cert b { display: block; font-size: 0.875rem; font-weight: 540; line-height: 1.3; }
.cert span { display: block; margin-top: 2px; font-size: 0.75rem; color: var(--ink-3); }

/* Contacto */
.contact { padding: clamp(56px, 6vw, 88px) 0 var(--section); }
.contact__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px clamp(40px, 6vw, 96px); align-items: start; }
.contact .label { color: var(--ink); }
.contact .statement { margin-top: 40px; font-size: clamp(1.625rem, 1.3rem + 1.1vw, 2.25rem); }
.contact__lead { margin-top: 24px; color: var(--ink-2); }
.facts { display: grid; gap: 2px; margin-top: 36px; }
.facts li { display: grid; grid-template-columns: 22px 110px 1fr; gap: 12px; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--line); }
.facts .icon { width: 18px; height: 18px; color: var(--ink-3); align-self: center; }
.facts span:first-of-type { color: var(--ink-3); font-size: 0.875rem; }
.facts a { border-bottom: 1px solid currentColor; }
.next { margin-top: 40px; }
.next h2 { font-size: 1.125rem; font-weight: 560; letter-spacing: -0.01em; }
.next ol { display: grid; gap: 10px; margin-top: 16px; counter-reset: next; }
.next li { display: flex; gap: 14px; align-items: baseline; counter-increment: next; color: var(--ink-2); }
.next li::before { content: counter(next); display: grid; place-items: center; flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--shoal); color: var(--ink); font-size: 0.8125rem; font-weight: 600; }
.reach {
  display: flex; align-items: center; gap: 18px; margin-top: 36px; padding: 22px 24px;
  background: var(--shoal-soft); transition: background-color 0.25s;
}
.reach:hover { background: var(--shoal); }
.reach__icon { display: grid; place-items: center; width: 52px; height: 52px; flex: none; border-radius: 50%; background: #fff; }
.reach__icon .icon { width: 22px; height: 22px; }
.reach__photo { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.reach__text { flex: 1; font-size: 0.9375rem; line-height: 1.4; }
.reach__text b { display: block; font-weight: 560; }
.reach > .icon { width: 24px; height: 24px; transition: transform 0.35s var(--ease); }
.reach:hover > .icon { transform: translateX(4px); }

.form-card { background: #fff; box-shadow: 0 30px 70px -40px rgba(34, 36, 38, 0.45); }
.form-card__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px clamp(22px, 3vw, 36px); background: var(--charcoal); color: var(--on-dark); }
.form-card__head h2 { font-size: 1.1875rem; font-weight: 520; letter-spacing: -0.01em; }
.form-card__head .icon { width: 22px; height: 22px; color: var(--silver); }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding: clamp(22px, 3vw, 36px); }
.form__intro { grid-column: 1 / -1; font-size: 0.9375rem; color: var(--ink-3); }
.field { display: grid; gap: 7px; align-content: start; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 540; font-size: 0.875rem; }
.field label .optional { font-weight: 420; color: var(--ink-3); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 11px 14px;
  border: 1px solid #cfd4d6; border-radius: 2px; background: #fff; color: var(--ink);
  font: inherit; font-size: 1rem; line-height: 1.4;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { min-height: 150px; resize: vertical; }
.field select {
  appearance: none; padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(135deg, var(--ink-2) 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-3); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: none; border-color: var(--magenta); box-shadow: 0 0 0 4px rgba(168, 21, 111, 0.14); }
.field [aria-invalid="true"] { border-color: var(--port); box-shadow: 0 0 0 4px rgba(194, 54, 45, 0.1); }
.field__error { color: var(--port); font-size: 0.875rem; }
.field__error:empty { display: none; }
.form__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__footer { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 24px; margin-top: 4px; }
.form__privacy { display: inline-flex; align-items: center; gap: 8px; font-size: 0.8125rem; color: var(--ink-3); }
.form__privacy .icon { width: 16px; height: 16px; color: var(--starboard); }
.form button[disabled] { opacity: 0.7; cursor: progress; }
.form__status { grid-column: 1 / -1; padding: 14px 16px; background: var(--paper); font-size: 0.9375rem; }
.form__status:empty { display: none; }
.form__status[data-state="ok"] { background: #e8f4ee; color: #12573a; }
.form__status[data-state="error"] { background: #fbeceb; color: #8f241d; }

/* Preguntas frecuentes */
.faq-section { padding: var(--section) 0; background: var(--card); }
.faq-layout { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 40px clamp(40px, 6vw, 96px); align-items: start; }
.faq-layout__head { position: sticky; top: 110px; }
.faq-layout__head .h2 { margin-top: 36px; }
.faq-layout__head p { margin-top: 18px; color: var(--ink-2); }
.faq { border-top: 1px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; padding: 22px 0; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { font-weight: 520; font-size: 1.0625rem; line-height: 1.45; letter-spacing: -0.01em; }
.faq summary:hover h3 { color: var(--magenta); }
.faq__sign { position: relative; flex: none; width: 30px; height: 30px; border: 1px solid #c3c8cb; border-radius: 50%; }
.faq__sign::before, .faq__sign::after { content: ""; position: absolute; left: 50%; top: 50%; background: var(--ink); border-radius: 2px; transition: transform 0.3s var(--ease); }
.faq__sign::before { width: 11px; height: 1.5px; transform: translate(-50%, -50%); }
.faq__sign::after { width: 1.5px; height: 11px; transform: translate(-50%, -50%); }
.faq details[open] .faq__sign::after { transform: translate(-50%, -50%) scaleY(0); }
.faq__answer { padding: 0 48px 26px 0; color: var(--ink-2); font-size: 0.984375rem; }
.faq__answer p + p, .faq__answer ol { margin-top: 12px; }
.faq__answer ol { padding-left: 1.2em; list-style: decimal; }
.faq__answer li + li { margin-top: 6px; }

/* 404 */
.notfound { min-height: 100svh; align-items: center; }
.notfound p + p { margin-top: 8px; }
.notfound .pill { margin-top: 36px; }
.notfound__alt { margin-top: 18px; }

/* ---------- Movimiento ---------- */
@media (prefers-reduced-motion: no-preference) {
  .course { animation: draw-course 2.8s cubic-bezier(0.55, 0.1, 0.35, 1) 0.5s both; }
  .buoy__flare { animation: light-up 0.7s ease-out both; }
  .buoy:nth-child(1) .buoy__flare { animation-delay: 1.75s; }
  .buoy:nth-child(2) .buoy__flare { animation-delay: 2.05s; }
  .buoy:nth-child(3) .buoy__flare { animation-delay: 2.35s; }
  .buoy:nth-child(4) .buoy__flare { animation-delay: 2.65s; }
  .buoy:nth-child(5) .buoy__flare { animation-delay: 2.9s; }
  .buoy:nth-child(6) .buoy__flare { animation-delay: 3.1s; }
  .harbor__ring { animation: harbor-in 0.6s ease-out 3.25s both; }
  .hero__text > * { animation: rise 1.1s var(--ease) both; }
  .hero__text > :nth-child(2) { animation-delay: 0.12s; }
  .hero__text > :nth-child(3) { animation-delay: 0.24s; }
  .hero__text > :nth-child(4) { animation-delay: 0.36s; }
  .site-header__bar { animation: fade 1.2s var(--ease) 0.1s both; }
  .hero__light::before { animation: drift-a 26s ease-in-out infinite alternate; }
  .hero__light::after { animation: drift-b 32s ease-in-out infinite alternate; }
  .band__bg, .page-hero__bg { animation: breathe 30s ease-in-out infinite alternate; }
  .gauge .gauge__gain { transform: scaleX(0); transition: transform 1.4s var(--ease) 0.2s; }
  .gauge.is-visible .gauge__gain { transform: scaleX(1); }

  .reveal { opacity: 0; transform: translateY(22px); transition: opacity 1s var(--ease), transform 1.1s var(--ease); }
  .reveal.is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .slider__track, .crew__track { transition: none; scroll-behavior: auto; }
}
@keyframes draw-course { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes light-up { from { opacity: 0; transform: scale(0.4); } to { opacity: 0.92; transform: scale(1); } }
@keyframes harbor-in { from { stroke-width: 0; fill: var(--magenta-glow); } to { stroke-width: 2.4; fill: var(--charcoal); } }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes drift-a { from { transform: translate(0, 0) scale(1); } to { transform: translate(-14vw, 6vw) scale(1.15); } }
@keyframes drift-b { from { transform: translate(0, 0); } to { transform: translate(-22vw, -8vw); } }
@keyframes breathe { from { transform: scale(1); } to { transform: scale(1.07); } }

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) {
  .nav__links a, .nav__lang { padding: 0 11px; }
  .pillars__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pillar:nth-child(3) { border-left: 0; }
  .pillar:nth-child(n + 3) { border-top: 1px solid var(--shoal-line); }
  .pillar h3 { margin-top: 48px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 48px; }
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed; inset: 0; z-index: -1;
    flex-direction: column; align-items: flex-start; justify-content: center; gap: 28px;
    padding: 110px var(--gutter) 48px;
    border: 0; border-radius: 0; background: var(--charcoal);
    -webkit-backdrop-filter: none; backdrop-filter: none;
    opacity: 0; visibility: hidden; transition: opacity 0.35s, visibility 0s 0.35s;
  }
  .nav.is-open { opacity: 1; visibility: visible; transition: opacity 0.35s; }
  .site-header.is-scrolled .nav { background: var(--charcoal); box-shadow: none; }
  .nav__links { flex-direction: column; gap: 4px; }
  .nav__links a { min-height: 0; padding: 4px 0; font-size: 2.25rem; letter-spacing: -0.025em; border-radius: 0; }
  .nav__links a:hover, .nav__links a[aria-current="page"] { background: none; color: var(--silver); }
  .nav__lang { padding: 0; min-height: 0; font-size: 1rem; }
  .nav__cta { margin: 0; }
  .site-header.is-scrolled .brand { opacity: 1; transform: none; pointer-events: auto; }
  .site-header.is-scrolled .site-header__bar { padding-top: 14px; }
  .site-header.is-scrolled .brand { padding: 6px 16px 6px 10px; border-radius: 999px; background: rgba(57, 59, 60, 0.7); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
  .site-header.is-scrolled .brand__sub { display: none; }
  .site-header.is-scrolled .brand__logo { width: 104px; }

  .hero { min-height: 0; padding: 140px 0 calc(var(--overlap) + 48px); }
  .hero__chart::after { background: linear-gradient(180deg, rgba(47, 49, 51, 0.9) 0%, rgba(47, 49, 51, 0.82) 55%, rgba(47, 49, 51, 0.6) 100%); }
  .hero .chart-label, .hero .soundings { display: none; }
  .trio__grid { grid-template-columns: 1fr; }
  .tile { min-height: 0; }
  .tile__media { min-height: 260px; flex: none; height: 300px; }
  .tile--dark { min-height: 420px; }
  .tile--dark .tile__media { height: auto; }
  .watermark { opacity: 0.5; right: -60px; }
  .slider { height: auto; min-height: 640px; }
  .slide { align-items: flex-end; padding: 120px 0 210px; }
  .slide::after { background: linear-gradient(0deg, rgba(17, 22, 26, 0.95) 0%, rgba(17, 22, 26, 0.88) 55%, rgba(17, 22, 26, 0.7) 100%); }
  .page-hero::after { background: linear-gradient(0deg, rgba(17, 22, 26, 0.85) 0%, rgba(17, 22, 26, 0.55) 100%); }
  .slider__controls { top: auto; bottom: 26px; right: var(--gutter); display: flex; transform: none; }
  .slider__foot { bottom: 36px; }
  .slider__foot .wrap { flex-direction: column; align-items: flex-start; gap: 10px; }
  .slider__note { flex: none; max-width: 40ch; }
  .site-footer__grid { grid-template-columns: 1fr; }
  .site-footer__col { min-height: 0; }
  .site-footer__col + .site-footer__col { margin-top: 48px; padding: 48px 0 0; border-left: 0; border-top: 1px solid var(--charcoal-line); }
  .intro-band .wrap, .row, .featured__panel, .contact__grid, .faq-layout { grid-template-columns: 1fr; }
  .row:nth-child(even) .row__media { order: 0; }
  .row__media { order: -1; }
  .faq-layout__head { position: static; }
  .cases__grid { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .brand__sub { display: none; }
  .brand__logo { width: 112px; }
  .pillars__grid { grid-template-columns: 1fr; }
  .pillar + .pillar { border-left: 0; border-top: 1px solid var(--shoal-line); }
  .pillar h3 { margin-top: 36px; }
  .steps { grid-template-columns: 1fr; }
  .crew__track { grid-auto-columns: 74%; }
  .form { grid-template-columns: 1fr; }
  .facts li { grid-template-columns: 22px 1fr; }
  .facts li > :last-child { grid-column: 2; }
  .hero__sub { font-size: 1.125rem; }
  .slide__metric { font-size: clamp(3.25rem, 1rem + 12vw, 4.5rem); }
  .gauge__pin b { font-size: 1rem; }
  .collage__detail { box-shadow: 0 0 0 6px var(--paper); }
}

@media print {
  .site-header, .hero__chart, .hero__light, .slider__controls, .crew__controls, .form-card { display: none; }
  body { background: #fff; }
}
