/* ==========================================================================
   Breid Digital — tokens
   ========================================================================== */
:root {
  --blue: #0455FF;        /* azul de marca */
  --blue-deep: #0339C4;   /* sombras y paneles sobre azul */
  --lime: #C5FF3B;        /* trazos a mano y CTA */
  --ink: #04123F;         /* texto sobre claro */
  --paper: #FFFFFF;
  --mist: #EEF2FF;        /* tarjetas claras con tinte azul */

  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --gutter: clamp(16px, 4vw, 56px);
  --radius-sheet: clamp(28px, 4vw, 48px);
  --radius-card: 28px;

  color-scheme: light;
}

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

/* Sin desplazamiento lateral en el celular.
   En <html> el overflow pasa al viewport (no crea un contenedor de scroll), así que
   las secciones fijas (position: sticky) siguen funcionando. */
html {
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}
@supports (overflow: clip) {
  html { overflow-x: clip; }
}

body {
  margin: 0;
  background: var(--blue);
  color: var(--ink);
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  position: relative;
}
/* Cada bloque recorta lo que sobresale (franja inclinada, flechas a mano, títulos en movimiento).
   clip, a diferencia de hidden, no rompe position: sticky. */
main,
.sheet,
.footer { overflow-x: clip; }

img { display: block; max-width: none; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }

:focus-visible {
  outline: 3px solid var(--lime);
  outline-offset: 3px;
  border-radius: 999px;
}

[hidden] { display: none !important; }

.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;
}

/* ==========================================================================
   Logos oficiales (recortados del lienzo cuadrado, sin redibujar)
   ========================================================================== */
.wordmark {
  position: relative;
  display: block;
  aspect-ratio: 1810 / 165;
  overflow: hidden;
}
.wordmark img {
  position: absolute;
  width: 106.08%;
  left: -4.42%;
  top: -554.5%;
}
.isotipo {
  position: relative;
  display: block;
  aspect-ratio: 1192 / 1062;
  overflow: hidden;
}
.isotipo img {
  position: absolute;
  width: 161.07%;
  left: -31.04%;
  top: -40.96%;
}
/* Versión blanca sobre fondos oscuros: el azul se vuelve blanco y el fondo blanco desaparece */
.wordmark--white img,
.isotipo--white img {
  filter: grayscale(1) invert(1) brightness(3);
  mix-blend-mode: screen;
}

/* ==========================================================================
   Tipografía
   ========================================================================== */
.display {
  font-size: clamp(2.75rem, 7.5vw, 7.5rem);
  font-variation-settings: "wdth" 125;
  font-weight: 900;
  line-height: .9;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  color: var(--paper);
}
.display--ink { color: var(--ink); }

.lead {
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  line-height: 1.5;
  max-width: 34ch;
}

/* ==========================================================================
   Botones
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  font-weight: 700;
  font-variation-settings: "wdth" 112;
  font-family: inherit;
  font-size: 1rem;
  letter-spacing: 0;
  white-space: nowrap;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  transition: transform 120ms var(--ease-out), background-color 160ms ease, color 160ms ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn--lime { background: var(--lime); color: var(--ink); }
.btn--lime:hover { background: var(--paper); }
.btn--ghost {
  color: var(--paper);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .55);
}
.btn--ghost:hover { background: rgba(255, 255, 255, .14); }
.btn--big { min-height: 64px; padding: 0 34px; font-size: 1.125rem; }

/* ==========================================================================
   Navegación de vidrio
   ========================================================================== */
.nav {
  position: fixed;
  z-index: 50;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1180px, calc(100% - 2 * 16px));
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 8px 8px 22px;
  border-radius: 999px;
  background: rgba(4, 85, 255, .62);
  backdrop-filter: blur(18px) saturate(170%);
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 10px 30px rgba(3, 30, 110, .18);
}
.nav__brand { width: 150px; flex: none; }
.nav__links {
  display: flex;
  gap: 4px;
  margin: 0 auto;
}
.nav__links a {
  color: var(--paper);
  font-weight: 600;
  font-size: .9375rem;
  padding: 10px 16px;
  border-radius: 999px;
  transition: background-color 150ms ease;
}
.nav__links a:hover { background: rgba(255, 255, 255, .14); }
.nav__links a:active { background: rgba(255, 255, 255, .24); }
.nav__cta { min-height: 44px; padding: 0 20px; font-size: .9375rem; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: sticky;
  top: 0;
  z-index: 0;
  height: 100svh;
  min-height: 640px;
  overflow: hidden;
  color: var(--paper);
  background:
    linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px) 0 0 / 72px 72px,
    linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px) 0 0 / 72px 72px,
    var(--blue);
}
.hero__stage {
  position: absolute;
  inset: 0;
  transform-origin: 50% 30%;
  will-change: transform, opacity;
}
.hero__title {
  position: absolute;
  left: 0;
  right: 0;
  top: 48%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  /* Crece con el ancho, pero nunca más de lo que cabe entre el menú y el texto inferior */
  font-size: clamp(4rem, min(15vw, calc((100svh - 290px) / 2.6)), 16rem);
  font-variation-settings: "wdth" 125;
  font-weight: 900;
  line-height: .84;
  letter-spacing: -0.035em;
  text-align: center;
  white-space: nowrap;
}
.hero__line {
  display: block;
  position: relative;
  will-change: transform;
}
.hash {
  position: absolute;
  left: -0.62em;
  top: -0.06em;
  width: .62em;
  height: .7em;
  overflow: visible;
}
.hash path {
  fill: none;
  stroke: var(--lime);
  stroke-width: 15;
  stroke-linecap: round;
}

