/* ==========================================================================
   Sciencelytics · De la evidencia a la acción
   Sistema visual: espacio profundo, tipografía editorial y profundidad 3D.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --navy: #0F2D4A;
  --steel: #4F7A9D;
  --stone: #A7B0BB;
  --soft: #F8FAFC;
  --wa: #25D366;

  --bg: #040B14;
  --bg-2: #071321;
  --surface: rgba(12, 31, 51, 0.62);
  --surface-2: rgba(19, 50, 80, 0.45);
  --surface-strong: rgba(9, 24, 40, 0.88);
  --line: rgba(167, 176, 187, 0.13);
  --line-2: rgba(141, 180, 214, 0.24);
  --text: #EEF4FA;
  --text-2: #A9B7C6;
  --text-3: #6F8296;
  --accent: #4F7A9D;
  --accent-2: #8DB4D6;
  --accent-3: #CFE3F5;
  --field-bg: rgba(3, 10, 19, 0.6);
  --ok: #34D399;
  --danger: #F87171;

  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', monospace;

  --header-h: 72px;
  --radius: 22px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.75);
  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #F5F7FA;
  --bg-2: #ECF1F6;
  --surface: rgba(255, 255, 255, 0.86);
  --surface-2: rgba(232, 239, 246, 0.9);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --line: rgba(15, 45, 74, 0.11);
  --line-2: rgba(15, 45, 74, 0.2);
  --text: #0F2D4A;
  --text-2: #4A5F75;
  --text-3: #7C8C9D;
  --accent: #4F7A9D;
  --accent-2: #2F5F87;
  --accent-3: #0F2D4A;
  --field-bg: #FFFFFF;
  --shadow: 0 24px 48px -28px rgba(15, 45, 74, 0.35);
  color-scheme: light;
}

/* Zonas que siempre son oscuras (inicio, banda fotográfica, llamado a la acción, pantallas) */
.hero,
.photo-band,
.cta-band,
.story-stage,
.peritaje-visual,
.film-screen {
  --text: #EEF4FA;
  --text-2: #B3C1CF;
  --text-3: #7D90A3;
  --line: rgba(167, 176, 187, 0.16);
  --line-2: rgba(141, 180, 214, 0.28);
  --accent-2: #8DB4D6;
  --accent-3: #CFE3F5;
  color: var(--text);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  background-image:
    radial-gradient(60vw 50vh at 85% 30%, rgba(19, 56, 91, 0.28), transparent 70%),
    radial-gradient(50vw 50vh at 10% 80%, rgba(15, 45, 74, 0.3), transparent 70%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  transition: background-color 0.4s ease;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

h1, h2, h3, p, ul, ol, dl, dd, figure {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

::selection {
  background: rgba(79, 122, 157, 0.45);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

.skip-link {
  position: fixed;
  top: -60px;
  left: 16px;
  z-index: 200;
  padding: 0.6rem 1rem;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- Capas de fondo y escena ---------- */
#space-canvas,
#fx-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
}

#space-canvas {
  z-index: 0;
}

#fx-canvas {
  z-index: 40;
}

main,
.site-footer {
  position: relative;
  z-index: 1;
}

section[id] {
  scroll-margin-top: calc(var(--header-h) + 8px);
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 120;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--steel), var(--accent-2), #E6F1FB);
  box-shadow: 0 0 12px rgba(141, 180, 214, 0.7);
  pointer-events: none;
}

/* ---------- Tipografía común ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 1rem;
}

.section-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.05rem, 3.9vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.section-lead {
  margin-top: 1.15rem;
  font-size: clamp(1.02rem, 1.4vw, 1.14rem);
  color: var(--text-2);
  max-width: 62ch;
  text-wrap: pretty;
}

.section {
  position: relative;
  padding-block: clamp(5rem, 10vw, 8.5rem);
}

.section-head {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-head.center {
  text-align: center;
  max-width: 780px;
  margin-inline: auto;
}

.section-head.center .section-lead {
  margin-inline: auto;
}

.section-head.split {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  align-items: end;
  gap: 2rem;
}

.dash-list {
  display: grid;
  gap: 0.6rem;
}

.dash-list li {
  position: relative;
  padding-left: 1.4rem;
  color: var(--text-2);
}

.dash-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 0.7rem;
  height: 1px;
  background: var(--accent-2);
}

/* ---------- Botones ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 46px;
  padding: 0 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s, background-color 0.25s, border-color 0.25s, color 0.25s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-lg {
  min-height: 56px;
  padding: 0 1.8rem;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(180deg, #6492B8 0%, #3D6A90 100%);
  border-color: rgba(207, 227, 245, 0.25);
  box-shadow: 0 14px 34px -14px rgba(79, 122, 157, 0.95), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.btn-primary:hover {
  box-shadow: 0 18px 44px -14px rgba(115, 160, 200, 1), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  background: linear-gradient(180deg, #6E9CC2 0%, #43729A 100%);
}

.btn-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line-2);
}

.btn-ghost:hover {
  background: rgba(141, 180, 214, 0.12);
  border-color: var(--accent-2);
}

[data-theme="light"] .btn-ghost:not(.hero .btn-ghost) {
  background: rgba(15, 45, 74, 0.03);
}

.btn-wa {
  color: #052B14;
  background: var(--wa);
  border-color: #1FBF5B;
  box-shadow: 0 14px 34px -16px rgba(37, 211, 102, 0.8);
}

.btn-wa:hover {
  background: #2BE070;
}

/* Halo animado del botón principal del inicio */
.btn-glow::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: inherit;
  border: 1px solid rgba(141, 180, 214, 0.5);
  opacity: 0;
  animation: halo 2.8s var(--ease-out) infinite;
  pointer-events: none;
}

@keyframes halo {
  0% { opacity: 0.7; transform: scale(0.96); }
  100% { opacity: 0; transform: scale(1.12); }
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

.icon-btn:hover {
  background: rgba(141, 180, 214, 0.12);
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.4rem;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-3);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}

.link-arrow::after {
  content: "→";
  transition: transform 0.25s var(--ease-out);
}

.link-arrow:hover::after {
  transform: translateX(4px);
}

/* ---------- Encabezado ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  transition: background-color 0.35s, border-color 0.35s, backdrop-filter 0.35s;
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(4, 11, 20, 0.78);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: rgba(167, 176, 187, 0.12);
}

[data-theme="light"] .site-header.is-scrolled {
  background: rgba(245, 247, 250, 0.85);
  border-bottom-color: var(--line);
}

[data-theme="light"] .site-header:not(.is-scrolled) {
  --text: #EEF4FA;
  --line-2: rgba(141, 180, 214, 0.28);
  color: #EEF4FA;
}

.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}

.brand-mark {
  width: auto;
  height: 46px;
}

/* Logo oficial: S clara sobre fondos oscuros, S azul marino sobre fondos claros */
.brand-mark.on-light {
  display: none;
}

[data-theme="light"] .site-header.is-scrolled .brand-mark.on-light,
[data-theme="light"] .site-footer .brand-mark.on-light {
  display: block;
}

[data-theme="light"] .site-header.is-scrolled .brand-mark.on-dark,
[data-theme="light"] .site-footer .brand-mark.on-dark {
  display: none;
}

.brand-text {
  display: grid;
  line-height: 1.1;
  padding-left: 0.85rem;
  border-left: 1px solid var(--line-2);
}

.brand-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.32rem;
  letter-spacing: -0.01em;
}

.brand-slogan {
  margin-top: 2px;
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--accent-2);
}

.main-nav {
  margin-left: auto;
}

.nav-list {
  display: flex;
  gap: 0.25rem;
}

.nav-link {
  position: relative;
  display: block;
  white-space: nowrap;
  padding: 0.55rem 0.85rem;
  color: var(--text-2);
  font-size: 0.93rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 999px;
  transition: color 0.2s, background-color 0.2s;
}

.site-header:not(.is-scrolled) .nav-link {
  color: rgba(238, 244, 250, 0.78);
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text);
  background: rgba(141, 180, 214, 0.1);
}

.nav-cta {
  display: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.header-cta {
  min-height: 42px;
}

/* Selector de idioma: ES | EN */
.lang-switch {
  display: inline-flex;
  align-items: center;
  height: 42px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.03);
}

.lang-switch a {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 100%;
  padding: 0 0.55rem;
  border-radius: 999px;
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-decoration: none;
  transition: color 0.2s, background-color 0.2s;
}

.site-header:not(.is-scrolled) .lang-switch a {
  color: rgba(238, 244, 250, 0.78);
}

