/* Nacho Viedma — diseño por diapositivas. Estructura responsive, sin frameworks. */
:root {
  color-scheme: light;
  --bg: #eeeeee;
  --text: #858585;
  --text-strong: #656565;
  --muted: #a3a3a3;
  --blue: #63a4fe;
  --panel: rgba(255, 255, 255, .69);
  --panel-solid: #f6f6f6;
  --stroke: rgba(105, 105, 105, .1);
  --logo-text: #5d5d5d;
  --disc-bg: #f6f6f6;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --transition: 820ms;
  --header-height: 76px;
  --footer-height: 58px;
  --font-apple: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", sans-serif;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #3e3e3e;
  --text: #aaa;
  --text-strong: #e2e2e2;
  --muted: #929292;
  --panel: rgba(255, 255, 255, .065);
  --panel-solid: #505050;
  --stroke: rgba(255, 255, 255, .1);
  --logo-text: #efefef;
  --disc-bg: #4b4b4b;
}

* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  width: 100%;
  margin: 0;
}

html {
  background: var(--bg);
  scroll-behavior: auto;
}

body {
  background: var(--bg);
  color: var(--text);
  overflow: hidden;
  font-family: var(--font-apple);
  transition: background 750ms var(--ease), color 750ms var(--ease);
  -webkit-font-smoothing: antialiased;
}

button, input, textarea {
  font: inherit;
  font-family: var(--font-apple);
}

button {
  cursor: pointer;
}

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

::selection {
  background: var(--blue);
  color: #fff;
}

.skip-link {
  position: fixed;
  top: -80px;
  left: 10px;
  z-index: 9999;
  padding: 10px 16px;
  background: var(--panel-solid);
  border-radius: 6px;
}

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

.site-header {
  position: fixed;
  z-index: 50;
  inset: 0 0 auto;
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  gap: clamp(20px, 3.5vw, 58px);
  padding: 14px clamp(20px, 3.5vw, 64px);
  background: transparent;
  transition: background 750ms var(--ease);
}

.logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  width: clamp(220px, 15vw, 210px);
  line-height: 0;
}

.site-logo {
  width: 100%;
  height: auto;
  display: block;
}

.site-logo .st6 {
  fill: var(--logo-text);
}

.site-logo path {
  transition: fill 750ms var(--ease);
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: clamp(4px, 0.9vw, 16px); /* 👈 Reduce este valor para acercar los botones entre sí */
  margin-left: auto;
}

.nav-link {
  position: relative;
  border: 1px solid transparent;
  border-radius: 999px;
  min-width: 49px;
  min-height: 34px;
  padding: 10px 13px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-family: var(--font-apple);
  font-size: clamp(9px, 0.88vw, 13px); /* 👈 Máximo controlado a 13px para que no explote en pantallas grandes */
  line-height: 1;
  letter-spacing: .04em;
  font-weight: 600; /* 👈 Grosor más marcado como querías */
  white-space: nowrap;
  transition: color 450ms var(--ease), border-color 450ms var(--ease), background 450ms var(--ease);
}

.nav-link:hover, .nav-link.active {
  color: var(--text-strong);
}

.nav-link.active {
  border-color: var(--stroke);
  background: var(--panel);
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tool-button {
  border: 1px solid var(--stroke);
  background: transparent;
  color: var(--text-strong);
  height: 34px;
  min-width: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  padding: 0;
  transition: background 350ms ease, border-color 350ms ease, transform 350ms ease;
}

.tool-button:hover {
  background: var(--panel);
  border-color: var(--blue);
  transform: translateY(-1px);
}

.language-selector {
  position: relative;
}

.language-current {
  font: 500 10px var(--font-apple);
}

.language-options {
  position: absolute;
  top: 42px;
  left: 50%;
  transform: translateX(-50%);
  width: 145px;
  border-radius: 16px;
  background: var(--panel-solid);
  border: 1px solid var(--stroke);
  padding: 7px;
  box-shadow: 0 18px 45px #00000017;
  z-index: 80;
  
  display: flex;
  flex-direction: column;
  gap: 5px;
  
  /* Configuración inicial para la animación de cierre/apertura del contenedor */
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-6px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease), visibility 0.3s;
}

/* Cuando el contenedor está abierto mediante la clase .is-open */
.language-options.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.language-options[hidden] {
  display: flex !important; /* Mantiene flex activo para que la transición funcione antes de ocultarse del todo */
  pointer-events: none;
}

.language-options button {
  display: block;
  text-align: center;
  width: 100%;
  background: none;
  border: none;
  border-radius: 9px;
  color: var(--text-strong);
  font: 400 12px var(--font-apple);
  padding: 10px 11px;
  
  /* Estado inicial de los botones dentro del menú cerrado */
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), background 0.3s, color 0.3s;
}

/* Cuando el menú tiene .is-open, los botones aparecen con retraso escalonado */
.language-options.is-open button {
  opacity: 1;
  transform: translateY(0);
}

.language-options button:nth-child(1) { transition-delay: 0.00s; }
.language-options button:nth-child(2) { transition-delay: 0.05s; }
.language-options button:nth-child(3) { transition-delay: 0.10s; }
.language-options button:nth-child(4) { transition-delay: 0.15s; }

.language-options button:hover, .language-options button[aria-current="true"] {
  background: var(--panel);
  color: var(--blue);
}

.theme-button svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.theme-button .theme-sun {
  display: none;
}

html[data-theme="dark"] .theme-button .theme-moon {
  display: none;
}

html[data-theme="dark"] .theme-button .theme-sun {
  display: block;
}

.menu-button {
  display: none;
  gap: 3px;
  align-content: center;
}

.menu-button span {
  display: block;
  width: 13px;
  height: 1px;
  background: currentColor;
}

.mobile-nav[hidden] {
  display: none;
}

.stage {
    position: fixed;
    inset: 0;
    isolation: isolate;
}