/* Tarjetas de vidrio */
.glass {
  position: absolute;
  z-index: 3;
  display: grid;
  justify-items: center;
  gap: 2px;
  width: clamp(150px, 15vw, 210px);
  padding: 22px 18px 20px;
  border-radius: var(--radius-card);
  background: rgba(3, 57, 196, .42);
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 0 0 1px rgba(255, 255, 255, .22), 0 24px 50px rgba(3, 30, 110, .28);
  text-align: center;
  will-change: transform;
  transition: background-color 160ms ease;
}
.glass:hover { background: rgba(3, 57, 196, .58); }
.glass--a { left: 14%; top: 54%; }
.glass--b { right: 17%; top: 20%; }
.glass__avatar {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 10px;
  border-radius: 50%;
  font-weight: 900;
  font-variation-settings: "wdth" 125;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.glass__name {
  font-weight: 800;
  font-size: 1.0625rem;
  line-height: 1.2;
  letter-spacing: .005em;
}
.glass__meta { font-size: .875rem; opacity: .8; }

/* Trazos a mano */
.squiggle { position: absolute; overflow: visible; }
.squiggle path,
.step__arrow path {
  fill: none;
  stroke: var(--lime);
  stroke-width: 9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.squiggle--hero-a { width: clamp(90px, 11vw, 170px); right: 30%; top: 12%; transform: rotate(-8deg); }
.squiggle--hero-b { width: clamp(90px, 10vw, 160px); left: 7%; top: 70%; transform: rotate(6deg); }

/* Sello giratorio */
.badge {
  position: absolute;
  z-index: 4;
  right: 7%;
  top: 58%;
  width: clamp(120px, 12vw, 176px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--lime);
  display: grid;
  place-items: center;
  transition: transform 160ms var(--ease-out);
}
.badge:active { transform: scale(.96); }
.badge__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  will-change: transform;
}
.badge__ring text {
  fill: var(--ink);
  font-size: 15.5px;
  font-weight: 800;
  font-variation-settings: "wdth" 112;
  letter-spacing: .04em;
}
.badge__core {
  width: 44%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--paper);
  display: grid;
  place-items: center;
}
.badge__core .isotipo { width: 62%; }

.hero__foot {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: clamp(20px, 4vh, 40px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}
.hero__foot p { max-width: 38ch; opacity: .88; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ==========================================================================
   Hoja blanca
   ========================================================================== */
.sheet {
  position: relative;
  z-index: 2;
  background: var(--paper);
  border-radius: var(--radius-sheet) var(--radius-sheet) 0 0;
  box-shadow: 0 -30px 60px rgba(3, 30, 110, .25);
}

/* Proceso */
.process {
  padding: clamp(72px, 10vw, 140px) var(--gutter) clamp(64px, 8vw, 120px);
  max-width: 1440px;
  margin: 0 auto;
}
.process__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: clamp(40px, 6vw, 80px);
}
.steps {
  display: grid;
  grid-template-columns: 1fr 64px 1fr 64px 1fr 64px 1fr;
  align-items: center;
}
.step {
  position: relative;
  background: var(--mist);
  border-radius: var(--radius-card);
  padding: 28px 24px 30px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
}
.step--lime { background: var(--lime); }
.step__num {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--blue);
  color: var(--paper);
  font-weight: 900;
  font-variation-settings: "wdth" 125;
  margin-bottom: auto;
}
.step--lime .step__num { background: var(--ink); }
.step h3 {
  margin-top: 40px;
  font-size: clamp(1.5rem, 2vw, 2rem);
  font-variation-settings: "wdth" 125;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.step p { margin-top: 10px; font-size: 1rem; line-height: 1.45; }
.step__arrow svg { width: 100%; overflow: visible; }
.step__arrow path { stroke: var(--blue); stroke-width: 6; }

/* Servicios: carril horizontal fijado */
.services {
  position: relative;
  height: 320vh;
  margin: 0 clamp(8px, 1.2vw, 16px);
  background: var(--blue);
  border-radius: var(--radius-sheet);
  color: var(--paper);
}
.services__pin {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(24px, 4vh, 48px);
  padding: 96px 0 32px var(--gutter);
  border-radius: var(--radius-sheet);
}
.services__intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding-right: var(--gutter);
}
.services__intro .display { font-size: clamp(2.5rem, min(6vw, 11vh), 6.5rem); }

