/* =================================================================
   Tritemius Home v4 — Stylesheet
   ================================================================= */
:root {
  --bg: #1F2A52;
  --surface: #313E6A;
  --surface-2: #28335C;
  --primary: #3199FA;
  --accent: #39D6F3;
  --text-1: #FFFFFF;
  --text-2: #E8ECF5;
  --text-3: #8A95B5;
  --gradient: linear-gradient(135deg, #3098F9 0%, #2F3B80 100%);
  --hairline: rgba(232, 236, 245, 0.08);
  --hairline-strong: rgba(232, 236, 245, 0.18);
  --footer-bg: #182143;
  --header-bg: rgba(31, 42, 82, 0.72);
  --portrait-tint: linear-gradient(165deg, var(--surface-2) 0%, var(--bg) 100%);
  --portrait-filter: grayscale(60%) brightness(0.95);
  --motion-scale: 1;
}

[data-theme="light"] {
  --bg: #FFFFFF;
  --surface: #F4F7FC;
  --surface-2: #E8F1FF;
  --primary: #0061DB;
  --accent: #0061DB;
  --text-1: #353D67;
  --text-2: #303D69;
  --text-3: #7F7F7F;
  --gradient: linear-gradient(135deg, #BFD9FF 0%, #D8C8F5 100%);
  --hairline: rgba(53, 61, 103, 0.08);
  --hairline-strong: rgba(53, 61, 103, 0.18);
  --footer-bg: #F4F7FC;
  --header-bg: rgba(255, 255, 255, 0.82);
  --portrait-tint: linear-gradient(165deg, #E8F1FF 0%, #FFFFFF 100%);
  --portrait-filter: grayscale(15%) brightness(1);
}

[data-motion="reduced"] {
  --motion-scale: 0.5;
}

[data-motion="off"] {
  --motion-scale: 0;
}

[data-motion="off"] *,
[data-motion="off"] *::before,
[data-motion="off"] *::after {
  animation-duration: 0.001s !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.05s !important;
}

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

html {
  scroll-behavior: smooth;
  /* Reserva el espacio del scrollbar siempre, para que abrir el menú mobile
     (body.nav-open => overflow: hidden) no ensanche el viewport ni desplace
     el .nav-toggle en el eje X al alternar hamburguesa <-> X. */
  scrollbar-gutter: stable;
}

body {
  background: var(--bg);
  color: var(--text-2);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}

::selection {
  background: var(--primary);
  color: white;
}

h1,
h2,
h3,
h4 {
  font-family: 'Barlow', sans-serif;
  color: var(--text-1);
  letter-spacing: -0.01em;
}

a {
  color: inherit;
  text-decoration: none;
}

.eyebrow {
  font-family: 'Barlow', sans-serif;
  font-weight: 300;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  display: inline-block;
}

.eyebrow::before {
  content: '';
  display: inline-block;
  width: 1.5rem;
  height: 1px;
  background: var(--accent);
  vertical-align: middle;
  margin-right: 0.75rem;
  transform: translateY(-2px);
}

/* HEADER */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1.5rem 4rem;
  background: var(--header-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--hairline);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: padding 0.3s ease, background 0.4s ease;
}

.header.scrolled {
  padding: 0.875rem 4rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  color: var(--text-1);
}

.logo .iso {
  width: 2.375rem;
  height: 2.375rem;
  flex-shrink: 0;
}

.logo .word {
  height: 1.375rem;
  width: auto;
  display: block;
  transition: filter 0.4s ease;
}

[data-theme="light"] .logo .word {
  filter: invert(1) brightness(0.2);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  flex: 1;
  margin: 0 2rem;
}

.nav a {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.02em;
  color: var(--text-2);
  position: relative;
  padding-bottom: 4px;
  text-align: center;
  line-height: 1.25;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.nav a:hover {
  color: var(--accent);
}

.nav a:hover::after {
  width: 100%;
}

.lang-switch {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  color: var(--text-3);
  letter-spacing: 0.08em;
  border: 1px solid var(--hairline-strong);
  border-radius: 100px;
  padding: 0.375rem 0.875rem;
  cursor: pointer;
  background: transparent;
  transition: all 0.3s ease;
}

.lang-switch:hover {
  color: var(--text-1);
  border-color: var(--text-1);
}

/* HERO */
.hero {
  min-height: 100vh;
  padding: 12.5rem 4rem 7.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: 30%;
  right: -10%;
  width: 50rem;
  height: 50rem;
  background: var(--gradient);
  border-radius: 50%;
  filter: blur(160px);
  opacity: 0.4;
  pointer-events: none;
  animation: float 16s ease-in-out infinite;
}

.hero-glow-2 {
  position: absolute;
  top: 5%;
  left: -20%;
  width: 37.5rem;
  height: 37.5rem;
  background: radial-gradient(circle, #3098F9 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(140px);
  opacity: 0.3;
  pointer-events: none;
  animation: float 20s ease-in-out infinite reverse;
}

@keyframes float {

  0%,
  100% {
    transform: translate(0, 0);
  }

  50% {
    transform: translate(-40px, 40px);
  }
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 82.5rem;
  margin: 0 auto;
  width: 100%;
}

.hero h1 {
  font-family: 'Barlow', sans-serif;
  font-weight: 700;
  font-size: clamp(3.25rem, 7.5vw, 6rem);
  line-height: 1.02;
  margin-bottom: 2.5rem;
  max-width: 71.875rem;
  letter-spacing: -0.02em;
  color: var(--text-1);
  opacity: 0;
  animation: fadeUp 1s 0.2s forwards;
}

.cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 1s 0.7s forwards;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  padding: 1.125rem 2rem;
  border-radius: 2px;
  cursor: pointer;
  border: none;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
}

.btn-primary {
  background: var(--primary);
  color: var(--text-1);
}

.btn-primary:hover {
  background: var(--accent);
  color: var(--bg);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(49, 153, 250, 0.32);
}

.btn-secondary {
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
}

.btn-secondary:hover {
  background: rgba(49, 153, 250, 0.08);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn .arrow {
  width: 0.875rem;
  height: 0.875rem;
  transition: transform 0.3s ease;
}

.btn:hover .arrow {
  transform: translateX(4px);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.scroll-indicator {
  position: absolute;
  bottom: 3.75rem;
  right: 4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-3);
  z-index: 2;
  opacity: 0;
  animation: fadeUp 1s 1s forwards;
}

.scroll-indicator-line {
  width: 1px;
  height: 2.5rem;
  background: linear-gradient(to bottom, transparent, var(--accent));
  animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {

  0%,
  100% {
    transform: scaleY(0.6);
    transform-origin: top;
    opacity: 0.4;
  }

  50% {
    transform: scaleY(1);
    opacity: 1;
  }
}

.scroll-indicator-text {
  font-family: 'Barlow', sans-serif;
  font-weight: 300;
  font-size: 0.625rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
}

/* SECTIONS */
section {
  padding: 10rem 4rem;
  position: relative;
}

.section-inner {
  max-width: 82.5rem;
  margin: 0 auto;
}

.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 5rem;
  margin-bottom: 6rem;
  align-items: end;
}

.section-head--wide {
  grid-template-columns: 1fr;
}

.section-head--wide h2 {
  max-width: none;
}

/* Variante "stack": h2 arriba y párrafo intro debajo, ambos a ancho
   completo. Pensada para secciones cortas (team) donde el grid 1fr 2fr
   crea una separación visual extraña entre título y párrafo. */
.section-head--stack {
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: start;
}

.section-head--stack h2 {
  max-width: none;
}

.section-head--stack .intro {
  max-width: 56rem;
}

.section-head h2 {
  font-weight: 700;
  font-size: clamp(2.5rem, 4.5vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
}

.section-head .intro {
  font-size: 1.125rem;
  color: var(--text-2);
  max-width: 36.25rem;
}

/* SECTION 2 — QUÉ HACEMOS (SPLIT) */
.split {
  background: var(--bg);
  position: relative;
}

.split::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--hairline-strong), transparent);
}

.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.split-card {
  background: var(--surface);
  padding: 3.5rem 3rem;
  border-radius: 4px;
  border: 1px solid transparent;
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  overflow: hidden;
  scroll-margin-top: 6.875rem;
  display: flex;
  flex-direction: column;
  min-height: 37.5rem;
}

.split-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
}

.split-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.split-card:hover::after {
  opacity: 1;
}

.split-card .number {
  font-family: 'Barlow', sans-serif;
  font-weight: 300;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--text-3);
  margin-bottom: 3rem;
}