.slide {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: none; /* ➔ Cambiado de 'contain' a 'none' para eliminar el rebote */
  overscroll-behavior-y: none; /* ➔ Asegura que tampoco rebote verticalmente en trackpads de Mac */
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(35px, 0, 0);
  transition: visibility 0s linear var(--transition), opacity var(--transition) var(--ease), transform var(--transition) var(--ease);
  will-change: opacity, transform;
  padding-bottom: 16px;
}

.slide.is-active {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
  z-index: 2;
  transition: visibility 0s linear 0s, opacity var(--transition) var(--ease), transform var(--transition) var(--ease);
}

.slide.is-from-left {
  transform: translate3d(-35px, 0, 0);
}

.slide.is-from-right {
  transform: translate3d(35px, 0, 0);
}

.slide.is-exiting-left {
  z-index: 3;
  visibility: visible;
  transform: translate3d(-35px, 0, 0);
  opacity: 0;
}

.slide.is-exiting-right {
  z-index: 3;
  visibility: visible;
  transform: translate3d(35px, 0, 0);
  opacity: 0;
}

.slide-inner {
  min-height: 100%;
  width: 100%;
  position: relative;
}

.slide .enter-item {
  transition: transform var(--transition) var(--ease), opacity var(--transition) var(--ease);
  opacity: 0;
  transform: translate3d(14px, 0, 0);
}

.slide.is-active .enter-item {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.slide.is-active .enter-item:nth-of-type(2) {
  transition-delay: 60ms;
}

.slide.is-active .enter-item:nth-of-type(3) {
  transition-delay: 110ms;
}

.content-inner {
  display: flex;
  flex-direction: column;
  padding: clamp(90px, 12vh, 136px) clamp(26px, 6vw, 112px) clamp(70px, 8vh, 95px);
  max-width: 1740px;
  margin: 0 auto;
}

.section-heading {
  align-self: flex-end;
  text-align: right;
  min-width: 280px;
  margin: -26px 0 clamp(18px, 2.5vh, 36px);
}

.section-heading h2 {
  font-family: var(--font-apple);
  font-size: clamp(44px, 5.1vw, 86px);
  font-weight: 700;
  letter-spacing: -.054em;
  line-height: .97;
  margin: 0;
  color: var(--text);
  transition: color 750ms var(--ease);
}

.section-heading p {
  font-size: clamp(9px, .9vw, 13px);
  line-height: 1.3;
  font-weight: 400;
  margin: 4px 3px 0;
  color: var(--muted);
}

/* HERO / luz ambiental tras el marco; vídeo oscurecido para mantener la legibilidad */
.home-inner {
  display: grid;
  place-items: center;
  padding: calc(var(--header-height) + 35px) 5vw calc(var(--footer-height) + 30px);
}

.hero-frame {
  width: min(84vw, 1240px);
  height: min(65vh, 700px);
  min-height: 320px;
  position: relative;
  border-radius: clamp(18px, 2vw, 32px);
  background: linear-gradient(133deg, #232c3d, #15161c 45%, #383c4b);
  isolation: isolate;
}

.hero-ambilight {
  position: absolute;
  /* Se sale ligeramente del marco (-15px) para desbordar el resplandor hacia fuera */
  inset: -15px; 
  border-radius: calc(clamp(18px, 2vw, 32px) + 8px);
  z-index: -1;
  overflow: visible !important;
  /* Gran desenfoque y un toque extra de saturación para que el color vibre como en YouTube */
  filter: blur(50px) saturate(1.7);
  opacity: .45;
  pointer-events: none;
  transform: translateZ(0); /* Aceleración por hardware */
}

.hero-ambilight video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Se escala un 8% más para evitar que los bordes desenfocados dejen espacios vacíos */
  transform: scale(0.9); 
}

.hero-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  filter: brightness(.7) saturate(.9);
}

.hero-copy {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5%;
}

.hero-copy h1 {
  font-family: var(--font-apple);
  font-size: clamp(37px, 4.8vw, 82px);
  font-weight: 500;
  letter-spacing: -.055em;
  line-height: 1.04;
  color: #f4f4f4;
  margin: 0;
  text-shadow: 0 2px 24px #0009;
}

.hero-copy h1 span {
  color: var(--blue);
  font-weight: 700;
}

.hero-copy p {
  font-size: clamp(12px, 1.12vw, 18px);
  line-height: 1.5;
  color: #ededed;
  margin: 17px 0 0;
  text-shadow: 0 1px 12px #0009;
}

.video-side-label {
  position: absolute;
  z-index: 1;
  left: 32px;
  bottom: 24px;
  color: #ffffffa0;
  letter-spacing: .18em;
  font: 500 9px var(--font-apple);
}

@keyframes ambientShift {
  to {
    transform: scale(1.09) translateX(2%);
    filter: blur(65px);
  }
}

/* TRABAJO */
.work-shell {
  width: min(100%, 1180px);
  align-self: center;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  gap: clamp(8px, 1.2vh, 16px);
}

.work-top {
  display: grid;
  grid-template-columns: minmax(230px, .8fr) minmax(330px, 1fr);
  gap: clamp(16px, 2.8vw, 48px);
  height: clamp(250px, 43vh, 480px);
  min-height: 0;
}

.service-menu {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  padding-left: 8px;
}

.service-choice {
  width: 100%;
  padding: 12px 2px;
  border: 0;
  background: transparent;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: clamp(13px, 1.13vw, 17px);
  font-weight: 600;
  color: var(--text);
  transition: transform 400ms var(--ease), color 400ms var(--ease), opacity 400ms var(--ease);
}

.service-choice:hover, .service-choice.selected {
  color: var(--text-strong);
  transform: translateX(9px);
}

.service-choice.selected .service-num {
  color: var(--blue);
}

.service-num {
  font: 400 10px var(--font-apple);
  color: var(--muted);
}

