:root {
  /* colors */
  --green-online:    hsl(112, 67%, 46%);
  --matching-03:     hsl(55deg 31.58% 92.55%);
  --matching-04:     hsl(56.47deg 18.68% 82.16%);
  --orange:          hsl(31.15deg 66.1% 53.73%);
  --sand:            hsl(48deg 62.5% 93.73%);
  --stone-gray:      hsl(190deg 10% 23.53%);
  --stone-gray-deep: hsl(190deg 5.88% 20%);
  --white-orange:    hsl(30, 68%, 79%);
  --white-sand:      hsla(60, 40%, 98%);
  
  /* shades */
  --shade-15: hsla(190, 5.88%, 20%, 0.15);
  --shade-20: hsl(174.55deg 18.64% 88.43%);
  --shade-21: hsl(180deg 16.5% 79.8%);
  --shade-22: hsl(186.92deg 15.48% 67.06%);
  --shade-23: hsl(184.29deg 11.2% 49.02%);
  --shade-24: hsl(188.18deg 14.47% 29.8%);
  
  /* similar */
  --similar-01: hsl(195deg 6.78% 23.14%);
  --similar-02: hsl(180deg 13.76% 21.37%);
  --similar-03: hsl(165deg 3.39% 23.14%);
  --similar-04: hsl(195deg 8.22% 28.63%);

  /* transparency */
  --stone-gray-05:   hsla(190, 10%, 24%, 0.5);
  --white-green-00:  hsla(112, 67%, 46%, 0);
  --white-green-03:  hsla(112, 67%, 46%, 0.32);
  --white-orange-04: hsla(30, 68%, 79%, 0.4);
  --white-sand-00:   hsla(60, 40%, 98%, 0);
  --white-sand-02:   hsla(60, 40%, 98%, 0.2);
  --white-sand-04:   hsla(60, 40%, 98%, 0.4);
  --white-sand-05:   hsla(48, 62.5%, 93.73%, 0.5);
}

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

* {
  font: inherit;
  margin: 0;
  padding: 0;
}

html {
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  background: url('../img/bg-light-noisy-texture.png') var(--sand);
  color: var(--stone-gray);
  font-family: 'Roboto', ui-sans-serif, system-ui, sans-serif, Apple Color Emoji, Segoe UI Emoji;
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  text-align: center;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

img {
  image-rendering: -webkit-optimize-contrast;
}

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 4px;
}

input, button, textarea, select {
  background: none;
  border: none;
  font: inherit;
  outline: none;
}

button {
  cursor: pointer;
}

a {
  color: var(--stone-gray);
}

/* Removes animations for users who disable them */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- FONTS & TYPOGRAPHY --- */

h1, h2, h3, h4, h5, h6 {
  color: var(--orange);
  font-family: 'Fraunces', serif;
  text-wrap: balance;
}

#hero .content h1 {
  color: var(--sand);
  font-size: clamp(3rem, 11vw, 159px);
  font-weight: 300;
  line-height: clamp(3.5rem, 11vw, 160px); 
}

#hero .content h1 span {
  font-weight: 400;
  position: relative;
  display: inline-block; /* Ayuda a que el span no rompa mal el layout */
}

#hero .content h2 {
  color: var(--sand);
  font-family: 'Roboto', ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.5rem, 3.5vw, 50px);
  font-weight: 300;
  position: relative;
  margin-top: 2rem;
}

#cases h2,
#capabilities h2,
#framework h2,
#faqs h2 {
  font-size: clamp(3.5rem, 14vw, 180px);
  font-weight: 400;
  line-height: clamp(1.1, 15vw, 1.2); 
}

#capabilities h3,
#capabilities h4,
#framework h3,
#framework h4,
#faqs h3,
#faqs h4 {
  font-weight: 400;
}

#capabilities h3,
#framework h3 {
  font-size: clamp(2.5rem, 8vw, 100px);
  line-height: 1.2;
  margin: 48px 0 24px 0;
}

#capabilities h4,
#framework h4,
#faqs h3 {
  font-size: clamp(1.5rem, 4vw, 40px);
  font-weight: 500;
  line-height: 1.2;
  margin-bottom: 16px;
}

