/* =========================================================
   Tipografía: PP Neue Montreal (gratis para uso personal en
   pangrampangram.com). Coloca los .woff2 en /fonts.
   Si no están, se usa Inter Tight como alternativa.
   ========================================================= */
@font-face { font-family: "Neue Montreal"; src: url("fonts/PPNeueMontreal-Book.woff2") format("woff2"); font-weight: 450; font-display: swap; }
@font-face { font-family: "Neue Montreal"; src: url("fonts/PPNeueMontreal-Thin.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Neue Montreal"; src: url("fonts/PPNeueMontreal-Bold.woff2") format("woff2"); font-weight: 800; font-display: swap; }

:root {
  --dark: #1c1d20;
  --dark-2: #141517;
  --blue: #455ce9;
  --blue-dark: #334bd3;
  --gray: #999d9e;
  --white: #ffffff;
  --muted: rgba(28, 29, 32, 0.5);
  --border: rgba(28, 29, 32, 0.175);
  --border-light: rgba(255, 255, 255, 0.2);
  --gap: clamp(1.25em, 4vw, 2.5em);
  --container: calc(100vw - (var(--gap) * 2));
  --ease: cubic-bezier(0.7, 0, 0.3, 1);
  --ease-out: cubic-bezier(0.25, 1, 0.5, 1);
  --font: "Neue Montreal", "Inter Tight", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--font);
  font-weight: 450;
  font-size: 16px;
  line-height: 1.6;
  color: var(--dark);
  background: var(--white);
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4 { font-weight: 450; line-height: 1.065; }
::selection { background: var(--blue); color: var(--white); }

.container {
  width: 100%;
  max-width: 100em;
  margin: 0 auto;
  padding: 0 calc(var(--gap) * 2.5);
}

/* ========================= LOADER ========================= */
.loader {
  position: fixed; inset: 0;
  z-index: 1000;
  background: var(--dark-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--white);
}
.loader__word {
  display: flex; align-items: center; gap: 0.5em;
  font-size: clamp(2em, 4vw, 2.6em);
  opacity: 0;
}
.dot { width: 0.25em; height: 0.25em; border-radius: 50%; background: currentColor; display: inline-block; }
.loader__curve {
  position: absolute; top: 100%; left: 0;
  width: 100%; height: 20vh;
  fill: var(--dark-2);
}

/* ========================= NAV ========================= */
.nav {
  position: absolute; top: 0; left: 0; right: 0;
  z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  padding: calc(var(--gap) * 0.9) var(--gap);
  color: var(--white);
}
.logo { display: flex; align-items: center; gap: 0.35em; overflow: hidden; white-space: nowrap; }
.logo__c { display: inline-block; transition: transform 0.6s var(--ease); }
.logo__roll {
  position: relative; display: flex; overflow: hidden;
  width: var(--w-a, auto);
  transition: width 0.6s var(--ease);
}
.logo__roll span { display: inline-block; flex: 0 0 auto; transition: transform 0.6s var(--ease); }
.logo__code, .logo__name { padding-right: 0.3em; }
.logo:hover .logo__c { transform: rotate(360deg); }
.logo:hover .logo__roll { width: var(--w-b, auto); }
.logo:hover .logo__roll span { transform: translateX(calc(-1 * var(--shift, 0px))); }

.nav__links { display: flex; gap: 0.4em; }
.nav__link { position: relative; padding: 0.9em 1em; display: block; }
.nav__link::after {
  content: ""; position: absolute; left: 50%; bottom: 0.3em;
  width: 5px; height: 5px; border-radius: 50%; background: currentColor;
  transform: translateX(-50%) scale(0);
  transition: transform 0.35s var(--ease-out);
}
.nav__link:hover::after { transform: translateX(-50%) scale(1); }
.nav__link span { display: block; pointer-events: none; }

/* ========================= HERO ========================= */
.hero {
  position: relative;
  height: 100vh; min-height: 40em;
  background: #55718c;
  overflow: hidden;
  color: var(--white);
}
.hero__bg {
  position: absolute; inset: 0; overflow: hidden;
  /* mismo cielo que el paisaje, por si las capas tardan en llegar */
  background: linear-gradient(#55718c 0%, #7189a3 35%, #a7a9bb 55%, #d2b2b6 62%, #8f9db1 72%, #5f6f86 100%);
}
/* Escenario con la proporción del paisaje (1920×1200), escalado tipo "cover" desde JS */
.hero__stage { position: absolute; left: 0; top: 0; width: 100%; height: 100%; }
/* Cada capa es un elemento propio: se pinta una vez y luego solo se mueve con transform (GPU) */
.lx { position: absolute; will-change: transform; backface-visibility: hidden; pointer-events: none; }
.lx > img { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }
.lx-sky {
  left: -5%; top: -40%; width: 110%; height: 180%;
  background: linear-gradient(#55718c 22%, #7189a3 41%, #a7a9bb 52%, #d2b2b6 56%, #8f9db1 62%, #5f6f86 78%);
}
.lx-glow {
  left: 8.1%; top: 36.7%; width: 93.75%; height: 43.3%;
  background: radial-gradient(closest-side, rgba(243, 210, 200, 0.55), rgba(243, 210, 200, 0));
}
.lx-ground {
  left: -5%; top: 55%; width: 110%; height: 60%;
  background: linear-gradient(rgba(13, 16, 20, 0), rgba(13, 16, 20, 0.95) 75%);
  will-change: auto;
}
.hero__grain { position: absolute; inset: 0; pointer-events: none; opacity: 0.9; background-size: 160px 160px; }
.hero__bg::after {
  /* oscurece un poco el centro para que el texto respire */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(ellipse 60% 45% at 50% 48%, rgba(20, 28, 40, 0.18), transparent 70%);
}

.hero__content {
  position: absolute; left: 50%; top: 50%;
  width: min(92vw, 62em);
  transform: translate(-50%, -54%); /* GSAP lo reemplaza por xPercent/yPercent */
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
}
.hero__badge {
  display: inline-flex; align-items: center; gap: 0.9em;
  padding: 0.55em 1.1em 0.55em 1em;
  border-radius: 999px;
  background: rgba(40, 52, 68, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.74em; letter-spacing: 0.06em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  transition: background 0.4s;
}
.hero__badge:hover { background: rgba(255, 255, 255, 0.18); }
.hero__badge-dot { position: relative; width: 7px; height: 7px; border-radius: 50%; background: var(--white); }
/* pulso con transform/opacity: no obliga a repintar */
.hero__badge-dot::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--white);
  animation: pulse 2.4s cubic-bezier(0.25, 1, 0.5, 1) infinite;
}
@keyframes pulse { 0% { transform: scale(1); opacity: 0.6; } 70%, 100% { transform: scale(3.2); opacity: 0; } }
.hero__badge svg { width: 0.55em; height: 0.8em; opacity: 0.7; transition: transform 0.4s var(--ease-out); }
.hero__badge:hover svg { transform: translateX(3px); }

.hero__title {
  margin: 0.75em 0 0.85em;
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  font-weight: 400;
  font-size: clamp(2.6em, 5.6vw, 5.8em);
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-shadow: 0 2px 30px rgba(20, 28, 40, 0.18);
}
.hero__line { display: block; overflow: hidden; padding-bottom: 0.06em; }
.hero__line > span { display: inline-block; will-change: transform; }
.hero__sub { font-size: clamp(1em, 1.3vw, 1.2em); color: rgba(255, 255, 255, 0.88); margin-bottom: 2.2em; }

.hero__cta {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.95em 1.9em;
  border-radius: 999px;
  background: var(--white); color: var(--dark);
  font-size: 1.05em;
}
.hero__cta:hover .btn-fill { top: -50%; border-radius: 0; }
.hero__cta:hover .btn-text { color: var(--white); }


/* ========================= BURGER / MENÚ ========================= */
.burger {
  position: fixed; top: var(--gap); right: var(--gap);
  z-index: 900;
  width: 5.4em; height: 5.4em;
  border-radius: 50%;
  border: 0;
  background: var(--dark);
  cursor: pointer;
  overflow: hidden;
  transform: scale(0);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.05);
}
.burger__lines, .burger__lines::before, .burger__lines::after { position: absolute; }
.burger__lines { inset: 0; z-index: 2; }
.burger__lines::before, .burger__lines::after {
  content: ""; left: 32%; width: 36%; height: 1px; background: var(--white);
  transition: transform 0.45s var(--ease), top 0.45s var(--ease);
}
.burger__lines::before { top: 46%; }
.burger__lines::after { top: 54%; }
.burger.is-open .burger__lines::before { top: 50%; transform: rotate(45deg); }
.burger.is-open .burger__lines::after { top: 50%; transform: rotate(-45deg); }

.menu-overlay {
  position: fixed; inset: 0; z-index: 800;
  background: rgba(0,0,0,0.25);
  opacity: 0; pointer-events: none;
  transition: opacity 0.8s var(--ease);
}
.menu-open .menu-overlay { opacity: 1; pointer-events: auto; }

.menu {
  position: fixed; top: 0; right: 0;
  z-index: 850;
  width: min(36em, 100vw); height: 100vh;
  background: var(--dark);
  color: var(--white);
  transform: translateX(calc(100% + 10vw));
}
.menu__curve {
  position: absolute; top: 0; right: calc(100% - 1px);
  width: 10vw; height: 100%;
  fill: var(--dark);
}
.menu__inner {
  height: 100%;
  padding: 7em 5em 3em 6em;
  display: flex; flex-direction: column; justify-content: space-between;
}
.menu__label {
  font-size: 0.72em; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  padding-bottom: 2.4em;
  margin-bottom: 2.4em;
  border-bottom: 1px solid var(--border-light);
}
.menu__links li { overflow: hidden; }
.menu__links a {
  position: relative; display: flex; align-items: center;
  font-size: clamp(2.6em, 4.5vw, 3.6em);
  line-height: 1.3;
}
.menu__dot {
  position: absolute; left: -0.7em;
  width: 0.2em; height: 0.2em; border-radius: 50%; background: var(--white);
  transform: scale(0);
  transition: transform 0.35s var(--ease-out);
}
.menu__links a:hover .menu__dot, .menu__links a.is-active .menu__dot { transform: scale(1); }
.menu__socials .menu__label { border: 0; padding-bottom: 0; margin-bottom: 1em; }
.menu__socials ul { display: flex; gap: 1.6em; flex-wrap: wrap; }

/* ========================= LINK CON LÍNEA ========================= */
.link-line { position: relative; display: inline-block; }
.link-line::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: right;
  transition: transform 0.45s var(--ease);
}
.link-line:hover::after { transform: scaleX(1); transform-origin: left; }

