/* =========================================================
   PORTUM LEGAL · v2 — Editorial premium
   Inspiración: Uría (asimetría editorial + arte) + Clyde (storytelling)
   ========================================================= */

/* ---------- 1. Variables ---------- */
:root {
  /* Paleta corporativa */
  --navy: #0b3b7b;
  --navy-deep: #062448;
  --navy-night: #030f24;
  --blue-mid: #6f96d1;
  --blue-soft: #9ccbff;
  --blue-pale: #bdd4e6;
  --bg: #fafaf7;            /* off-white cálido tipo papel */
  --bg-cream: #f5f2eb;      /* tono crema editorial */
  --bg-soft: #edf0f5;
  --ink: #0a1729;
  --ink-soft: #2a3a55;
  --muted: #6b7891;
  --line: #d8dde6;
  --gold: #b89968;
  --accent: #c54b3c;        /* rojo sello — micro-acento puntual */

  /* Tipografía — más editorial */
  --font-display: 'Cormorant Garamond', 'Times New Roman', serif;
  --font-serif: 'Fraunces', Georgia, serif;
  --font-body: 'Söhne', 'Inter Tight', 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', 'Söhne Mono', monospace;

  /* Layout */
  --container: min(1380px, 92vw);
  --gutter: clamp(1.2rem, 3vw, 2.5rem);
  --section-y: clamp(5rem, 10vw, 9rem);
  --header-h: 80px;

  /* Easing curves teatrales */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.83, 0, 0.17, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  font-feature-settings: 'ss01', 'ss02', 'cv01';
  cursor: none; /* Cursor custom en desktop */
}

@media (max-width: 900px) {
  body { cursor: auto; }
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul, ol { list-style: none; }

::selection { background: var(--navy); color: var(--bg); }

/* ---------- 2. Cursor custom ---------- */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 8px;
  height: 8px;
  background: var(--navy);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 9999;
  transition: transform 0.15s var(--ease-out), background 0.2s, width 0.25s, height 0.25s, opacity 0.2s;
  mix-blend-mode: difference;
  filter: invert(1);
}
.cursor.is-hover {
  width: 60px;
  height: 60px;
  background: var(--navy);
}
.cursor.is-hidden { opacity: 0; }
@media (max-width: 900px) {
  .cursor { display: none; }
}

/* ---------- 3. Tipografía — editorial fuerte ---------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--navy);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
}
.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--navy);
}

.display-xl { font-size: clamp(3rem, 9vw, 9rem); line-height: 0.92; letter-spacing: -0.04em; }
.display-l  { font-size: clamp(2.4rem, 5.5vw, 5rem); line-height: 1; }
.display-m  { font-size: clamp(1.8rem, 3.5vw, 3rem); line-height: 1.05; }

p { color: var(--ink-soft); }
.lead {
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 1.3vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 56ch;
}

.italic { font-style: italic; }

/* Highlighted words within headlines (estilo Uría) */
.hl-bold {
  font-weight: 600;
  font-style: italic;
  color: var(--navy);
}

/* ---------- 4. Container & utilities ---------- */
.container { width: var(--container); margin: 0 auto; }
.section { padding: var(--section-y) 0; position: relative; }

.section--cream { background: var(--bg-cream); }
.section--night {
  background: var(--navy-night);
  color: var(--bg);
}
.section--night h1, .section--night h2, .section--night h3 { color: var(--bg); }
.section--night p { color: rgba(250, 250, 247, 0.7); }
.section--night .eyebrow { color: var(--blue-soft); }
.section--night .eyebrow::before { background: var(--blue-soft); }

/* ---------- 5. Header ---------- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  transition: background 0.4s var(--ease-out), border-color 0.3s, color 0.4s;
  mix-blend-mode: difference;
  color: var(--bg);
}
.header.is-scrolled {
  mix-blend-mode: normal;
  background: rgba(250, 250, 247, 0.92);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.header__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.header__logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.header__logo svg { height: 28px; width: auto; }

.nav {
  display: flex;
  align-items: center;
  gap: 2.4rem;
}
.nav__link {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  position: relative;
  padding: 0.35rem 0;
  transition: opacity 0.2s;
}
.nav__link::before {
  content: counter(nav-counter, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  vertical-align: super;
  margin-right: 0.35rem;
  opacity: 0.5;
  letter-spacing: 0.05em;
}
.nav { counter-reset: nav-counter; }
.nav__link { counter-increment: nav-counter; }
.nav__link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width 0.4s var(--ease-out-expo);
}
.nav__link:hover::after { width: 100%; }

.nav__lang {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  padding-left: 1.5rem;
  border-left: 1px solid currentColor;
  opacity: 0.7;
}
.nav__lang strong { opacity: 1; font-weight: 500; }

.nav__toggle {
  display: none;
  width: 36px;
  height: 36px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}
.nav__toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.35s var(--ease-out), opacity 0.3s;
}
.nav__toggle.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- 6. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  position: relative;
  white-space: nowrap;
  cursor: none;
  text-transform: uppercase;
}
.btn--inline {
  padding-bottom: 0.5rem;
  border-bottom: 1px solid currentColor;
  transition: gap 0.3s var(--ease-out);
}
.btn--inline:hover { gap: 1.1rem; }

.btn--pill {
  padding: 0.95rem 1.6rem;
  border-radius: 999px;
  background: var(--navy);
  color: var(--bg);
  transition: all 0.4s var(--ease-out);
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 0.9rem;
}
.btn--pill:hover {
  background: var(--navy-deep);
  transform: translateY(-1px);
  box-shadow: 0 14px 36px -16px rgba(11, 59, 123, 0.6);
}
.btn--pill-ghost {
  padding: 0.95rem 1.6rem;
  border-radius: 999px;
  border: 1px solid var(--navy);
  color: var(--navy);
  transition: all 0.4s var(--ease-out);
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 0.9rem;
}
.btn--pill-ghost:hover { background: var(--navy); color: var(--bg); }

.btn .arrow { transition: transform 0.4s var(--ease-out); }
.btn:hover .arrow { transform: translateX(5px); }

/* ---------- 7. HERO — split asimétrico editorial ---------- */
.hero {
  min-height: 100vh;
  position: relative;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  padding-top: var(--header-h);
}

.hero__inner {
  flex: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: stretch;
  position: relative;
}