.service-mark {
  margin-left: auto;
  color: var(--blue);
  opacity: 0;
  transition: opacity .35s;
}

.service-choice:hover .service-mark, .service-choice.selected .service-mark {
  opacity: 1;
}

.service-progress {
  height: 2px;
  background: var(--stroke);
  margin: 14px 32px 0;
  overflow: hidden;
  position: relative;
}

.service-progress span {
  display: block;
  height: 100%;
  width: 25%;
  background: var(--blue);
  transition: transform .7s var(--ease);
}

.service-viewer {
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  background: var(--panel);
  isolation: isolate;
}

.service-viewer video {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  inset: 0;
  transition: opacity .65s var(--ease);
}

.service-viewer.has-video video {
  opacity: 1;
}

.service-placeholder {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: linear-gradient(120deg, var(--panel), rgba(99, 164, 254, .065));
  transition: opacity .6s;
}

.service-viewer.has-video .service-placeholder {
  opacity: 0;
}

.placeholder-orb {
  position: absolute;
  width: 55%;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(50px);
  opacity: .45;
  animation: orbFloat 9s ease-in-out infinite alternate;
}

.orb-one {
  background: #63a4fe;
  top: -45%;
  right: -10%;
}

.orb-two {
  background: #b79beb;
  bottom: -55%;
  left: 0;
  animation-delay: -4s;
}

.placeholder-grid {
  position: absolute;
  inset: 0;
  opacity: .13;
  background-image: linear-gradient(90deg, var(--text) 1px, transparent 1px), linear-gradient(var(--text) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(90deg, transparent, #000);
}

.service-caption {
  position: absolute;
  bottom: 20px;
  left: 24px;
  right: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  z-index: 2;
  color: var(--text-strong);
  font-family: var(--font-apple);
}

.service-caption .mini-index {
  font-size: 10px;
  color: var(--blue);
  letter-spacing: .08em;
}

.service-caption strong {
  font-size: 12px;
  letter-spacing: .08em;
}

.service-caption small {
  font-size: 10px;
  margin-left: auto;
  opacity: .55;
}

@keyframes orbFloat {
  to {
    transform: translate(20%, 22%) scale(1.2);
  }
}

.project-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 5px;
}

.project-head h3 {
  font-size: clamp(13px, 1vw, 16px);
  margin: 0;
  color: var(--text-strong);
  font-weight: 500;
}

.portfolio-link {
  font: 300 clamp(12px, 1vw, 15px) var(--font-apple);
  transition: color .3s;
  color: var(--text);
}

.portfolio-link:hover {
  color: var(--blue);
}

.client-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.client-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 14px;
  background: var(--panel);
  height: clamp(130px, 18vh, 170px);
  min-width: 0;
  padding: 14px 10px 11px;
  overflow: hidden;
  color: var(--text-strong);
  transition: border-color 1.5s cubic-bezier(0.16, 1, 0.3, 1), 
              background 1.5s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.client-card:hover, .client-card.is-expanded {
  border-color: rgba(99, 164, 254, .3);
  transform: translateY(-3px);
}

.client-logo {
  width: min(100%, 126px);
  height: 55px;
  margin-bottom: 4px;
  color: var(--text-strong);
  fill: currentColor;
  flex-shrink: 0;
  overflow: visible;
}

.client-logo text {
  font-family: var(--font-apple);
  fill: currentColor;
}

.client-logo .brand-strong {
  font-weight: 700;
  letter-spacing: -.035em;
}

.client-name {
  font-size: clamp(9px, .8vw, 12px);
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
}

.client-roles {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  font-size: clamp(8px, .72vw, 10px);
  line-height: 1.2;
  /* Duración ampliada a 1.5s para un ritmo mucho más pausado y fino */
  transition: max-height 1.5s cubic-bezier(0.16, 1, 0.3, 1), 
              opacity 1.5s cubic-bezier(0.16, 1, 0.3, 1), 
              margin 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- ESTADO DE SALIDA (EXIT): Retardos invertidos y más pausados --- */
.client-roles span {
  transform: translateY(8px);
  opacity: 0;
  transition: transform 1.0s cubic-bezier(0.16, 1, 0.3, 1), 
              opacity 1.0s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: 0ms; 
}

.client-roles span:nth-child(1) { transition-delay: 270ms; }
.client-roles span:nth-child(2) { transition-delay: 180ms; }
.client-roles span:nth-child(3) { transition-delay: 90ms; }
.client-roles span:nth-child(4) { transition-delay: 0ms; }

.client-card:hover .client-roles, .client-card.is-expanded .client-roles {
  max-height: 92px;
  opacity: 1;
  margin-top: 7px;
}

/* --- ESTADO DE ENTRADA (HOVER / ENTRY): De arriba hacia abajo con calma --- */
.client-card:hover .client-roles span, .client-card.is-expanded .client-roles span {
  transform: translateY(0);
  opacity: 1;
}

.client-card:hover .client-roles span:nth-child(1), .client-card.is-expanded .client-roles span:nth-child(1) {
  transition-delay: 0ms;
}
.client-card:hover .client-roles span:nth-child(2), .client-card.is-expanded .client-roles span:nth-child(2) {
  transition-delay: 90ms;
}
.client-card:hover .client-roles span:nth-child(3), .client-card.is-expanded .client-roles span:nth-child(3) {
  transition-delay: 180ms;
}
.client-card:hover .client-roles span:nth-child(4), .client-card.is-expanded .client-roles span:nth-child(4) {
  transition-delay: 270ms;
}

/* MÉTODO */
.method-shell {
  width: min(100%, 1120px);
  align-self: center;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
}

.method-intro {
  margin-bottom: clamp(20px, 3.1vh, 40px);
}

/* --- MODO OSCURO ESPECÍFICO PARA REBACAS Y OMNIDOCTOR --- */

/* REBACAS: .st0 pasa a blanco puro */
html[data-theme="dark"] svg[aria-label="REBACAS"] .st0 {
  fill: #ffffff !important;
}

/* OMNIDOCTOR: .st0 pasa a #eeeeee */
html[data-theme="dark"] svg[aria-label="Omnidoctor"] .st0 {
  fill: #eeeeee !important;
}

.method-intro h3 {
  font-family: var(--font-apple);
  font-size: clamp(20px, 2.2vw, 30px);
  font-weight: 500;
  font-style: italic;
  margin: 0 0 4px;
  color: var(--text-strong);
}

.method-intro p {
  font-size: clamp(11px, 1vw, 14px);
  font-style: italic;
  margin: 0;
  line-height: 1.5;
}

.method-grid {
  display: grid;
  grid-template-columns: minmax(260px, .88fr) minmax(380px, 1.12fr);
  gap: clamp(30px, 4vw, 72px);
  align-items: stretch;
  height: clamp(360px, 56vh, 550px);
  min-height: 0;
}

.method-photo {
  background: var(--panel);
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  isolation: isolate;
}

.method-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  filter: grayscale(.28);
  transition: opacity .8s var(--ease), transform 1.1s var(--ease);
}

.method-photo img.is-loaded {
  opacity: 1;
}

.method-photo:hover img {
  transform: scale(1.04);
}

.method-photo-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 40% 35%, #63a4fe26, transparent 55%), linear-gradient(145deg, var(--panel), #a2b9d023);
}

