:root {
  --banana-base: #f2e3a6;
  --banana-cream: #fbf2d8;
  --cafe-principal: #926449;
  --cafe-medio: #8f6147;
  --cafe-profundo: #6f4c38;
  --verde-suave: #dce9c8;
  --blanco-calido: #fff9ef;
  --gris-crema: #f4f1eb;
  --oro-suave: #f0da8f;
  --borde-suave: rgba(143, 97, 71, 0.14);
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --container-max: 1180px;
  --shadow-soft: 0 12px 30px rgba(146, 100, 73, 0.08);
  --shadow-hover: 0 20px 40px rgba(146, 100, 73, 0.12);
  --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--cafe-principal);
  background: var(--blanco-calido);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.menu-open { overflow: hidden; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--cafe-profundo);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
}

p { color: var(--cafe-medio); }

a {
  color: var(--cafe-profundo);
  text-decoration: none;
  transition: var(--transition);
}

img { max-width: 100%; height: auto; display: block; }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.lead {
  font-size: 1.08rem;
  max-width: 800px;
  margin: 0 auto;
}

.text-center-block { text-align: center; }

.section-header {
  margin-bottom: 3rem;
  text-align: center;
}

.section-header p {
  max-width: 640px;
  margin: 0.25rem auto 0;
}

.section-kicker,
.badge {
  display: inline-block;
  margin-bottom: 0.95rem;
  padding: 0.38rem 0.82rem;
  border-radius: 999px;
  background: rgba(255, 249, 239, 0.82);
  border: 1px solid rgba(143, 97, 71, 0.12);
  color: var(--cafe-principal);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.badge-green { background: rgba(191, 216, 166, 0.55); }

.reveal { opacity: 1; transform: none; }
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}
.js .reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.85rem 1.45rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  text-align: center;
  border: 1.5px solid transparent;
  transition: var(--transition);
}

.btn-primary {
  background: var(--cafe-principal);
  color: var(--blanco-calido);
  box-shadow: 0 8px 20px rgba(146, 100, 73, 0.12);
}
.btn-primary:hover {
  background: var(--cafe-profundo);
  color: var(--blanco-calido);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--cafe-principal);
  border-color: rgba(146, 100, 73, 0.52);
}
.btn-outline:hover {
  background: rgba(255, 249, 239, 0.6);
  border-color: var(--cafe-principal);
  transform: translateY(-2px);
}

.header {
  position: fixed;
  inset: 0 0 auto 0;
  width: 100%;
  background: rgba(255, 249, 239, 0.92);
  backdrop-filter: blur(10px);
  z-index: 1000;
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}
.header.scrolled {
  border-bottom-color: rgba(146, 100, 73, 0.08);
  box-shadow: 0 10px 24px rgba(146, 100, 73, 0.06);
}
.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 84px;
  gap: 1rem;
}
.logo-img { height: 58px; }

.nav-list {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 1.9rem;
}
.nav-link {
  position: relative;
  font-weight: 600;
  color: var(--cafe-profundo);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 100%;
  height: 2px;
  background: var(--cafe-principal);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.24s ease;
}
.nav-link:hover::after { transform: scaleX(1); }

.btn-nav {
  background: #f1deae;
  padding: 0.65rem 1.12rem;
  border-radius: 999px;
  border: 1px solid rgba(146, 100, 73, 0.08);
}
.btn-nav::after { display: none; }
.btn-nav:hover { background: #eacf90; }

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.4rem;
}
.hamburger .bar {
  display: block;
  width: 24px;
  height: 2.5px;
  margin: 5px auto;
  background: var(--cafe-profundo);
  transition: var(--transition);
  border-radius: 999px;
}

.site-shell { padding-top: 96px; }

/* HERO */
.hero { padding: 0 0 1.4rem; }

.hero-panel {
  position: relative;
  overflow: hidden;
  background: var(--banana-base);
  border-radius: 34px;
  border: 1px solid var(--borde-suave);
  box-shadow: var(--shadow-soft);
  min-height: 760px;
  padding: 3.2rem 2rem 10rem;
  isolation: isolate;
}