/* Lado izquierdo: tipografía dramática */
.hero__left {
  padding: clamp(2rem, 6vw, 5rem) clamp(2rem, 5vw, 4rem) clamp(2rem, 5vw, 3rem) var(--gutter);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.hero__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  margin-bottom: clamp(2rem, 5vw, 4rem);
}

.hero__index {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--muted);
  text-transform: uppercase;
}
.hero__index span { color: var(--navy); }

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7.5vw, 7rem);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.035em;
  color: var(--navy);
  position: relative;
}
.hero__title em {
  font-style: italic;
  font-weight: 400;
  color: var(--blue-mid);
}
.hero__title .word {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}
.hero__title .word > span {
  display: inline-block;
  transform: translateY(110%);
  animation: wordRise 1.1s var(--ease-out-expo) forwards;
}
.hero__title .word:nth-child(1) > span { animation-delay: 0.1s; }
.hero__title .word:nth-child(2) > span { animation-delay: 0.2s; }
.hero__title .word:nth-child(3) > span { animation-delay: 0.3s; }
.hero__title .word:nth-child(4) > span { animation-delay: 0.4s; }
.hero__title .word:nth-child(5) > span { animation-delay: 0.5s; }
.hero__title .word:nth-child(6) > span { animation-delay: 0.6s; }

@keyframes wordRise {
  to { transform: translateY(0); }
}

.hero__bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-top: clamp(2rem, 5vw, 4rem);
  align-items: end;
  opacity: 0;
  animation: fadeUp 0.9s var(--ease-out) 0.9s forwards;
}

.hero__sub {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 38ch;
}

.hero__cta {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  align-items: flex-start;
}

/* Lado derecho: foto con overlay */
.hero__right {
  position: relative;
  overflow: hidden;
  background: var(--navy-night);
}
.hero__media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-image: url('../img/hero.svg');
  filter: contrast(1.05) saturate(0.95) brightness(0.92);
  transform: scale(1.05);
  animation: zoomOut 2.4s var(--ease-out-expo) forwards;
}
@keyframes zoomOut { to { transform: scale(1); } }

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(3, 15, 36, 0.15) 0%, rgba(3, 15, 36, 0.55) 100%);
  z-index: 1;
}

.hero__caption {
  position: absolute;
  left: clamp(1.5rem, 3vw, 2.5rem);
  bottom: clamp(1.5rem, 3vw, 2.5rem);
  z-index: 2;
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.85;
  max-width: 28ch;
  line-height: 1.5;
}
.hero__caption strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0.01em;
  margin-bottom: 0.6rem;
  font-style: italic;
}

.hero__corner {
  position: absolute;
  top: clamp(1.5rem, 3vw, 2.5rem);
  right: clamp(1.5rem, 3vw, 2.5rem);
  z-index: 2;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bg);
  text-align: right;
  opacity: 0.85;
}
.hero__corner strong {
  display: block;
  font-size: 0.65rem;
  opacity: 0.7;
  margin-bottom: 0.3rem;
}

/* Hero compass — decoración náutica sutil */
.hero__compass {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-15deg);
  width: 220px;
  height: auto;
  color: var(--blue-soft);
  opacity: 0;
  animation: compassFade 1.6s var(--ease-out-expo) 1.4s forwards, compassRotate 80s linear 1.4s infinite;
  pointer-events: none;
  z-index: 3;
}
@keyframes compassFade {
  to { opacity: 0.4; }
}
@keyframes compassRotate {
  from { transform: translate(-50%, -50%) rotate(-15deg); }
  to { transform: translate(-50%, -50%) rotate(345deg); }
}
@media (max-width: 1024px) {
  .hero__compass { display: none; }
}

/* Scroll cue */
.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bg);
  mix-blend-mode: difference;
  opacity: 0.75;
}
.hero__scroll-line {
  width: 1px;
  height: 38px;
  background: currentColor;
  position: relative;
  overflow: hidden;
}
.hero__scroll-line::after {
  content: '';
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, transparent, var(--bg));
  animation: scrollHint 2s ease-in-out infinite;
}
@keyframes scrollHint {
  to { top: 100%; }
}

/* ---------- 8. STATS — cifras como statement (Uría-style) ---------- */
.stats {
  background: var(--bg);
  padding: clamp(4rem, 7vw, 7rem) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
}

.stats__intro {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.2vw, 2.1rem);
  font-style: italic;
  font-weight: 300;
  color: var(--navy);
  max-width: 48ch;
  margin-bottom: clamp(3rem, 6vw, 5rem);
  line-height: 1.2;
}

/* ---------- STATS · configurable por número de columnas ---------- */
.stats__grid {
  display: grid;
  /* Por defecto 4 columnas. Cada clase modificadora .stats__grid--cols-N
     impone su nº de columnas, y los media queries gestionan tablet/móvil. */
  grid-template-columns: repeat(4, 1fr);
  column-gap: var(--portum-stats-gap-x, 0px);
  row-gap: var(--portum-stats-gap-y, 3rem);
}

/* Nº de columnas en DESKTOP */
.stats__grid--cols-1 { grid-template-columns: 1fr; }
.stats__grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.stats__grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.stats__grid--cols-4 { grid-template-columns: repeat(4, 1fr); }
.stats__grid--cols-5 { grid-template-columns: repeat(5, 1fr); }
.stats__grid--cols-6 { grid-template-columns: repeat(6, 1fr); }

.stat {
  padding: 1.5rem 0;
  position: relative;
  /* Usamos border-left en todas menos las que abren fila.
     Así funciona automáticamente con cualquier nº de columnas. */
  border-left: 1px solid var(--line);
  padding-left: clamp(1rem, 2.5vw, 2rem);
}
/* El contenido de cada celda puede limitarse en ancho para no estirarse */
.stat > * {
  max-width: var(--portum-stats-content-width, 100%);
}

/* Quitar borde-izquierdo a los stats que abren fila.
   nth-child no acepta variables CSS, así que generamos una regla por
   número de columnas mediante una clase modificadora en el grid. */