.lang-switch a:hover {
  color: var(--text);
  background: rgba(141, 180, 214, 0.12);
}

.lang-switch a.is-current,
.site-header:not(.is-scrolled) .lang-switch a.is-current {
  color: #fff;
  background: var(--steel);
  cursor: default;
}

.theme-toggle .icon-moon {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-moon {
  display: block;
}

[data-theme="light"] .theme-toggle .icon-sun {
  display: none;
}

.menu-toggle {
  display: none;
  gap: 4px;
  align-content: center;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 1.6px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out), opacity 0.2s;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.6px) rotate(-45deg); }

/* ---------- Inicio ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: calc(var(--header-h) + 2.5rem);
  padding-bottom: 5.5rem;
  overflow: hidden;
  isolation: isolate;
  background: transparent;
}

[data-theme="light"] body {
  background-image: none;
}

[data-theme="light"] .hero {
  background: #040B14;
}

.hero-backdrop {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
}

.hero-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 60% 50%;
  transform: scale(1.08);
  transform-origin: 60% 50%;
  animation: drift 40s ease-in-out infinite alternate;
  will-change: transform;
}

@keyframes drift {
  from { transform: scale(1.08) translate3d(0, 0, 0); }
  to { transform: scale(1.14) translate3d(-1.5%, -1%, 0); }
}

.hero-backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(4, 11, 20, 0.94) 0%, rgba(4, 11, 20, 0.72) 38%, rgba(4, 11, 20, 0.25) 70%, rgba(4, 11, 20, 0.35) 100%),
    linear-gradient(180deg, rgba(4, 11, 20, 0.55) 0%, rgba(4, 11, 20, 0) 22%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  align-items: center;
  gap: 2rem;
}

.eyebrow-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(10, 26, 43, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-3);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #7FD4B4;
  box-shadow: 0 0 0 0 rgba(127, 212, 180, 0.6);
  animation: pulse 2.4s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(127, 212, 180, 0.55); }
  70% { box-shadow: 0 0 0 9px rgba(127, 212, 180, 0); }
  100% { box-shadow: 0 0 0 0 rgba(127, 212, 180, 0); }
}

.hero-title {
  margin-top: 1.6rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(3rem, 6.6vw, 5.6rem);
  line-height: 1;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.hero-title em {
  display: block;
  font-style: italic;
  font-weight: 500;
  background: linear-gradient(100deg, #CFE3F5 0%, #8DB4D6 55%, #CFE3F5 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-bottom: 0.08em;
}

.hero-lead {
  margin-top: 1.6rem;
  max-width: 58ch;
  font-size: clamp(1.04rem, 1.45vw, 1.17rem);
  color: var(--text-2);
  text-wrap: pretty;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2.2rem;
}

.hero-direct {
  margin-top: 1.4rem;
  font-size: 0.9rem;
  color: var(--text-3);
}

.hero-direct a {
  color: var(--text-2);
  text-decoration: none;
  border-bottom: 1px solid var(--line-2);
  transition: color 0.2s, border-color 0.2s;
}

.hero-direct a:hover {
  color: var(--accent-3);
  border-color: var(--accent-2);
}

.hero-direct span {
  margin-inline: 0.35rem;
  opacity: 0.6;
}

.hero-visual {
  position: relative;
  aspect-ratio: 1 / 1;
  width: 100%;
  max-width: 560px;
  margin-left: auto;
  touch-action: pan-y;
}

.hero-visual-hint {
  position: absolute;
  left: 50%;
  bottom: 2%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  white-space: nowrap;
}

.hero-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--line);
}

.hero-facts li {
  display: grid;
  gap: 0.35rem;
  padding: 1.35rem 1.25rem 0 0;
}

.hero-facts li + li {
  padding-left: 1.25rem;
  border-left: 1px solid var(--line);
}

.hero-facts strong {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-3);
}

.hero-facts span {
  font-size: 0.9rem;
  color: var(--text-2);
}

.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 1.4rem;
  width: 24px;
  height: 38px;
  margin-left: -12px;
  border: 1.5px solid var(--line-2);
  border-radius: 14px;
}

.scroll-cue span {
  position: absolute;
  left: 50%;
  top: 7px;
  width: 3px;
  height: 7px;
  margin-left: -1.5px;
  border-radius: 2px;
  background: var(--accent-3);
  animation: wheel 1.8s var(--ease-out) infinite;
}

@keyframes wheel {
  0% { opacity: 0; transform: translateY(0); }
  30% { opacity: 1; }
  100% { opacity: 0; transform: translateY(12px); }
}

/* ---------- Ranuras de escena 3D ---------- */
.scene-slot {
  position: relative;
}

.svc-slot {
  height: 250px;
}

/* ---------- Servicios ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  align-items: start;
}

.pillar {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.pillar-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.pillar-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.85) contrast(1.05);
  transform: scale(1.02);
  transition: transform 1.2s var(--ease-out);
}

.pillar:hover .pillar-media img {
  transform: scale(1.08);
}

.pillar-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(4, 11, 20, 0.05) 30%, rgba(8, 22, 37, 0.92) 100%);
}

[data-theme="light"] .pillar-media::after {
  /* termina en el color de la tarjeta para que no se note el borde de la foto */
  background: linear-gradient(180deg, rgba(253, 253, 254, 0) 40%, rgba(253, 253, 254, 0.75) 78%, #FDFDFE 100%);
}

.pillar-body {
  position: relative;
  margin-top: -2.2rem;
  padding: 0 1.75rem 1.5rem;
}

.pillar-index {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  color: var(--accent-2);
}

.pillar-title {
  margin-top: 0.35rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.6rem;
  line-height: 1.15;
}

.pillar-desc {
  margin-top: 0.45rem;
  font-size: 0.92rem;
  color: var(--text-2);
}

.svc-list {
  margin-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.svc-list li {
  border-bottom: 1px solid var(--line);
}

.svc-list li:last-child {
  border-bottom: 0;
}

.svc-row {
  position: relative;
  display: grid;
  width: 100%;
  padding: 0.95rem 2.2rem 0.95rem 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  color: var(--text);
}

.svc-name {
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.2s, transform 0.35s var(--ease-out);
}

.svc-hint {
  display: grid;
  grid-template-rows: 0fr;
  font-size: 0.85rem;
  color: var(--text-3);
  opacity: 0;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.4s var(--ease-out), opacity 0.3s, margin 0.4s var(--ease-out);
}

.svc-row::after {
  content: "";
  position: absolute;
  right: 0.35rem;
  top: 50%;
  width: 8px;
  height: 8px;
  border-top: 1.5px solid var(--accent-2);
  border-right: 1.5px solid var(--accent-2);
  transform: translateY(-50%) rotate(45deg);
  transition: transform 0.35s var(--ease-out), border-color 0.2s;
}

.svc-row:hover .svc-name,
.svc-row:focus-visible .svc-name {
  color: var(--accent-3);
  transform: translateX(4px);
}

.svc-row:hover .svc-hint,
.svc-row:focus-visible .svc-hint {
  max-height: 3em;
  opacity: 1;
  margin-top: 0.2rem;
}

.svc-row:hover::after {
  transform: translate(4px, -50%) rotate(45deg);
  border-color: var(--accent-3);
}

/* ---------- Profundidad 3D en tarjetas ---------- */
[data-tilt] {
  transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transform-style: preserve-3d;
}

[data-tilt]::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 0%), rgba(207, 227, 245, 0.14), transparent 45%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
  z-index: 2;
}

[data-tilt].is-tilting::after {
  opacity: 1;
}

[data-tilt],
[data-reveal] {
  transition:
    opacity 0.9s var(--ease-out) var(--d, 0ms),
    translate 0.9s var(--ease-out) var(--d, 0ms),
    transform var(--tilt-dur, 0.7s) var(--ease-out),
    box-shadow 0.35s,
    border-color 0.35s,
    background-color 0.35s;
}

[data-tilt].is-tilting {
  --tilt-dur: 0.12s;
}

.fx-ready [data-reveal]:not(.is-in) {
  opacity: 0;
  translate: 0 30px;
}

/* ---------- Llamado a la acción ---------- */
.cta-band-wrap {
  position: relative;
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

@property --angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.cta-band {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) auto;
  align-items: center;
  gap: 2rem;
  padding: clamp(2rem, 5vw, 3.4rem);
  border-radius: 28px;
  background:
    radial-gradient(120% 140% at 0% 0%, rgba(79, 122, 157, 0.38) 0%, transparent 55%),
    linear-gradient(135deg, #0D243B 0%, #07131F 100%);
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8);
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: conic-gradient(from var(--angle), rgba(141, 180, 214, 0.1), rgba(207, 227, 245, 0.75), rgba(141, 180, 214, 0.1) 30%, rgba(141, 180, 214, 0.1));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  animation: spin-border 6s linear infinite;
  z-index: -1;
}