/* ========================= BOTONES ========================= */
.btn-fill {
  position: absolute; left: -25%; top: 100%;
  width: 150%; height: 200%;
  border-radius: 50%;
  background: var(--blue);
  transition: top 0.6s var(--ease), border-radius 0.6s var(--ease);
  z-index: 0;
}
.btn-text { position: relative; z-index: 1; transition: color 0.4s var(--ease); }

.btn-round, .btn-pill {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
}
.btn-round:hover .btn-fill, .btn-pill:hover .btn-fill, .burger:hover .btn-fill { top: -50%; border-radius: 0; }

.btn-round { width: 11.5em; height: 11.5em; border-radius: 50%; color: var(--white); font-size: 1em; }
.btn-round--dark { background: var(--dark); }
.btn-round--blue { background: var(--blue); }
.btn-round--blue .btn-fill { background: var(--blue-dark); }
.burger .btn-fill { background: var(--blue); }

.btn-pill {
  padding: 1.55em 3.2em;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 1.05em;
}
.btn-pill:hover .btn-text { color: var(--white); }
.btn-pill sup { font-size: 0.6em; margin-left: 0.25em; vertical-align: super; }
.btn-pill--outline { border-color: var(--border-light); color: var(--white); }

/* ========================= INTRO ========================= */
.intro { position: relative; z-index: 3; padding: calc(var(--gap) * 4.5) 0 calc(var(--gap) * 2); }
.intro__grid {
  display: grid; grid-template-columns: 1fr minmax(12em, 18em);
  gap: 8vw;
  max-width: 76em;
}
.intro__big { font-size: clamp(1.55em, 2.3vw, 2.2em); line-height: 1.4; font-weight: 450; }
.split-words .w { display: inline-block; overflow: hidden; vertical-align: top; }
.split-words .w > span { display: inline-block; will-change: transform; }
.intro__side { position: relative; }
.intro__side p { font-size: 1.05em; line-height: 1.6; padding-top: 0.5em; }
.intro__side .btn-round { position: absolute; top: 120%; left: 0; }