.stats__grid--cols-1 .stat { border-left: none; padding-left: 0; }
.stats__grid--cols-2 .stat:nth-child(2n + 1) { border-left: none; padding-left: 0; }
.stats__grid--cols-3 .stat:nth-child(3n + 1) { border-left: none; padding-left: 0; }
.stats__grid--cols-4 .stat:nth-child(4n + 1) { border-left: none; padding-left: 0; }
.stats__grid--cols-5 .stat:nth-child(5n + 1) { border-left: none; padding-left: 0; }
.stats__grid--cols-6 .stat:nth-child(6n + 1) { border-left: none; padding-left: 0; }
/* Fallback con :first-child por si la clase no se aplica */
.stat:first-child { border-left: none; padding-left: 0; }

/* === Columnas responsive: TABLET (<= 900px) ===
   En tablet, se aplican clases .stats__grid--cols-tablet-N que reemplazan
   el patrón de bordes del desktop. */
@media (max-width: 900px) {
  /* Sobreescribir grid-template-columns con la clase tablet */
  .stats__grid--cols-tablet-1 { grid-template-columns: 1fr; }
  .stats__grid--cols-tablet-2 { grid-template-columns: repeat(2, 1fr); }
  .stats__grid--cols-tablet-3 { grid-template-columns: repeat(3, 1fr); }
  .stats__grid--cols-tablet-4 { grid-template-columns: repeat(4, 1fr); }
  .stats__grid--cols-tablet-5 { grid-template-columns: repeat(5, 1fr); }
  .stats__grid--cols-tablet-6 { grid-template-columns: repeat(6, 1fr); }

  /* Reset: por defecto en tablet todos llevan borde y padding */
  .stats__grid[class*="stats__grid--cols-tablet"] .stat {
    border-left: 1px solid var(--line);
    padding-left: clamp(0.8rem, 2.5vw, 1.5rem);
  }
  .stats__grid--cols-tablet-1 .stat { border-left: none; padding-left: 0; }
  .stats__grid--cols-tablet-2 .stat:nth-child(2n + 1) { border-left: none; padding-left: 0; }
  .stats__grid--cols-tablet-3 .stat:nth-child(3n + 1) { border-left: none; padding-left: 0; }
  .stats__grid--cols-tablet-4 .stat:nth-child(4n + 1) { border-left: none; padding-left: 0; }
  .stats__grid--cols-tablet-5 .stat:nth-child(5n + 1) { border-left: none; padding-left: 0; }
  .stats__grid--cols-tablet-6 .stat:nth-child(6n + 1) { border-left: none; padding-left: 0; }
}

/* === Columnas responsive: MOBILE (<= 600px) === */
@media (max-width: 600px) {
  .stats__grid--cols-mobile-1 { grid-template-columns: 1fr; }
  .stats__grid--cols-mobile-2 { grid-template-columns: repeat(2, 1fr); }
  .stats__grid--cols-mobile-3 { grid-template-columns: repeat(3, 1fr); }
  .stats__grid--cols-mobile-4 { grid-template-columns: repeat(4, 1fr); }

  .stats__grid[class*="stats__grid--cols-mobile"] .stat {
    border-left: 1px solid var(--line);
    padding-left: 0.8rem;
  }
  .stats__grid--cols-mobile-1 .stat { border-left: none; padding-left: 0; }
  .stats__grid--cols-mobile-2 .stat:nth-child(2n + 1) { border-left: none; padding-left: 0; }
  .stats__grid--cols-mobile-3 .stat:nth-child(3n + 1) { border-left: none; padding-left: 0; }
  .stats__grid--cols-mobile-4 .stat:nth-child(4n + 1) { border-left: none; padding-left: 0; }
}

.stat__number {
  font-family: var(--font-display);
  /* El tamaño se escala según el nº de columnas: con 1-2 cols puede ser más grande */
  font-size: clamp(2.5rem, calc(8vw / max(var(--portum-stats-cols, 4), 1)) + 2.5rem, 7rem);
  font-weight: 300;
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--navy);
  display: flex;
  align-items: flex-start;
  gap: 0.2rem;
}
.stat__number sup {
  font-size: 0.4em;
  font-style: italic;
  font-weight: 400;
  color: var(--blue-mid);
  letter-spacing: 0;
  margin-top: 0.3em;
}

.stat__label {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 1rem;
  /* El ancho de texto del label se hereda de --portum-stats-content-width.
     Por defecto 22ch para mantener legibilidad. */
  max-width: var(--portum-stats-label-width, 22ch);
  line-height: 1.45;
}
.stat__label strong {
  display: block;
  color: var(--navy);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.3rem;
}

/* ---------- 9. FIRMA — split editorial ---------- */
.firma {
  padding: clamp(5rem, 10vw, 9rem) 0;
}

.firma__grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: clamp(3rem, 8vw, 7rem);
  align-items: start;
}

.firma__head {
  position: sticky;
  top: calc(var(--header-h) + 2rem);
}

.firma__head h2 {
  margin-top: 1.5rem;
  font-size: clamp(2.4rem, 5.5vw, 5rem);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.035em;
}

.firma__body p {
  font-size: clamp(1.05rem, 1.3vw, 1.2rem);
  line-height: 1.6;
  margin-bottom: 1.8rem;
  color: var(--ink-soft);
}
.firma__body p .hl-bold {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  color: var(--navy);
  font-size: 1.08em;
}

.firma__pull {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-style: italic;
  font-weight: 300;
  line-height: 1.2;
  color: var(--navy);
  margin: clamp(2rem, 4vw, 3rem) 0;
  padding: 1.5rem 0 1.5rem 2rem;
  border-left: 3px solid var(--blue-mid);
  position: relative;
}
.firma__pull::before {
  content: '"';
  position: absolute;
  top: -0.5rem;
  left: 1rem;
  font-size: 4rem;
  color: var(--blue-mid);
  opacity: 0.25;
  font-family: var(--font-display);
}

.firma__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 2rem;
  border-top: 1px solid var(--line);
}