#faqs h3 {
  font-size: clamp(1.5rem, 4vw, 32px);
  margin-bottom: 24px;
}

#footer h5 {
  font-size: clamp(1.5rem, 4vw, 24px);
  margin-bottom: 12px;
}

.container {
  margin-inline: auto;
  padding-inline: 1.5rem; /* Un poco menos de padding en mobile */
  /* Aumentamos el ancho máximo para pantallas 2K/4K */
  width: min(100%, 1600px); 
}

p.lead-text {
  font-size: clamp(1.25rem, 2.5vw, 40px);
  line-height: 1.4;
}
p.lead-text + p.lead-text {
  margin-top: 24px;
}

p.sub-text {
  font-size: clamp(1.1rem, 2.5vw, 32px);
}
p.paragraph {
  font-size: clamp(1rem, 1.5vw, 19px);
  line-height: 1.6;
}

#capabilities .highlight {
  color: var(--orange);
  font-style: italic;
}

#capabilities ul {
  list-style: none;
  margin: 48px 0 0 0;
  padding: 0;
}

.thumb {
  border-radius: 100px;
  overflow: hidden;
}

/* --- GRIDS & LAYOUT --- */
/* Cambiamos Flex por Grid real para mejor control responsive */

.core-competencies .grid-3-cols,
.async-protocol .grid-3-cols { 
  margin: 56px 0;
}

.grid-2-cols {
  display: grid;
  grid-template-columns: 1fr; /* Mobile por defecto: 1 columna */
  gap: 2rem;
  justify-content: center;
}

@media (min-width: 768px) {
  .grid-2-cols {
    grid-template-columns: repeat(2, 1fr); /* Tablet/Desktop: 2 columnas */
  }
}

.grid-4-cols {
  display: grid;
  grid-template-columns: 1fr; /* Mobile: 1 columna */
  gap: 3rem;
  text-align: left;
}