.split-card h3 {
  font-weight: 700;
  font-size: 2.5rem;
  line-height: 1.05;
  margin-bottom: 0.75rem;
  letter-spacing: -0.015em;
}

.split-card .audience {
  font-family: 'Barlow', sans-serif;
  font-weight: 300;
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 2rem;
  display: block;
}

.split-card p {
  font-size: 1rem;
  color: var(--text-2);
  margin-bottom: 2.5rem;
  line-height: 1.65;
}

.split-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 3rem;
  flex: 1;
}

.split-features li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-2);
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--hairline);
  line-height: 1.5;
}

.split-features li:last-child {
  border-bottom: none;
}

.split-features .feature-label {
  font-family: 'Barlow', sans-serif;
  font-weight: 700;
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  color: var(--text-1);
  min-width: 8.125rem;
  text-transform: uppercase;
}

/* Variante clickable del feature-label: aspecto idéntico al label
   estático (mismo color blanco que .feature-label) y el hover
   subraya + escala ligeramente para indicar que es interactivo. */
.split-features a.feature-label--link {
  cursor: pointer;
  text-decoration: none;
  color: var(--text-1);
  display: inline-block;
  transform-origin: left center;
  transition: transform 0.2s ease;
}

.split-features a.feature-label--link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transform: scale(1.04);
}