/* Pantallas bajas de escritorio: menos aire para que las tarjetas quepan completas */
@media (min-width: 821px) and (max-height: 720px) {
  .services__pin { padding-top: 84px; padding-bottom: 16px; gap: 16px; }
  .service { padding-bottom: 20px; }
  .service h3 { margin-top: 16px; }
  .service__visual { min-height: 96px; }
  .tags { padding-top: 14px; }
}
@media (min-width: 821px) and (max-height: 600px) {
  .services__pin { padding-top: 76px; }
  .services__intro .display { font-size: 2.25rem; }
  .service__visual { min-height: 64px; }
}
.services__progress {
  height: 4px;
  width: min(280px, 30vw);
  margin-bottom: .6em;
  border-radius: 4px;
  background: rgba(255, 255, 255, .2);
  overflow: hidden;
}
.services__progress span {
  display: block;
  height: 100%;
  background: var(--lime);
  transform-origin: 0 50%;
  transform: scaleX(0);
}
.services__track {
  display: flex;
  gap: 20px;
  /* Alto mínimo según la pantalla, pero la tarjeta crece si su contenido lo necesita */
  flex: none;
  min-height: min(58vh, 540px);
  will-change: transform;
}
.service {
  flex: none;
  width: min(480px, 72vw);
  display: flex;
  flex-direction: column;
  padding: 18px 18px 28px;
  border-radius: 36px;
  background: rgba(255, 255, 255, .1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), inset 0 0 0 1px rgba(255, 255, 255, .14);
}
.service h3 {
  margin: 26px 10px 0;
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  font-variation-settings: "wdth" 125;
  font-weight: 900;
  line-height: .95;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}
.service p { margin: 12px 10px 0; max-width: 36ch; opacity: .9; }
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: auto 10px 0;
  padding-top: 20px;
}
.tags li {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: .875rem;
  font-weight: 600;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .4);
}

/* Visuales de cada servicio (dibujados con CSS) */
.service__visual {
  position: relative;
  flex: 1 1 0;
  min-height: 140px;
  border-radius: 24px;
  overflow: hidden;
}
.service__visual--web {
  background: var(--paper);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mock-bar { display: flex; gap: 6px; }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--mist); }
.mock-h { margin-top: 8px; width: 78%; height: 30px; flex: none; border-radius: 10px; background: var(--blue); }
.mock-p { width: 64%; height: 9px; border-radius: 9px; background: var(--mist); }
.mock-p--short { width: 42%; }
.mock-btn { margin-top: auto; width: 34%; height: 38px; flex: none; border-radius: 999px; background: var(--lime); }

.service__visual--brand {
  background: var(--blue-deep);
  display: grid;
  place-items: center;
}
.service__visual--brand .isotipo { width: 28%; }
.swatch { position: absolute; width: 36px; height: 36px; border-radius: 50%; top: 18px; }
.swatch--1 { left: 18px; background: var(--lime); }
.swatch--2 { left: 46px; background: var(--paper); }
.swatch--3 { left: 74px; background: var(--ink); box-shadow: 0 0 0 2px var(--blue-deep); }

.service__visual--app {
  background: var(--lime);
  display: grid;
  place-items: end center;
}
.phone {
  width: 46%;
  height: 86%;
  border-radius: 28px 28px 0 0;
  background: var(--ink);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.phone__row { height: 26px; border-radius: 10px; background: rgba(255, 255, 255, .14); }
.phone__row--lime { background: var(--blue); }
.phone__chart { flex: 1; display: flex; align-items: flex-end; gap: 8px; padding: 0 4px; }
.phone__chart i { flex: 1; border-radius: 6px 6px 2px 2px; background: var(--lime); }
.phone__chart i:nth-child(1) { height: 30%; }
.phone__chart i:nth-child(2) { height: 52%; }
.phone__chart i:nth-child(3) { height: 40%; }
.phone__chart i:nth-child(4) { height: 72%; }
.phone__chart i:nth-child(5) { height: 92%; background: var(--paper); }

/* Franja lima */
.marquee {
  margin: clamp(64px, 9vw, 120px) -2vw 0;
  padding: 18px 0;
  background: var(--lime);
  transform: rotate(-2deg);
  overflow: hidden;
}
.marquee__row {
  display: flex;
  width: max-content;
  will-change: transform;
}
.marquee__row span {
  flex: none;
  font-size: clamp(2.25rem, 6vw, 5.5rem);
  font-variation-settings: "wdth" 125;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
}

/* Proyectos */
.projects {
  padding: clamp(72px, 10vw, 140px) var(--gutter) clamp(72px, 10vw, 140px);
  max-width: 1440px;
  margin: 0 auto;
}
.projects__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: clamp(32px, 5vw, 64px);
}
.projects__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.project {
  position: relative;
  border-radius: 36px;
  padding: 12px 12px 22px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 18px 16px;
  overflow: hidden;
  transition: transform 160ms var(--ease-out);
}
.project:active { transform: scale(.985); }
.project__img {
  grid-column: 1 / -1;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: 26px;
  overflow: hidden;
  background: var(--mist);
}
.project__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease-out);
}
.project__img--top img { object-position: 50% 0; }
/* Con un número impar de proyectos, el primero va destacado a todo el ancho */
.project:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
.project:first-child:nth-last-child(odd) .project__img { aspect-ratio: 21 / 9; }
.project:hover .project__img img { transform: scale(1.04); }
.project__name {
  padding-left: 12px;
  font-size: clamp(1.375rem, 2.4vw, 2.25rem);
  font-variation-settings: "wdth" 125;
  font-weight: 900;
  line-height: .95;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}