.firma__tag {
  font-family: var(--font-body);
  font-size: 0.82rem;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex: 0 0 50%;
  padding-right: 1rem;
  color: var(--ink-soft);
  transition: color 0.3s, padding-left 0.3s var(--ease-out);
}
.firma__tag:nth-child(odd) { padding-left: 0; }
.firma__tag:nth-child(even) {
  padding-left: 1rem;
  border-left: 1px solid var(--line);
}
.firma__tag::before {
  content: counter(tags, decimal-leading-zero);
  counter-increment: tags;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.firma__tags { counter-reset: tags; }
.firma__tag:hover { color: var(--navy); padding-left: 0.5rem; }
.firma__tag:nth-child(even):hover { padding-left: 1.5rem; }

/* ---------- 10. ÁREAS — formato magazine portadas ---------- */
.areas {
  background: var(--navy-night);
  color: var(--bg);
  padding: clamp(5rem, 10vw, 9rem) 0;
  overflow: hidden;
}

.areas__intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: end;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

.areas__intro h2 {
  color: var(--bg);
  max-width: 16ch;
  font-weight: 300;
}

.areas__intro p {
  color: rgba(250, 250, 247, 0.7);
  max-width: 50ch;
  font-size: 1.05rem;
  line-height: 1.55;
}

.area-row {
  display: grid;
  grid-template-columns: 80px 1fr 1.2fr 100px;
  gap: clamp(1rem, 3vw, 3rem);
  padding: clamp(2rem, 4vw, 3rem) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  align-items: start;
  position: relative;
  transition: background 0.5s var(--ease-out);
  cursor: none;
}
.area-row:last-child { border-bottom: 1px solid rgba(255, 255, 255, 0.12); }

.area-row::before {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: 0; bottom: 0;
  background: rgba(156, 203, 255, 0.04);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
  z-index: 0;
}
.area-row:hover::before { opacity: 1; }

.area-row > * { position: relative; z-index: 1; }

.area-num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 300;
  color: var(--blue-soft);
  font-style: italic;
  letter-spacing: -0.02em;
  line-height: 1;
}

.area-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  font-weight: 300;
  color: var(--bg);
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.area-title em {
  font-style: italic;
  color: var(--blue-soft);
  display: block;
  font-size: 0.85em;
  margin-top: 0.3rem;
}

.area-desc {
  font-size: 0.95rem;
  line-height: 1.55;
  color: rgba(250, 250, 247, 0.7);
}
.area-desc strong {
  color: var(--blue-soft);
  font-weight: 500;
  font-style: italic;
}

.area-arrow {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: rgba(250, 250, 247, 0.5);
  text-transform: uppercase;
  transition: color 0.3s, transform 0.4s var(--ease-out);
}
.area-row:hover .area-arrow {
  color: var(--blue-soft);
  transform: translateX(8px);
}

/* Detail panel that opens (initially hidden, expandable) */
.area-detail {
  grid-column: 1 / -1;
  padding-top: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.7s var(--ease-out-expo), opacity 0.5s, padding-top 0.5s;
}
.area-row.is-open .area-detail {
  max-height: 2500px;
  opacity: 1;
  padding-top: 2.5rem;
}

.area-detail__grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: clamp(2rem, 4vw, 4rem);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 2.5rem;
}

.area-detail__intro {
  font-size: 0.95rem;
  line-height: 1.65;
  color: rgba(250, 250, 247, 0.78);
}
.area-detail__intro p { color: inherit; margin-bottom: 1rem; }
.area-detail__clients {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-style: italic;
  color: var(--blue-soft);
  font-size: 0.9rem;
  line-height: 1.5;
}

.area-services {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}
.area-services__title {
  grid-column: 1 / -1;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue-soft);
  margin-bottom: 1.2rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.area-services__item {
  font-size: 0.85rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(250, 250, 247, 0.78);
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding-right: 1rem;
  transition: color 0.25s, padding-left 0.3s var(--ease-out);
}
.area-services__item::before {
  content: counter(srv, decimal-leading-zero);
  counter-increment: srv;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: rgba(156, 203, 255, 0.5);
  letter-spacing: 0.05em;
  flex-shrink: 0;
}
.area-services { counter-reset: srv; }
.area-services__item:hover {
  color: var(--bg);
  padding-left: 0.4rem;
}

/* Subareas of marítimo */
.subareas {
  margin-top: 2.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  grid-column: 1 / -1;
}
.subarea h4 {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue-soft);
  margin-bottom: 0.7rem;
}
.subarea p {
  font-size: 0.85rem;
  line-height: 1.55;
  color: rgba(250, 250, 247, 0.7);
}
.subarea a {
  color: var(--blue-soft);
  border-bottom: 1px solid rgba(156, 203, 255, 0.4);
  transition: border-color 0.3s;
}
.subarea a:hover { border-color: var(--blue-soft); }

/* ---------- 11. STORYTELLING / Sticky scroll dinámico ---------- */
.story {
  background: var(--bg-cream);
  padding: clamp(5rem, 10vw, 9rem) 0;
  position: relative;
}

.story__head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: end;
  margin-bottom: clamp(3rem, 5vw, 4rem);
}
.story__head h2 { font-weight: 300; }

.story__inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(3rem, 6vw, 6rem);
  align-items: start;
  position: relative;
}

/* Lado izquierdo sticky */
.story__sticky {
  position: sticky;
  top: calc(var(--header-h) + 2rem);
  height: fit-content;
  display: flex;
  gap: 1.5rem;
  align-items: stretch;
}

.story__panel {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--line);
  padding: clamp(2rem, 4vw, 3rem);
  position: relative;
  overflow: hidden;
  min-height: 460px;
  display: flex;
  flex-direction: column;
}

.story__counter {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--muted);
  margin-bottom: 2rem;
  display: flex;
  gap: 0.3rem;
  align-items: baseline;
}
.story__counter-num {
  color: var(--navy);
  font-weight: 500;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
}
.story__counter-total { opacity: 0.6; font-variant-numeric: tabular-nums; }

.story__panels-wrap {
  position: relative;
  flex: 1;
}

.story__panel-item {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity 0.5s var(--ease-out), transform 0.6s var(--ease-out);
  pointer-events: none;
}
.story__panel-item.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.story__panel-num {
  font-family: var(--font-display);
  font-size: clamp(5rem, 10vw, 9rem);
  font-style: italic;
  font-weight: 300;
  color: var(--navy);
  line-height: 0.9;
  letter-spacing: -0.05em;
  margin-bottom: 1rem;
  opacity: 0.95;
}

.story__panel-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.4vw, 2.1rem);
  font-weight: 400;
  color: var(--navy);
  line-height: 1.1;
  margin-bottom: 1rem;
}
.story__panel-title em {
  font-style: italic;
  color: var(--blue-mid);
}

