/* bbgestudio — tokens */
:root {
  --bg: #efefea;
  --paper: #f7f7f3;
  --tone: #e6e6df;
  --ink: #1f2416;
  --head: #2f3b1b;
  --muted: #5d6253;
  --line: rgba(47, 59, 27, .07);
  --accent: #99cc00;
  --accent-hover: #8abb00;
  --accent-ink: #1f2416;
  --moss: #6f8f2a;

  /* pasteles, solo en degradados suaves sobre blanco */
  --p-lime: #dff2b4;
  --p-mint: #d3efe3;
  --forest: #06402b; /* verde oscuro corporativo */
  --p-forest: #a8c3b5; /* el mismo verde, suavizado */
  --p-pale: #f1f8e2;

  --serif: "Alexandria", system-ui, sans-serif;
  --sans: "Alexandria", system-ui, sans-serif;

  --step-small: 0.875rem;
  --step-body: clamp(1rem, .96rem + .2vw, 1.125rem);
  --step-hero: clamp(2.1rem, .6rem + 4.7vw, 6.5rem);
  --step-big: clamp(2.5rem, 1.1rem + 4.4vw, 6.25rem);

  --m: clamp(16px, 2vw, 40px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  --space: clamp(64px, 7vw, 104px); /* mismo espacio entre todas las secciones */
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 var(--step-body)/1.5 var(--sans);
  overflow-x: hidden;
}
a { color: inherit; }
h1, h2, h3, p, ul { margin: 0; }
ul { padding: 0; list-style: none; }
::selection { background: var(--p-lime); color: var(--ink); }
:focus-visible { outline: 2px solid var(--head); outline-offset: 3px; }

/* Texto solo para lectores de pantalla y buscadores */
.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;
}

/* Botón: el único sitio con verde lleno */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px;
  border-radius: 999px;
  background: var(--accent); color: var(--accent-ink);
  font: 600 1rem/1 var(--sans);
  text-decoration: none;
  transition: transform .45s var(--ease), color .35s var(--ease);
}
/* Relleno verde oscuro que crece desde donde entra el cursor */
.btn::before {
  content: ""; position: absolute; z-index: -1;
  left: var(--x, 50%); top: var(--y, 50%);
  width: 260%; aspect-ratio: 1; border-radius: 50%;
  background: var(--forest);
  transform: translate(-50%, -50%) scale(0);
  transition: transform .6s var(--ease);
}
.btn__label { display: inline-block; transition: transform .45s var(--ease); }
.btn__arrow {
  display: inline-block; width: 0; opacity: 0; overflow: hidden;
  transform: translateX(-8px);
  transition: width .45s var(--ease), opacity .3s var(--ease), transform .45s var(--ease);
}
.btn__arrow svg { display: block; width: 18px; height: 18px; }
.btn:hover { color: #fff; }
.btn:hover::before { transform: translate(-50%, -50%) scale(1); }
.btn:hover .btn__arrow { width: 18px; opacity: 1; transform: none; }
.btn:active { transform: scale(.96); transition-duration: .15s; }
@media (hover: none) { .btn:hover { color: var(--accent-ink); } .btn:hover::before { transform: translate(-50%, -50%) scale(0); } }

/* Logo: dos líneas desplazadas, como Marimba */
.logo {
  display: inline-block;
  font: 700 1.35rem/.9 var(--serif);
  letter-spacing: -0.03em;
  color: var(--head);
  text-decoration: none;
}
.logo span { display: block; padding-left: 1.1em; }
.logo--big { font-size: clamp(3rem, 7vw, 5.5rem); color: #b9c6a2; }

/* Pantalla de carga */
.loader { display: none; }
.js .loader {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  background: var(--bg);
  animation: loader-out .8s var(--ease) 1.2s forwards;
}
.js .loader .logo { animation: mark-in .8s var(--ease) both; }
@keyframes mark-in { from { opacity: 0; transform: translateY(14px); } }
@keyframes loader-out { to { opacity: 0; visibility: hidden; } }

/* Barra: cinco columnas alineadas con las líneas del hero */
.bar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
  display: grid; grid-template-columns: repeat(5, 1fr);
  align-items: start;
  padding: 34px var(--m) 0;
}
.bar > span { display: none; }
.bar__nav { grid-column: 5; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; padding-top: 4px; }
.bar__nav a {
  font-size: var(--step-small); text-decoration: none; color: var(--muted);
  transition: color .2s, transform .25s var(--ease);
}
.bar__nav a[aria-current] { color: var(--ink); font-weight: 600; }
.bar__nav a[aria-current]::before { content: "• "; }
.bar__nav a:hover { color: var(--ink); transform: translateX(-3px); }

/* Hero */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid; place-items: center;
  padding: 150px var(--m) 120px;
  background: var(--bg);
  overflow: hidden;
  isolation: isolate;
}
.hero__bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }

.cols {
  position: absolute; inset: 0 var(--m);
  display: grid; grid-template-columns: repeat(5, 1fr);
}
.cols i { border-left: 1px solid var(--line); }
.cols i:last-child { position: absolute; right: 0; top: 0; bottom: 0; }

/* Una web borrosa al fondo, como en Marimba */
.ghost {
  position: absolute; left: 44%; top: 4%;
  width: 60vw; display: flex; flex-wrap: wrap; gap: 26px 22px;
  transform: rotate(-16deg) skewX(8deg);
  filter: blur(9px); opacity: .9;
}
.ghost b { display: block; width: var(--w); height: var(--h, 26px); background: #fbfbf8; border-radius: 8px; }

.blob {
  position: absolute; display: grid; place-items: center;
  border-radius: 50%;
  will-change: transform;
}
.blob::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  background: var(--fill); filter: blur(28px);
}
.blob span {
  position: relative;
  font: 500 clamp(1.25rem, .9rem + 1.1vw, 2rem)/1 var(--serif);
  letter-spacing: -0.03em;
  color: #fff;
}
.blob--a {
  --fill: radial-gradient(circle at 30% 40%, #cdeb98 0%, #dcf0cf 45%, #eef2e2 70%, transparent 72%);
  width: 24vw; height: 22vw; left: 3vw; top: 13%;
}
.blob--a span { transform: translate(-4vw, -2vw); }
/* Verde oscuro: grande y muy transparente, para que no pese */
.blob--b {
  --fill: radial-gradient(circle at 55% 45%, rgba(6, 64, 43, .9) 0%, rgba(6, 64, 43, .55) 28%, rgba(6, 64, 43, .2) 52%, rgba(6, 64, 43, 0) 70%);
  width: 46vw; height: 50vw; right: -12vw; top: -8%;
}
.blob--b::before { opacity: .42; filter: blur(48px); }
.blob--b span { transform: translate(-2vw, 2vw); }
.blob--c {
  --fill: radial-gradient(circle at 40% 40%, #d2ec9b 0%, #e5f4d3 50%, transparent 72%);
  width: 18vw; height: 18vw; left: 33vw; bottom: -9vw;
}
.blob--c span { transform: translateY(-3vw); }

.deco { position: absolute; will-change: transform; }
.deco--flower { width: clamp(34px, 3vw, 58px); left: 24vw; top: 15%; }

.js .blob { animation: drift 16s ease-in-out infinite alternate; }
.js .blob--b { animation-duration: 19s; animation-direction: alternate-reverse; }
.js .blob--c { animation-duration: 13s; }
.js .deco--flower { animation: spin 30s linear infinite; }
@keyframes drift { to { translate: 14px -22px; scale: 1.04; } }
@keyframes spin { to { rotate: 360deg; } }

.hero__copy {
  display: flex; flex-direction: column; align-items: center; gap: 36px;
  max-width: 1500px; text-align: center;
}
.hero__title {
  max-width: 15em;
  font: 500 var(--step-hero)/1.06 var(--serif);
  letter-spacing: -0.04em;
  color: var(--head);
  text-wrap: balance;
}
.pill {
  display: inline-block; vertical-align: -.08em;
  width: 1.12em; height: .8em; margin: 0 .04em;
  border-radius: .26em;
  overflow: hidden;
}
.pill--web { background: linear-gradient(135deg, var(--p-lime), var(--p-forest)); }
.pill--app { background: linear-gradient(135deg, var(--p-forest), #e2ebe6); }
.pill svg { display: block; width: 100%; height: 100%; }

/* Franja: dos líneas que se cruzan */
.ticker {
  overflow: hidden;
  background: var(--paper);
  padding: var(--space) 0 0;
  font: 600 clamp(1.75rem, 1rem + 2.6vw, 3.5rem)/1.15 var(--sans);
  letter-spacing: -0.03em;
}
.ticker__track { display: flex; align-items: center; width: max-content; animation: ticker 40s linear infinite; }
.ticker__track span { padding: 0 .4em; }
.ticker__track i { width: .22em; height: .22em; border-radius: 50%; background: #cfe79a; flex: none; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* Servicios: lista informativa por grupos */
.services { padding: var(--space) var(--m) 0; background: var(--paper); }
.group {
  display: grid; grid-template-columns: 4fr 8fr; gap: 32px 48px;
  padding: clamp(40px, 4vw, 56px) 0;
  border-top: 1px solid rgba(31, 36, 22, .12);
}
.group:last-child { border-bottom: 1px solid rgba(31, 36, 22, .12); }
.group__info { display: grid; grid-template-columns: auto 1fr; column-gap: 24px; align-content: start; }
.group__num { grid-row: span 2; padding-top: .7em; font-size: var(--step-small); color: var(--moss); font-variant-numeric: tabular-nums; }
.group__info h3 { font: 500 clamp(1.625rem, 1.2rem + 1.1vw, 2.5rem)/1.05 var(--serif); color: var(--head); letter-spacing: -0.035em; }
.group__info p { margin-top: 12px; max-width: 26ch; color: var(--muted); font-size: 1rem; }
.group__list { display: grid; grid-template-columns: 1fr 1fr; column-gap: 32px; align-content: start; }
.group__list li {
  display: flex; flex-direction: column; gap: 4px;
  padding: 18px 0;
  border-bottom: 1px solid rgba(31, 36, 22, .08);
}
.group__list li:nth-last-child(-n+2):nth-child(odd),
.group__list li:nth-child(even):nth-last-child(2),
.group__list li:last-child { border-bottom: 0; }
.group__list b { font-weight: 600; font-size: 1.0625rem; }
.group__list span { font-size: .9375rem; color: var(--muted); }

/* Proyectos: carrusel horizontal (scroll vertical lo mueve en escritorio) */
.reel { --card-h: min(74vh, 720px); background: var(--paper); padding: var(--space) 0; }
.hscroll { position: relative; }
/* La franja mide lo que las tarjetas y se fija con ellas centradas en pantalla */
.hscroll__sticky { position: sticky; top: calc((100svh - var(--card-h)) / 2); height: var(--card-h); display: flex; align-items: center; overflow-x: clip; }
.hscroll__track { display: flex; gap: clamp(12px, 1.2vw, 20px); padding-inline: var(--m); will-change: transform; }
.hbox {
  flex: 0 0 auto; position: relative;
  height: var(--card-h);
  border-radius: clamp(16px, 2vw, 28px);
  overflow: hidden;
}
.hbox--intro, .hbox--more {
  width: clamp(280px, 28vw, 440px);
  padding: clamp(24px, 2.6vw, 44px);
  display: flex; flex-direction: column; justify-content: space-between;
  background: var(--bg);
}
.hbox--intro p { max-width: 26ch; color: var(--muted); }
.hbox--more {
  justify-content: center; align-items: flex-start; gap: 28px;
  background: linear-gradient(150deg, var(--p-pale) 0%, var(--p-lime) 60%, var(--p-mint) 100%);
}
.hbox__title { font: 500 clamp(2.25rem, 1.3rem + 2.4vw, 4rem)/.95 var(--serif); color: var(--head); letter-spacing: -0.045em; }
.hbox--more .hbox__title { font-size: clamp(1.875rem, 1.2rem + 1.8vw, 3rem); }

.hbox--case { width: clamp(300px, 52vw, 900px); background: var(--c, var(--tone)); }
.hbox__media { position: absolute; inset: 0; }
.hbox__media img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.06); transition: transform 1.2s var(--ease);
}
.hbox--case:hover .hbox__media img { transform: scale(1); }
/* Con foto: velo oscuro abajo y texto en blanco */
.hbox--case:not(.hbox--mock):not(.hbox--light):has(img)::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(20,24,14,.06) 0%, rgba(20,24,14,.12) 40%, rgba(20,24,14,.82) 100%);
}
/* Tarjeta con la proporción de su imagen (Poppy): la imagen la llena entera */
.hbox--wide { width: min(calc(var(--card-h) * var(--ratio)), calc(100vw - 2 * var(--m))); text-decoration: none; }
.hbox--light .hbox__info { color: var(--head); }
a.hbox--case { color: inherit; }

/* Mockups con fondo propio: imagen entera, sin velo, texto oscuro */
.hbox--mock .hbox__media { inset: clamp(20px, 2.4vw, 40px) clamp(20px, 2.4vw, 40px) clamp(110px, 9vw, 150px); }
.hbox--mock .hbox__media img { object-fit: contain; object-position: center top; transform: scale(.97); }
.hbox--mock:hover .hbox__media img { transform: scale(1); }
.hbox--mock::after { display: none; }
.hbox--case.hbox--mock .hbox__info { color: var(--head); }

.hbox__info {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: clamp(20px, 2.4vw, 40px);
  display: flex; flex-direction: column; gap: 14px;
  color: var(--head);
}
.hbox--case:not(.hbox--mock):not(.hbox--light):has(img) .hbox__info { color: #fff; }
.hbox__info h3 { font: 500 clamp(1.5rem, .9rem + 1.7vw, 2.625rem)/1.05 var(--serif); letter-spacing: -0.04em; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid currentColor;
  font-size: var(--step-small); font-weight: 500;
  opacity: .85;
}
.hbox--case { transition: transform .5s var(--ease); }
.hbox--case:hover { transform: translateY(-4px); }

/* Entrada de las tarjetas, como MK Vision */
.js .hbox--case { opacity: 0; translate: 30% 0; transition: opacity .7s ease-out, translate .8s cubic-bezier(.45,0,.55,1), transform .5s var(--ease); }
.js .hscroll.in .hbox--case { opacity: 1; translate: 0 0; }
.js .hscroll.in .hbox--case:nth-child(3) { transition-delay: .085s; }
.js .hscroll.in .hbox--case:nth-child(4) { transition-delay: .17s; }
.js .hscroll.in .hbox--case:nth-child(5) { transition-delay: .255s; }
.js .hscroll.in .hbox--case:nth-child(6) { transition-delay: .34s; }
.js .hscroll.in .hbox--case:nth-child(7) { transition-delay: .425s; }
.js .hscroll.in .hbox--case:nth-child(8) { transition-delay: .51s; }

@media (max-width: 800px) {
  .hscroll { height: auto !important; }
  .hscroll__sticky { position: relative; top: auto; height: auto; }
  .hscroll__track {
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--m);
    scrollbar-width: none; transform: none !important; padding-bottom: 8px;
  }
  .hscroll__track::-webkit-scrollbar { display: none; }
  .hbox { height: 62vh; scroll-snap-align: start; }
  .hbox--case { width: 82vw; }
  .hbox--wide { width: 88vw; }
  .hbox--intro, .hbox--more { width: 72vw; }
}

/* Contacto sencillo, como Bhavana */
.contact { background: var(--paper); padding: 0 var(--m) var(--space); }
.contact__grid {
  max-width: 1000px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px 64px; align-items: center;
}
.contact__title { font: 500 var(--step-big)/.95 var(--serif); color: var(--head); letter-spacing: -0.045em; max-width: 8ch; }
.contact__side { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.contact__side p { max-width: 30ch; color: var(--muted); }
.contact__mail {
  grid-column: 1 / -1; justify-self: start;
  font-weight: 500; text-decoration: underline; text-underline-offset: 5px;
  transition: color .2s;
}
.contact__mail:hover { color: var(--muted); }

.foot {
  display: flex; justify-content: space-between; gap: 16px;
  max-width: calc(1000px + 2 * var(--m)); margin: 0 auto;
  padding: 0 var(--m) 40px;
  font-size: var(--step-small); color: var(--muted);
}
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* Volver arriba: aparece al hacer scroll */
.to-top {
  position: fixed; right: var(--m); bottom: var(--m); z-index: 20;
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink); color: var(--paper);
  opacity: 0; visibility: hidden; transform: translateY(16px) scale(.9);
  transition: opacity .35s var(--ease), transform .35s var(--ease), visibility 0s linear .35s, background-color .25s, color .25s;
}
.to-top svg { width: 22px; height: 22px; transition: transform .3s var(--ease); }
.to-top.show { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.to-top:hover { background: var(--accent); color: var(--ink); }
.to-top:hover svg { transform: translateY(-3px); }
.to-top:active { transform: scale(.94); }
/* Cursor con flecha sobre el carrusel (solo ratón) */
.cursor {
  position: fixed; left: 0; top: 0; z-index: 30;
  pointer-events: none;
  will-change: transform;
}
.cursor__dot {
  width: 92px; height: 92px; margin: -46px 0 0 -46px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--forest); color: #fff;
  transform: scale(0);
  transition: transform .4s var(--ease);
}
.cursor.on .cursor__dot { transform: scale(1); }
.cursor.on.press .cursor__dot { transform: scale(.85); }
.cursor svg { width: 28px; height: 28px; transition: transform .4s var(--ease); }
.cursor.link svg { transform: rotate(-45deg); }
@media (pointer: fine) { .js .hscroll__track, .js .hscroll__track a { cursor: none; } .js .hscroll__track .btn { cursor: pointer; } }

/* Entradas */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); transition-delay: var(--d, 0ms); }
.js .reveal.in { opacity: 1; transform: none; }
.js .hero__copy > * { animation: rise .9s var(--ease) both; }
.js .hero__title { animation-delay: 1.45s; }
.js .hero__bg { animation: fade 1.6s var(--ease) 1.1s both; }
@keyframes rise { from { opacity: 0; transform: translateY(28px); } }
@keyframes fade { from { opacity: 0; } }