.project__tags { display: flex; flex-wrap: wrap; gap: 8px; padding-right: 10px; }
.project__tags span {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: .875rem;
  font-weight: 600;
  box-shadow: inset 0 0 0 1.5px currentColor;
}
.project--blue { background: var(--blue); color: var(--paper); }
.project--lime { background: var(--lime); color: var(--ink); }
.project--ink { background: var(--ink); color: var(--paper); }
.project--ink .project__name { color: var(--lime); }
.project--mist { background: var(--mist); color: var(--blue); }

/* ==========================================================================
   Contacto + pie
   ========================================================================== */
.contact {
  position: relative;
  z-index: 2;
  background: var(--blue);
  color: var(--paper);
  padding: clamp(96px, 14vw, 200px) var(--gutter) clamp(80px, 10vw, 140px);
  text-align: center;
  overflow: hidden;
}
.contact__title {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: clamp(2rem, 7.4vw, 8.5rem);
  font-variation-settings: "wdth" 125;
  font-weight: 900;
  line-height: .86;
  letter-spacing: -0.035em;
  white-space: nowrap;
}
.contact__title span { display: block; will-change: transform; }
.squiggle--contact {
  width: clamp(80px, 9vw, 140px);
  right: 12%;
  top: clamp(40px, 7vw, 110px);
  transform: rotate(12deg);
}
.contact__text {
  max-width: 46ch;
  margin: clamp(32px, 4vw, 48px) auto 32px;
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  opacity: .9;
}
.contact .hero__actions { justify-content: center; }

.footer {
  position: relative;
  z-index: 2;
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding: 40px var(--gutter);
}
.footer__mark { width: 190px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 4px 24px; font-weight: 600; }
.footer__links a:hover { color: var(--lime); }
.footer__legal { font-size: .875rem; opacity: .7; }

/* ==========================================================================
   Páginas de proyecto
   ========================================================================== */
.hero--case .hero__title {
  font-size: min(var(--title-size), calc((100svh - 320px) / 2.2));
  /* 0.84em = media altura de dos líneas: el titular empieza siempre debajo del botón "Volver" */
  top: max(38%, calc(150px + 0.84em));
}

.case-back {
  position: absolute;
  z-index: 5;
  top: 96px;
  left: var(--gutter);
  padding: 9px 18px;
  border-radius: 999px;
  color: var(--paper);
  font-weight: 600;
  font-size: .9375rem;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .45);
  transition: background-color 150ms ease;
}
.case-back:hover { background: rgba(255, 255, 255, .14); }
.case-back:active { background: rgba(255, 255, 255, .24); }

/* Imagen principal flotando sobre el titular, como una tarjeta de vidrio */
.shot {
  --w: min(680px, 50vw, 66vh);
  position: absolute;
  z-index: 3;
  top: 46%;
  left: 50%;
  width: var(--w);
  margin: 0 0 0 calc(var(--w) / -2);
  will-change: transform;
}
.shot--square { --w: min(340px, 28vw, 36vh); top: 42%; }
.shot__inner {
  padding: 10px;
  border-radius: 30px;
  transform: rotate(-4deg);
  background: rgba(255, 255, 255, .18);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55), inset 0 0 0 1px rgba(255, 255, 255, .22), 0 40px 80px rgba(3, 30, 110, .35);
}
.shot__bar { display: flex; gap: 6px; padding: 4px 8px 10px; }
.shot__bar i { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, .7); }
.shot__inner img { display: block; width: 100%; border-radius: 22px; }
.shot__inner img.is-contain { background: var(--paper); padding: 10%; aspect-ratio: 1; object-fit: contain; }

.glass--client { left: 7%; top: 22%; }
.glass__avatar--logo { width: 84px; height: 84px; background: var(--paper); overflow: hidden; }
.glass__avatar--logo img { width: 86%; height: 86%; object-fit: contain; }