.method-photo-fallback span {
  font: 300 clamp(90px, 14vw, 200px) var(--font-apple);
  opacity: .08;
}

.method-photo-label {
  position: absolute;
  bottom: 23px;
  left: 25px;
  right: 25px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-shadow: 0 1px 12px #0008;
  color: #fff;
  z-index: 2;
}

.method-photo:has(img:not(.is-loaded)) .method-photo-label {
  color: var(--text-strong);
  text-shadow: none;
}

.method-photo-label small {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .18em;
}

.method-photo-label strong {
  font: 500 17px var(--font-apple);
}

.skill-list {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 0;
  gap: 6px;
}

.skill-item {
  display: flex;
  align-items: center;
  text-align: left;
  gap: 18px;
  padding: 2px 6px;
  background: transparent;
  border: 0;
  color: var(--text);
  border-radius: 16px;
  min-height: 0;
  flex: 1;
  transition: transform .45s var(--ease), background .45s;
}

.skill-item:hover, .skill-item.selected {
  transform: translateX(6px);
  background: var(--panel);
}

.animal-disc {
  display: grid;
  place-items: center;
  border-radius: 50%;
  height: clamp(52px, 5.5vw, 76px);
  width: clamp(52px, 5.5vw, 76px);
  flex-shrink: 0;
  background: var(--panel-solid);
  color: var(--text-strong);
  transition: background .5s, color .5s, transform .5s;
}

.animal-disc svg {
  width: 52%;
  height: 52%;
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 2.3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.animal-disc svg path {
  fill: none;
}

.animal-disc svg ellipse {
  fill: none;
}

.skill-item.selected .animal-disc {
  background: #63a4fe22;
  color: var(--blue);
  transform: scale(1.05);
}

.skill-copy {
  display: flex;
  flex-direction: column;
  max-width: 370px;
  gap: 3px;
}

.skill-copy strong {
  font: 600 clamp(14px, 1.28vw, 18px) var(--font-apple);
  color: var(--text-strong);
}

.skill-copy small {
  font-size: clamp(10px, .85vw, 13px);
  line-height: 1.35;
  color: var(--muted);
  font-style: italic;
}

/* MISIÓN / desenfoque en degradados, efecto lente suavizado */
.mission-center {
  flex: 1;
  display: grid;
  place-items: center;
  padding-bottom: 7vh;
}

.values-sphere {
  width: min(60vh, clamp(400px, 42vw, 570px));
  height: min(60vh, clamp(400px, 42vw, 570px));
  border-radius: 50%;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #535353;
  display: grid;
  place-items: center;
  transform: translateZ(0);
}

html[data-theme="dark"] .values-sphere {
  background: #252525;
}

.values-sphere::after {
  content: "";
  inset: 0;
  position: absolute;
  border-radius: inherit;
  pointer-events: none;
  z-index: 3;
  opacity: .85;
}

.values-glow {
  position: absolute;
  inset: -25%;
  z-index: 0;
  opacity: 0;
  filter: blur(42px);
  transition: opacity .8s ease;
  background: radial-gradient(ellipse at 28% 30%, var(--c1) 0%, transparent 42%), radial-gradient(ellipse at 75% 72%, var(--c2) 4%, transparent 60%);
  transform: scale(1.15);
  animation: fluidShift 11s ease-in-out infinite alternate;
}

.glow-0 {
  --c1: #5f90e2;
  --c2: #bf5fb8;
}

.glow-1 {
  --c1: #e9a552;
  --c2: #cd488a;
}

.glow-2 {
  --c1: #4ba8a2;
  --c2: #5b68c9;
}

.glow-3 {
  --c1: #728bfb;
  --c2: #ef7c88;
}

.glow-4 {
  --c1: #8b57d6;
  --c2: #55c2d5;
}

.glow-5 {
  --c1: #ee945c;
  --c2: #8167d9;
}

.values-sphere[data-value="0"] .glow-0,
.values-sphere[data-value="1"] .glow-1,
.values-sphere[data-value="2"] .glow-2,
.values-sphere[data-value="3"] .glow-3,
.values-sphere[data-value="4"] .glow-4,
.values-sphere[data-value="5"] .glow-5 {
  opacity: .96;
}

@keyframes fluidShift {
  to {
    transform: rotate(10deg) translate(3%, -2%) scale(1.25);
  }
}

.values-items {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: clamp(4px, 1.2vh, 10px);
  padding: 4% 5%;
  position: relative;
  z-index: 2;
}

.value-item {
  border: 0;
  background: none;
  color: #c3c3c3;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  width: 100%;
  transform: scale(var(--fish-scale, 1));
  transform-origin: center;
  cursor: pointer;
  
  /* Padding base que se expandirá suavemente en hover para empujar a los vecinos */
  padding: 4px 0;
  
  /* Estado inicial para la animación de entrada */
  opacity: 0;
  filter: blur(8px);
  transform: translateY(12px) scale(var(--fish-scale, 1));
  
  transition: color 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              padding 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity, filter, padding;
}

/* Animación de entrada con 0.5s de retraso y desenfoque a enfoque suave */
@keyframes valueSlideIn {
  0% {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(12px) scale(var(--fish-scale, 1));
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0) scale(var(--fish-scale, 1));
  }
}

