/* Layout concept: single vertical scroll, black ground, Manrope throughout.
   The logotype's square frame becomes the structural device of the whole page. */

/* Manrope (variable, latin subset), self-hosted. */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 500;
  font-display: swap;
  src: url(fonts/manrope-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #000000;
  --ink-2: #212121;
  --ink-3: #424242;
  --ink-4: #616161;
  --ink-5: #969696;
  --paper: #FFFFFF;
  --paper-2: #F4F4F4;
  --rule: rgba(255,255,255,0.14);
  --rule-faint: rgba(255,255,255,0.08);
  --bg: var(--ink);
  --fg: var(--paper);
  --mute: var(--ink-5);
  --sans: 'Manrope', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --top-h: 97px; /* sticky header height: 24px padding ×2 + 48px mark + 1px rule */
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--top-h) + env(safe-area-inset-top, 0px)); }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
html, body { background: var(--bg); color: var(--fg); font-family: var(--sans); }
body { margin: 0; font-weight: 300; -webkit-font-smoothing: antialiased; letter-spacing: 0.005em; line-height: 1.55; }
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; letter-spacing: inherit; }
::selection { background: var(--paper); color: var(--ink); }
:focus-visible { outline: 1px solid var(--paper); outline-offset: 4px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 16px; top: -100px; z-index: 30;
  padding: 10px 14px; background: var(--paper); color: var(--ink);
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500;
}
.skip:focus { top: 16px; }

/* --- Shell --- */
.shell { padding-inline: clamp(20px, 5vw, 72px); }

/* --- Top bar --- */
.top {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: 24px;
  position: sticky; top: env(safe-area-inset-top, 0px);
  background: var(--bg);
  z-index: 20;
  border-bottom: 1px solid var(--rule-faint);
}
/* Logotipo según manual (p. 4 y 12): envolvente cuadrada de trazo fino,
   palabra centrada horizontalmente y apoyada en el tercio inferior.
   Proporciones medidas del manual: ancho de palabra ≈ 66 % del cuadrado,
   altura de mayúscula ≈ 19 %, margen inferior ≈ 19 %, laterales ≈ 17 %. */
.mark {
  --mk: 48px;
  width: var(--mk); height: var(--mk);
  border: 1px solid var(--paper);
  position: relative;
  display: block;
  font-weight: 400; letter-spacing: 0;
}
.mark > span {
  position: absolute; left: 0; right: 0;
  bottom: calc(var(--mk) * 0.10);
  text-align: center;
  font-size: calc(var(--mk) * 0.33);
  line-height: 1;
}
.nav {
  display: flex; align-items: center; gap: clamp(18px, 3vw, 40px);
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500;
}
.nav a { color: var(--mute); transition: color .25s ease; }
.nav a:hover { color: var(--paper); }
.lang {
  display: inline-flex; gap: 2px; color: var(--mute);
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 500;
}
.lang a { padding: 4px 6px; color: var(--mute); transition: color .25s ease; }
.lang a:hover, .lang a[aria-current] { color: var(--paper); }
.lang .sep { opacity: .4; align-self: center; }
@media (max-width: 720px) {
  .nav .nav-link { display: none; }
}

/* --- Hero --- */
.hero {
  padding-block: clamp(72px, 14vw, 160px) clamp(96px, 16vw, 200px);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(48px, 7vw, 96px);
  border-bottom: 1px solid var(--rule-faint);
}
.eyebrow {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--mute); font-weight: 500;
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: ""; width: 24px; height: 1px; background: var(--mute);
}
.hero-title {
  font-weight: 200;
  font-size: clamp(40px, 7.2vw, 112px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
  margin: 0;
  max-width: 18ch;
}
.hero-title em {
  font-style: normal;
  color: var(--ink-5);
}
.hero-foot {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: end;
  padding-top: 36px;
  border-top: 1px solid var(--rule-faint);
}
.hero-lead {
  max-width: 48ch;
  font-size: clamp(15px, 1.1vw, 17px);
  color: var(--ink-5);
  font-weight: 300;
  line-height: 1.6;
}
.hero-cta {
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 500;
  display: inline-flex; align-items: center; gap: 14px;
  color: var(--paper);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--paper);
  white-space: nowrap;
}
.hero-cta .arrow {
  display: inline-block; transition: transform .3s ease;
}
.hero-cta:hover .arrow { transform: translateX(6px); }
@media (max-width: 640px) {
  .hero-foot { grid-template-columns: 1fr; }
}