.split-cta-block {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
}

.split-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  padding: 1rem 1.75rem;
  border-radius: 2px;
  background: var(--primary);
  color: var(--text-1);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
  border: none;
}

.split-cta:hover {
  background: var(--accent);
  color: var(--bg);
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(49, 153, 250, 0.32);
}

.split-cta .arrow {
  width: 0.875rem;
  height: 0.875rem;
  transition: transform 0.3s ease;
}

.split-cta:hover .arrow {
  transform: translateX(6px);
}

/* SECTION 3 — VISIÓN */
.vision {
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.vision::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -10%;
  transform: translateY(-50%);
  width: 37.5rem;
  height: 37.5rem;
  background: var(--gradient);
  border-radius: 50%;
  filter: blur(160px);
  opacity: 0.25;
  pointer-events: none;
}

.vision-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 6rem;
  align-items: center;
  position: relative;
  z-index: 2;
}

.vision-text h2 {
  font-weight: 700;
  font-size: clamp(2.5rem, 5.5vw, 4rem);
  line-height: 1.05;
  margin-bottom: 2rem;
  letter-spacing: -0.02em;
}

.vision-text p {
  font-size: 1.125rem;
  color: var(--text-2);
  margin-bottom: 2.5rem;
  max-width: 33.75rem;
  line-height: 1.65;
}

.vision-paper {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  aspect-ratio: 3/4;
}

.vision-paper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vision-paper:hover {
  transform: rotate(-1deg) translateY(-6px);
}

/* SECTION 4 — EQUIPO */
.team {
  background: var(--bg);
  position: relative;
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.team-card {
  position: relative;
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  border: 1px solid var(--hairline);
  background: var(--surface);
  border-radius: 4px;
  overflow: hidden;
}

.team-portrait {
  aspect-ratio: 1/1;
  background: var(--portrait-tint);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.team-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  filter: var(--portrait-filter);
  transition: filter 0.4s ease, transform 0.4s ease;
}

/* Hover de cards desactivado en la revisión de Silvia: las cards ya
   no son clickeables ni abren modal. */

.portrait-empty {
  font-family: 'Barlow', sans-serif;
  font-weight: 300;
  font-size: 0.875rem;
  color: var(--text-3);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.5;
}

.team-info {
  padding: 1.5rem;
}

.team-info .name {
  font-family: 'Barlow', sans-serif;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--text-1);
  margin-bottom: 0.375rem;
  line-height: 1.2;
}