@keyframes spin-border {
  to { --angle: 360deg; }
}

.cta-band-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  line-height: 1.1;
}

.cta-band p {
  margin-top: 0.7rem;
  color: var(--text-2);
  max-width: 52ch;
}

.cta-band-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

/* ---------- Investigación: relato en tres etapas ---------- */
.story-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: start;
}

.story-stage {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  height: min(calc(100vh - var(--header-h) - 56px), 760px);
  border-radius: 26px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: #050D18;
  box-shadow: var(--shadow);
}

.story-photos img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  filter: saturate(0.7) brightness(0.5) contrast(1.05);
  transform: scale(1.08);
  transition: opacity 1s var(--ease-out), transform 7s ease-out;
}

.story-photos img.is-active {
  opacity: 1;
  transform: scale(1);
}

.story-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(70% 60% at 50% 45%, rgba(4, 11, 20, 0) 0%, rgba(4, 11, 20, 0.65) 100%),
    linear-gradient(180deg, rgba(4, 11, 20, 0) 60%, rgba(4, 11, 20, 0.85) 100%);
  pointer-events: none;
}

.story-slot {
  position: absolute;
  inset: 8% 8% 14% 8%;
  z-index: 1;
}

.story-hud {
  position: absolute;
  left: 1.4rem;
  right: 1.4rem;
  bottom: 1.15rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.story-caption {
  color: var(--accent-3);
}

.story-dots {
  display: flex;
  gap: 0.9rem;
}

.story-dots li {
  color: var(--text-3);
  transition: color 0.3s;
}

.story-dots li.is-active {
  color: var(--accent-3);
}

.story-step {
  min-height: 78vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: 2.5rem;
  opacity: 0.32;
  transition: opacity 0.6s var(--ease-out);
}

.story-step.is-active {
  opacity: 1;
}

.step-slot {
  display: none;
}

.step-meta {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--mono);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}

.step-meta span {
  display: inline-grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  color: var(--accent-3);
  letter-spacing: 0;
}

.step-title {
  margin-top: 1.2rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
  line-height: 1.1;
}

.step-problem {
  margin: 1.2rem 0 1rem;
  padding-left: 1rem;
  border-left: 2px solid rgba(248, 113, 113, 0.55);
  color: var(--text-2);
}

.story-step > p:not(.step-meta):not(.step-problem):not(.step-result) {
  color: var(--text-2);
  font-size: 1.04rem;
}

.step-result {
  margin-top: 1.1rem;
  color: var(--accent-3);
  font-weight: 500;
}

.more {
  margin-top: 1.1rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.more summary {
  position: relative;
  padding: 0.85rem 2rem 0.85rem 0;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--text);
}

.more summary::-webkit-details-marker {
  display: none;
}

.more summary::before,
.more summary::after {
  content: "";
  position: absolute;
  right: 0.4rem;
  top: 50%;
  width: 11px;
  height: 1.5px;
  background: var(--accent-2);
  transition: transform 0.3s var(--ease-out);
}

.more summary::after {
  transform: rotate(90deg);
}

.more[open] summary::after {
  transform: rotate(0deg);
}

.more > :not(summary) {
  padding-bottom: 1rem;
  color: var(--text-2);
}

.story-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.story-foot p {
  color: var(--text-3);
  font-size: 0.92rem;
  max-width: 52ch;
}

.story-foot-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---------- Banda fotográfica ---------- */
.photo-band {
  position: relative;
  min-height: clamp(420px, 72vh, 720px);
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

.photo-band-media {
  position: absolute;
  inset: -12% 0;
  z-index: -1;
  -webkit-mask-image: linear-gradient(180deg, transparent 12%, #000 34%, #000 66%, transparent 88%);
  mask-image: linear-gradient(180deg, transparent 12%, #000 34%, #000 66%, transparent 88%);
}

.photo-band-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate3d(0, var(--py, 0px), 0) scale(1.05);
  will-change: transform;
}

.photo-band-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(2, 6, 12, 0.8) 0%, rgba(2, 6, 12, 0.3) 60%, rgba(2, 6, 12, 0.05) 100%);
}

.photo-band-quote {
  max-width: 30ch;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.6rem, 3.1vw, 2.55rem);
  line-height: 1.22;
  text-wrap: balance;
}

/* ---------- Método: controles de calidad ---------- */
.gates {
  --p: 0;
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1.25rem;
  padding-top: 3.6rem;
  counter-reset: gate;
}

.gates::before,
.gates::after {
  content: "";
  position: absolute;
  top: 1.15rem;
  left: 10%;
  right: 10%;
  height: 1px;
}

.gates::before {
  background: var(--line-2);
}

.gates::after {
  background: linear-gradient(90deg, var(--steel), var(--accent-3));
  box-shadow: 0 0 14px rgba(141, 180, 214, 0.8);
  transform-origin: 0 50%;
  transform: scaleX(var(--p));
}

.gate {
  position: relative;
  text-align: center;
  padding: 0 0.25rem;
}

.gate-node {
  position: absolute;
  top: -3.6rem;
  left: 50%;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  margin-left: -1.15rem;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--bg);
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--text-3);
  transition: background-color 0.4s, color 0.4s, box-shadow 0.4s, border-color 0.4s;
}

.gate.is-on .gate-node {
  background: var(--steel);
  border-color: var(--accent-3);
  color: #fff;
  box-shadow: 0 0 0 6px rgba(79, 122, 157, 0.18), 0 0 26px rgba(141, 180, 214, 0.7);
}

.gate-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.gate-title {
  margin-top: 0.6rem;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.4;
  text-wrap: balance;
}

.gate .more {
  text-align: left;
}

/* ---------- Modalidades ---------- */
.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  align-items: stretch;
}

.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem 1.85rem 1.85rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.plan.is-featured {
  border-color: rgba(141, 180, 214, 0.45);
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(79, 122, 157, 0.28) 0%, transparent 60%),
    var(--surface);
}

.plan-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.plan-meta span:first-child {
  color: var(--accent-2);
}

.plan-meta span:last-child {
  color: var(--text-3);
}

.plan-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.75rem;
  line-height: 1.1;
}

.plan-desc {
  color: var(--text-2);
}

.plan .dash-list {
  margin-bottom: 0.5rem;
}

.plan .btn {
  margin-top: auto;
}

.estimator-teaser {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: 2rem;
  padding: 1.5rem 1.75rem;
  border-radius: 18px;
  border: 1px dashed var(--line-2);
}

.estimator-teaser-title {
  font-weight: 600;
  font-size: 1.05rem;
}

.estimator-teaser p:not(.estimator-teaser-title) {
  color: var(--text-2);
  font-size: 0.95rem;
}

/* ---------- Entregables ---------- */
.deliverables {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}

.deliverable {
  position: relative;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.deliverable-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.deliverable-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.8);
  transition: transform 1.2s var(--ease-out), filter 0.6s;
}

.deliverable:hover .deliverable-media img {
  transform: scale(1.07);
  filter: saturate(1);
}

.deliverable-body {
  padding: 1.35rem 1.4rem 1.6rem;
}