.story__panel-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
  flex: 1;
}

.story__panel-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: auto;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

/* Indicador de progreso lateral */
.story__progress {
  width: 2px;
  position: relative;
  background: rgba(11, 59, 123, 0.1);
  flex-shrink: 0;
}
.story__progress-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: var(--navy);
  transition: height 0.6s var(--ease-out);
}

/* Lado derecho: bloques scrollables */
.story__scrolls {
  display: flex;
  flex-direction: column;
  gap: clamp(4rem, 8vw, 7rem);
}

.story__scroll-block {
  padding: 0 0 clamp(2rem, 4vw, 3rem) 0;
  border-bottom: 1px solid var(--line);
}
.story__scroll-block:last-child { border-bottom: none; }

.story__scroll-meta {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.story__scroll-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy);
  font-weight: 500;
}
.story__scroll-time {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.story__scroll-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 400;
  color: var(--navy);
  line-height: 1.1;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.story__scroll-text {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink-soft);
  margin-bottom: 1rem;
  max-width: 46ch;
}
.story__scroll-text em {
  font-style: italic;
  color: var(--navy);
  font-weight: 500;
}
.story__scroll-text .hl-bold {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  color: var(--navy);
  font-size: 1.08em;
}

.story-step__chip {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 0.25rem 0.5rem;
  background: var(--bg-soft);
  text-transform: uppercase;
}

/* ---------- 12. CLIENTES — bandera tipográfica ---------- */
.clients {
  background: var(--bg);
  padding: clamp(5rem, 10vw, 8rem) 0;
}

.clients__head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: end;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}
.clients__head h2 { max-width: 18ch; font-weight: 300; }
.clients__head p { max-width: 40ch; }

.clients__list {
  border-top: 1px solid var(--line);
}
.client-row {
  display: grid;
  grid-template-columns: 80px 1fr 1fr;
  gap: 2rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
  transition: padding-left 0.4s var(--ease-out), background 0.4s;
  cursor: none;
}
.client-row:hover {
  padding-left: 1.5rem;
  background: var(--bg-cream);
}

.client-row__num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.client-row__name {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  font-weight: 400;
  color: var(--navy);
  letter-spacing: -0.01em;
}

.client-row__desc {
  font-size: 0.88rem;
  color: var(--ink-soft);
  font-style: italic;
}

/* ---------- 13. ACTUALIDAD ---------- */
.news {
  background: var(--bg-cream);
  padding: clamp(5rem, 10vw, 9rem) 0;
}

.news__head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: clamp(3rem, 5vw, 4rem);
}
.news__head h2 { font-weight: 300; }

.news__featured {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  margin-bottom: 4rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--line);
}

.news__featured-img {
  height: 420px;
  background-size: cover;
  background-position: center;
  background-image: url('../img/news-featured.svg');
  filter: contrast(1.05) saturate(0.9);
  cursor: none;
}

.news__featured-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.news__featured-content .meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.news-card-meta {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}
.news-card-cat {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--navy);
  text-transform: uppercase;
}

.news__featured-content h3 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--navy);
  margin-bottom: 1rem;
}

.news__featured-content p {
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: 2rem;
  max-width: 45ch;
}

.news__list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.news-card {
  padding: 1.8rem 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  cursor: none;
  transition: padding-left 0.4s var(--ease-out);
}
.news-card:hover { padding-left: 1rem; }

.news-card__num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--muted);
  letter-spacing: 0.1em;
}

.news-card__body .meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.6rem;
}

.news-card__title {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1.5vw, 1.4rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--navy);
  margin-bottom: 0.7rem;
}

.news-card__excerpt {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* ---------- 14. CTA Block — full bleed dramático ---------- */
.cta-block {
  background: var(--navy-night);
  color: var(--bg);
  padding: clamp(6rem, 12vw, 10rem) 0;
  position: relative;
  overflow: hidden;
}
.cta-block::before {
  content: '';
  position: absolute;
  top: -10%;
  right: -10%;
  width: 60%;
  height: 120%;
  background: radial-gradient(circle, rgba(156, 203, 255, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.cta-block__inner {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 5rem;
  align-items: center;
}

.cta-block h2 {
  color: var(--bg);
  font-size: clamp(2.2rem, 5.5vw, 5rem);
  line-height: 0.95;
  font-weight: 300;
  letter-spacing: -0.035em;
}
.cta-block h2 em {
  font-style: italic;
  color: var(--blue-soft);
}

.cta-block__cta {
  margin-top: 2rem;
}
.cta-block__cta .btn--pill {
  background: var(--bg);
  color: var(--navy);
}
.cta-block__cta .btn--pill:hover {
  background: var(--blue-soft);
}

.cta-detail {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cta-detail__line {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.cta-detail__line:last-child { border-bottom: 0; }

.cta-detail__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue-soft);
}
.cta-detail__value {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  font-weight: 400;
  color: var(--bg);
}

/* ---------- 15. Footer ---------- */
.footer {
  background: var(--navy-night);
  color: rgba(250, 250, 247, 0.65);
  padding: clamp(3rem, 5vw, 4rem) 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer__top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer__brand h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--bg);
  margin-bottom: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  font-style: italic;
}

.footer__tagline {
  font-size: 0.92rem;
  line-height: 1.5;
  color: rgba(250, 250, 247, 0.7);
  max-width: 32ch;
  margin-bottom: 1.5rem;
}

.footer__col-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bg);
  margin-bottom: 1.2rem;
  opacity: 0.85;
}
.footer__list li { margin-bottom: 0.6rem; font-size: 0.88rem; }
.footer__list a {
  color: rgba(250, 250, 247, 0.7);
  transition: color 0.2s, padding-left 0.3s;
}
.footer__list a:hover { color: var(--blue-soft); padding-left: 0.3rem; }

.footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: rgba(250, 250, 247, 0.5);
}