.grid-4-cols > div {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.grid-3-cols {
  display: grid;
  grid-template-columns: 1fr; /* Mobile: 1 columna */
  gap: 3rem;
  text-align: left;
}

@media (min-width: 900px) {
  .grid-3-cols {
    grid-template-columns: repeat(3, 1fr); /* Desktop: 3 columnas */
  }
  .grid-4-cols {
    grid-template-columns: repeat(4, 1fr); /* Desktop: 4 columnas */
  }
}

/* Ajustes de imágenes y videos dentro de grids */

.grid-2-cols > li, 
.grid-2-cols > div,
.grid-3-cols > li {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.grid-2-cols > li, 
.grid-2-cols > div {
  justify-content: center;
}

#capabilities,
#framework,
#faqs {
  margin-top: 40px;
}

.core-competencies,
.async-protocol,
.engagement-tiers {
  margin: 80px 0 0 0;
}

.btn {
  align-items: center;
  border-radius: 100px;
  display: inline-flex;
  font-size: 0.9rem;
  font-weight: bold;
  justify-content: center;
  padding: 1rem;
  text-decoration: none;
  transition: all 0.4s ease-in-out
}

.btn.primary {
  background: var(--orange);
  color: var(--sand);
}

.btn.primary:hover {
  background: var(--sand);
  color: var(--orange);
}

.btn.secondary {
  background: var(--white-sand-04);
  border: 1px solid var(--stone-gray);
  color: var(--stone-gray);
}

.btn.secondary:hover {
  background: var(--stone-gray);
  border-color: var(--stone-gray);
  color: var(--sand);
}

/* --- NAVIGATION --- */

.nav,
.nav .nav-links li .call {
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.nav {
  background: url('../img/bg-light-noisy-texture.png');
  border: 1px solid var(--white-sand-05);
  border-radius: 100px;
  bottom: 32px;
  box-shadow: 0 8px 24px var(--shade-15), inset 0 24px 56px var(--white-sand);
  box-sizing: border-box;
  left: 50%;
  position: fixed;
  transform: translateX(-50%);
  width: max-content;
  max-width: 95vw; /* FIX: Asegura que no se salga en móviles */
  z-index: 9999;
  display: flex;
  flex-wrap: nowrap; /* Fuerza una línea */
}

.nav::-webkit-scrollbar { display: none; } /* Chrome hide scrollbar */

.nav .wrapper {
  padding: 0 16px;
  display: flex;
  flex-wrap: nowrap; /* Fuerza una línea */
  overflow: hidden; /* Oculta overflow en bordes redondeados */ 
  /* Scroll horizontal para móviles muy pequeños */
  overflow-x: auto; 
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

.nav .logo,
.nav .nav-links,
.nav .nav-links li,
.nav .nav-links li a,
.nav .nav-links li .call {
  align-items: center;
  display: flex;
}

.nav .logo {
  position: relative;
  width: 62px;
}

.nav .logo::before, 
.nav .logo::after {
  content: '';
  display: block;
  width: 132px;
  height: 112px;
  background-size: contain;
  position: absolute;
  bottom: -16px;
  left: -16px;
  transition: all 0.4s ease-in-out;
}

.nav .logo::before {
  background: url('../img/designnode-logo.png') no-repeat center center;
  opacity: 1;
  z-index: 1;
}

.nav .logo::after {
  background: url('../img/designnode-logo-color.png') no-repeat center center;
  opacity: 0;
  z-index: 2;
}

.nav .logo.active-glow::after {
  animation: soft-glow-pulse 3s ease-in-out infinite;
}

@keyframes soft-glow-pulse {
  0% { opacity: 0; }
  50% { opacity: 1; } /* Momento de máximo color */
  100% { opacity: 0; }
}

.nav .nav-links {
  margin-left: 24px;
}

.nav .nav-links li:nth-last-child(2) {
  margin-right: 24px;
}

.nav a {
  text-decoration: none;
}

.nav .nav-links li .link {
  font-size: 16px;
  font-weight: bold;
  line-height: 64px;
  padding: 0 16px;
  position: relative;
  text-decoration: none;
  text-shadow: 0 2px 16px var(--white-sand), 0 -1px 0 var(--white-sand-04), 0 1px 0 var(--white-sand);
  transition: all 0.4s ease-in-out;
  white-space: nowrap; /* Evita que los links se rompan en 2 líneas */
}

.nav .nav-links li .link:hover,
.nav .nav-links li .link.active {
  text-shadow: 0 2px 16px var(--white-orange), 0 -1px 0 var(--white-orange-04), 0 1px 0 var(--white-orange);
}

.nav .nav-links li .link::before {
  /* Filtros originales mantenidos */
  background: var(--orange);
  border-radius: 20px;
  bottom: -64px;
  content: "";
  filter: blur(16px);
  height: 32px;
  left: 0;
  margin: 0 auto;
  position: absolute;
  right: 0;
  transition: all 0.4s ease-in-out;
  width: 64px;
}

.nav .nav-links li .link:hover::before,
.nav .nav-links li .link.active::before {
  bottom: -24px;
}

.nav .nav-links li .call {
  background: url('../img/bg-light-noisy-texture.png') var(--white-sand-04);
  border: 1px solid var(--white-sand-05);
  border-radius: 32px;
  box-shadow: 0 8px 24px var(--shade-15);
  font-size: 16px;
  font-weight: bold;
  line-height: 40px;
  padding: 0 12px 0 8px;
  position: relative;
  transition: all 0.4s ease-in-out;
  white-space: nowrap;
}

.nav .nav-links li .call:hover,
.nav .nav-links li .call.active {
  background: url('../img/bg-light-noisy-texture.png') var(--green-online);
  border: 1px solid var(--white-green-00);
  box-shadow: 0 8px 24px var(--white-green-03);
  color: var(--sand);
}

.nav .nav-links li .call:hover .pulse,
.nav .nav-links li .call.active .pulse {
  animation: pulse-sand-animation 2s infinite;
  background: var(--sand);
}

.nav .nav-links li .call .pulse {
  height: 8px;
  left: 24px;
  top: 8px;
  width: 8px;
  animation: pulse-green-animation 2s infinite;
  background: var(--green-online);
  border-radius: 100px;
  box-shadow: 0px 0px 1px 1px var(--white-green-03);
  position: absolute;
  transition: all 0.4s ease-in-out;
}

.nav .nav-links li .call .thumb {
  background: url('../img/thumb-santiago-petrone.png');
  display: flex;
  margin-right: 8px;
  height: 24px;
  width: 24px;
}

/* Hero banner */

#hero,
#cases {
  align-items: center;
  color: var(--sand);
  display: flex;
  flex-direction: column;
  height: 100vh;
  justify-content: center;
  overflow: hidden;
  padding: 32px;
  position: relative;
  text-align: left;
  width: 100%;
}

#hero .content {
  position: relative;
  top: -32px;
  width: min(100%, 1240px);
  z-index: 2;
}


/* Glass effect on Hero Text */
#hero .content h1 span::before,
#hero .content h2::before {
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  background: url('../img/bg-light-noisy-texture.png');
  box-shadow: 0 8px 24px var(--shade-15);
  content: '';
  opacity: .98;
  position: absolute;
  z-index: -1;
}