.slide.is-active .value-item {
  animation: valueSlideIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Cascada con el retraso inicial de 0.5s pedido */
.slide.is-active .value-item:nth-child(1) { animation-delay: 0.30s; }
.slide.is-active .value-item:nth-child(2) { animation-delay: 0.38s; }
.slide.is-active .value-item:nth-child(3) { animation-delay: 0.46s; }
.slide.is-active .value-item:nth-child(4) { animation-delay: 0.54s; }
.slide.is-active .value-item:nth-child(5) { animation-delay: 0.62s; }
.slide.is-active .value-item:nth-child(6) { animation-delay: 0.70s; }

.value-item strong {
  font: 800 clamp(16px, 1.77vw, 22px) var(--font-apple);
  line-height: 1.25;
  display: inline-block;
  transform-origin: center;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.value-item small {
  font: 600 clamp(11px, .11vw, 14px) var(--font-apple);
  line-height: 1.25;
  display: inline-block;
  transform-origin: center;
  opacity: 0;
  /* El small aparece y crece ligeramente más tarde que el texto principal */
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.08s;
}

/* HOVER / ESTADO ACTIVO: Empuja a los vecinos y ejecuta el zoom escalonado */
.value-item:hover, .value-item.is-on {
  color: white;
  padding: 16px 0; /* Expande el contenedor y desplaza al resto de ítems */
  z-index: 10;
}

.value-item:hover strong, .value-item.is-on strong {
  transform: scale(1.22);
}

.value-item:hover small, .value-item.is-on small {
  opacity: 0.75;
  transform: scale(1.08); /* Crece en menor porcentaje */
}

/* PERFIL / 4 tramos (Diseño fluido, cohesivo y espaciado) */
.profile-shell {
  width: min(100%, 540px); /* Tarjetas más estrechas y contenidas */
  align-self: center;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.profile-shell > h3 {
  font: 00 clamp(15px, 1.28vw, 18px) 'SF Pro Display', sans-serif;
  align-self: center;
  color: var(--text-strong);
  margin: 0 0 clamp(0px, 0vh, 7px); /* Mayor separación vertical superior */
  cursor: default;
}

.timeline-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: clamp(0px, 1.2vh, 22px);
  padding: 0;
  margin: 0;
  min-height: 0;
}

.timeline-entry {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 0;
  cursor: default;
}

/* 1. TIMELINE YEAR: Fundido puro (sin blur ni desplazamiento) */
.timeline-year {
  font: 100 clamp(20px, 3.2vw, 50px) 'SF Pro', sans-serif;
  color: var(--muted);
  letter-spacing: -.015em;
  cursor: default;

  opacity: 0;
  will-change: opacity;
}

@keyframes yearFadeIn {
  to {
    opacity: 1;
  }
}

.slide.is-active .timeline-year {
  animation: yearFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 2. TIMELINE CARD: Desenfoque + desplazamiento vertical acelerado por GPU */
.timeline-card {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: clamp(14px, 1.8vh, 20px) clamp(22px, 2.8vw, 34px);
  text-align: center;
  min-height: 0;
  cursor: default;

  opacity: 0;
  filter: blur(8px);
  translate: 0 12px;
  will-change: translate, transform, opacity, filter;

  transition: border-color 0.6s var(--ease), 
              transform 0.6s var(--ease), 
              background 0.6s var(--ease), 
              box-shadow 0.6s var(--ease);
}

@keyframes cardSlideIn {
  0% {
    opacity: 0;
    filter: blur(8px);
    translate: 0 12px;
  }
  100% {
    opacity: 1;
    filter: blur(0);
    translate: 0 0;
  }
}

.slide.is-active .timeline-card {
  animation: cardSlideIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 3. CASCADA ESCALONADA (El año aparece ligeramente antes que su tarjeta) */
.slide.is-active .timeline-entry:nth-child(1) .timeline-year { animation-delay: 0.20s; }
.slide.is-active .timeline-entry:nth-child(1) .timeline-card { animation-delay: 0.28s; }

.slide.is-active .timeline-entry:nth-child(2) .timeline-year { animation-delay: 0.30s; }
.slide.is-active .timeline-entry:nth-child(2) .timeline-card { animation-delay: 0.38s; }

.slide.is-active .timeline-entry:nth-child(3) .timeline-year { animation-delay: 0.40s; }
.slide.is-active .timeline-entry:nth-child(3) .timeline-card { animation-delay: 0.48s; }

.slide.is-active .timeline-entry:nth-child(4) .timeline-year { animation-delay: 0.50s; }
.slide.is-active .timeline-entry:nth-child(4) .timeline-card { animation-delay: 0.58s; }

.slide.is-active .timeline-entry:nth-child(5) .timeline-year { animation-delay: 0.60s; }
.slide.is-active .timeline-entry:nth-child(5) .timeline-card { animation-delay: 0.68s; }

.slide.is-active .timeline-entry:nth-child(6) .timeline-year { animation-delay: 0.70s; }
.slide.is-active .timeline-entry:nth-child(6) .timeline-card { animation-delay: 0.78s; }

/* Hover elegante completamente independiente */
.timeline-card:hover {
  border-color: rgba(99, 164, 254, 0.4);
  background: var(--panel-solid);
  transform: translateY(-2px) scale(1.015);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04);
}

html[data-theme="dark"] .timeline-card:hover {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

.timeline-card strong {
  display: block;
  font: 597 clamp(11px, .9vw, 13px) 'Outfit', sans-serif;
  color: var(--text-strong);
  margin: 0 0 6px;
  cursor: default;
}

.timeline-card p {
  font-size: clamp(11px, .9vw, 12px);
  line-height: 1.45;
  margin: 0;
  color: var(--text);
  cursor: default;
}

/* CONTACTO */
.contact-shell {
  display: grid;
  grid-template-columns: minmax(280px, 400px) minmax(200px, 315px);
  gap: clamp(25px, 5vw, 92px);
  align-items: center;       /* Centra los elementos verticalmente en sus celdas */
  justify-content: center;   /* <-- ¡Añade esto para centrar horizontalmente la rejilla! */
  min-height: 0;
  padding-bottom: 0vh;
}

.contact-left {
  display: flex;
  flex-direction: column;
  gap: 19px;
}

.contact-message {
  font-size: clamp(14px, 1.05vw, 16px);
  line-height: 1.64;
  color: var(--text);
  margin: 0 0 4px;
}

.contact-message em {
  font-style: normal;
  color: var(--text-strong);
  font-weight: 600;
}

.contact-message span {
  color: var(--blue);
  font-weight: 600;
}

#contact-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#contact-form input:not([name="website"]), #contact-form textarea {
  width: 100%;
  border-radius: 13px;
  background: var(--panel);
  border: 1px solid var(--stroke);
  color: var(--text-strong);
  padding: 12px 17px;
  outline: none;
  transition: border-color .3s, background .3s;
  resize: vertical;
  min-height: 42px;
  font-size: 12px;
}

#contact-form textarea {
  min-height: 150px;
  max-height: 290px;
}

#contact-form input:focus, #contact-form textarea:focus {
  border-color: var(--blue);
}

#contact-form ::placeholder {
  color: var(--muted);
  opacity: 1;
}