/* ---------- 16. Animaciones / reveal ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s var(--ease-out-expo), transform 1s var(--ease-out-expo);
}
.reveal.is-in { opacity: 1; transform: translateY(0); }

.reveal-stagger > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}
.reveal-stagger.is-in > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.is-in > *:nth-child(1)  { transition-delay: 0.05s; }
.reveal-stagger.is-in > *:nth-child(2)  { transition-delay: 0.12s; }
.reveal-stagger.is-in > *:nth-child(3)  { transition-delay: 0.19s; }
.reveal-stagger.is-in > *:nth-child(4)  { transition-delay: 0.26s; }
.reveal-stagger.is-in > *:nth-child(5)  { transition-delay: 0.33s; }
.reveal-stagger.is-in > *:nth-child(6)  { transition-delay: 0.40s; }
.reveal-stagger.is-in > *:nth-child(7)  { transition-delay: 0.47s; }
.reveal-stagger.is-in > *:nth-child(8)  { transition-delay: 0.54s; }
.reveal-stagger.is-in > *:nth-child(9)  { transition-delay: 0.61s; }
.reveal-stagger.is-in > *:nth-child(10) { transition-delay: 0.68s; }

/* Mask reveal effect for images */
.mask-reveal {
  position: relative;
  overflow: hidden;
}
.mask-reveal::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--navy-night);
  transform-origin: top;
  transform: scaleY(1);
  transition: transform 1.2s var(--ease-out-expo);
  z-index: 5;
}
.mask-reveal.is-in::after { transform: scaleY(0); }

/* Text reveal — para titulares con efecto mask de izquierda a derecha */
.text-reveal {
  position: relative;
  display: inline-block;
  overflow: hidden;
}
.text-reveal > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1s var(--ease-out-expo);
}
.text-reveal.is-in > span {
  transform: translateY(0);
}

/* Reveal con cortina horizontal sobre toda una caja */
.curtain-reveal {
  position: relative;
  overflow: hidden;
}
.curtain-reveal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-cream);
  transform-origin: right;
  transform: scaleX(1);
  transition: transform 1s var(--ease-out-expo);
  z-index: 5;
  pointer-events: none;
}
.curtain-reveal.is-in::before {
  transform-origin: left;
  transform: scaleX(0);
}

/* ---------- 17. Responsive ---------- */
@media (max-width: 1024px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__right { min-height: 50vh; order: -1; }
  .hero__left { padding-bottom: 4rem; }

  .firma__grid,
  .areas__intro,
  .clients__head,
  .news__featured,
  .cta-block__inner,
  .footer__top,
  .story__head {
    grid-template-columns: 1fr;
  }
  .firma__head { position: static; }

  /* Story: en tablet/mobile el sticky se desactiva */
  .story__inner { grid-template-columns: 1fr; gap: 2rem; }
  .story__sticky { position: static; flex-direction: column; }
  .story__progress { display: none; }
  .story__panel { min-height: auto; }
  .story__panels-wrap { position: static; }
  .story__panel-item {
    position: static;
    inset: auto;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    padding: 1.5rem 0;
    border-top: 1px solid var(--line);
  }
  .story__panel-item:first-child { border-top: none; padding-top: 0; }
  .story__counter { display: none; }
  .story__scrolls { gap: 2rem; }
  .story__scroll-block { padding-bottom: 2rem; }

  .area-row {
    grid-template-columns: 60px 1fr 60px;
    gap: 1.5rem;
  }
  .area-row .area-desc {
    grid-column: 2 / 3;
    margin-top: 0.6rem;
  }

  .area-detail__grid { grid-template-columns: 1fr; }

  /* Stats: el número de columnas en tablet ahora se controla
     desde el widget vía --portum-stats-cols-tablet aplicado responsive
     por Elementor. No fijar aquí valores que sobreescriban. */

  .news__list { grid-template-columns: 1fr; }
  .news__featured-img { height: 280px; }

  .firma__tag { flex: 0 0 100%; padding-left: 0 !important; border-left: none !important; }

  .area-services { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --header-h: 64px; }

  .nav { display: none; }
  .nav__toggle { display: flex; }

  .nav.is-open {
    display: flex;
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 3rem var(--gutter);
    gap: 1.6rem;
    border-top: 1px solid var(--line);
  }
  .nav.is-open .nav__link {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 300;
    color: var(--navy);
  }
  .nav.is-open .nav__link::before { font-size: 0.7rem; }

  /* Hero mobile fixes */
  .hero__bottom {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  .hero__top { flex-direction: column; gap: 1rem; align-items: flex-start; }
  .hero__top .hero__index:last-child { text-align: left; }
  .hero__scroll { display: none; }
  .hero__corner { display: none; }
  .hero__caption { font-size: 0.65rem; max-width: 24ch; }

  /* Stats: nº de columnas en móvil controlado desde el widget
     vía --portum-stats-cols-mobile. No hardcodeamos aquí. */

  .area-row {
    grid-template-columns: 1fr;
    gap: 0.8rem;
  }
  .area-num { font-size: 2.5rem; }
  .area-arrow { display: none; }

  .client-row { grid-template-columns: 60px 1fr; gap: 1rem; }
  .client-row__desc { display: none; }

  .header__logo span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  body { cursor: auto; }
  .cursor { display: none; }
}

/* =========================================================
   ELEMENTOR INTEGRATION — v2
   ========================================================= */

/* Widgets PORTUM ocupan todo el ancho de su contenedor */
.elementor-widget-portum-header,
.elementor-widget-portum-hero,
.elementor-widget-portum-stats,
.elementor-widget-portum-firma,
.elementor-widget-portum-areas,
.elementor-widget-portum-story,
.elementor-widget-portum-clients,
.elementor-widget-portum-equipo,
.elementor-widget-portum-news,
.elementor-widget-portum-cta,
.elementor-widget-portum-footer {
  width: 100%;
}

.elementor-widget-portum-header > .elementor-widget-container,
.elementor-widget-portum-hero > .elementor-widget-container,
.elementor-widget-portum-stats > .elementor-widget-container,
.elementor-widget-portum-firma > .elementor-widget-container,
.elementor-widget-portum-areas > .elementor-widget-container,
.elementor-widget-portum-story > .elementor-widget-container,
.elementor-widget-portum-clients > .elementor-widget-container,
.elementor-widget-portum-equipo > .elementor-widget-container,
.elementor-widget-portum-news > .elementor-widget-container,
.elementor-widget-portum-cta > .elementor-widget-container,
.elementor-widget-portum-footer > .elementor-widget-container {
  padding: 0;
}

/* Admin bar offset */
body.admin-bar .header { top: 32px; }
@media (max-width: 782px) {
  body.admin-bar .header { top: 46px; }
}
body.admin-bar .cursor { display: none; }
body.admin-bar { cursor: auto !important; }

/* Editor de Elementor: desactivar cursor y sticky para edición cómoda */
body.elementor-editor-active .cursor { display: none; }
body.elementor-editor-active * { cursor: auto !important; }
body.elementor-editor-active .story__sticky { position: static; }
body.elementor-editor-active .header { position: relative !important; top: 0 !important; }

/* En columnas Elementor, evitar max-width restrictivo */
.elementor-column .elementor-widget-portum-header,
.elementor-column .elementor-widget-portum-hero,
.elementor-column .elementor-widget-portum-stats,
.elementor-column .elementor-widget-portum-firma,
.elementor-column .elementor-widget-portum-areas,
.elementor-column .elementor-widget-portum-story,
.elementor-column .elementor-widget-portum-clients,
.elementor-column .elementor-widget-portum-equipo,
.elementor-column .elementor-widget-portum-news,
.elementor-column .elementor-widget-portum-cta,
.elementor-column .elementor-widget-portum-footer {
  width: 100%;
  max-width: 100%;
}

/* Variantes header configurables desde el widget */
.header.header--static { position: relative; }
.header.header--no-blend { mix-blend-mode: normal; }
.header.header--no-numbers .nav__link::before { content: none; }

/* Stats: ocultar separadores cuando el widget tiene el switcher OFF
   (prefix_class genera la clase .portum-stats-dividers- sin sufijo) */
.elementor-widget-portum-stats.portum-stats-dividers- .stat,
.portum-stats-dividers- .stats__grid .stat {
  border-left-style: none !important;
  padding-left: 0 !important;
}

/* =========================================================
   BLOG WIDGETS v2.1.0
   ========================================================= */

/* ---------- Blog Archive (listado de entradas) ---------- */
.blog-archive { padding: 8rem 0 6rem; background: var(--bg); }
.blog-archive__head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 3rem;
  align-items: end;
  margin-bottom: 5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(11, 59, 123, 0.15);
}
.blog-archive__head .eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue-mid);
  font-weight: 500;
}
.blog-archive__head h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  font-weight: 400;
  line-height: 1.05;
  color: var(--navy);
  margin: 1.5rem 0 0;
  letter-spacing: -0.02em;
}
.blog-archive__head h1 em {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 300;
  color: var(--blue-mid);
}
.blog-archive__lead {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--navy);
  max-width: 360px;
  margin: 0;
  opacity: 0.85;
}