.hero-content {
  position: relative;
  z-index: 5;
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-logo-wrap {
  width: min(100%, 290px);
  margin: 0 auto 1rem;
}

.hero-logo-main {
  width: 100%;
  object-fit: contain;
  filter: drop-shadow(0 10px 18px rgba(146, 100, 73, 0.08));
}

.hero-content h1 {
  font-size: clamp(2.8rem, 4.6vw, 5rem);
  margin-bottom: 1.2rem;
  max-width: 11ch;
}

.hero-text {
  font-size: 1.08rem;
  margin-bottom: 1.8rem;
  max-width: 60ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  margin-bottom: 1.5rem;
}

.hero-points {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  list-style: none;
  position: relative;
  z-index: 5;
}

.hero-points li {
  padding: 0.56rem 0.92rem;
  border-radius: 999px;
  background: rgba(255, 249, 239, 0.75);
  border: 1px solid rgba(143, 97, 71, 0.1);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--cafe-profundo);
}

/* BANANA SCENE */
.banana-rain-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.banana-floor-layer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 180px;
  pointer-events: none;
  z-index: 3;
}

.scene-banana {
  position: absolute;
  top: -90px;
  width: var(--size, 54px);
  height: var(--size, 54px);
  opacity: 0;
  animation: bananaFall var(--dur, 8s) linear infinite;
  animation-delay: var(--delay, 0s);
  transform: rotate(var(--rot, 0deg));
  background-image: url('../img/ui/banana.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  filter: drop-shadow(0 10px 14px rgba(111, 76, 56, 0.12));
  z-index: 4;
}

.scene-banana.floor {
  position: absolute;
  top: auto;
  bottom: 10px;
  width: var(--size, 64px);
  height: var(--size, 64px);
  opacity: 0.96;
  animation: none;
  filter: drop-shadow(0 6px 10px rgba(111, 76, 56, 0.12));
}

@keyframes bananaFall {
  0% {
    opacity: 0;
    transform: translate3d(0, -20px, 0) rotate(var(--rot, 0deg));
  }
  10% {
    opacity: 0.95;
  }
  100% {
    opacity: 0.95;
    transform: translate3d(var(--drift, 0px), calc(100% + 220px), 0)
      rotate(calc(var(--rot, 0deg) + 24deg));
  }
}

/* STACKED SECTIONS */
.stacked-sections { padding-bottom: 1rem; }

.section-wrap {
  position: relative;
  padding: 0 0 4rem;
}

.stack-card {
  position: sticky;
  top: 108px;
  border-radius: 30px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--borde-suave);
  padding: 4.5rem 2rem;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.stack-light { background: var(--blanco-calido); }
.stack-cream { background: var(--banana-cream); }
.stack-neutral { background: var(--gris-crema); }
.stack-green { background: var(--verde-suave); }
.stack-gold { background: var(--oro-suave); }

.section-wrap:nth-child(n + 2) .stack-card { margin-top: -1.25rem; }
.section-wrap:hover .stack-card { box-shadow: var(--shadow-hover); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.2rem;
}

.card {
  background: rgba(255, 255, 255, 0.82);
  border-radius: 24px;
  padding: 1.9rem;
  border: 1px solid var(--borde-suave);
  box-shadow: 0 8px 20px rgba(146, 100, 73, 0.06);
  transition: var(--transition);
  height: 100%;
}
.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-6px);
  border-color: rgba(143, 97, 71, 0.25);
}
.card h3 {
  font-size: 1.24rem;
  margin-bottom: 0.75rem;
}
.card p { font-size: 0.96rem; }
.card-highlight { background: rgba(220, 233, 200, 0.95); }

.about h2,
.approach h2,
.contact h2,
.labs h2 {
  font-size: clamp(2rem, 3vw, 3rem);
  margin-bottom: 1rem;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  align-items: start;
  transition: var(--transition);
}