/* ========================= TRABAJOS ========================= */
.work { position: relative; z-index: 2; background: var(--white); padding: calc(var(--gap) * 6) 0 calc(var(--gap) * 6); }
.eyebrow {
  font-size: 0.7em; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 3em;
  padding: 0 calc(var(--gap) * 1.5);
}
.work__list { border-bottom: 1px solid var(--border); }
.work__row { border-top: 1px solid var(--border); transition: opacity 0.4s; }
.work__row a {
  display: flex; justify-content: space-between; align-items: center;
  padding: calc(var(--gap) * 1.6) calc(var(--gap) * 1.5);
}
.work__row h3 {
  font-size: clamp(3em, 6.5vw, 6.5em);
  letter-spacing: -0.02em;
  transition: transform 0.45s var(--ease-out), color 0.45s;
}
.work__row p { transition: transform 0.45s var(--ease-out); }
.work__row:hover h3 { transform: translateX(-0.18em); color: var(--muted); }
.work__row:hover p { transform: translateX(0.6em); }
.work__list:hover .work__row:not(:hover) { opacity: 0.3; }

.center-btn { display: flex; justify-content: center; padding-top: calc(var(--gap) * 3); }

/* Modal que sigue al cursor */
.work-modal {
  position: fixed; top: 0; left: 0; z-index: 500;
  width: 400px; height: 350px;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0);
  overflow: hidden;
}
.work-modal__inner { position: absolute; inset: 0; overflow: hidden; }
.work-modal__slider { width: 100%; height: 100%; transition: transform 0.5s var(--ease); }
.work-modal__item { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.work-modal__item img { width: 82%; height: auto; }
.cursor-view {
  position: fixed; top: 0; left: 0; z-index: 501;
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--blue); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0);
  font-size: 0.95em;
}