/* Filtros por categoría */
.blog-archive__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 4rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(11, 59, 123, 0.08);
}
.blog-archive__filter {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.1rem;
  border: 1px solid rgba(11, 59, 123, 0.2);
  border-radius: 999px;
  font-family: 'Inter Tight', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
  color: var(--navy);
  text-decoration: none;
  background: transparent;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.blog-archive__filter:hover { background: rgba(11, 59, 123, 0.06); }
.blog-archive__filter.is-active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.blog-archive__filter-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.65rem;
  opacity: 0.6;
}

/* Listado de entradas */
.blog-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}
.blog-item {
  display: grid;
  grid-template-columns: 80px 1fr 280px;
  gap: 2.5rem;
  align-items: start;
  padding: 3rem 0;
  border-top: 1px solid rgba(11, 59, 123, 0.1);
  transition: background 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.blog-item:last-child { border-bottom: 1px solid rgba(11, 59, 123, 0.1); }
.blog-item:hover { background: rgba(11, 59, 123, 0.02); }
.blog-item:hover .blog-item__title { color: var(--blue-mid); }
.blog-item:hover .blog-item__img { transform: scale(1.02); }

.blog-item__num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  color: var(--blue-mid);
  letter-spacing: 0.05em;
  padding-top: 0.4rem;
}

.blog-item__body { min-width: 0; }
.blog-item__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-mid);
  margin-bottom: 1rem;
}
.blog-item__meta-cat {
  padding: 0.25rem 0.65rem;
  background: rgba(156, 203, 255, 0.18);
  color: var(--navy);
  border-radius: 999px;
  font-weight: 500;
}
.blog-item__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.7rem, 2.6vw, 2.3rem);
  font-weight: 400;
  line-height: 1.15;
  color: var(--navy);
  margin: 0 0 0.8rem;
  letter-spacing: -0.01em;
  transition: color 0.3s ease;
}
.blog-item__title a {
  color: inherit;
  text-decoration: none;
  background-image: linear-gradient(to right, currentColor, currentColor);
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.blog-item:hover .blog-item__title a { background-size: 100% 1px; }

.blog-item__excerpt {
  font-family: 'Inter Tight', sans-serif;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--navy);
  opacity: 0.75;
  margin: 0 0 1.2rem;
  max-width: 60ch;
}

.blog-item__more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy);
  text-decoration: none;
  border-bottom: 1px solid var(--navy);
  padding-bottom: 0.15rem;
  transition: gap 0.3s ease;
}
.blog-item__more:hover { gap: 0.9rem; }

.blog-item__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  border-radius: 4px;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Paginación */
.blog-archive__pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid rgba(11, 59, 123, 0.1);
}
.blog-archive__pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 0.8rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.78rem;
  color: var(--navy);
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 4px;
  transition: all 0.3s ease;
}
.blog-archive__pagination .page-numbers:hover {
  background: rgba(11, 59, 123, 0.06);
  border-color: rgba(11, 59, 123, 0.2);
}
.blog-archive__pagination .page-numbers.current {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.blog-archive__pagination .page-numbers.dots { opacity: 0.4; }

/* ---------- Post Header (cabecera de single) ---------- */
.post-header {
  padding: 9rem 0 5rem;
  background: var(--bg);
  position: relative;
}
.post-header__inner {
  max-width: 850px;
  margin: 0 auto;
  padding: 0 2rem;
}
.post-header__breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 2.5rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-mid);
}
.post-header__breadcrumb a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.post-header__breadcrumb a:hover { border-bottom-color: currentColor; }
.post-header__breadcrumb-sep { opacity: 0.4; }