#hero .content h1 span::before {
  bottom: 0px;
  left: -12px;
  right: -37px;
  top: 39px;
}

#hero .content h2::before {
  bottom: -1px;
  left: 24px;
  right: 0;
  top: 10px;
}

#hero video {
  height: auto;
  left: 50%;
  min-height: 100%;
  min-width: 100%;
  object-fit: cover;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: auto;
  z-index: 0;
}

/* Capabilities */

#capabilities ul.ai-thumbs {
  margin: 32px 0 56px;
}

#capabilities ul.ai-thumbs + ul.ai-thumbs {
  margin: 0;
}

#capabilities ul.ai-thumbs > li > div {
  overflow: hidden;
  padding: 0;
}

#capabilities ul.ai-thumbs > li > .text-align-right,
#capabilities ul.ai-thumbs > li > .text-align-left {
  background: none;
  justify-content: center;
}

#capabilities ul.ai-thumbs > li > .text-align-right {
  text-align: right;
}

#capabilities ul.ai-thumbs > li > .text-align-left {
  text-align: left;
}

/* Mobile Alignment Override */
@media (max-width: 768px) {
  #capabilities ul.ai-thumbs > li > .text-align-right,
  #capabilities ul.ai-thumbs > li > .text-align-left {
    text-align: left; /* En mobile alineamos todo a la izquierda para lectura */
  }
}

#capabilities .core-competencies .card {
  position: relative;
}

#capabilities .core-competencies .card .chips-video-wrapper {
  margin-bottom: 12px;
  perspective: 1000px;
  position: relative;
  width: 100%;
}

#capabilities .core-competencies .card .chips-video-wrapper .image-thumb {
  display: block;
  height: auto;
  width: 100%;
  overflow: hidden;
  background-color: var(--stone-gray);
  position: relative;
}

.video-loader {
  position: absolute;
  top: 0;
  left: 0;
  height: 4px; 
  width: 100%;
  background-color: transparent;
  z-index: 10;
  opacity: 1;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.video-loader::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  background-color: var(--orange);
  width: 100%; /* Ocupa todo el ancho base */
  transform: scaleX(0); /* Pero lo ocultamos con escala */
  transform-origin: left;
  animation: loader-gpu 1.5s infinite ease-in-out;
  will-change: transform; /* Aviso a la GPU */
}

.video-thumb.loaded .video-loader {
  opacity: 0;
  animation: none;
  display: none;
}

#capabilities .core-competencies .card .chips-video-wrapper ul.chips {
  height: 100%;
  left: 0;
  list-style: none;
  margin: 0;
  padding: 0;
  pointer-events: none;
  position: absolute;
  top: 0;
  transform-style: preserve-3d;
  width: 100%;
  z-index: 10;
}

#capabilities .core-competencies .card .chips-video-wrapper ul.chips li {
  position: absolute;
  transform-style: preserve-3d;
  white-space: nowrap;
}

