/* ===== Mancha Group · web ===== */

@font-face { font-family: "Inter Tight"; src: url("assets/fonts/InterTight.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("assets/fonts/InstrumentSerif.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("assets/fonts/InstrumentSerif-Italic.woff2") format("woff2"); font-style: italic; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("assets/fonts/JetBrainsMono.woff2") format("woff2"); font-display: swap; }

:root {
  --marfil: #F7F3EA;
  --negro: #0E0E0F;
  --naranja: #FD4B07;
  --gris: #B9B3A6;
  --gutter: clamp(16px, 4vw, 56px);
  --display: "Inter Tight", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  background: var(--marfil);
  color: var(--negro);
  font-family: var(--display);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: 0; text-transform: none; }

/* ---------- mancha naranja ---------- */
.blob-layer {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  z-index: 0; pointer-events: none;
}
#blob { fill: var(--naranja); }
main { position: relative; z-index: 1; }

/* ---------- piezas comunes ---------- */
.label {
  font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
}
.label--light { color: var(--marfil); }
.title {
  font-weight: 900; text-transform: uppercase; letter-spacing: -.03em; line-height: .92;
  font-size: clamp(44px, 8vw, 132px);
}
.title em { text-transform: none; font-size: 1.05em; }
.body { font-size: clamp(16px, 1.4vw, 20px); line-height: 1.45; max-width: 34ch; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: .06em;
  padding: 12px 20px; border-radius: 999px; transition: transform .25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--dark { background: var(--negro); color: var(--marfil); }
.btn--big { font-size: clamp(14px, 1.4vw, 18px); padding: 20px 32px; }

/* ---------- nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--gutter);
}
.nav { transition: transform .45s cubic-bezier(.2,.7,.2,1); }
.nav--hidden { transform: translateY(-110%); }
.nav--dark .nav__logo img { filter: invert(1); }
.nav--dark .btn--dark { background: var(--marfil); color: var(--negro); }
.nav__logo { position: relative; width: 112px; }
.nav__dot {
  position: absolute; left: 31.24%; top: 63.1%; width: 5.9%; aspect-ratio: 1;
  translate: -50% -50%; border-radius: 50%; background: var(--naranja);
}

/* ---------- 1 · inicio ---------- */
.hero {
  min-height: 100svh; padding: 84px var(--gutter) 28px;
  display: grid; grid-template-rows: auto 1fr auto; gap: 24px;
}
.hero__center { align-self: center; display: flex; flex-direction: column; gap: clamp(20px, 3vw, 44px); }
.hero__top, .hero__bottom { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.hero__bottom { justify-content: flex-end; }
@media (orientation: portrait) { .hero { min-height: 80svh; } }
.hero__mark { position: relative; width: 100%; }
.hero__wordmark { width: 100%; height: auto; }
.hero__dot-anchor { position: absolute; left: 31.24%; top: 63.1%; width: 5.4%; aspect-ratio: 1; translate: -50% -50%; }
.hero__claim {
  font-weight: 900; text-transform: uppercase; letter-spacing: -.03em; line-height: .95;
  font-size: clamp(34px, 5.4vw, 92px);
}
.scroll-hint { animation: bob 1.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(6px); } }

/* ---------- 2 · qué somos ---------- */
.about { min-height: 100vh; padding: 20vh var(--gutter); display: flex; flex-direction: column; gap: 32px; justify-content: center; }
.about__text {
  font-weight: 800; letter-spacing: -.025em; line-height: 1.02;
  font-size: clamp(32px, 5.6vw, 92px); max-width: 15em;
}
.about__text em { font-size: 1.08em; }
.reveal-words .w { color: var(--gris); transition: none; }

/* ---------- 3 · investigación ---------- */
.research {
  min-height: 100vh; padding: 16vh var(--gutter);
  display: grid; grid-template-columns: 1fr 1.1fr; gap: 6vw; align-items: center;
}
.research__copy { display: flex; flex-direction: column; gap: 28px; }
.research__chart { width: 100%; overflow: visible; }
.research__chart .grid line { stroke: var(--negro); stroke-width: 2; }
.research__chart .bars rect { fill: var(--negro); transform-origin: bottom; transform-box: fill-box; }
.draw { fill: none; stroke: var(--naranja); stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; }
.research__chart .pin { fill: var(--naranja); transform-box: fill-box; transform-origin: center; }

/* ---------- 4 · servicios ---------- */
.services { min-height: 100vh; padding: 18vh var(--gutter); display: flex; flex-direction: column; gap: 40px; justify-content: center; }
.services__list {
  font-weight: 900; text-transform: uppercase; letter-spacing: -.035em; line-height: .98;
  font-size: clamp(36px, 7.6vw, 136px);
}
.svc { display: block; width: max-content; }
.tag {
  display: inline-block; vertical-align: top; margin-left: .12em; margin-top: .3em;
  font-family: var(--mono); font-weight: 500; font-size: clamp(11px, .9vw, 15px); letter-spacing: .04em;
  background: var(--naranja); color: var(--negro); border-radius: 999px; padding: .3em .75em;
  border: 1.5px solid var(--negro);
}

/* ---------- 5 · proceso horizontal ---------- */
.process { height: 100vh; overflow: hidden; }
.process__track { display: flex; height: 100%; width: max-content; }
.step {
  width: auto; min-width: min(42vw, 560px); height: 100%; flex-shrink: 0;
  padding: 18vh 3vw 14vh; border-left: 2px solid var(--negro);
  display: flex; flex-direction: column; gap: 20px;
}
.step--intro { width: 100vw; border-left: 0; padding-left: var(--gutter); justify-content: center; }
.step__num { font-family: var(--mono); font-size: 14px; }
.step__title { font-weight: 900; text-transform: uppercase; letter-spacing: -.03em; font-size: clamp(36px, 4.6vw, 72px); line-height: .95; }
.step__icon { width: 120px; margin-top: auto; overflow: visible; }

/* ---------- 6 · números ---------- */
.numbers { min-height: 100vh; padding: 16vh var(--gutter); display: flex; flex-direction: column; justify-content: center; gap: 48px; }
.numbers__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4vw; }
.stat { display: flex; flex-direction: column; gap: 8px; border-top: 2px solid var(--negro); padding-top: 20px; }
.stat__num { font-weight: 900; letter-spacing: -.05em; line-height: .9; font-size: clamp(72px, 12vw, 200px); color: var(--naranja); font-variant-numeric: tabular-nums; }
.stat__txt { font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }

/* ---------- 7 · video ---------- */
.video {
  clip-path: inset(0);
  position: relative; min-height: 100vh; background: var(--negro); color: var(--marfil);
  display: grid; place-items: center; overflow: hidden;
}
.video__marquee {
  position: absolute; top: 50%; left: 0; translate: 0 -50%; display: flex; white-space: nowrap;
  font-weight: 900; text-transform: uppercase; letter-spacing: -.03em; font-size: clamp(80px, 16vw, 260px);
  color: transparent; -webkit-text-stroke: 1.5px rgba(247,243,234,.35);
}
.video__marquee span { padding-right: .3em; }
.video__frame {
  position: relative; width: min(84vw, 1200px); aspect-ratio: 16 / 9;
  border: 1.5px solid rgba(247,243,234,.35); border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 20px;
  background: rgba(14,14,15,.7); backdrop-filter: blur(6px);
}
.video__play {
  width: clamp(72px, 9vw, 120px); aspect-ratio: 1; border-radius: 50%; background: var(--naranja);
  display: grid; place-items: center; animation: pulse 2s ease-in-out infinite;
}
.video__play span { width: 0; height: 0; border-left: 22px solid var(--negro); border-top: 14px solid transparent; border-bottom: 14px solid transparent; margin-left: 6px; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(253,75,7,.5); } 50% { box-shadow: 0 0 0 22px rgba(253,75,7,0); } }