.website-trap {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(100%);
}

.contact-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.send-button {
  margin-left: auto;
  min-width: 97px;
  border: none;
  border-radius: 999px;
  background: #5a5a5a;
  color: #fff;
  padding: 11px 19px;
  font: 500 11px var(--font-apple);
  transition: background .35s, transform .35s;
}

.send-button:hover {
  background: var(--blue);
  transform: translateY(-2px);
}

.send-button:disabled {
  opacity: .4;
  cursor: wait;
}

.contact-bottom [role="status"] {
  font-size: 11px;
  line-height: 1.3;
  flex: 1;
}

.contact-bottom .is-error {
  color: #cf5454;
}

.contact-bottom .is-success {
  color: #4b996d;
}

.contact-portrait {
  height: clamp(350px, 52vh, 515px);
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  background: var(--panel);
  align-self: center;
}

.contact-portrait img {
  width: 100%;
  height: 100%;
  object-position: 50% 0%;
  object-fit: cover;
  filter: grayscale(1);
  transition: transform .9s var(--ease), filter .9s var(--ease);
}

.contact-portrait:hover img {
  transform: scale(1.04);
  filter: grayscale(.6);
}

.portrait-index {
  position: absolute;
  bottom: 15px;
  left: 18px;
  color: #fff;
  mix-blend-mode: difference;
  font: 500 9px var(--font-apple);
  letter-spacing: .12em;
}

/* PIE COMÚN - Redes Sociales */
.site-footer {
  position: fixed;
  inset: auto 0 0;
  z-index: 50;
  height: var(--footer-height);
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 12px;
  align-items: center;
  padding: 0 clamp(20px, 3.5vw, 64px);
  background: transparent;
  transition: background 750ms var(--ease);
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 9px;
}

.footer-socials a,
.social-link-circle {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--stroke);
  border-radius: 50%;
  color: var(--text);
  
  /* Fondo sólido basado en el tema para garantizar total legibilidad */
  background: var(--panel-solid);

  font-size: 13px;
  transition: color .3s, border-color .3s, transform .3s, background .3s;
}

/* Asegurar que los iconos de Font Awesome se muestren y hereden el color del tema */
.footer-socials a i,
.social-link-circle i {
  display: inline-block !important;
  color: inherit !important;
}

.footer-socials a:hover,
.social-link-circle:hover {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
  transform: translateY(-2px);
}

.footer-copy {
  justify-self: center;
  text-align: center;
  font-size: clamp(7px, 1.8vw, 10.5px);
  line-height: 1.3;
  color: var(--muted); /* Usa el color muted del tema que ya contrasta perfectamente */
  margin: 10px;
  white-space: nowrap;
  
  /* Evita saltos de línea y asegura que se quede en su sitio */
  white-space: nowrap;
  
  /* Por si acaso el espacio es crítico, permite que se ajuste sin desbordar el grid */
  min-width: 0;
  overflow: visible;
  text-overflow: visible;
}

.footer-navigation {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
}

.footer-navigation button {
  height: 31px;
  width: 31px;
  display: flex;
  align-items: center;
  justify-content: center;
  
  /* Fondo sólido para los botones de navegación */
  background: var(--panel-solid);

  color: var(--text);
  border: 1px solid var(--stroke);
  border-radius: 50%;
  font-size: 19px;
  line-height: 1;
  transition: background .35s, color .35s, border-color .35s;
}

.footer-navigation button:hover:not(:disabled) {
  color: var(--blue);
  border-color: var(--blue);
  background: var(--panel);
}

.footer-navigation button:disabled {
  opacity: .25;
  cursor: not-allowed;
}

.footer-navigation span {
  font: 400 9px var(--font-apple);
  letter-spacing: .1em;
  color: var(--muted);
  white-space: nowrap;
}