/* Animaciones Chips mantenidas intactas */
#capabilities .core-competencies .card .chips-video-wrapper ul.chips li:nth-child(1) {
  animation: float-1 6s ease-in-out infinite;
  bottom: 53%;
  left: -3%;
}

#capabilities .core-competencies .card .chips-video-wrapper ul.chips li:nth-child(2) {
  animation: float-2 7s ease-in-out infinite;
  bottom: 41%;
  left: -5%;
  z-index: 2;
}

#capabilities .core-competencies .card .chips-video-wrapper ul.chips li:nth-child(3) {
  animation: float-1 8s ease-in-out infinite reverse;
  bottom: 21%;
  left: -2%;
  transform: scale(0.9) translateZ(-50px);
}

#capabilities .core-competencies .card .chips-video-wrapper ul.chips li:nth-child(4) {
  animation: float-2 5.5s ease-in-out infinite;
  bottom: 8%;
  left: -5%;
  transform: rotate(-5deg);
}

#capabilities .core-competencies .card .chips-video-wrapper ul.chips li span {
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  background-image: url('../img/bg-light-noisy-texture.png'), linear-gradient(352deg, rgba(255, 255, 255, 1) -90%, rgba(255, 255, 255, 0) 80%);
  background-clip: padding-box, border-box;
  border: 1px solid transparent;
  border-radius: 50px;
  color: var(--sand);
  display: block;
  font-size: 13px;
  text-shadow: 0 1.5px var(--stone-gray-05);
  font-weight: 500;
  overflow: hidden;
  padding: 4px 8px;
  position: relative;
  text-align: center;
  transform: translateZ(8px);
  z-index: 1;
}

#capabilities .core-competencies .card .chips-video-wrapper ul.chips li span::before {
  bottom: 0;
  content: '';
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  z-index: -1;
  box-shadow: 
    0 8px 24px var(--shade-15),
    inset 1px 1px 0px rgba(255, 255, 255, 0.4),
    inset -1px -1px 0px rgba(0, 0, 0, 0.1);
}

/* Business & Marquee */

.tech-framework {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  height: 90px;
  margin: 40px 0 -32px;
}

.tech-framework:hover .track {
  animation-play-state: paused;
}

.tech-framework-wrapper {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  z-index: 1;
  mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
  transition: opacity 0.4s ease;
  pointer-events: auto;
  height: 90px;
}

.tech-framework-wrapper .track {
  display: flex;
  align-items: center;
  gap: 4rem;
  width: max-content;
  animation: scroll-left-to-right 120s linear infinite;
  height: 90px;
}

.tech-framework-wrapper .block {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  width: max-content;
  margin-top: -24px;
  transition: all 0.4s ease;
}

.tech-framework-wrapper .block .title {
  color: var(--orange);
  position: absolute;
  top: -28px;
  left: 0;
  font-size: 12px;
  opacity: .2;
  transition: all 0.4s ease;
  white-space: nowrap; /* Evita quiebre de linea */
}

.tech-framework-wrapper .block:hover {
  margin-top: 0;
}

.tech-framework-wrapper .block:hover .title {
  opacity: 1;
}

.tech-framework-wrapper .block .tool {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  transition: all 0.4s ease;
}

.tech-framework-wrapper .block .tool img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: .1;
  filter: grayscale(100%);
  transition: all 0.4s ease;
}

.tech-framework-wrapper .tool:hover img {
  opacity: 1;
  transition: all 0.4s ease;
}

/* The Async Protocol */

.async-protocol {
  position: relative;
}

.async-protocol .dna-sequence {
  position: absolute;
  top: 84%;
  left: 0;
  width: 100%;
  height: 240px; 
  transform: translateY(-50%);
  z-index: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 5%;
  pointer-events: none;
  perspective: 1000px; 
  opacity: .25; 
}

.async-protocol .dna-strand {
  position: relative;
  width: 1px;
  height: 100%;
  background: var(--orange); 
  transform-style: preserve-3d;
  animation: rotateStrand 8s linear infinite;
  animation-delay: calc(var(--i) * -0.2s);
}