.process-grid.has-focus .process-step:not(.is-active) {
  opacity: 0.48;
  transform: scale(0.95);
}

.process-step {
  position: relative;
  min-height: 100%;
  text-align: center;
  padding: 1.55rem 1rem 1.25rem;
  border-radius: 24px;
  border: 1px solid transparent;
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease,
    opacity 0.35s ease,
    background-color 0.35s ease,
    border-color 0.35s ease;
  cursor: pointer;
}

.process-step:hover,
.process-step:focus-visible,
.process-step.is-active {
  background: rgba(255, 249, 239, 0.82);
  border-color: rgba(146, 100, 73, 0.12);
  box-shadow: var(--shadow-soft);
  transform: translateY(-6px) scale(1.08);
  z-index: 2;
}

.process-step h3 {
  font-size: 1.22rem;
  margin-bottom: 0.75rem;
  transition: transform 0.35s ease;
}
.process-step:hover h3,
.process-step:focus-visible h3,
.process-step.is-active h3 {
  transform: scale(1.03);
}
.process-step:hover p,
.process-step:focus-visible p,
.process-step.is-active p {
  color: var(--cafe-profundo);
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  background: #f3d680;
  color: var(--cafe-profundo);
  font-family: var(--font-heading);
  font-size: 1.55rem;
  font-weight: 800;
  border-radius: 50%;
  margin: 0 auto 1.05rem;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.process-step:hover .step-number,
.process-step:focus-visible .step-number,
.process-step.is-active .step-number {
  transform: scale(1.28);
  box-shadow: 0 10px 18px rgba(146, 100, 73, 0.12);
}

.contact-card { text-align: center; }

.contact-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1.8rem 0 0;
}

/* FOOTER */
.footer {
  position: relative;
  overflow: hidden;
  background: var(--blanco-calido);
  padding: 4rem 0 8rem;
  border-top: 1px solid rgba(143, 97, 71, 0.08);
  isolation: isolate;
}

.footer-container {
  position: relative;
  z-index: 5;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2.4rem;
}

.footer-brand { max-width: 340px; }

.footer-logo {
  width: 216px;
  margin-bottom: 0.9rem;
}

.footer-links {
  display: flex;
  gap: 1.65rem;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.96rem;
  font-weight: 600;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.2rem;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(143, 97, 71, 0.08);
  font-size: 0.88rem;
}

.easter-egg a {
  text-decoration: underline;
  text-decoration-color: rgba(146, 100, 73, 0.35);
}

.footer a:hover,
.easter-egg a:hover {
  color: var(--cafe-principal);
}

.process-step:focus-visible,
.btn:focus-visible,
.nav-link:focus-visible {
  outline: 2px solid rgba(146, 100, 73, 0.35);
  outline-offset: 4px;
}


/* TEST FORZADO FOOTER */
.footer-banana-rain,
.footer-banana-floor {
  z-index: 20;
}

.footer .scene-banana {
  opacity: 1 !important;
}

.banana-test {
  animation: none !important;
  top: 24px;
  width: 90px;
  height: 90px;
  background-image: url('../img/ui/banana.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.banana-test-1 { left: 8%; transform: rotate(-18deg); }
.banana-test-2 { left: 28%; transform: rotate(12deg); }
.banana-test-3 { left: 58%; transform: rotate(-10deg); }
.banana-test-4 { left: 80%; transform: rotate(16deg); }

.banana-floor-test {
  width: 96px;
  height: 96px;
  background-image: url('../img/ui/banana.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  bottom: 8px !important;
}

.banana-floor-test-1 { left: 6%; transform: rotate(-24deg); }
.banana-floor-test-2 { left: 32%; transform: rotate(14deg); }
.banana-floor-test-3 { left: 60%; transform: rotate(-12deg); }
.banana-floor-test-4 { left: 84%; transform: rotate(22deg); }

.footer-js-test,
.footer-js-floor-test {
  background-image: url('../img/ui/banana.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  z-index: 30;
}