.deliverable-tag {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.deliverable h3 {
  margin-top: 0.55rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.28rem;
  line-height: 1.2;
}

.deliverable-body p:last-child {
  margin-top: 0.6rem;
  color: var(--text-2);
  font-size: 0.93rem;
}

/* ---------- Confidencialidad ---------- */
.gov-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.tax-note {
  margin-top: 1.75rem;
  max-width: 62ch;
}

.gov-list {
  display: grid;
  gap: 0.85rem;
}

.gov-list li {
  display: grid;
  gap: 0.25rem;
  padding: 1.15rem 1.35rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.gov-list strong {
  font-weight: 600;
}

.gov-list span {
  color: var(--text-2);
  font-size: 0.93rem;
}

/* ---------- Contacto ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.contact-slot {
  height: 170px;
  margin-bottom: 1rem;
}

.channels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 2rem;
  max-width: 560px;
}

.channel-wide {
  grid-column: 1 / -1;
}

.channel {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 1.1rem;
  row-gap: 0.1rem;
  padding: 1.05rem 1.3rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  color: var(--text);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.channel:hover {
  border-color: var(--line-2);
}

.channel-icon {
  grid-row: 1 / span 2;
  color: var(--accent-3);
}

.channel::before {
  content: "→";
  grid-column: 3;
  grid-row: 1 / span 2;
  color: var(--text-3);
  transition: transform 0.3s var(--ease-out), color 0.3s;
}

.channel:hover::before {
  transform: translateX(4px);
  color: var(--accent-3);
}

.channel-label,
.channel-value {
  grid-column: 2;
}

.channel-label {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
}

.channel-value {
  font-weight: 600;
  font-size: 0.95rem;
  overflow-wrap: anywhere;
}

.channel-wa {
  border-color: rgba(37, 211, 102, 0.4);
  background: linear-gradient(160deg, rgba(37, 211, 102, 0.16), rgba(37, 211, 102, 0.03)), var(--surface);
}

.channel-wa .channel-icon {
  color: var(--wa);
}

.channel-ig .channel-icon {
  color: #E1306C;
}

.channel-fb .channel-icon {
  color: #1877F2;
}

.channel-in .channel-icon {
  color: #0A66C2;
}

[data-theme="dark"] .channel-in .channel-icon,
:root:not([data-theme]) .channel-in .channel-icon {
  color: #6FA8DC;
}

/* Oficina y mapa */
.office {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
  margin-top: clamp(3rem, 7vw, 5rem);
  scroll-margin-top: calc(var(--header-h) + 1.5rem);
}

.office-map {
  margin: 0;
}

.office-map-link {
  display: block;
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.office-map img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.8s var(--ease-out);
}

.office-map-link:hover img,
.office-map-link:focus-visible img {
  transform: scale(1.03);
}

.office-map figcaption {
  margin-top: 0.55rem;
  font-size: 0.75rem;
  color: var(--text-3);
}

.office-map figcaption a {
  color: inherit;
}

.office-title {
  margin-top: 0.4rem;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.15;
  color: var(--text);
}

.office-sub {
  margin-top: 0.6rem;
  color: var(--text-2);
}

.office-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

@media (max-width: 960px) {
  .office {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  .channels {
    grid-template-columns: minmax(0, 1fr);
  }

  .office-actions .btn {
    flex: 1 1 100%;
  }
}

.contact-meta {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.contact-meta dt {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
}

.contact-meta dd {
  margin-top: 0.2rem;
  color: var(--text-2);
}

.contact-meta a {
  color: var(--text);
}

.form-panel {
  padding: clamp(1.5rem, 3vw, 2.3rem);
  border-radius: 26px;
  border: 1px solid var(--line-2);
  background: var(--surface-strong);
  box-shadow: var(--shadow);
}

.form-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

.contact-form {
  display: grid;
  gap: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-2);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.95rem;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--field-bg);
  color: var(--text);
  font: inherit;
  font-size: 0.97rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field textarea {
  min-height: 120px;
  resize: vertical;
}

.field select {
  appearance: none;
  padding-right: 2.4rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238DB4D6' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.95rem center;
}

.field select option,
.field select optgroup {
  background: #0B1C2E;
  color: #EEF4FA;
}

[data-theme="light"] .field select option,
[data-theme="light"] .field select optgroup {
  background: #fff;
  color: #0F2D4A;
}

.field input::placeholder,
.field textarea::placeholder {
  color: var(--text-3);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(79, 122, 157, 0.25);
}

.field [aria-invalid="true"] {
  border-color: var(--danger);
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: 0.92rem;
  color: var(--text-2);
  cursor: pointer;
}

.check input {
  margin-top: 0.25rem;
  width: 17px;
  height: 17px;
  accent-color: var(--steel);
}

.form-note {
  font-size: 0.82rem;
  color: var(--text-3);
}

.form-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.form-actions .btn {
  width: 100%;
}

.form-notice {
  padding: 0.95rem 1.1rem;
  border-radius: 12px;
  font-size: 0.92rem;
}

.form-notice.success {
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.5);
  color: var(--ok);
}

.form-notice.error {
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.5);
  color: var(--danger);
}

[data-theme="light"] .form-notice.success { color: #047857; }
[data-theme="light"] .form-notice.error { color: #B91C1C; }

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* ---------- Pie de página ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, transparent, rgba(2, 6, 12, 0.6));
  padding: clamp(3.5rem, 6vw, 5rem) 0 2rem;
}

[data-theme="light"] .site-footer {
  background: var(--bg-2);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 2.5rem;
}

.footer-about {
  margin-top: 1.25rem;
  max-width: 40ch;
  color: var(--text-2);
  font-size: 0.94rem;
}

.footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.footer-badges span {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--text-2);
}

.footer-heading {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 1rem;
}

.footer-col ul {
  display: grid;
  gap: 0.5rem;
  font-size: 0.92rem;
  color: var(--text-2);
}

.footer-col a,
.footer-col button,
.footer-legal a,
.footer-legal button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-2);
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  font-size: inherit;
  transition: color 0.2s;
}

.footer-col a:hover,
.footer-col button:hover,
.footer-legal a:hover,
.footer-legal button:hover {
  color: var(--text);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.84rem;
  color: var(--text-3);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.footer-legal a,
.footer-legal button {
  color: var(--text-3);
}

/* ---------- Botón flotante de WhatsApp ---------- */
.wa-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 0;
  height: 58px;
  padding: 0 15px;
  border-radius: 999px;
  background: var(--wa);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 16px 36px -12px rgba(37, 211, 102, 0.7), 0 4px 14px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s var(--ease-out), gap 0.35s var(--ease-out);
}

.wa-float::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid var(--wa);
  animation: wa-ring 2.6s var(--ease-out) infinite;
  pointer-events: none;
}

@keyframes wa-ring {
  0% { opacity: 0.8; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.45); }
}

.wa-float-label {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font-weight: 700;
  font-size: 0.95rem;
  color: #052B14;
  transition: max-width 0.4s var(--ease-out);
}

.wa-float svg {
  color: #fff;
  flex-shrink: 0;
}

@media (hover: hover) {
  .wa-float:hover {
    gap: 0.55rem;
    transform: translateY(-2px);
  }

  .wa-float:hover .wa-float-label {
    max-width: 120px;
  }
}

/* ---------- Panel de detalle ---------- */
.drawer {
  margin: 0 0 0 auto;
  width: min(620px, 100vw);
  max-width: 100vw;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  overflow: hidden;
}

.drawer::backdrop {
  background: rgba(2, 6, 12, 0.62);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  animation: fade-in 0.35s ease;
}

.drawer[open] .drawer-panel {
  animation: drawer-in 0.5s var(--ease-out);
}

.drawer.is-closing .drawer-panel {
  animation: drawer-out 0.24s ease-in forwards;
}

.drawer.is-closing::backdrop {
  animation: fade-out 0.24s ease-in forwards;
}

@keyframes drawer-in {
  from { transform: translateX(40px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

@keyframes drawer-out {
  to { transform: translateX(40px); opacity: 0; }
}

@keyframes fade-in {
  from { opacity: 0; }
}

@keyframes fade-out {
  to { opacity: 0; }
}

.drawer-panel {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0A1A2B 0%, #050E19 100%);
  border-left: 1px solid var(--line-2);
  box-shadow: -40px 0 80px -30px rgba(0, 0, 0, 0.8);
}

[data-theme="light"] .drawer-panel {
  background: linear-gradient(180deg, #FFFFFF 0%, #F3F6FA 100%);
}

.drawer-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--surface-strong);
  color: var(--text);
  cursor: pointer;
}

.drawer-close:hover {
  border-color: var(--accent-2);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 3.6rem clamp(1.4rem, 4.5vw, 2.8rem) 2.4rem;
}

.detail-eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.detail-title {
  margin-top: 0.75rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.95rem, 4.4vw, 2.6rem);
  line-height: 1.08;
  text-wrap: balance;
}

.detail-lead {
  margin-top: 1rem;
  font-size: 1.05rem;
  color: var(--text-2);
}

.detail-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 1.6rem;
}

.detail-facts div {
  padding: 0.95rem 1.05rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.detail-facts dt {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
}

.detail-facts dd {
  margin-top: 0.3rem;
  font-size: 0.92rem;
}

.detail h3:not(.estimator-title) {
  margin: 2rem 0 0.85rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chips li {
  padding: 0.38rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  font-size: 0.84rem;
  color: var(--text-2);
}

.drawer-cta {
  margin-top: 2.4rem;
  padding: 1.5rem;
  border-radius: 18px;
  border: 1px solid var(--line-2);
  background: radial-gradient(120% 120% at 0% 0%, rgba(79, 122, 157, 0.28), transparent 60%), var(--surface-2);
}

.drawer-cta-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.3rem;
}

.drawer-cta p:not(.drawer-cta-title) {
  margin-top: 0.35rem;
  color: var(--text-2);
  font-size: 0.93rem;
}

.drawer-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.1rem;
}