/* ---------- 8 · contacto ---------- */
.contact {
  min-height: 100vh; padding: 20vh var(--gutter) 32px;
  display: flex; flex-direction: column; gap: 20px;
}
.contact__title { font-weight: 900; text-transform: uppercase; letter-spacing: -.045em; line-height: .85; font-size: clamp(72px, 17vw, 300px); }
.contact__sub { font-size: clamp(32px, 5vw, 80px); line-height: 1; }
.contact__buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.contact__foot { margin-top: auto; padding-top: 48px; display: flex; justify-content: space-between; }

/* ---------- whatsapp flotante ---------- */
.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 10;
  width: 56px; height: 56px; border-radius: 50%; background: var(--negro);
  display: grid; place-items: center; transition: transform .25s ease;
}
.wa-float:hover { transform: scale(1.08); }
.wa-float svg { width: 26px; fill: var(--marfil); }

/* ---------- celular ---------- */
@media (max-width: 760px) {
  .research { grid-template-columns: 1fr; }
  .numbers__grid { grid-template-columns: 1fr; }
  .step { min-width: 82vw; padding: 16vh 7vw 12vh; }
  .contact__buttons .btn { flex: 1 1 40%; }
  .hero__top .label:last-child { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .scroll-hint, .video__play { animation: none; }
}

/* formas naranjas en las que se convierte la mancha */
.tag { transform-origin: center; }
.stat__num { align-self: flex-start; transform-origin: 30% 60%; }

/* el título de cada paso nunca se corta ni pisa al siguiente: el paso se ensancha */
.step__title { white-space: nowrap; padding-right: 2vw; }
/* mancha visible sobre el negro del video (recortada a la sección) */
.blob-layer--video { z-index: 0; }
.blob-layer--video path { fill: var(--naranja); }
.video__marquee, .video__frame { z-index: 1; }
.video__play { position: relative; }

/* ---------- panel de mail ---------- */
.mail {
  position: fixed; inset: 0; z-index: 30; background: var(--marfil);
  transform: translateX(100%); visibility: hidden; overflow-y: auto;
}
.mail__inner {
  min-height: 100%; max-width: 1100px; margin: 0 auto;
  padding: 28px var(--gutter) 48px; display: flex; flex-direction: column; gap: 22px;
}
.mail__back { align-self: flex-start; background: none; border: 0; cursor: pointer; color: var(--negro); padding: 6px 0; }
.mail__back:hover { text-decoration: underline; text-decoration-color: var(--naranja); text-underline-offset: 4px; }
.mail__title { font-weight: 900; text-transform: uppercase; letter-spacing: -.035em; line-height: .92; font-size: clamp(40px, 7vw, 110px); }
.mail__title em { text-transform: none; }
.mail__form { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 4vw; margin-top: 12px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field input, .field textarea {
  font: 500 clamp(18px, 1.6vw, 22px)/1.35 var(--display); color: var(--negro);
  background: transparent; border: 0; border-bottom: 2px solid var(--negro); border-radius: 0;
  padding: 8px 0; outline: none; resize: vertical; transition: border-color .2s;
}
.field textarea::placeholder { color: var(--gris); }
.field input:focus, .field textarea:focus { border-bottom-color: var(--naranja); }
.field.is-error input, .field.is-error textarea { border-bottom-color: var(--naranja); border-bottom-style: dashed; }
.mail__actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.mail__actions .btn { border: 0; cursor: pointer; }
.mail__actions .btn:disabled { opacity: .5; cursor: wait; }
.mail__honey { position: absolute; left: -9999px; }
.mail__alt a { text-decoration: underline; text-decoration-color: var(--naranja); text-underline-offset: 4px; text-transform: none; }
button.btn { font-family: var(--mono); }
@media (max-width: 760px) { .mail__form { grid-template-columns: 1fr; } }