.team-info .role {
  font-family: 'Inter', sans-serif;
  font-size: 0.75rem;
  color: var(--text-3);
  line-height: 1.45;
  min-height: 2.25rem;
}


/* SECTION 5 — CONTACTO */
.contact {
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.contact::before {
  content: '';
  position: absolute;
  bottom: -12.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 62.5rem;
  height: 37.5rem;
  background: var(--gradient);
  border-radius: 50%;
  filter: blur(180px);
  opacity: 0.25;
  pointer-events: none;
}

.contact-inner {
  position: relative;
  z-index: 2;
}

.contact h2 {
  font-weight: 700;
  font-size: clamp(3.25rem, 6.5vw, 5rem);
  line-height: 1.02;
  margin-bottom: 5rem;
  max-width: 56.25rem;
  letter-spacing: -0.02em;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.contact-card {
  padding: 3rem 2.25rem;
  border: 1px solid var(--hairline);
  border-radius: 4px;
  background: rgba(48, 62, 106, 0.25);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
  display: flex;
  flex-direction: column;
  min-height: 17.5rem;
  position: relative;
  overflow: hidden;
}

.contact-card p {
  font-size: 0.875rem;
  color: var(--text-3);
  margin-bottom: auto;
  line-height: 1.55;
}

.contact-card:hover {
  border-color: var(--primary);
  transform: translateY(-6px);
  background: rgba(48, 62, 106, 0.5);
}

.contact-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.contact-card:hover::after {
  opacity: 1;
}

.contact-card .number {
  font-family: 'Barlow', sans-serif;
  font-weight: 300;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  color: var(--text-3);
  margin-bottom: 2.5rem;
}

.contact-card h3 {
  font-family: 'Barlow', sans-serif;
  font-weight: 700;
  font-size: 1.625rem;
  margin-bottom: 0.875rem;
  line-height: 1.2;
}

.contact-card .cta {
  margin-top: 2rem;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.8125rem;
  color: var(--accent);
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.contact-card .arrow {
  width: 0.875rem;
  height: 0.875rem;
  transition: transform 0.3s ease;
}

.contact-card:hover .cta .arrow {
  transform: translateX(6px);
}

/* FOOTER */
footer {
  padding: 6rem 4rem 1.5rem;
  background: var(--footer-bg);
  border-top: 1px solid var(--hairline);
  transition: background 0.4s ease;
}

.footer-inner {
  max-width: 82.5rem;
  margin: 0 auto;
}

.footer-top {
  display: block;
  margin-bottom: 4rem;
  padding-bottom: 3rem;
}

/* Logo + Negocio + Legal apilados verticalmente bajo el logo.
   Los items internos de cada columna ("Investments · ...", "Aviso
   legal") se renderizan horizontalmente. */
.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: flex-start;
}

.footer-col h5 {
  font-family: 'Barlow', sans-serif;
  font-weight: 300;
  font-size: 0.6875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
}

/* Columnas "Negocio" y "Legal": items en fila (flex-wrap permite que
   wrappen si no caben). Ambas viven bajo el logo y mantienen el
   patrón visual coherente. */
.footer-col--business ul,
.footer-col--legal ul {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.875rem 2rem;
}

.footer-col li a {
  font-size: 0.8125rem;
  color: var(--text-2);
  transition: color 0.2s ease;
}

.footer-col li a:hover {
  color: var(--accent);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--text-3);
  letter-spacing: 0.04em;
}

.footer-bottom .social {
  display: flex;
  gap: 1.5rem;
}

.footer-bottom .social a {
  color: var(--text-3);
  transition: color 0.2s ease;
}

.footer-bottom .social a:hover {
  color: var(--accent);
}

.regulatory-notice {
  margin-top: 2rem;
  padding: 1.5rem 0 0;
  border-top: 1px solid var(--hairline);
  font-size: 0.75rem;
  color: var(--text-3);
  font-style: italic;
  line-height: 1.65;
}

/* TEAM LAYOUT (variant "compact" — única en uso) */
[data-team-layout="compact"] .team-grid {
  grid-template-columns: repeat(7, 1fr);
  gap: 1rem;
}

/* Pirámide invertida 3-6-7: la fila más ancha es la última.
   - Fila 1: 3 founding partners (Luis, Carlos, Sacha) pegados a la izq
   - Fila 2: 6 cards (Juanjo a Paco)
   - Fila 3: 7 cards (Ana a Yasser), llenando el grid completo

   La 4ª card (Juanjo) arranca en col 1 de fila 2; la 10ª (Ana)
   arranca en col 1 de fila 3. Solo se fuerza en desktop. */
@media (min-width: 1025px) {

  [data-team-layout="compact"] .team-grid .team-card:nth-child(4),
  [data-team-layout="compact"] .team-grid .team-card:nth-child(10) {
    grid-column-start: 1;
  }
}

[data-team-layout="compact"] .team-info {
  padding: 1rem;
}

[data-team-layout="compact"] .team-info .name {
  font-size: 0.875rem;
}

[data-team-layout="compact"] .team-info .role {
  font-size: 0.6875rem;
  min-height: 1.875rem;
}

@media (max-width: 1024px) {

  [data-team-layout="compact"] .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.team-card .team-info {
  position: relative;
}

/* MODAL */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 22, 48, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
}

[data-theme="light"] .modal-backdrop {
  background: rgba(53, 61, 103, 0.45);
}

.modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

/* .modal-close se conserva porque el legal modal lo reutiliza. */
.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 100px;
  background: rgba(232, 236, 245, 0.08);
  border: 1px solid var(--hairline-strong);
  color: var(--text-1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
  z-index: 3;
}

.modal-close:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

/* PARALLAX & MOTION-REDUCE */
[data-motion="reduced"] .hero-glow,
[data-motion="reduced"] .hero-glow-2,
[data-motion="off"] .hero-glow,
[data-motion="off"] .hero-glow-2 {
  animation: none;
}

[data-motion="off"] .scroll-indicator-line {
  animation: none;
  opacity: 0.6;
}

.parallax-layer {
  will-change: transform;
}

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal.delay-1 {
  transition-delay: 0.1s;
}

.reveal.delay-2 {
  transition-delay: 0.2s;
}

[data-motion="off"] .reveal {
  opacity: 1;
  transform: none;
  transition: none;
}

/* RESPONSIVE */
@media (max-width: 1024px) {

  .header,
  section,
  footer {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .split-grid,
  .contact-grid,
  .footer-top,
  .vision-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .vision-grid {
    gap: 3rem;
  }

  .nav {
    display: none;
  }

  .hero {
    padding: 8.75rem 2rem 6.25rem;
  }

  .scroll-indicator {
    display: none;
  }

  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .header {
    padding: 0.875rem 1.5rem;
  }

  section,
  footer {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 1rem;
  }

  .split-card,
  .contact-card {
    padding: 2.25rem 1.75rem;
  }

  .footer-top {
    gap: 2.5rem;
  }
}

/* =================================================================
   Refactor additions — clases que sustituyen style= inline del origen
   ================================================================= */
.eyebrow-vision {
  margin-bottom: 2rem;
}

.eyebrow-contact {
  margin-bottom: 2.5rem;
}

.footer-bottom {
  margin-top: 1.25rem;
}

/* =================================================================
   Theme toggle button — sol/luna en esquina inferior derecha
   ================================================================= */
.theme-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 90;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--header-bg, rgba(31, 42, 82, 0.72));
  border: 1px solid var(--hairline-strong, rgba(232, 236, 245, 0.18));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: var(--text-1, #FFFFFF);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
    background 0.4s ease,
    border-color 0.4s ease,
    color 0.4s ease;
}

.theme-toggle:hover {
  transform: translateY(-2px);
  border-color: var(--accent, #39D6F3);
  color: var(--accent, #39D6F3);
}

.theme-toggle:focus-visible {
  outline: 2px solid var(--accent, #39D6F3);
  outline-offset: 2px;
}

.theme-toggle svg {
  width: 1.25rem;
  height: 1.25rem;
  transition: opacity 0.3s ease, transform 0.3s ease;
  position: absolute;
}

.theme-toggle .icon-sun {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

.theme-toggle .icon-moon {
  opacity: 0;
  transform: rotate(-90deg) scale(0.6);
}

[data-theme="light"] .theme-toggle .icon-sun {
  opacity: 0;
  transform: rotate(90deg) scale(0.6);
}

[data-theme="light"] .theme-toggle .icon-moon {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

@media (max-width: 640px) {
  .theme-toggle {
    bottom: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
  }
}

/* =================================================================
   Lang switch — estados de los spans hijos
   ================================================================= */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.lang-switch [data-lang-code] {
  opacity: 0.45;
  transition: opacity 0.25s ease, color 0.25s ease;
}

.lang-switch [data-lang-code].is-active {
  opacity: 1;
  color: var(--accent);
}

.lang-switch .lang-sep {
  opacity: 0.35;
  margin: 0 4px;
}

/* =================================================================
   Mobile nav — hamburger button + overlay
   ================================================================= */

/* Botón hamburguesa: oculto por defecto en desktop */
.nav-toggle {
  display: none;
  width: 2.75rem;
  height: 2.75rem;
  background: transparent;
  border: 1px solid var(--hairline-strong);
  border-radius: 100px;
  cursor: pointer;
  position: relative;
  padding: 0;
  align-items: center;
  justify-content: center;
  transition: border-color 0.25s ease, background 0.25s ease;
  z-index: 101;
}

.nav-toggle:hover {
  border-color: var(--accent);
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.nav-toggle-bar {
  display: block;
  width: 1.125rem;
  height: 1.5px;
  background: var(--text-1);
  border-radius: 1px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
    opacity 0.2s ease,
    top 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
    background 0.4s ease;
}

.nav-toggle-bar:nth-child(1) {
  top: 0.9375rem;
}

.nav-toggle-bar:nth-child(2) {
  top: 1.3125rem;
}

.nav-toggle-bar:nth-child(3) {
  top: 1.6875rem;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  top: 1.3125rem;
  transform: translateX(-50%) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
  transform: translateX(-50%) scaleX(0);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  top: 1.3125rem;
  transform: translateX(-50%) rotate(-45deg);
}

/* Bloquear scroll del body cuando el menú está abierto */
body.nav-open {
  overflow: hidden;
}

@media (max-width: 1024px) {

  /* Mostrar el botón hamburguesa */
  .nav-toggle {
    display: inline-flex;
  }

  /* El nav se convierte en overlay full-screen */
  .nav {
    display: flex;
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: var(--bg);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.75rem;
    padding: 6rem 2rem 4rem;
    margin: 0;
    flex: none;
    z-index: 99;
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: none;
    overflow-y: auto;
  }

  /* Sólo aplicar transitions tras el primer paint y fuera de resize.
     Evita que el menú se "deslice" al cruzar el breakpoint 1024px. */
  body.nav-ready .nav {
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
      opacity 0.3s ease,
      visibility 0s linear 0.4s;
  }

  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  body.nav-ready .nav.is-open {
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1),
      opacity 0.3s ease,
      visibility 0s linear 0s;
  }

  .nav a {
    font-size: 1.375rem;
    color: var(--text-1);
    padding: 0.5rem 0;
  }

  .nav a:hover {
    color: var(--accent);
  }

  /* El lang-switch dentro del overlay sigue compacto */
  .nav .lang-switch {
    margin-top: 1rem;
  }
}

/* =================================================================
   Responsive refinements
   Pulir layout en breakpoints <1024 / <640 / <480 px.
   - Sobreescribe paddings verticales heredados del diseño desktop
   - Soluciona bug del team-grid en <640 (data-team-layout="editorial"
     mantenía 2 columnas porque la regla del breakpoint base no
     ganaba en especificidad)
   - Apila CTAs en mobile pequeño, normaliza modal y oculta cursor
     decorativo en dispositivos táctiles
   ================================================================= */

@media (max-width: 1024px) {
  section {
    padding-top: 6rem;
    padding-bottom: 6rem;
  }

  .hero {
    padding-top: 7.5rem;
    padding-bottom: 5rem;
    min-height: auto;
  }

  footer {
    padding-top: 4rem;
    padding-bottom: 2rem;
  }

  .section-head {
    margin-bottom: 4rem;
  }

  .hero h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
  }

  .split-card {
    padding: 2.5rem 2rem;
    min-height: auto;
  }

  .vision-paper {
    max-width: 30rem;
    margin: 0 auto;
  }

  .vision-grid {
    gap: 2.5rem;
  }

  .contact-card {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  section {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
  }

  .hero {
    padding-top: 6.25rem;
    padding-bottom: 3.5rem;
  }

  footer {
    padding: 3.5rem 1.5rem 2rem;
  }

  .section-head {
    margin-bottom: 3rem;
  }

  .hero h1 {
    font-size: clamp(2.125rem, 9vw, 3.25rem);
    line-height: 1.05;
  }

  .cta-row {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .cta-row .btn {
    justify-content: center;
    padding: 1rem 1.5rem;
  }

  .section-head h2 {
    font-size: clamp(1.875rem, 8vw, 2.625rem);
  }

  .vision-text h2 {
    font-size: clamp(2.125rem, 9vw, 3.25rem);
  }

  .contact h2 {
    font-size: clamp(2.125rem, 9vw, 3.5rem);
    margin-bottom: 3.5rem;
  }

  /* Team grid en pantallas estrechas: 2 columnas. Mantenemos 2 cols
     hasta el mínimo soportado para que el lazy-loading no se desordene
     en cargas iniciales con viewport pequeño (el grid pirámide de
     desktop deja huecos que confunden al observador del browser). */
  .team-grid,
  [data-team-layout="compact"] .team-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .split-card,
  .contact-card {
    padding: 2rem 1.5rem;
  }

  .split-card h3 {
    font-size: 2rem;
  }

  .footer-top {
    gap: 2rem;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
  }

  .footer-col h5 {
    margin-bottom: 1rem;
  }

  .regulatory-notice {
    padding: 1.25rem 0 0;
    font-size: 0.6875rem;
  }

  /* Team layout en mobile: tamaños standard, sin modificadores. */
  [data-team-layout="compact"] .team-info {
    padding: 1.25rem;
  }

  [data-team-layout="compact"] .team-info .name {
    font-size: 1.125rem;
  }

  [data-team-layout="compact"] .team-info .role {
    font-size: 0.75rem;
    min-height: auto;
  }
}

@media (max-width: 480px) {

  section,
  footer {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .header {
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }

  .hero {
    padding: 5.5rem 1.25rem 3rem;
  }

  .hero h1 {
    font-size: clamp(1.875rem, 10vw, 2.75rem);
  }
}

/* Footer · estilos viejos eliminados — sustituidos por
   .footer-credentials al final del archivo. */

/* =================================================================
   Silvia review (mayo 2026) — sub-bullets en split-card 2 + legal modal
   + texto descriptivo de certificaciones.
   ================================================================= */

.split-features .feature-body {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  flex: 1;
}

.split-features .feature-subbullet {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  padding-left: 1.125rem;
  position: relative;
  align-self: flex-start;
  line-height: 1.5;
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.split-features .feature-subbullet::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: 400;
}

.split-features a.feature-subbullet:hover {
  color: var(--text-1);
  transform: translateX(2px);
}

/* Enlaces inline dentro de descripciones de features. El selector
   :not() los distingue de los sub-bullets que ya tienen su propio
   estilo con flecha. */
.split-features li>span a:not(.feature-subbullet),
.split-features .feature-body a:not(.feature-subbullet) {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.2s ease;
}

.split-features li>span a:not(.feature-subbullet):hover,
.split-features .feature-body a:not(.feature-subbullet):hover {
  color: var(--text-1);
}

/* Aviso legal en modal (footer column "Legal" → trigger) */
.footer-col li a.legal-trigger {
  cursor: pointer;
}

.legal-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, calc(-50% + 24px));
  z-index: 201;
  background: var(--surface);
  width: min(45rem, calc(100vw - 3rem));
  max-height: calc(100vh - 3rem);
  overflow-y: auto;
  border: 1px solid var(--hairline-strong);
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.45s cubic-bezier(0.2, 0.8, 0.2, 1),
    transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4);
  padding: 3rem 3.25rem 3.25rem;
}

[data-theme="light"] .legal-modal {
  background: #FFFFFF;
  box-shadow: 0 40px 80px rgba(53, 61, 103, 0.2);
}

.legal-modal.open {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%);
}

.legal-modal .modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 100px;
  background: rgba(232, 236, 245, 0.08);
  border: 1px solid var(--hairline-strong);
  color: var(--text-1);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.legal-modal .modal-close:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

.legal-modal h3 {
  font-family: 'Barlow', sans-serif;
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1.15;
  color: var(--text-1);
  margin-bottom: 0.5rem;
  letter-spacing: -0.015em;
}

.legal-modal .eyebrow {
  margin-bottom: 1rem;
}

.legal-modal .legal-body {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.75;
  margin-top: 1.25rem;
}

.legal-modal .legal-body p+p {
  margin-top: 0.875rem;
}

@media (max-width: 640px) {
  .legal-modal {
    padding: 2.25rem 1.5rem 2rem;
  }

  .legal-modal h3 {
    font-size: 1.375rem;
  }
}

/* =================================================================
   Footer · credenciales unificadas (financiación + certificaciones)
   Un único bloque blanco en dos columnas con eyebrow para cada
   sección. Logos ISO subidos a ~96px de altura para que el texto
   interno sea legible. En mobile colapsa a una sola columna.
   ================================================================= */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.footer-credentials {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.credentials-col {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  min-width: 0;
}

.credentials-eyebrow {
  font-family: 'Inter', sans-serif;
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 700;
}

/* Cada grupo de logos vive en su propia caja blanca; el contenedor
   padre mantiene el color del footer. */
.credentials-logos {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 2px;
  padding: 0.625rem 0.875rem;
  align-self: flex-start;
  max-width: 100%;
  gap: 1.25rem;
}

.credentials-logo {
  width: auto;
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}

.credentials-logo--ue {
  height: 2.75rem;
}

.credentials-logo--fe {
  height: 2.25rem;
}

.credentials-logo--cam {
  height: 2.5rem;
}

.credentials-logo--iso {
  width: 7rem;
  height: 7rem;
  object-fit: contain;
}

.credentials-statement {
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  color: var(--text-3);
  line-height: 1.55;
  margin: 0;
}

.credentials-meta {
  font-family: 'Inter', sans-serif;
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 700;
  margin: 0;
}

@media (max-width: 900px) {
  .footer-credentials {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

@media (max-width: 640px) {
  .credentials-logos {
    padding: 0.5rem 0.75rem;
    gap: 1rem;
  }

  .credentials-logo--ue {
    height: 2.25rem;
  }

  .credentials-logo--fe {
    height: 1.875rem;
  }

  .credentials-logo--cam {
    height: 2rem;
  }

  .credentials-logo--iso {
    width: 5.75rem;
    height: 5.75rem;
  }
}