.badge--case { right: 7%; top: 56%; }
.squiggle--case-a { width: clamp(90px, 10vw, 150px); right: 21%; top: 15%; transform: rotate(-6deg); }

/* El proyecto + ficha */
.case-intro {
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(72px, 10vw, 140px) var(--gutter) clamp(48px, 6vw, 96px);
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(32px, 6vw, 96px);
  align-items: end;
}
.case-intro .display { margin-bottom: 28px; }
.case-intro .lead { max-width: 46ch; }
.case-intro .lead + .lead { margin-top: 16px; }
.facts { margin: 0; }
.facts div {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 16px;
  padding: 16px 0;
  border-top: 1.5px solid var(--mist);
}
.facts div:last-child { border-bottom: 1.5px solid var(--mist); }
.facts dt { color: rgba(4, 18, 63, .62); font-size: .9375rem; }
.facts dd { margin: 0; font-weight: 700; }
.facts dd a { color: var(--blue); text-decoration: underline; text-underline-offset: 3px; }

/* Imagen grande que crece al entrar */
.showcase { max-width: 1440px; margin: 0 auto; padding: 0 var(--gutter); }
.showcase__frame {
  border-radius: 36px;
  overflow: hidden;
  background: var(--mist);
  transform-origin: 50% 0;
  will-change: transform;
}
.showcase__frame img { display: block; width: 100%; transform: scale(var(--zoom-img, 1)); }
.showcase--tall .showcase__frame { max-width: 760px; margin: 0 auto; }
.showcase--square .showcase__frame { max-width: 640px; margin: 0 auto; }
.showcase figcaption {
  max-width: 60ch;
  margin: 18px auto 0;
  text-align: center;
  font-size: .9375rem;
  color: rgba(4, 18, 63, .7);
}

/* Lo que hicimos / Lo que incluye */
.deliverables {
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(72px, 10vw, 140px) var(--gutter) clamp(64px, 8vw, 120px);
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.deliverables .display { position: sticky; top: 120px; }
.deliverables__list { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.deliverables__list li {
  position: relative;
  padding: 20px 22px 22px 52px;
  border-radius: 24px;
  background: var(--mist);
  font-weight: 600;
  line-height: 1.4;
}
.deliverables__list li::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 25px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 3px var(--blue);
}

/* Galería: mismo carril horizontal que Servicios */
.gallery { height: 340vh; }
.gallery__track { height: min(60vh, 560px); min-height: 0; }
.gallery__item {
  flex: none;
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.gallery__item img {
  display: block;
  height: calc(100% - 34px);
  width: auto;
  border-radius: 24px;
  background: var(--paper);
}
.gallery__item--contain img { aspect-ratio: 1; object-fit: contain; padding: 7%; }
.gallery__item--dark img { background: var(--ink); }
.gallery__item figcaption { font-size: .9375rem; font-weight: 600; opacity: .85; }

/* Resultado: se ilumina palabra por palabra */
.result {
  position: relative;
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(72px, 10vw, 140px) var(--gutter) 0;
}
.result__tag {
  display: inline-block;
  margin-bottom: 24px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--lime);
  font-weight: 700;
  font-size: .9375rem;
}
.result__text {
  max-width: 20ch;
  font-size: clamp(2rem, 5vw, 4.75rem);
  font-variation-settings: "wdth" 112;
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.result__text .w { opacity: .16; transition: opacity 250ms ease; }
.result__text .w.on { opacity: 1; }
.result__squiggle { position: absolute; right: 8%; bottom: -10px; width: clamp(90px, 10vw, 150px); overflow: visible; }
.result__squiggle path { fill: none; stroke: var(--blue); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }

/* Siguiente proyecto */
.next { max-width: 1440px; margin: 0 auto; padding: clamp(72px, 10vw, 140px) var(--gutter); }
.next__card {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  grid-template-rows: auto 1fr auto;
  gap: 10px 32px;
  padding: clamp(20px, 3vw, 36px);
  border-radius: 40px;
  background: var(--blue);
  color: var(--paper);
  overflow: hidden;
  transition: transform 160ms var(--ease-out);
}
.next__card:active { transform: scale(.985); }
.next__label { font-weight: 600; opacity: .8; padding: 8px 0 0 8px; }
.next__name {
  align-self: center;
  padding-left: 8px;
  font-size: clamp(2.25rem, 5.5vw, 5.5rem);
  font-variation-settings: "wdth" 125;
  font-weight: 900;
  line-height: .9;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
.next__meta {
  justify-self: start;
  margin: 0 0 8px 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: .875rem;
  font-weight: 600;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .5);
}
.next__img {
  grid-column: 2;
  grid-row: 1 / span 3;
  aspect-ratio: 16 / 10;
  border-radius: 28px;
  overflow: hidden;
  background: var(--blue-deep);
}
.next__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease-out); }
.next__card:hover .next__img img { transform: scale(1.04); }