.drawer-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1.4rem, 4.5vw, 2.8rem);
  border-top: 1px solid var(--line);
}

.drawer-nav:empty {
  display: none;
}

.drawer-nav button {
  display: grid;
  gap: 0.1rem;
  max-width: 48%;
  padding: 0.25rem 0;
  border: 0;
  background: none;
  text-align: left;
  cursor: pointer;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
}

.drawer-nav button:last-child {
  margin-left: auto;
  text-align: right;
}

.drawer-nav small {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
}

.drawer-nav button:hover {
  color: var(--accent-3);
}

html.drawer-open {
  overflow: hidden;
}

/* Estimador dentro del panel */
.estimator {
  display: grid;
  gap: 1.5rem;
  margin-top: 1.75rem;
}

.estimator-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.estimator-result {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
  border-radius: 18px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
}

.estimator-badge {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.estimator-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.45rem;
  line-height: 1.15;
}

.estimator-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.estimator-meta dt {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}

.estimator-meta dd {
  font-size: 0.93rem;
  font-weight: 500;
}

.estimator-result .btn {
  white-space: normal;
  text-align: center;
  line-height: 1.3;
}

/* ---------- Responsivo ---------- */
@media (max-width: 1180px) {
  .main-nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    padding: 1rem clamp(16px, 4vw, 32px) 1.5rem;
    background: rgba(4, 11, 20, 0.96);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
  }

  [data-theme="light"] .main-nav {
    background: rgba(245, 247, 250, 0.98);
  }

  .main-nav.is-open {
    display: grid;
    gap: 1rem;
  }

  .nav-list {
    flex-direction: column;
    gap: 0.15rem;
  }

  .nav-link {
    padding: 0.8rem 0.5rem;
    font-size: 1.05rem;
    border-radius: 10px;
  }

  .site-header:not(.is-scrolled) .main-nav .nav-link {
    color: var(--text-2);
  }

  .nav-cta {
    display: inline-flex;
  }

  .header-actions {
    margin-left: auto;
  }

  .menu-toggle {
    display: inline-grid;
  }

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

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

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-visual {
    order: -1;
    width: min(320px, 70vw);
    margin: 0 auto -0.5rem;
  }

  .hero-visual-hint {
    display: none;
  }

  .hero-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-facts li:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .hero-facts li:nth-child(n + 3) {
    padding-top: 1.1rem;
  }

  .pillars,
  .plans {
    grid-template-columns: minmax(0, 1fr);
  }

  .pillars {
    max-width: 680px;
    margin-inline: auto;
  }

  .plans {
    max-width: 560px;
    margin-inline: auto;
  }

  .section-head.split {
    grid-template-columns: minmax(0, 1fr);
  }

  .svc-slot {
    height: 190px;
    order: -1;
  }

  .gates {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.6rem;
    padding-top: 0;
    max-width: 640px;
    margin-inline: auto;
  }

  .gates::before,
  .gates::after {
    top: 0.5rem;
    bottom: 0.5rem;
    left: 1.15rem;
    right: auto;
    width: 1px;
    height: auto;
  }

  .gates::after {
    background: linear-gradient(180deg, var(--steel), var(--accent-3));
    transform-origin: 50% 0;
    transform: scaleY(var(--p));
  }

  .gate {
    text-align: left;
    padding-left: 3.6rem;
    min-height: 2.3rem;
  }

  .gate-node {
    top: 0;
    left: 0;
    margin-left: 0;
  }

  .gov-grid,
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .cta-band {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 960px) {
  .story-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .story-stage {
    display: none;
  }

  .story-step {
    min-height: 0;
    opacity: 1;
    padding-block: 1.5rem 2.5rem;
  }

  .story-step + .story-step {
    border-top: 1px solid var(--line);
    padding-top: 2.5rem;
  }

  .step-slot {
    display: block;
    height: 240px;
    margin-bottom: 1.5rem;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: radial-gradient(60% 60% at 50% 50%, rgba(19, 56, 91, 0.45), rgba(4, 11, 20, 0.2) 70%);
  }
}

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

  .brand-mark {
    height: 40px;
  }

  .brand-name {
    font-size: 1.15rem;
  }

  .brand-slogan {
    font-size: 0.6rem;
  }

  .brand-text {
    padding-left: 0.65rem;
  }

  .header-cta {
    display: none;
  }

  .header-inner {
    gap: 0.75rem;
  }

  .header-actions {
    gap: 0.45rem;
  }

  /* En celular solo se muestra el idioma al que se puede cambiar */
  .lang-switch {
    width: 42px;
    padding: 0;
    overflow: hidden;
  }

  .lang-switch a.is-current {
    display: none;
  }

  .lang-switch a {
    width: 100%;
    padding: 0;
  }

  .hero {
    padding-bottom: 4.5rem;
  }

  .hero-visual {
    width: min(250px, 66vw);
  }

  .hero-title {
    margin-top: 1.2rem;
  }

  .hero-ctas .btn {
    width: 100%;
  }

  .hero-direct span {
    display: none;
  }

  .hero-direct a {
    display: inline-block;
    margin: 0.35rem 0.75rem 0 0;
  }

  .hero-facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-facts li,
  .hero-facts li + li {
    padding: 1rem 0 0;
    border-left: 0;
  }

  .scroll-cue {
    display: none;
  }

  .pillar-body {
    padding-inline: 1.3rem;
  }

  .cta-band-actions .btn {
    flex: 1 1 100%;
  }

  .deliverables,
  .form-row,
  .form-actions,
  .estimator-controls,
  .detail-facts,
  .estimator-meta,
  .footer-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .story-foot-actions,
  .story-foot-actions .btn {
    width: 100%;
  }

  .photo-band-quote {
    font-size: 1.45rem;
  }

  .wa-float {
    right: 16px;
    bottom: 16px;
    height: 54px;
    padding: 0 13px;
  }

  .drawer-cta-actions .btn {
    flex: 1 1 100%;
  }
}

/* Celulares angostos (360 a 400 px): logo, eslogan y tres botones caben sin cortarse */
@media (max-width: 400px) {
  .brand {
    gap: 0.5rem;
  }

  .brand-mark {
    height: 34px;
  }

  .brand-text {
    padding-left: 0.5rem;
  }

  .brand-slogan {
    letter-spacing: 0.02em;
  }

  .header-inner {
    gap: 0.5rem;
  }

  .header-actions {
    gap: 0.35rem;
  }

  .icon-btn,
  .lang-switch {
    width: 38px;
    height: 38px;
  }
}

@media (max-width: 340px) {
  .brand-slogan {
    display: none;
  }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .fx-ready [data-reveal]:not(.is-in) {
    opacity: 1;
    translate: none;
  }
}

/* ==========================================================================
   AMPLIACIÓN 2026-10-18: escenas HyperFrames, peritajes, clientes, película,
   consentimiento, aviso de privacidad, redes y páginas legales
   ========================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Grano fotográfico: textura de película sobre todo el sitio ---------- */
body::after {
  content: "";
  position: fixed;
  inset: -50%;
  z-index: 60;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 1.6 -0.3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(4) infinite;
}

[data-theme="light"] body::after {
  opacity: 0.035;
}