/* ========================= CURVA → FOOTER ========================= */
.curve-wrap {
  position: absolute; left: 0; bottom: 0; transform: translateY(100%);
  width: 100%; height: 15vh; overflow: hidden; pointer-events: none;
}
.curve {
  position: absolute; left: -10%; top: -100%;
  width: 120%; height: 200%;
  background: var(--white);
  border-radius: 0 0 50% 50%;
  box-shadow: 0 60px 50px rgba(0,0,0,0.08);
  will-change: height;
}

/* ========================= FOOTER ========================= */
.footer {
  position: relative;
  background: var(--dark);
  color: var(--white);
  padding-top: calc(var(--gap) * 7);
  overflow: hidden;
}
.footer__top { position: relative; max-width: 80em; }
.footer__title { display: flex; align-items: center; gap: 0.25em; }
.footer__title h2 { font-size: clamp(3.2em, 7vw, 6.6em); letter-spacing: -0.02em; line-height: 1.03; }
.footer__arrow { position: absolute; right: 12%; top: 34%; width: 1.3em; height: 1.3em; transform: rotate(180deg); }

.footer__line {
  position: relative;
  margin: calc(var(--gap) * 2.5) 0 calc(var(--gap) * 2.2);
  height: 1px; background: var(--border-light);
}
.footer__cta { position: absolute; right: 12%; top: 50%; transform: translateY(-50%); width: 12.5em; height: 12.5em; font-size: 1.05em; }
.footer__pills { display: flex; flex-wrap: wrap; gap: 1em; }

.footer__bottom {
  display: flex; justify-content: space-between; align-items: flex-end;
  max-width: none;
  padding: calc(var(--gap) * 6) var(--gap) var(--gap);
  font-size: 0.95em;
}
.footer__meta { display: flex; gap: 2.6em; }
.footer__label { font-size: 0.72em; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.45); margin-bottom: 0.9em; }
.footer__socials ul { display: flex; gap: 1.6em; }

/* ========================= REVEALS ========================= */
.fade-up { opacity: 0; transform: translateY(1.2em); }

/* ========================= RESPONSIVE ========================= */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .intro__grid { grid-template-columns: 1fr; gap: 2em; }
  .intro__side .btn-round { position: relative; top: auto; margin: 2em 0 0 auto; display: flex; }
  .work__row a { flex-direction: column; align-items: flex-start; gap: 0.4em; padding-left: 0; padding-right: 0; }
  .eyebrow { padding: 0; }
  .work-modal, .cursor-view { display: none; }
  .container { padding: 0 var(--gap); }
  .footer__cta { right: 0; width: 9.5em; height: 9.5em; }
  .footer__arrow { display: none; }
  .footer__bottom { flex-direction: column; align-items: flex-start; gap: 2em; }
  .menu__inner { padding: 7em 2.5em 2.5em 3em; }
  .burger { transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