@media (max-width: 820px) {
  .hero--case .hero__title { top: 30%; }
  .case-back { top: 82px; }
  .shot { --w: min(90vw, 70vh); top: 40%; }
  .shot--square { --w: min(60vw, 40vh); top: 38%; }
  .hero--case .hero__foot p { display: none; }
  .hero--case .hero__actions { flex-wrap: wrap; }
  .hero--case .hero__actions .btn { flex: 1 1 auto; padding: 0 16px; }
  .glass--client,
  .squiggle--case-a { display: none; }
  .hero .badge--case { top: 78px; right: 4%; width: 84px; }

  .case-intro,
  .deliverables { grid-template-columns: 1fr; }
  .deliverables .display { position: static; }
  .deliverables__list { grid-template-columns: 1fr; }

  /* En móvil la galería se desliza con el dedo */
  .gallery { height: auto; }
  .gallery .gallery__track {
    flex-direction: row;
    height: 56vh;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 8px;
  }
  .gallery__item { scroll-snap-align: start; }

  .next__card { grid-template-columns: 1fr; grid-template-rows: none; }
  .next__img { grid-column: 1; grid-row: 1; }
}

/* ==========================================================================
   Cotizar: formulario
   ========================================================================== */
:root { --error: #D92D20; }

/* Vista previa del formulario en el hero */
.shot--form { --w: min(420px, 32vw, 52vh); top: 44%; }
.form-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
  aspect-ratio: 4 / 3.3;
  padding: 22px;
  border-radius: 22px;
  background: var(--paper);
}
.form-preview__chips { display: flex; gap: 8px; }
.form-preview__chips i { flex: 1; height: 26px; border-radius: 999px; background: var(--mist); }
.form-preview__chips i.is-on { background: var(--blue); }
.form-preview__field { height: 34px; border-radius: 10px; background: var(--mist); }
.form-preview__field--tall { height: 60px; }
.form-preview__btn { margin-top: auto; width: 46%; height: 38px; border-radius: 999px; background: var(--lime); }

.quote {
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(72px, 10vw, 140px) var(--gutter) clamp(48px, 6vw, 96px);
}
.quote__head {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.quote__squiggle {
  position: absolute;
  /* justo después de "TU IDEA" (≈4.6 veces el tamaño del titular) */
  left: calc(min(7.5vw, 7.5rem) * 4.7);
  top: 46%;
  width: clamp(70px, 7vw, 120px);
  overflow: visible;
}
.quote__squiggle path,
.result__squiggle path { fill: none; stroke: var(--blue); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }

.quote__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 400px);
  gap: clamp(20px, 3vw, 48px);
  align-items: start;
}
.quote__form { display: grid; gap: 16px; }