@keyframes grain {
  0% { transform: translate3d(0, 0, 0); }
  25% { transform: translate3d(-4%, 3%, 0); }
  50% { transform: translate3d(3%, -2%, 0); }
  75% { transform: translate3d(-2%, -4%, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

/* ---------- Escenas en formato HyperFrames ---------- */
.hf-word {
  display: inline-block;
}

/* La entrada del inicio parte oculta; si la animación no corre, aparece sola */
.hf-pending [data-composition-id="inicio"] [data-fx],
.hf-pending [data-composition-id="visor"] [data-fx] {
  opacity: 0;
  animation: hf-failsafe 0.01s linear 3s forwards;
}

@keyframes hf-failsafe {
  to { opacity: 1; }
}

/* ---------- Respaldo en el inicio ---------- */
.hero-backing {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
  padding: 0.4rem 0.45rem 0.4rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(10, 26, 43, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--text-2);
  text-decoration: none;
  transition: border-color 0.25s, background-color 0.25s;
}

.hero-backing:hover {
  border-color: var(--accent-2);
  background: rgba(19, 50, 80, 0.6);
}

.hero-backing-label {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}

.logo-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  background: #FFFFFF;
  box-shadow: inset 0 0 0 1px rgba(15, 45, 74, 0.08), 0 8px 20px -10px rgba(0, 0, 0, 0.7);
}

.logo-chip img {
  height: 26px;
  width: auto;
}

.logo-chip-sm {
  padding: 0.3rem 0.65rem;
}

.logo-chip-sm img {
  height: 20px;
}

/* ---------- Visor del inicio (esquinas y rótulos) ---------- */
.hud {
  position: absolute;
  inset: 5%;
  pointer-events: none;
}

.hud-corner {
  position: absolute;
  width: 28px;
  height: 28px;
  border: 0 solid rgba(207, 227, 245, 0.55);
}

.hud-tl { top: 0; left: 0; border-top-width: 1.5px; border-left-width: 1.5px; border-top-left-radius: 7px; }
.hud-tr { top: 0; right: 0; border-top-width: 1.5px; border-right-width: 1.5px; border-top-right-radius: 7px; }
.hud-bl { bottom: 0; left: 0; border-bottom-width: 1.5px; border-left-width: 1.5px; border-bottom-left-radius: 7px; }
.hud-br { bottom: 0; right: 0; border-bottom-width: 1.5px; border-right-width: 1.5px; border-bottom-right-radius: 7px; }

.hud-label {
  position: absolute;
  top: 0.55rem;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: rgba(207, 227, 245, 0.72);
  white-space: nowrap;
}

.hud-label-bottom {
  right: 2.3rem;
  color: rgba(127, 212, 180, 0.85);
}

/* ---------- Peritajes ---------- */
.peritaje {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  margin-top: 1.5rem;
  padding: clamp(1.4rem, 3.5vw, 2.8rem);
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  background:
    radial-gradient(90% 120% at 0% 0%, rgba(127, 212, 180, 0.08), transparent 55%),
    radial-gradient(80% 100% at 100% 100%, rgba(79, 122, 157, 0.22), transparent 60%),
    var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.peritaje-visual {
  position: relative;
  aspect-ratio: 32 / 26;
  border-radius: 18px;
  border: 1px solid var(--line);
  background:
    radial-gradient(70% 70% at 55% 55%, rgba(79, 122, 157, 0.28), transparent 70%),
    linear-gradient(160deg, #0A1A2B 0%, #050D18 100%);
  color: #CFE3F5;
  overflow: hidden;
}

.peritaje-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.06) 0%, transparent 30%);
  pointer-events: none;
}

.peritaje-svg {
  width: 100%;
  height: 100%;
}

.peritaje-title {
  margin-top: 0.4rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.1;
}

.peritaje-lead {
  margin-top: 1rem;
  max-width: 62ch;
  color: var(--text-2);
}

.peritaje-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.5rem;
  margin-top: 1.5rem;
}

.peritaje-list li {
  display: grid;
  gap: 0.25rem;
  padding-left: 1rem;
  border-left: 2px solid rgba(127, 212, 180, 0.5);
}

.peritaje-list strong {
  font-weight: 600;
}

.peritaje-list span {
  color: var(--text-2);
  font-size: 0.9rem;
}

.peritaje-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.6rem;
}

.peritaje-note {
  margin-top: 1.1rem;
  font-size: 0.84rem;
  color: var(--text-3);
}

/* ---------- Clientes ---------- */
.section.clients {
  padding-block: clamp(3.5rem, 7vw, 5.5rem);
}

.clients-head {
  max-width: 780px;
  margin: 0 auto clamp(2rem, 4vw, 2.75rem);
  text-align: center;
}

.clients-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  line-height: 1.12;
  text-wrap: balance;
}

.clients-lead {
  margin-top: 0.9rem;
  color: var(--text-2);
  text-wrap: pretty;
}

.logo-wall {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.logo-wall.logo-wall-single {
  grid-template-columns: minmax(0, 340px);
  justify-content: center;
}

.logo-card {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 132px;
  padding: 1.2rem 1.4rem;
  border-radius: 18px;
  border: 1px solid rgba(15, 45, 74, 0.1);
  background: #FFFFFF;
  box-shadow: 0 18px 40px -26px rgba(0, 0, 0, 0.85);
  overflow: hidden;
}

.logo-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.55) 50%, transparent 65%);
  transform: translateX(-120%);
  transition: transform 0.9s var(--ease-out);
  pointer-events: none;
}

.logo-card:hover::after {
  transform: translateX(120%);
}

.logo-card img {
  max-width: 100%;
  max-height: 78px;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.5s var(--ease-out);
}

.logo-card:hover img {
  transform: scale(1.04);
}

.logo-card-dark {
  border-color: rgba(212, 175, 55, 0.28);
  background: #050505;
}

.logo-card-dark::after {
  background: linear-gradient(115deg, transparent 35%, rgba(212, 175, 55, 0.18) 50%, transparent 65%);
}

.logo-badge {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 1;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: var(--navy);
  color: #FFFFFF;
  font-family: var(--mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sector-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.75rem;
}

.sector-list li {
  padding: 0.38rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  color: var(--text-2);
  font-size: 0.84rem;
}

/* ---------- Terminal del relato de investigación ---------- */
.story-terminal {
  position: absolute;
  top: 1.1rem;
  left: 1.4rem;
  right: 1.4rem;
  z-index: 2;
  min-height: 3em;
  font-family: var(--mono);
  font-size: 0.66rem;
  line-height: 1.55;
  letter-spacing: 0.08em;
  color: rgba(207, 227, 245, 0.8);
}

.story-term-line {
  display: none;
}

.story-term-line.is-active {
  display: block;
}

.story-term-line.is-active::after {
  content: "";
  display: inline-block;
  width: 0.5em;
  height: 1em;
  margin-left: 0.25em;
  vertical-align: -0.15em;
  background: #7FD4B4;
  animation: caret 1s steps(1) infinite;
}

@keyframes caret {
  50% { opacity: 0; }
}

/* ---------- Película del método ---------- */
.film {
  max-width: 1080px;
  margin: 0 auto clamp(3rem, 6vw, 4.5rem);
}

.film-screen {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 22px;
  border: 1px solid var(--line-2);
  background: #02070D;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 50px 100px -50px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(141, 180, 214, 0.06);
}

.film-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  background: linear-gradient(115deg, rgba(255, 255, 255, 0.07) 0%, transparent 26%, transparent 74%, rgba(255, 255, 255, 0.03) 100%);
  pointer-events: none;
}

.film-poster {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 0.6s ease;
}

.film-player {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
}

.film-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  margin: -39px 0 0 -39px;
  padding: 0 0 0 4px;
  border-radius: 50%;
  border: 1px solid rgba(207, 227, 245, 0.45);
  background: rgba(4, 11, 20, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: #FFFFFF;
  cursor: pointer;
  transition: transform 0.3s var(--ease-out), background-color 0.3s, opacity 0.4s;
}

.film-play:hover {
  transform: scale(1.06);
  background: rgba(79, 122, 157, 0.65);
}

.film-screen.is-ready .film-poster,
.film-screen.is-ready .film-play {
  opacity: 0;
  pointer-events: none;
}

.film-screen.is-error .film-player {
  display: none;
}

.film-caption {
  display: block;
  margin-top: 1rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
  color: var(--text-3);
}

.film-rec {
  display: inline-block;
  vertical-align: 0.05em;
  margin-right: 0.6rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #F87171;
  animation: rec 2s infinite;
}

@keyframes rec {
  0% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0.55); }
  70% { box-shadow: 0 0 0 8px rgba(248, 113, 113, 0); }
  100% { box-shadow: 0 0 0 0 rgba(248, 113, 113, 0); }
}

/* ---------- Documentos legales en la sección de confidencialidad ---------- */
.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.legal-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  color: var(--text-2);
  font-size: 0.86rem;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}

.legal-links a::before {
  content: "§";
  font-family: var(--serif);
  color: var(--accent-2);
}

.legal-links a:hover {
  color: var(--text);
  border-color: var(--accent-2);
  background: rgba(141, 180, 214, 0.08);
}

/* ---------- Redes sociales ---------- */
.social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.contact-meta dd.social-row {
  margin-top: 0.5rem;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 40px;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  color: var(--text);
  font-size: 0.88rem;
  text-decoration: none;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}

.contact-meta .social-link {
  color: var(--text);
}

.social-link:hover {
  border-color: var(--accent-2);
  background: rgba(141, 180, 214, 0.1);
}