/* ALTURAS REDUCIDAS */
@media (max-height: 790px) and (min-width: 801px) {
  .content-inner {
    padding-top: 78px;
    padding-bottom: 66px;
  }
  .section-heading {
    margin: -8px 0 10px;
  }
  .section-heading h2 {
    font-size: clamp(43px, 4.5vw, 67px);
  }
  .work-top {
    height: clamp(235px, 39vh, 330px);
  }
  .client-card {
    height: 125px;
  }
  .client-logo {
    height: 37px;
  }
  .service-choice {
    padding: 8px 2px;
  }
  .method-intro {
    margin-bottom: 12px;
  }
  .method-grid {
    height: clamp(330px, 52vh, 440px);
  }
  .method-photo-label {
    bottom: 13px;
  }
  .animal-disc {
    height: 53px;
    width: 53px;
  }
  .timeline-list {
    gap: 8px;
  }
  .timeline-year {
    font-size: 23px;
  }
  .timeline-card {
    padding: 7px 18px;
  }
  .timeline-card p {
    line-height: 1.32;
  }
  .profile-shell > h3 {
    margin-bottom: 7px;
  }
  .contact-portrait {
    height: clamp(320px, 50vh, 420px);
  }
  #contact-form textarea {
    min-height: 115px;
  }
  .mission-center {
    padding-bottom: 1vh;
  }
  .values-sphere {
    width: min(60vh, 450px);
    height: min(60vh, 450px);
  }
}

@media (max-width: 1000px) {
  .site-header {
    gap: 15px;
    padding-inline: 22px;
  }
  .desktop-nav {
    gap: 3px;
  }
  .nav-link {
    padding: 10px 8px;
  }
  .content-inner {
    padding-inline: 34px;
  }
  .work-top {
    grid-template-columns: .8fr 1fr;
    gap: 22px;
  }
  .client-grid {
    gap: 8px;
  }
  .method-grid {
    grid-template-columns: .8fr 1.2fr;
    gap: 22px;
  }
  .method-intro p {
    max-width: 760px;
  }
  .skill-item {
    gap: 10px;
  }
  .timeline-card p {
    font-size: 10px;
  }
  .site-footer {
    padding-inline: 22px;
  }
}