.qstep {
  min-width: 0;
  margin: 0;
  padding: clamp(22px, 3vw, 36px);
  border: 0;
  border-radius: 32px;
  background: var(--mist);
}
.qstep__title {
  float: left;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0;
  margin-bottom: 8px;
  font-size: clamp(1.375rem, 2.2vw, 1.875rem);
  font-variation-settings: "wdth" 125;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.qstep__title + * { clear: both; }
.qstep__title .step__num { flex: none; margin: 0; }
.qstep__hint { margin: 4px 0 18px; font-size: .9375rem; color: rgba(4, 18, 63, .65); }
.qstep__label { margin: 20px 0 10px; font-weight: 700; }
.qstep__hint + .qstep__label { margin-top: 0; }

/* Tarjetas de selección */
.choices--services { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 18px; }
.qstep__hint + .choices--services { margin-top: 0; }
.choice { position: relative; display: block; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.choice input,
.pill input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.choice__card {
  display: flex;
  flex-direction: column;
  min-height: 124px;
  padding: 18px 18px 20px;
  border-radius: 24px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1.5px rgba(4, 18, 63, .08);
  transition: background-color 180ms ease, color 180ms ease, transform 120ms var(--ease-out), box-shadow 180ms ease;
}
.choice:active .choice__card { transform: scale(.97); }
.choice__check {
  position: relative;
  width: 26px;
  height: 26px;
  margin-bottom: auto;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(4, 18, 63, .2);
  transition: background-color 180ms ease, box-shadow 180ms ease;
}
.choice__check::after {
  content: "";
  position: absolute;
  left: 9px;
  top: 5px;
  width: 6px;
  height: 11px;
  border: solid var(--ink);
  border-width: 0 2.5px 2.5px 0;
  transform: rotate(45deg) scale(.4);
  opacity: 0;
  transition: transform 220ms var(--ease-out), opacity 120ms ease;
}
.choice__title {
  margin-top: 18px;
  font-size: 1.125rem;
  font-variation-settings: "wdth" 125;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.choice__text { margin-top: 6px; font-size: .9375rem; opacity: .72; }
.choice input:checked + .choice__card { background: var(--blue); color: var(--paper); box-shadow: none; }
.choice input:checked + .choice__card .choice__check { background: var(--lime); box-shadow: none; }
.choice input:checked + .choice__card .choice__check::after { opacity: 1; transform: rotate(45deg) scale(1); }
.choice input:focus-visible + .choice__card { outline: 3px solid var(--blue); outline-offset: 3px; }
.choices.is-invalid .choice__card { box-shadow: inset 0 0 0 2px var(--error); }

.choices--pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { position: relative; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pill span {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: inset 0 0 0 1.5px rgba(4, 18, 63, .1);
  font-weight: 600;
  transition: background-color 160ms ease, color 160ms ease, transform 120ms var(--ease-out);
}
.pill:active span { transform: scale(.96); }
.pill input:checked + span { background: var(--ink); color: var(--paper); box-shadow: none; }
.pill input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 3px; }

/* Campos de texto */
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.field { min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.field label { display: block; margin-bottom: 8px; font-weight: 700; font-size: .9375rem; }
.field input,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 0;
  border-radius: 16px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  box-shadow: inset 0 0 0 1.5px rgba(4, 18, 63, .1);
  transition: box-shadow 150ms ease;
}
.field textarea { min-height: 116px; resize: vertical; line-height: 1.5; }
.field input::placeholder,
.field textarea::placeholder { color: rgba(4, 18, 63, .4); }
.field input:focus,
.field textarea:focus { outline: none; box-shadow: inset 0 0 0 2px var(--blue), 0 0 0 4px rgba(4, 85, 255, .16); }
.field [aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--error); }
.field__error { margin-top: 8px; color: var(--error); font-size: .875rem; font-weight: 600; }
.qstep > .field__error { margin-top: 14px; }

/* Resumen en vivo */
.summary { position: sticky; top: 104px; }
.summary__card {
  padding: 28px;
  border-radius: 32px;
  background: var(--blue);
  color: var(--paper);
  box-shadow: 0 30px 60px rgba(3, 30, 110, .22);
}
.summary__title {
  font-size: 1.75rem;
  font-variation-settings: "wdth" 125;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}
.summary__progress { height: 6px; margin: 18px 0 8px; border-radius: 6px; background: rgba(255, 255, 255, .2); overflow: hidden; }
.summary__progress span {
  display: block;
  height: 100%;
  background: var(--lime);
  transform-origin: 0 50%;
  transform: scaleX(0);
  transition: transform 450ms var(--ease-out);
}
.summary__status { font-size: .875rem; opacity: .85; }
.summary__list { margin: 20px 0 22px; }
.summary__list div {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px solid rgba(255, 255, 255, .18);
}
.summary__list dt { font-size: .875rem; opacity: .72; }
.summary__list dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.summary__list dd.is-empty { font-weight: 500; opacity: .55; }
.summary__list dd.is-updated { animation: sum-in 520ms var(--ease-out); }
@keyframes sum-in {
  from { color: var(--lime); transform: translateY(6px); opacity: .3; }
  to { transform: none; opacity: 1; }
}
.summary__submit { width: 100%; }
.summary__note { margin-top: 14px; font-size: .875rem; opacity: .82; }

/* Confirmación */
.sent {
  position: relative;
  padding: clamp(32px, 5vw, 72px);
  border-radius: 40px;
  background: var(--blue);
  color: var(--paper);
  overflow: hidden;
  opacity: 0;
  transform: translateY(24px) scale(.98);
  transition: opacity 450ms var(--ease-out), transform 600ms var(--ease-out);
}
.sent.is-shown { opacity: 1; transform: none; }
.sent:focus { outline: none; }
.sent__squiggle { position: absolute; right: 6%; top: 28px; width: clamp(80px, 9vw, 130px); overflow: visible; }
.sent__squiggle path { fill: none; stroke: var(--lime); stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.sent__text { max-width: 46ch; margin: 18px 0 0; font-size: clamp(1.0625rem, 1.4vw, 1.25rem); }
.hp { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.sent__label { margin-top: 24px; font-weight: 700; font-size: .9375rem; opacity: .85; }
.sent__preview {
  max-width: 64ch;
  max-height: 320px;
  margin: 10px 0 28px;
  padding: 20px;
  overflow: auto;
  border-radius: 20px;
  background: rgba(255, 255, 255, .1);
  font-family: inherit;
  font-size: .9375rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

@media (max-width: 1080px) {
  .quote__layout { grid-template-columns: 1fr; }
  .summary { position: static; }
}
@media (max-width: 820px) {
  /* "TU PROYECTO" pasa a dos líneas para que el titular pueda ser grande */
  .hero--quote .hero__title { font-size: 12vw; top: 27%; white-space: normal; }
  .hero--quote .hero__actions { flex-wrap: wrap; }
  .hero--quote .hero__actions .btn { flex: 1 1 100%; }
  .shot--form { --w: min(58vw, 30vh); top: 44%; }
  .form-preview { gap: 8px; padding: 14px; }
  .form-preview__chips i { height: 20px; }
  .form-preview__field { height: 22px; border-radius: 8px; }
  .form-preview__field--tall { height: 38px; }
  .form-preview__btn { height: 26px; }
  .quote__head { flex-direction: column; align-items: flex-start; }
  .quote__squiggle { left: auto; right: 0; }
  .fields { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  /* Títulos de sección: que la palabra más larga ("PROYECTOS", "REALIDAD") quepa a 360 px */
  .display { font-size: 10.5vw; }
  .choices--services { grid-template-columns: 1fr; }
  .choice__card { min-height: 0; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 4px 14px; }
  .choice__check { margin: 0; flex: none; }
  .choice__title { margin: 0; }
  .choice__text { flex-basis: 100%; margin: 0 0 0 40px; }
}

/* ==========================================================================
   Estados de animación
   ========================================================================== */
.draw path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.draw--load path { transition: stroke-dashoffset 900ms var(--ease-out); }
.is-loaded .draw--load path { stroke-dashoffset: 0; }
.is-loaded .hash path:nth-child(2) { transition-delay: 120ms; }
.is-loaded .hash path:nth-child(3) { transition-delay: 240ms; }
.is-loaded .hash path:nth-child(4) { transition-delay: 360ms; }
.is-loaded .squiggle--hero-a path { transition-delay: 500ms; }
.is-loaded .squiggle--hero-b path { transition-delay: 650ms; }
.is-loaded .draw--load path:last-child { transition-delay: 900ms; }

[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 600ms var(--ease-out), transform 700ms var(--ease-out);
  transition-delay: calc(var(--i, 0) * 80ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* Entrada del titular */
.hero__line {
  opacity: 0;
  translate: 0 40px;
  transition: opacity 700ms var(--ease-out), translate 900ms var(--ease-out);
}
.hero__line:nth-child(3) { transition-delay: 80ms; }
.hero__line:nth-child(4) { transition-delay: 160ms; }
.is-loaded .hero__line { opacity: 1; translate: 0 0; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .steps { grid-template-columns: 1fr 48px 1fr; row-gap: 16px; }
  .step__arrow:nth-child(4) { display: none; }
  .step__arrow:nth-child(4) + .step { grid-column: 1; }
}

@media (max-width: 820px) {
  .nav__links { display: none; }
  .nav { justify-content: space-between; }
  .nav__brand { width: 128px; }

  .hero__title { font-size: 17vw; top: 46%; }
  .glass { width: 128px; padding: 14px 10px; }
  .glass__avatar { width: 44px; height: 44px; font-size: 1rem; margin-bottom: 6px; }
  .glass__avatar--logo { width: 60px; height: 60px; }
  .glass__name { font-size: .875rem; }
  .glass__meta { font-size: .75rem; }
  .glass--a { left: 5%; top: 14%; }
  .glass--b { right: 5%; top: 10%; }
  .badge { right: 4%; top: 52%; width: 96px; }
  .squiggle--hero-a { right: 42%; top: 24%; width: 70px; }
  .squiggle--hero-b { display: none; }
  .hero__foot { flex-direction: column; align-items: stretch; }
  .hero__foot .btn { flex: 1; }

  .process__head,
  .projects__head { flex-direction: column; align-items: flex-start; }
  .steps { grid-template-columns: 1fr; }
  .step { min-height: 0; }
  .step h3 { margin-top: 24px; }
  .step__arrow,
  .step__arrow:nth-child(4) { display: block; width: 72px; margin: 4px auto; transform: rotate(90deg); }
  .step__arrow:nth-child(4) + .step { grid-column: auto; }

  /* En móvil los servicios se apilan sin carril horizontal */
  .services { height: auto; }
  .services__pin { position: static; height: auto; flex-direction: column; align-items: stretch; padding: 64px 16px 16px; }
  .services__intro { padding-right: 0; }
  .services__progress { display: none; }
  .services__track { flex-direction: column; height: auto; transform: none !important; }
  .service { width: auto; }
  .service__visual { min-height: 220px; }

  .squiggle--contact { top: 28px; right: 8%; width: 56px; }

  .projects__grid { grid-template-columns: 1fr; }
  .project { grid-template-columns: 1fr; }
  .project__tags { padding: 0 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .draw path { stroke-dashoffset: 0 !important; transition: none !important; }
  [data-reveal],
  .hero__line { opacity: 1; transform: none; translate: none; transition: opacity 200ms ease; }
  .project__name { transition: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .nav { background: var(--blue); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .glass { background: var(--blue-deep); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