.async-protocol .dna-strand::before,
.async-protocol .dna-strand::after {
  content: '';
  position: absolute;
  left: 50%;
  width: 5px; 
  height: 5px;
  border-radius: 50%;
  transform: translateX(-50%);
  background: var(--orange);
  animation: counterRotate 8s linear infinite reverse;
  animation-delay: calc(var(--i) * -0.2s);
}

.dna-strand::before { top: 0; }
.dna-strand::after { bottom: 0; }

/* Engagement tiers */

.tiers {
  margin: 32px 0 0 0;
  justify-content: center;
}

.tiers > li {
  justify-content: end;
}

.tiers > li > div {
  background: url('../img/bg-light-noisy-texture.png') var(--white-sand);
  border: 1px solid var(--white-sand-05);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  padding: 2.5rem;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  max-width: 100%;
}

.tiers > li > div:hover {
  box-shadow: 0 12px 32px var(--shade-15);
  transform: translateY(-5px);
}

.tiers .tier-image {
  margin: 0 auto -24px;
  width: 132px;
}

.tiers > li > div.featured {
  background: url('../img/bg-light-noisy-texture.png') var(--stone-gray);
  color: var(--sand);
  position: relative;
}

.tiers > li > div.featured:hover {
  border: 1px solid var(--white-orange-04);
  box-shadow: 0 24px 56px var(--orange);
}

.tiers h4 {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.tiers p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.tiers ul {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.tiers ul li {
  align-items: flex-start;
  color: var(--primary);
  display: flex;
  font-size: 1rem;
  text-align: left;
}

.tiers ul li::before {
  align-items: center;
  content: "👊";
  display: inline-flex;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: bold;
  height: 20px;
  justify-content: center;
  margin-right: 12px;
  width: 20px;
}

@media (min-width: 768px) {
  .tiers.grid-2-cols {
    /* LA CLAVE: En vez de '1fr' (estirar), usamos un tope fijo (ej. 480px).
       minmax(0, 480px) significa: "Sé flexible, pero nunca midas más de 480px". */
    grid-template-columns: repeat(2, minmax(0, 480px)); 
  }
}

/* FAQs */

.faq-item {
  margin-bottom: 1rem;
}

.faq-item summary {
  cursor: pointer;
}

.faq-slabs-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem;
  perspective: 1500px;
  padding: 2rem 0;
  text-align: left;
}

.faq-slab {
  flex: 1 1 500px; 
  max-width: 640px;
  transform-style: preserve-3d;
  transform: perspective(1000px) rotateX(0deg) rotateY(0deg);
  transition: transform 0.1s ease-out;
}

.slab-content {
  border-radius: 12px;
  padding: 2.5rem;
  background-image: url('../img/bg-light-noisy-texture.png'), linear-gradient(352deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 90%);
  background-clip: padding-box, border-box;
  backface-visibility: hidden;
  transform: translateZ(0);
  position: relative;
  overflow: hidden;
  text-shadow: 0 1.5px #fff;
  box-shadow: 0 12px 32px var(--shade-15);
}

.slab-content::before {
  bottom: 0;
  content: '';
  left: 0;
  position: absolute;
  right: 0;
  top: 0;
  z-index: -1;
  box-shadow: 0 8px 24px var(--shade-15), inset 1px 1px 0px rgba(255, 255, 255, 0.4), inset -1px -1px 0px rgba(0, 0, 0, 0.1);
  border-radius: 12px;
}

.slab-content h3 {
  font-family: 'Fraunces', serif;
  font-size: 1.5rem;
  color: var(--orange);
  margin-bottom: 2rem;
  margin-top: 0;
}

.faq-item {
  border-bottom: 1px solid rgba(0,0,0,0.05);
  margin-bottom: 1rem;
  padding-bottom: 1rem;
}
.faq-item:last-child { border: none; margin: 0; padding: 0; }

.faq-question {
  cursor: pointer;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color 0.2s;
}
.faq-question:hover { color: var(--orange); }

.faq-answer {
  margin-top: 0.8rem;
  font-size: 0.95rem;
  line-height: 1.6;
  transition: all 0.4s ease-in-out;
}

.icon-toggle {
  display: flex; 
  align-items: center;
  justify-content: center;
  width: 24px; 
  height: 24px;
  opacity: 0;
  transition: all 0.4s ease-in-out;
}

.icon-toggle::after {
  content: '';
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--orange); 
  border-bottom: 2px solid var(--orange);
  transform: rotate(45deg);
  transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), border-color 0.3s ease;
  margin-bottom: 3px; 
  margin-left: 1px;
}