/* Tableta */
@media (max-width: 1000px) {
  .bar { grid-template-columns: 1fr 1fr; }
  .bar__nav { grid-column: 2; }
  .cols { grid-template-columns: repeat(3, 1fr); }
  .cols i:nth-child(n+4):not(:last-child) { display: none; }
  .group { grid-template-columns: 1fr; }
  .blob--a { width: 36vw; height: 34vw; left: 2vw; }
  .blob--b { width: 60vw; height: 64vw; right: -20vw; }
  .blob--c { width: 30vw; height: 30vw; }
}

/* Móvil */
@media (max-width: 640px) {
  .bar { padding-top: 22px; }
  .logo { font-size: 1.2rem; }
  .hero { padding: 160px var(--m) 110px; }
  .hero__copy { gap: 28px; }
  .hero__title { font-size: clamp(1.875rem, 8.6vw, 2.5rem); }
  .cols { grid-template-columns: repeat(2, 1fr); }
  .cols i:nth-child(n+3):not(:last-child) { display: none; }
  .ghost { left: 10%; width: 140vw; }
  .blob--a { width: 60vw; height: 56vw; left: -16vw; top: 9%; }
  .blob--a span { transform: translate(6vw, 2vw); }
  .blob--b { width: 90vw; height: 96vw; right: -36vw; top: auto; bottom: -6%; }
  .blob--b span { transform: translate(-14vw, 4vw); }
  .blob--c { display: none; }
  .deco--flower { left: auto; right: 22vw; top: 17%; }
  .group__list { grid-template-columns: 1fr; }
  .group__list li:nth-last-child(-n+2):nth-child(odd):not(:last-child),
  .group__list li:nth-child(even):nth-last-child(2) { border-bottom: 1px solid rgba(31, 36, 22, .08); }
  .contact__grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .js .loader { display: none; }
  .js .blob, .js .deco, .ticker__track, .js .hero__copy > *, .js .hero__bg { animation: none; }
  .cursor { display: none; }
  .js .reveal, .js .hbox--case { transition-duration: .01ms; transform: none; translate: none; opacity: 1; clip-path: none; }
  html { scroll-behavior: auto; }
}