@media (max-width: 800px) {
  :root {
    --header-height: 47px;
    --footer-height: 36px;
  }
  .desktop-nav {
    display: none;
  }
  .logo-link {
    width: 155px;
  }
  .site-header {
    padding: 12px 19px;
  }
  .header-tools {
    margin-left: auto;
  }
  .menu-button {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
.mobile-nav {
    position: fixed;
    z-index: 45;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    background: var(--bg);
    padding: 80px 20px;
    box-shadow: 0 30px 50px #0001;
    
    /* Transición del contenedor general para permitir la animación fluida */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.4s var(--ease), visibility 0.4s;
  }
  
  .mobile-nav[hidden] {
    display: flex !important; /* Mantiene flex activo para que la transición de entrada/salida funcione */
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .mobile-nav:not([hidden]) {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  
  .mobile-nav a {
    font: 500 20px var(--font-apple); /* Reducido un 30% desde 28px */
    letter-spacing: .05em;
    padding: 7px 20px; /* Padding ajustado proporcionalmente */
    border-radius: 30px;
    color: var(--text-strong);
    
    /* Estado inicial de los enlaces (ocultos y desplazados hacia abajo) */
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
                background 0.3s ease, 
                border 0.3s ease;
  }

  .mobile-nav a.active {
    background: var(--panel);
    border: 1px solid var(--stroke);
  }

  /* --- ANIMACIÓN EN CASCADA AL ACTIVAR EL MENÚ --- */
  .mobile-nav:not([hidden]) a {
    opacity: 1;
    transform: translateY(0);
  }

  /* Retrados progresivos por cada elemento (Cascada) */
  .mobile-nav:not([hidden]) a:nth-child(1) { transition-delay: 0.05s; }
  .mobile-nav:not([hidden]) a:nth-child(2) { transition-delay: 0.12s; }
  .mobile-nav:not([hidden]) a:nth-child(3) { transition-delay: 0.19s; }
  .mobile-nav:not([hidden]) a:nth-child(4) { transition-delay: 0.26s; }
  .mobile-nav:not([hidden]) a:nth-child(5) { transition-delay: 0.33s; }
  .mobile-nav:not([hidden]) a:nth-child(6) { transition-delay: 0.40s; }
  .content-inner {
    padding: 53px 22px 32px;
  }
    
  .section-heading {
    align-self: flex-end;
    text-align: right;
    margin: 0 0 0px;
  }
  .section-heading h2 {
    font-size: clamp(42px, 8.6vw, 67px);
  }
  .section-heading p {
    font-size: 11px;
  }
  .home-inner {
    padding: 80px 18px;
  }
  .hero-frame {
    width: 100%;
    height: 60vh;
    min-height: 335px;
  }
  .hero-copy h1 {
    font-size: clamp(34px, 6.2vw, 56px);
  }
  .work-shell, .method-shell, .profile-shell {
    flex: initial;
    max-width: 580px;
  }
  .work-top {
    height: auto;
    min-height: unset;
    display: flex;
    flex-direction: column;
    gap: 17px;
  }
  .service-menu {
    padding: 0;
    gap: 1px;
  }
  .service-choice {
    font-size: 14px;
    padding: 8px 4px;
  }
  .service-progress {
    margin: 5px 25px;
  }
  .service-viewer {
    height: 240px;
    flex-shrink: 0;
  }
  .project-head {
    margin-top: 15px;
  }
  .client-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
  }
  .client-card {
    height: 113px;
    padding: 7px 3px;
  }
  .client-logo {
    height: 28px;
  }
  .client-name {
    font-size: 8px;
  }
  .client-roles {
    font-size: 7px;
  }
  .method-grid {
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .method-photo {
    height: 280px;
    flex-shrink: 0;
  }
  .skill-list {
    gap: 4px;
  }
  .skill-item {
    min-height: 72px;
  }
  .skill-copy strong {
    font-size: 16px;
  }
  .skill-copy small {
    font-size: 11px;
  }
  .animal-disc {
    width: 54px;
    height: 54px;
  }
  .method-intro {
    margin-bottom: 18px;
  }
} /* <-- LLAVE QUE FALTABA Y ROMPÍA TODO EL RESTO DEL CSS */

@media (max-width: 600px) {
  .site-footer {
    grid-template-columns: auto 1fr auto;
    gap: 4px;
    padding: 0 14px;
  }
  .footer-socials {
    gap: 4px;
  }
  .footer-socials a {
    width: 20px;
    height: 20px;
    font-size: 10px;
  }
  .footer-copy {
    font-size: 7px;
    padding: 0 5px;
  }
  .footer-navigation {
    gap: 3px;
  }
  /* IGUALADOS: Mismo ancho, alto y tamaño de fuente que las redes sociales (20px) */
  .footer-navigation button {
    height: 20px;
    width: 20px;
    font-size: 10px;
  }
  .footer-navigation span {
    display: none;
  }
  .logo-link {
    width: 140px;
  }
  .tool-button {
    height: 30px;
    min-width: 30px;
  }
  .home-inner {
    padding: 75px 13px 65px;
  }
  .hero-frame {
    width: 100%;
    min-height: 380px;
    height: 65vh;
    border-radius: 17px;
  }
  .hero-copy h1 {
    font-size: clamp(35px, 8.3vw, 57px);
  }
  .hero-copy p {
    font-size: 12px;
    margin-top: 18px;
  }
  .video-side-label {
    left: 14px;
    bottom: 14px;
  }
  .content-inner {
    padding: 60px 17px 25px;
  }
  .section-heading {
    margin-bottom: 23px;
  }
  .section-heading h2 {
    font-size: clamp(44px, 10vw, 31px);
  }
  .work-shell {
    gap: 9px;
  }
  .work-top {
    gap: 15px;
  }
  .service-viewer {
    height: 195px;
  }
  .service-choice {
    padding: 7px 2px;
  }
  .project-head {
    gap: 8px;
  }
  .project-head h3 {
    font-size: 12px;
  }
  .portfolio-link {
    font-size: 12px;
  }
  .client-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
  }
  .client-card {
    border-radius: 9px;
    height: 111px;
    min-width: 0;
  }
  .client-name {
    font-size: 7px;
  }
  .client-name small {
    font-size: 7px;
  }
  .client-roles {
    font-size: 5.4px;
    line-height: 1.15;
  }
  .client-roles span {
    word-break: break-word;
  }
  .method-photo {
    height: 200px;
  }
  .method-intro h3 {
    font-size: 24px;
  }
  .method-intro p {
    font-size: 11px;
  }
  .skill-item {
    padding: 4px;
    min-height: 66px;
  }
  .animal-disc {
    height: 46px;
    width: 46px;
  }
  .skill-copy strong {
    font-size: 14px;
  }
  .skill-copy small {
    font-size: 10px;
  }
  .mission-center {
    padding: 25px 0;
    flex: initial;
  }
  .values-sphere {
    width: min(92vw, 430px);
    height: min(92vw, 430px);
  }
  .values-items {
    gap: 9px;
  }
  .value-item strong {
    font-size: clamp(13px, 3.9vw, 18px);
  }
  .value-item small {
    font-size: 10px;
  }
  .profile-shell {
    margin-top: 5px;
  }
  .timeline-list {
    gap: 14px;
  }
  .timeline-year {
    font-size: 24px;
  }
  .timeline-card {
    padding: 11px;
  }
  .timeline-card p {
    font-size: 9.5px;
  }
  .contact-shell {
    grid-template-columns: 1fr;
    gap: 16px;
    max-width: 430px;
    width: 100%;
    margin: 0 auto;
    padding: 0;
  }

  .contact-left {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .contact-portrait {
    order: -1;
    width: 100%;
    height: 160px;
  }

  .contact-portrait img {
    object-position: 50% 0%;
  }

  #contact-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  #contact-form textarea {
    height: clamp(90px, 18vh, 130px);
    min-height: 90px;
    max-height: 100px;
    resize: none;
  }

  .contact-message {
    font-size: 12px;
    line-height: 1.4;
    margin: 0;
  }

@media (max-width: 380px) {
  .footer-copy {
    display: none;
  }
  .site-footer {
    grid-template-columns: 1fr auto;
  }
  .client-card {
    height: 100px;
  }
  .client-logo {
    height: 21px;
  }
  .client-name {
    font-size: 6.7px;
  }
  .client-roles {
    font-size: 5px;
  }
  .service-viewer {
    height: 170px;
  }
  .hero-copy h1 {
    font-size: 34px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --transition: 20ms;
  }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
  .slide .enter-item {
    transition-delay: 0ms !important;
  }
}

.slide.is-active.is-from-left, .slide.is-active.is-from-right {
  opacity: 0;
}

.footer-socials a i {
  display: none;
}

.footer-socials a svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-portrait::before {
  content: "NV";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font: 700 clamp(70px, 8vw, 115px) var(--font-apple);
  letter-spacing: -.09em;
  color: var(--muted);
  opacity: .15;
  background: radial-gradient(circle at 68% 25%, #63a4fe22, transparent 58%);
}

.contact-portrait img {
  position: relative;
  object-position: 50% 0%;
  z-index: 1;
}

.portrait-index {
  z-index: 2;
}

/* Elimina el destello/recuadro táctil en todos los elementos interactivos en móviles */
a, button, input, select, textarea, [role="button"] {
  -webkit-tap-highlight-color: transparent;
}