/* --- Section grid shared --- */
.section {
  padding-block: clamp(80px, 10vw, 140px);
  border-bottom: 1px solid var(--rule-faint);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.1fr);
  gap: clamp(40px, 6vw, 96px);
}
@media (max-width: 820px) {
  .section { grid-template-columns: 1fr; gap: 40px; }
}
.sec-head { display: flex; flex-direction: column; gap: 24px; }
.sec-num {
  font-size: 12px; letter-spacing: 0.22em; color: var(--ink-5); font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.sec-kicker {
  font-size: clamp(22px, 2.6vw, 32px);
  font-weight: 300;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0;
  max-width: 14ch;
  color: var(--paper);
}

/* --- Firma body --- */
.firma-body {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 60ch;
}
.firma-body p {
  margin: 0;
  font-size: clamp(17px, 1.4vw, 22px);
  line-height: 1.5;
  font-weight: 300;
  color: var(--paper);
  letter-spacing: -0.005em;
}
.firma-body p.muted { color: var(--ink-5); font-size: clamp(15px, 1.15vw, 18px); line-height: 1.6; }
.firma-rule {
  height: 1px; background: var(--rule-faint); border: 0; margin: 0;
}

/* --- Situaciones --- */
.sec-intro { margin: 0; font-size: 14px; color: var(--ink-5); line-height: 1.6; max-width: 30ch; }
.sits { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 56px); border-top: 1px solid var(--rule-faint); }
.sit { display: grid; grid-template-columns: 40px 1fr; gap: 14px; padding: 22px 0; border-bottom: 1px solid var(--rule-faint); }
.sit-num { font-size: 11px; letter-spacing: 0.22em; color: var(--ink-5); font-weight: 500; padding-top: 6px; font-variant-numeric: tabular-nums; }
.sit p { margin: 0; font-size: clamp(16px, 1.25vw, 19px); line-height: 1.4; font-weight: 300; color: var(--paper); letter-spacing: -0.005em; }
.sit .sit-sub { font-size: 14px; color: var(--ink-5); margin-top: 2px; }
@media (max-width: 760px) { .sits { grid-template-columns: 1fr; } }

/* --- Pillars (three principles) --- */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--rule-faint);
}
.pillars-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pillars-4 .pillar:nth-child(2n) { border-right: 0; padding-right: 0; }
.pillars-4 .pillar:nth-child(-n+2) { border-bottom: 1px solid var(--rule-faint); }
.pillars-4 .pillar:nth-child(2n+1) { padding-right: clamp(16px, 2vw, 32px); }
@media (max-width: 760px) {
  .pillars, .pillars-4 { grid-template-columns: 1fr; }
  .pillars-4 .pillar { border-bottom: 1px solid var(--rule-faint); }
  .pillars-4 .pillar:last-child { border-bottom: 0; }
}
.pillar {
  padding: 36px clamp(16px, 2vw, 32px) 32px 0;
  display: flex; flex-direction: column; gap: 16px;
  border-right: 1px solid var(--rule-faint);
}
.pillar:last-child { border-right: 0; padding-right: 0; }
@media (max-width: 760px) {
  .pillar { border-right: 0; border-bottom: 1px solid var(--rule-faint); padding: 28px 0; }
  .pillar:last-child { border-bottom: 0; }
}
.pillar-num {
  font-size: 11px; letter-spacing: 0.22em; color: var(--ink-5); font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.pillar h3 {
  margin: 0;
  font-size: clamp(18px, 1.5vw, 22px);
  font-weight: 400;
  letter-spacing: -0.005em;
  line-height: 1.3;
  color: var(--paper);
  text-wrap: balance;
  max-width: 16ch;
}
.pillars-close {
  margin: 0;
  padding-top: 36px;
  border-top: 1px solid var(--rule-faint);
  font-size: clamp(17px, 1.4vw, 22px);
  font-weight: 300;
  color: var(--paper);
  letter-spacing: -0.005em;
}
.pillar p {
  margin: 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-5);
  font-weight: 300;
  max-width: 32ch;
}