.social-icon {
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
}

.footer-social {
  margin-top: 1.1rem;
}

/* ---------- Formulario: autorizaciones y canales ---------- */
.form-sub {
  margin: -0.6rem 0 1.2rem;
  color: var(--text-2);
  font-size: 0.92rem;
}

.consent {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line-2);
  border-radius: 14px;
  background: rgba(141, 180, 214, 0.05);
}

.check a {
  color: var(--accent-3);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.check input[aria-invalid="true"] {
  outline: 2px solid var(--danger);
  outline-offset: 2px;
}

.form-alt {
  margin-top: -0.25rem;
  text-align: center;
  font-size: 0.86rem;
  color: var(--text-3);
}

.link-inline {
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent-3);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.link-inline:hover {
  color: var(--text);
}

.form-notice:focus {
  outline: none;
}

.form-notice-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.8rem;
}

.form-notice-actions .btn {
  min-height: 42px;
  font-size: 0.9rem;
}

/* ---------- Pie de página ---------- */
.footer-backing {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.3rem;
  color: var(--text-3);
  font-size: 0.8rem;
  text-decoration: none;
}

.footer-heading-gap {
  margin-top: 1.6rem;
}

.credits-note {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-3);
}

/* ---------- Aviso de privacidad ---------- */
.privacy-notice {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 95;
  width: min(410px, calc(100vw - 40px));
  padding: 1.15rem 1.25rem 1.1rem;
  border-radius: 18px;
  border: 1px solid var(--line-2);
  background: var(--surface-strong);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.4s var(--ease-out);
}

.privacy-notice.is-open {
  opacity: 1;
  transform: none;
}

.privacy-notice-title {
  padding-right: 2.2rem;
  font-weight: 700;
}

.privacy-notice-text {
  margin-top: 0.35rem;
  font-size: 0.9rem;
  color: var(--text-2);
}

.privacy-notice-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.95rem;
}

.privacy-notice-actions .btn {
  min-height: 40px;
  padding: 0 1rem;
  font-size: 0.88rem;
}

.privacy-notice-actions .link-inline {
  font-size: 0.86rem;
}

.privacy-notice-x {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
}

.privacy-notice-x:hover {
  color: var(--text);
  border-color: var(--accent-2);
}

/* ---------- Páginas legales ---------- */
.legal-body {
  background-image: none;
}

.legal-header .header-actions {
  margin-left: auto;
}

.legal-main {
  position: relative;
  z-index: 1;
  padding: calc(var(--header-h) + 2.6rem) 0 4.5rem;
}

.legal-grid {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  align-items: start;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.legal-aside {
  position: sticky;
  top: calc(var(--header-h) + 1.6rem);
  display: grid;
  gap: 1.8rem;
  max-height: calc(100vh - var(--header-h) - 3rem);
  overflow-y: auto;
  padding-right: 0.5rem;
}

.legal-aside-title {
  margin-bottom: 0.65rem;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.legal-toc ol,
.legal-docs ul {
  display: grid;
  gap: 0.4rem;
}

.legal-toc a,
.legal-docs a {
  color: var(--text-2);
  font-size: 0.87rem;
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.2s;
}

.legal-toc a:hover,
.legal-docs a:hover,
.legal-docs a[aria-current="page"] {
  color: var(--text);
}

.legal-docs a[aria-current="page"] {
  font-weight: 600;
}

.legal-doc {
  max-width: 780px;
}

.legal-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.1rem, 4.2vw, 3.1rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.legal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.5rem;
}

.legal-meta div {
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.legal-meta dt {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}

.legal-meta dd {
  margin-top: 0.15rem;
  font-size: 0.92rem;
}

.legal-meta .legal-meta-hash {
  flex: 1 1 100%;
}

.legal-meta code,
.legal-history code {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--text-2);
  word-break: break-all;
}

.legal-summary {
  margin-top: 1.8rem;
  padding: 1.3rem 1.5rem;
  border-radius: 18px;
  border: 1px solid rgba(127, 212, 180, 0.35);
  background: linear-gradient(160deg, rgba(127, 212, 180, 0.08), transparent 60%), var(--surface);
}

.legal-summary h2 {
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #2E8C6B;
}

[data-theme="dark"] .legal-summary h2 {
  color: #7FD4B4;
}

.legal-summary ul {
  display: grid;
  gap: 0.6rem;
  margin-top: 0.85rem;
}

.legal-summary li {
  position: relative;
  padding-left: 1.5rem;
}

.legal-summary li::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 0.42em;
  width: 0.55rem;
  height: 0.3rem;
  border-left: 2px solid #3FAE87;
  border-bottom: 2px solid #3FAE87;
  transform: rotate(-45deg);
}

.legal-body-text h2 {
  margin-top: 2.5rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.45rem;
  line-height: 1.25;
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.legal-body-text h3 {
  margin-top: 1.4rem;
  font-size: 1.05rem;
}

.legal-body-text p {
  margin-top: 0.85rem;
  color: var(--text-2);
}

.legal-body-text strong {
  color: var(--text);
}

.legal-body-text a {
  color: var(--accent-3);
  text-underline-offset: 3px;
}

.legal-list {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.85rem;
}

.legal-list li {
  position: relative;
  padding-left: 1.3rem;
  color: var(--text-2);
}

.legal-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.78em;
  width: 0.6rem;
  height: 1px;
  background: var(--accent-2);
}

.legal-steps {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.85rem;
  padding-left: 1.4rem;
  list-style: decimal;
  color: var(--text-2);
}

.legal-table-wrap {
  margin-top: 1rem;
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.legal-table th,
.legal-table td {
  padding: 0.75rem 0.9rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.legal-table th {
  font-family: var(--mono);
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-2);
  background: var(--surface);
}

.legal-table td {
  color: var(--text-2);
}

.legal-table tr:last-child td {
  border-bottom: 0;
}

.legal-history {
  margin-top: 2.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}

.legal-history h2 {
  font-size: 1.05rem;
}

.legal-history p {
  margin-top: 0.4rem;
  font-size: 0.88rem;
  color: var(--text-3);
}

.legal-history ul {
  display: grid;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

.legal-history li {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: baseline;
  gap: 0.8rem;
  font-size: 0.86rem;
  color: var(--text-2);
}

.legal-history .legal-history-note {
  display: block;
  color: var(--text-3);
}

.legal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.2rem;
}

.legal-footer {
  padding-top: 0;
}

.legal-footer .footer-bottom {
  margin-top: 0;
}

/* ---------- Responsivo de lo nuevo ---------- */
@media (max-width: 1320px) and (min-width: 1181px) {
  .nav-link {
    padding: 0.55rem 0.62rem;
    font-size: 0.9rem;
  }
}

/* Entre 1181 y 1279 px el menú completo no deja espacio al botón del encabezado;
   el mismo llamado está en el inicio y en cada sección */
@media (max-width: 1279px) and (min-width: 1181px) {
  .header-cta {
    display: none;
  }
}

@media (max-width: 1024px) {
  .peritaje {
    grid-template-columns: minmax(0, 1fr);
  }

  .peritaje-visual {
    width: 100%;
    max-width: 460px;
    margin-inline: auto;
  }

  .logo-wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .logo-wall.logo-wall-single {
    grid-template-columns: minmax(0, 300px);
  }

  .hud-label-bottom {
    display: none;
  }

  .legal-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .legal-aside {
    position: static;
    order: 2;
    max-height: none;
    overflow: visible;
  }

  .legal-toc {
    display: none;
  }
}

@media (max-width: 640px) {
  .hero-backing {
    border-radius: 18px;
  }

  .peritaje-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .peritaje-actions .btn {
    flex: 1 1 100%;
  }

  .logo-card {
    min-height: 104px;
    padding: 1rem;
  }

  .logo-card img {
    max-height: 60px;
  }

  .film-screen {
    border-radius: 14px;
  }

  .film-play {
    width: 62px;
    height: 62px;
    margin: -31px 0 0 -31px;
  }

  .privacy-notice {
    left: 12px;
    right: 12px;
    bottom: 84px;
    width: auto;
  }

  .legal-back {
    display: none;
  }

  .legal-table thead {
    display: none;
  }

  .legal-table tr {
    display: block;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--line);
  }

  .legal-table tr:last-child {
    border-bottom: 0;
  }

  .legal-table td {
    display: block;
    padding: 0.35rem 0.9rem;
    border: 0;
  }

  .legal-table td::before {
    content: attr(data-label);
    display: block;
    font-family: var(--mono);
    font-size: 0.6rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-3);
  }

  .legal-history li {
    grid-template-columns: auto auto;
  }

  .legal-history li code {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px), (prefers-reduced-motion: reduce) {
  body::after {
    animation: none;
  }
}