.post-header__meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-mid);
}
.post-header__category {
  padding: 0.3rem 0.8rem;
  background: var(--navy);
  color: #fff;
  border-radius: 999px;
  font-weight: 500;
}
.post-header__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.5rem, 5.5vw, 4.8rem);
  font-weight: 400;
  line-height: 1.05;
  color: var(--navy);
  margin: 0 0 1.5rem;
  letter-spacing: -0.02em;
}
.post-header__title em {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 300;
  color: var(--blue-mid);
}
.post-header__excerpt {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  line-height: 1.5;
  color: var(--navy);
  opacity: 0.85;
  margin: 0 0 3rem;
  max-width: 60ch;
}
.post-header__author {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(11, 59, 123, 0.12);
}
.post-header__avatar {
  width: 48px; height: 48px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-cream);
  flex-shrink: 0;
}
.post-header__author-info { line-height: 1.3; }
.post-header__author-name {
  font-family: 'Inter Tight', sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--navy);
}
.post-header__author-role {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-mid);
  margin-top: 0.2rem;
}

.post-header__featured-img {
  margin: 4rem auto 0;
  max-width: 1100px;
  padding: 0 2rem;
}
.post-header__featured-img img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  display: block;
}

/* ---------- Post Content (cuerpo editorial) ---------- */
.post-content {
  padding: 4rem 0 6rem;
  background: var(--bg);
}
.post-content__inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 2rem;
  font-family: 'Inter Tight', sans-serif;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--navy);
}
.post-content__inner > * + * { margin-top: 1.6rem; }
.post-content__inner h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--navy);
  margin-top: 3.5rem;
  letter-spacing: -0.01em;
}
.post-content__inner h2 em {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 300;
  color: var(--blue-mid);
}
.post-content__inner h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.55rem;
  font-weight: 500;
  line-height: 1.25;
  color: var(--navy);
  margin-top: 2.5rem;
}
.post-content__inner h4 {
  font-family: 'Inter Tight', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blue-mid);
  margin-top: 2rem;
}
.post-content__inner p { margin: 0; }
.post-content__inner a {
  color: var(--navy);
  border-bottom: 1px solid var(--blue-mid);
  text-decoration: none;
  transition: border-color 0.3s ease;
}
.post-content__inner a:hover { border-bottom-color: var(--navy); }
.post-content__inner blockquote {
  border-left: 3px solid var(--blue-soft);
  padding: 1.5rem 0 1.5rem 2rem;
  margin: 2.5rem 0;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-size: 1.3rem;
  line-height: 1.5;
  color: var(--navy);
  font-weight: 300;
}
.post-content__inner blockquote p { margin: 0; }
.post-content__inner ul,
.post-content__inner ol {
  padding-left: 1.5rem;
  margin: 1.5rem 0;
}
.post-content__inner li {
  margin: 0.5rem 0;
  line-height: 1.7;
}
.post-content__inner img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  margin: 2.5rem 0;
}
.post-content__inner figcaption {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-mid);
  text-align: center;
  margin-top: 0.8rem;
}
.post-content__inner pre {
  background: var(--bg-cream);
  padding: 1.5rem;
  border-radius: 4px;
  overflow-x: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
  margin: 2rem 0;
}
.post-content__inner code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88em;
  background: var(--bg-cream);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}
.post-content__inner hr {
  border: none;
  border-top: 1px solid rgba(11, 59, 123, 0.15);
  margin: 3rem 0;
}

/* Tags al final del post */
.post-content__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 4rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(11, 59, 123, 0.12);
}
.post-content__tag {
  padding: 0.4rem 1rem;
  background: var(--bg-cream);
  color: var(--navy);
  border-radius: 999px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  transition: background 0.3s ease;
}
.post-content__tag:hover { background: var(--blue-soft); }

/* Share buttons */
.post-content__share {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(11, 59, 123, 0.12);
}
.post-content__share-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--blue-mid);
}
.post-content__share-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: 1px solid rgba(11, 59, 123, 0.2);
  border-radius: 999px;
  font-family: 'Inter Tight', sans-serif;
  font-size: 0.8rem;
  color: var(--navy);
  text-decoration: none;
  transition: all 0.3s ease;
}
.post-content__share-link:hover {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

/* ---------- Related Posts ---------- */
.related-posts {
  padding: 6rem 0;
  background: var(--bg-cream);
  border-top: 1px solid rgba(11, 59, 123, 0.1);
}
.related-posts__head {
  margin-bottom: 4rem;
  text-align: center;
}
.related-posts__head .eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue-mid);
}
.related-posts__head h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 400;
  line-height: 1.1;
  color: var(--navy);
  margin: 1.2rem 0 0;
  letter-spacing: -0.01em;
}
.related-posts__head h2 em {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 300;
  color: var(--blue-mid);
}
.related-posts__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
}
.related-post {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.related-post:hover { transform: translateY(-4px); }
.related-post__img {
  width: 100%;
  aspect-ratio: 4 / 3;
  background-size: cover;
  background-position: center;
  background-color: var(--blue-soft);
  border-radius: 4px;
  margin-bottom: 1.5rem;
  transition: opacity 0.3s ease;
}
.related-post:hover .related-post__img { opacity: 0.9; }
.related-post__meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-mid);
  margin-bottom: 0.8rem;
}
.related-post__title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 400;
  line-height: 1.2;
  color: var(--navy);
  margin: 0;
  letter-spacing: -0.01em;
  transition: color 0.3s ease;
}
.related-post:hover .related-post__title { color: var(--blue-mid); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .blog-archive__head { grid-template-columns: 1fr; gap: 2rem; }
  .blog-item {
    grid-template-columns: 50px 1fr;
    gap: 1rem 1.5rem;
    padding: 2.5rem 0;
  }
  .blog-item__img {
    grid-column: 1 / -1;
    aspect-ratio: 16 / 9;
    order: 3;
    margin-top: 1.5rem;
  }
  .post-header { padding: 7rem 0 3rem; }
  .post-header__featured-img { margin-top: 3rem; }
  .related-posts__grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

@media (max-width: 600px) {
  .blog-archive { padding: 6rem 0 4rem; }
  .blog-archive__filters { gap: 0.4rem; }
  .blog-archive__filter { padding: 0.4rem 0.9rem; font-size: 0.72rem; }
  .blog-item__num { display: none; }
  .blog-item { grid-template-columns: 1fr; }
}