/* --- Contact section --- */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(48px, 7vw, 120px);
  padding-block: clamp(96px, 12vw, 160px);
  align-items: start;
}
@media (max-width: 820px) {
  .contact { grid-template-columns: 1fr; gap: 48px; }
}
.contact-title {
  font-weight: 200;
  font-size: clamp(32px, 4.4vw, 64px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 24px 0;
  text-wrap: balance;
  max-width: 14ch;
}
.contact-sub {
  font-size: clamp(15px, 1.15vw, 17px);
  color: var(--ink-5); line-height: 1.6; font-weight: 300;
  max-width: 42ch;
  margin: 0;
}
.contact-list {
  display: grid; gap: 2px;
  border-top: 1px solid var(--rule-faint);
}
.contact-row {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--rule-faint);
}
@media (max-width: 480px) {
  .contact-row { grid-template-columns: 90px 1fr; }
  .contact-row .copy { grid-column: 1 / -1; justify-self: start; margin-top: 4px; }
}
.contact-row .label {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-5); font-weight: 500;
}
.contact-row .value {
  font-size: clamp(15px, 1.15vw, 17px);
  color: var(--paper); font-weight: 300;
  font-style: normal;
  word-break: break-word;
}
/* Mail / phone links: a hairline underline draws in from the left. */
.contact-row a.value {
  justify-self: start;
  padding-bottom: 2px;
  background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px;
  transition: background-size .45s cubic-bezier(.2, .7, .2, 1);
}
.contact-row a.value:hover,
.contact-row a.value:focus-visible { background-size: 100% 1px; }
.copy {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-5);
  padding: 6px 10px; border: 1px solid var(--rule); border-radius: 999px;
  transition: color .25s, border-color .25s;
}
.copy:hover { color: var(--paper); border-color: var(--paper); }
.copy.copied { color: var(--paper); border-color: var(--paper); }
.legal-note {
  grid-column: 1 / -1;
  margin: 0;
  padding-top: 28px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-5);
  max-width: 60ch;
}

/* --- Carreras --- */
.careers { border-top: 1px solid var(--rule-faint); }
.careers-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: clamp(32px, 6vw, 96px); padding-block: clamp(64px, 8vw, 112px); align-items: start; }
.careers-title { margin: 20px 0 0; font-weight: 200; font-size: clamp(24px, 2.8vw, 40px); line-height: 1.15; letter-spacing: -0.015em; max-width: 20ch; text-wrap: balance; }
.careers-text { margin: 20px 0 0; font-size: clamp(15px, 1.15vw, 17px); color: var(--ink-5); line-height: 1.6; max-width: 40ch; }
.contact-actions { margin-top: 28px; }
@media (max-width: 820px) { .careers-in { grid-template-columns: 1fr; gap: 32px; } }

/* --- Footer --- */
.foot {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 32px;
  align-items: end;
  padding-block: 48px 56px;
  padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
}
@media (max-width: 640px) {
  .foot { grid-template-columns: 1fr; align-items: start; gap: 28px; }
}
.foot .mark { --mk: 56px; }
.foot-nav {
  display: flex; justify-content: center; gap: clamp(18px, 3vw, 40px);
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-5); font-weight: 500;
}
.foot-nav a { color: var(--ink-5); transition: color .25s ease; }
.foot-nav a:hover { color: var(--paper); }
.foot-meta {
  text-align: right;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-5); font-weight: 500;
}
.foot-legal { display: inline-flex; gap: 10px; color: var(--ink-5); }
.foot-legal a { color: var(--ink-5); }
.foot-legal a:hover { color: var(--paper); }
@media (max-width: 640px) {
  .foot-nav { justify-content: flex-start; }
  .foot-meta { text-align: left; align-items: flex-start; }
}