/* ---------- Impresión de documentos legales ---------- */
@media print {
  :root,
  [data-theme] {
    --bg: #FFFFFF;
    --surface: #FFFFFF;
    --text: #000000;
    --text-2: #1A1A1A;
    --text-3: #444444;
    --line: #CCCCCC;
    --accent-2: #0F2D4A;
    --accent-3: #0F2D4A;
  }

  body {
    background: #FFFFFF !important;
    color: #000000;
  }

  body::after,
  .site-header,
  .legal-aside,
  .legal-actions,
  .site-footer,
  .wa-float,
  .privacy-notice,
  .scroll-progress,
  #space-canvas,
  #fx-canvas {
    display: none !important;
  }

  .legal-main {
    padding: 0;
  }

  .legal-grid {
    display: block;
  }

  .legal-doc {
    max-width: none;
  }

  .legal-body-text a {
    color: #000000;
  }
}

/* Licencias: disponibles para quien las busque, sin competir con el contenido */
.footer-legal .footer-fine {
  font-size: 0.74rem;
  opacity: 0.7;
}

.footer-legal .footer-fine:hover {
  opacity: 1;
}

/* Panel de preferencias: interruptores por categoría */
.consent-panel {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.consent-row {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.75rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  cursor: pointer;
}

.consent-row input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.consent-switch {
  position: relative;
  width: 36px;
  height: 20px;
  margin-top: 0.15rem;
  border-radius: 999px;
  background: var(--line-2);
  transition: background-color 0.2s;
}

.consent-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #FFFFFF;
  transition: transform 0.2s var(--ease-out);
}

.consent-row input:checked + .consent-switch {
  background: var(--steel);
}

.consent-row input:checked + .consent-switch::after {
  transform: translateX(16px);
}

.consent-row input:disabled + .consent-switch {
  opacity: 0.6;
}

.consent-row input:focus-visible + .consent-switch {
  outline: 2px solid var(--accent-2);
  outline-offset: 2px;
}

.consent-copy {
  display: grid;
  gap: 0.15rem;
  font-size: 0.88rem;
}

.consent-copy small {
  color: var(--text-2);
  font-size: 0.8rem;
  line-height: 1.45;
}

/* ==========================================================================
   PESTAÑAS: cada área se muestra por separado (ver initViews en app.js)
   ========================================================================== */
html.has-views main > [data-view][hidden] {
  display: none !important;
}

.view-tabs {
  display: none;
}

/* Acceso directo a cada pestaña desde el inicio */
.routes-section {
  padding-block: clamp(4rem, 8vw, 6.5rem);
}

.routes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

.route-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 100%;
  padding: 1.5rem 1.35rem 1.3rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: transform 0.35s var(--ease-out), border-color 0.25s, background-color 0.25s;
}

.route-card:hover,
.route-card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--line-2);
  background: var(--surface-2);
}

.route-index,
.teaser-index {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  color: var(--accent-2);
}

.route-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.35rem;
  line-height: 1.15;
}

.route-desc {
  flex: 1;
  font-size: 0.9rem;
  color: var(--text-2);
}

.route-go,
.teaser-go {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.87rem;
  font-weight: 600;
  color: var(--accent-2);
}

.route-go::after,
.teaser-go::after {
  content: "→";
  transition: transform 0.25s var(--ease-out);
}

.route-card:hover .route-go::after,
.peritaje-teaser:hover .teaser-go::after {
  transform: translateX(4px);
}

/* Peritajes desde la pestaña Servicios */
.peritaje-teaser {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "index go" "title go" "desc go";
  align-items: center;
  column-gap: 2rem;
  row-gap: 0.3rem;
  margin-top: 1.5rem;
  padding: 1.5rem 1.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  background:
    radial-gradient(90% 140% at 0% 0%, rgba(127, 212, 180, 0.08), transparent 55%),
    var(--surface);
  box-shadow: var(--shadow);
  color: inherit;
  text-decoration: none;
  transition: border-color 0.25s, transform 0.35s var(--ease-out);
}

.peritaje-teaser:hover,
.peritaje-teaser:focus-visible {
  border-color: var(--accent-2);
  transform: translateY(-2px);
}

.teaser-index { grid-area: index; }
.teaser-go { grid-area: go; white-space: nowrap; }

.teaser-title {
  grid-area: title;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.45rem;
  line-height: 1.2;
}

.teaser-desc {
  grid-area: desc;
  font-size: 0.93rem;
  color: var(--text-2);
}

.peritaje-section .peritaje {
  margin-top: 0;
}

@media (max-width: 720px) {
  .peritaje-teaser {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "index" "title" "desc" "go";
  }

  .teaser-go {
    margin-top: 0.4rem;
  }
}

/* En pantallas pequeñas las pestañas quedan fijas bajo el encabezado */
@media (max-width: 1180px) {
  html.has-views {
    --tabs-h: 48px;
  }

  html.has-views .view-tabs {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    z-index: 99;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    height: var(--tabs-h);
    padding: 0 clamp(16px, 4vw, 32px);
    overflow-x: auto;
    scrollbar-width: none;
    background: rgba(4, 11, 20, 0.86);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);
    border-bottom: 1px solid rgba(167, 176, 187, 0.12);
    transition: background-color 0.35s, border-color 0.35s;
  }

  html.has-views .view-tabs::-webkit-scrollbar {
    display: none;
  }

  [data-theme="light"] .view-tabs {
    background: rgba(245, 247, 250, 0.92);
    border-bottom-color: var(--line);
  }

  .site-header:not(.is-scrolled) + .view-tabs {
    background: transparent;
    border-bottom-color: transparent;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .view-tab {
    flex: none;
    padding: 0.42rem 0.95rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    color: var(--text-2);
    font-size: 0.88rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
  }

  .site-header:not(.is-scrolled) + .view-tabs .view-tab {
    color: rgba(238, 244, 250, 0.86);
    border-color: rgba(238, 244, 250, 0.22);
  }

  .view-tab.is-active {
    color: var(--text);
    background: rgba(141, 180, 214, 0.16);
    border-color: var(--line-2);
  }

  .site-header:not(.is-scrolled) + .view-tabs .view-tab.is-active {
    color: #fff;
    background: rgba(141, 180, 214, 0.22);
  }

  [data-theme="light"] .site-header.is-scrolled + .view-tabs .view-tab.is-active {
    background: rgba(15, 45, 74, 0.08);
  }

  html.has-views .hero {
    padding-top: calc(var(--header-h) + var(--tabs-h) + 2.5rem);
  }

  html.has-views:not([data-view="inicio"]) main {
    padding-top: var(--tabs-h);
  }

  html.has-views .main-nav {
    z-index: 101;
  }
}


/* ---------- Quiénes somos (#quienes-somos) y Calendario de Socios (#calendario) ---------- */
.about-section {
  padding-top: 2rem;
  padding-bottom: 1.5rem;
}

.about-card {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 2.2rem;
  align-items: start;
  padding: clamp(1.6rem, 3.5vw, 2.6rem);
  border-radius: 22px;
  border: 1px solid var(--line-2);
  background: radial-gradient(120% 120% at 0% 0%, rgba(79, 122, 157, 0.2), transparent 65%), var(--surface);
  box-shadow: var(--shadow-lg);
}

.about-tagline {
  margin-top: 0.45rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--accent-3);
}

.about-lead {
  margin-top: 0.85rem;
  font-size: 1.02rem;
  color: var(--text);
  line-height: 1.65;
}

.about-body {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: var(--text-2);
  line-height: 1.65;
}

.about-disciplines {
  padding: 1.35rem;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

.about-chips-label {
  margin-bottom: 0.85rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.partner-cal-wrap {
  margin-top: 2.8rem;
}

.partner-cal-card {
  padding: clamp(1.5rem, 3.5vw, 2.4rem);
  border-radius: 22px;
  border: 1px solid var(--line-2);
  background: radial-gradient(110% 110% at 100% 0%, rgba(79, 122, 157, 0.22), transparent 60%), var(--surface);
  box-shadow: var(--shadow-lg);
}

.partner-cal-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}

.booking-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.booking-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.25rem;
}

@media (max-width: 980px) {
  .about-card {
    grid-template-columns: 1fr;
  }
  .booking-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .booking-grid {
    grid-template-columns: 1fr;
  }
}