details:hover .icon-toggle {
  opacity: 1;
}

details[open] .icon-toggle::after {
  transform: rotate(225deg);
  margin-bottom: -3px; 
}

.faq-question:hover .icon-toggle::after {
  border-color: var(--orange);
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
  .masonry-grid {
    column-count: 1; /* En móvil, una sola columna */
  }
}

/* Footer */

#footer {
  background: url('../img/bg-light-noisy-texture.png'), var(--stone-gray);
  color: var(--sand);
  margin: 56px 0 0;
  padding: 56px 0 120px;
  text-align: left;
  overflow: hidden;
  content-visibility: auto;
  contain-intrinsic-size: 450px;
}

#footer .grid-3-cols {
  gap: 9rem;
}

#footer .btn {
  margin: 16px 0 0;
  width: fit-content;
  padding: .4rem 1.2rem;
}

#footer .quotes {
  min-height: 138px;
  min-width: 0;
  position: relative;
}

#footer .quotes .carousel-window {
  width: 100%;
  overflow: hidden;
  position: relative;
}

#footer .quotes .carousel-track {
  display: flex;
  width: 100%;
  will-change: transform;
}

#footer .quotes .client {
  min-width: 100%; /* Ocupa el 100% de la ventana */
  flex: 0 0 100%;  /* No se encoge */
  box-sizing: border-box;
  padding-right: 1rem; /* Espacio para que no corte el texto */
}

#footer .quotes .client .italic {
  font-style: italic;
  font-size: 18px;
  font-family: 'Fraunces', serif;
}

#footer .quotes .client .thumb-name {
  position: relative;
  margin-top: 12px;
  display: flex;
  align-items: center;
}

#footer .quotes .client .thumb-name .thumb {
  margin-right: 12px;
  height: 32px;
  width: 32px;
  border: 1px solid var(--white-sand-04);
}

#footer .quotes .client .name-job {
  font-weight: 600;
  font-size: 16px;
}

#footer .quotes .client .name-job span {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: var(--white-sand-04);
}

#footer .copyright {
  margin-top: 64px;
  text-align: center;
  color: var(--white-sand-04);
}

/* Animations Keyframes */

@keyframes pulse-green-animation {
  0% { box-shadow: 0 0 0 0px var(--green-online); }
  100% { box-shadow: 0 0 0 5px var(--white-green-00); }
}

@keyframes pulse-sand-animation {
  0% { box-shadow: 0 0 0 0px var(--sand); }
  100% { box-shadow: 0 0 0 5px var(--white-sand-00); }
}

@keyframes float-1 {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(0, -10px, 20px) rotate(2deg); }
}

@keyframes float-2 {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(0, 8px, 10px) rotate(-1deg); }
}

@keyframes scroll-left-to-right {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes rotateStrand {
  0% { transform: rotateX(0deg); }
  100% { transform: rotateX(360deg); }
}
  
@keyframes counterRotate {
  0% { transform: translateX(-50%) rotateX(0deg); }
  100% { transform: translateX(-50%) rotateX(360deg); }
}

/* Mobile Navigation Toggle (Safety for small screens) */
@media (max-width: 768px) {
  #main-nav .container {
    padding-inline: 1.5rem;
  }
  
  #main-nav .nav-links {
    gap: 2rem;
  }
}

/* video loader */
@keyframes loader-gpu {
  0% {
    transform: scaleX(0);
    transform-origin: left;
  }
  49% {
    transform: scaleX(1);
    transform-origin: left;
  }
  50% {
    transform: scaleX(1);
    transform-origin: right; /* Truco: cambiamos el punto de anclaje */
  }
  100% {
    transform: scaleX(0);
    transform-origin: right;
  }
}