/* --- 404 ---
   One screen, no scroll. The logotype's frame is scaled up and holds the code
   in the same lower-third position the word occupies in the mark. */
.nf-page { min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.nf-page .top { position: static; }
.nf-page .lang button { padding: 4px 6px; color: var(--mute); transition: color .25s ease; text-transform: inherit; }
.nf-page .lang button:hover, .nf-page .lang button[aria-pressed="true"] { color: var(--paper); }
[data-l="en"] { display: none; }
html[lang="en"] [data-l="es"] { display: none; }
html[lang="en"] [data-l="en"] { display: revert; }
html[lang="en"] .nf-links[data-l="en"] { display: block; }

.nf {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(48px, 7vw, 120px);
  align-items: center;
  padding-block: clamp(48px, 8vw, 112px);
  border-bottom: 1px solid var(--rule-faint);
}
.nf-copy { display: flex; flex-direction: column; gap: 28px; }
.nf-title {
  margin: 0;
  font-weight: 200;
  font-size: clamp(34px, 4.6vw, 72px);
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-wrap: balance;
  max-width: 16ch;
}
.nf-title em { font-style: normal; color: var(--ink-5); }
.nf-path {
  margin: 0;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px;
}
.nf-path[hidden] { display: none; }
.nf-path-label {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-5); font-weight: 500;
}
.nf-path code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px; color: var(--paper);
  padding: 4px 10px; border: 1px solid var(--rule); border-radius: 999px;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nf-links { list-style: none; margin: 12px 0 0; padding: 0; border-top: 1px solid var(--rule-faint); max-width: 520px; }
.nf-links a {
  display: grid; grid-template-columns: 40px 1fr auto; gap: 14px; align-items: center;
  padding: 18px 0;
  border-bottom: 1px solid var(--rule-faint);
  font-size: clamp(16px, 1.25vw, 19px); color: var(--paper); letter-spacing: -0.005em;
  transition: padding .35s cubic-bezier(.2, .7, .2, 1), border-color .35s ease;
}
.nf-links .nf-num {
  font-size: 11px; letter-spacing: 0.22em; color: var(--ink-5); font-weight: 500; font-variant-numeric: tabular-nums;
}
.nf-links .arrow { color: var(--ink-5); transition: transform .3s ease, color .3s ease; }
.nf-links a:hover, .nf-links a:focus-visible { padding-left: 8px; border-bottom-color: var(--paper); }
.nf-links a:hover .arrow, .nf-links a:focus-visible .arrow { transform: translateX(6px); color: var(--paper); }

.nf-frame {
  --mk: min(100%, 440px);
  justify-self: end;
  width: var(--mk);
  aspect-ratio: 1;
  border: 1px solid var(--paper);
  position: relative;
  container-type: inline-size;
}
.nf-code {
  position: absolute; left: 0; right: 0; bottom: 10%;
  text-align: center;
  font-size: 33cqi;
  font-weight: 400; line-height: 1; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
@media (prefers-reduced-motion: no-preference) {
  .nf-frame { animation: nf-in 1.1s cubic-bezier(.2, .7, .2, 1) both; }
  .nf-code { animation: nf-in 1.1s .25s cubic-bezier(.2, .7, .2, 1) both; }
}
@keyframes nf-in { from { opacity: 0; transform: translateY(12px); } }

.nf-foot { grid-template-columns: 1fr auto; align-items: center; padding-block: 28px; padding-bottom: calc(28px + env(safe-area-inset-bottom, 0px)); }
.foot-mail { font-size: 13px; color: var(--ink-5); transition: color .25s ease; }
.foot-mail:hover { color: var(--paper); }

@media (max-width: 820px) {
  .nf { grid-template-columns: 1fr; align-items: start; }
  .nf-frame { --mk: min(56vw, 240px); justify-self: start; order: -1; }
}
@media (max-width: 640px) {
  .nf-foot { grid-template-columns: 1fr auto; gap: 16px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero-cta .arrow, .copy, .nav a, .lang a, .foot-nav a, .contact-row a.value, .nf-links a, .nf-links .arrow, .foot-mail { transition: none; }
}
