/* Portada. */

/* ---------- Hero: el vídeo se convierte en el acento ---------- */
.hero { position: relative; background: var(--paper); }
.hero__pin { height: 100vh; height: 100svh; }
.hero__stage { position: relative; height: 100%; overflow: hidden; }
.hero__word {
  position: absolute; left: 50%; top: 54%; width: min(88vw, 1500px); transform: translate(-50%, -50%);
  color: var(--ink-2); display: none;
}
.hero__logo { width: 100%; height: auto; fill: currentColor; overflow: visible; }
.hero__word .logo__accent { fill: transparent; }
.motion .hero__word { display: block; }
.hero__media { position: absolute; inset: 0; --zoom: 1; will-change: clip-path; }
.hero__poster, .hero__video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transform: scale(var(--zoom)); transform-origin: 82% 18%;
}
.hero__poster img { width: 100%; height: 100%; object-fit: cover; }
.hero__video { opacity: 0; transition: opacity 0.8s; }
.hero__video.is-playing { opacity: 1; }
.hero__veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgb(0 0 0 / 0.38) 0%, rgb(0 0 0 / 0.05) 34%, rgb(0 0 0 / 0.1) 60%, rgb(0 0 0 / 0.55) 100%);
}
.hero__copy {
  position: absolute; inset: auto var(--gutter) clamp(1.6rem, 5vh, 3.4rem); color: #fff;
  display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 1rem 2rem;
}
.hero__kicker { grid-column: 1 / -1; color: rgb(255 255 255 / 0.85); }
.hero__title {
  font-size: var(--fs-mega); font-weight: 500; letter-spacing: var(--track-display); line-height: 0.84;
  text-transform: lowercase; margin-left: -0.05em;
}
.hero__title .line { padding-bottom: 0.14em; margin-bottom: -0.14em; }
.hero__lead { max-width: 22ch; font-size: var(--fs-lead); line-height: 1.3; text-align: right; padding-bottom: 0.6rem; }
.hero__scroll {
  position: absolute; right: 0; top: calc(-1 * clamp(3rem, 8vh, 5rem)); display: none;
}
.hero__after {
  position: absolute; left: var(--gutter); top: calc(var(--header-h) + clamp(1rem, 5vh, 3rem)); color: var(--ink); max-width: 16ch;
  display: none; text-transform: lowercase; font-size: clamp(1.7rem, 2.9vw, 3rem);
}
.motion .hero__after { display: block; }
.motion .hero__after .line__in { transform: translateY(105%); }
.hero__toggle {
  position: absolute; right: var(--gutter); top: calc(var(--header-h) + 0.6rem); width: 40px; height: 40px;
  border-radius: 50%; border: 1px solid rgb(255 255 255 / 0.6); color: #fff; display: grid; place-items: center;
}
.hero__toggle-icon { width: 10px; height: 12px; border-left: 3px solid currentColor; border-right: 3px solid currentColor; }
.hero__toggle[aria-pressed="true"] .hero__toggle-icon {
  border: 0; width: 0; height: 0; border-left: 10px solid currentColor; border-top: 6px solid transparent;
  border-bottom: 6px solid transparent; margin-left: 3px;
}
.hero__toggle[hidden] { display: none; }

@media (max-width: 720px) {
  .hero__copy { grid-template-columns: 1fr; }
  .hero__lead { text-align: left; }
  .hero__word { top: 50%; width: 92vw; }
}

/* ---------- Bienvenida ---------- */
.welcome__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2.4rem var(--gutter); }
.welcome__kicker { grid-column: 1 / 4; align-self: start; }
.welcome__quote { grid-column: 4 / 13; }
.welcome__quote p {
  font-size: var(--fs-h2); font-weight: 500; letter-spacing: var(--track-tight); line-height: 1.02; text-wrap: balance;
}
.welcome__author { display: block; margin-top: 1.4rem; color: var(--ink-3); }
.welcome__text { grid-column: 7 / 13; display: grid; gap: 1.2rem; margin-top: 2rem; }
.welcome__close { color: var(--ink-3); }

/* ---------- Encabezado de sección ---------- */
.sec-head { display: grid; gap: 1.2rem; margin-bottom: clamp(3rem, 7vw, 6rem); justify-items: start; }

/* ---------- Muestrario de servicios ---------- */
.samples__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--gutter); }
.samples__list { counter-reset: s; }
.sample { min-height: 72vh; display: flex; align-items: center; border-top: 1px solid var(--line); }
.sample:last-child { border-bottom: 1px solid var(--line); }
.sample__link { display: grid; grid-template-columns: 3.4rem 1fr auto; gap: 0.6rem 1rem; width: 100%; padding-block: 2rem; }
.sample__n { color: var(--ink-3); padding-top: 1.1em; }
.sample__name {
  font-size: var(--fs-display); font-weight: 500; letter-spacing: var(--track-display); line-height: 0.9;
  color: var(--ink); transition: color 0.6s var(--ease-set);
}
.motion .sample__name { color: var(--paper-3); }
.sample.is-active .sample__name, .sample__link:hover .sample__name { color: var(--ink); }
.sample__short { grid-column: 2 / 3; max-width: 30ch; color: var(--ink-3); transition: opacity 0.6s; }
.motion .sample__short { opacity: 0.4; }
.sample.is-active .sample__short { opacity: 1; }
.sample__go { grid-row: 1; grid-column: 3; align-self: center; width: 2.6rem; color: var(--accent);
  opacity: 0; transform: translateX(-12px); transition: opacity 0.4s, transform 0.5s var(--ease-out); }
.sample.is-active .sample__go, .sample__link:hover .sample__go { opacity: 1; transform: none; }
.sample__fig-m { display: none; }
:root:not(.motion) .samples__grid { grid-template-columns: 1fr; }
:root:not(.motion) .samples__stage { display: none; }
:root:not(.motion) .sample { min-height: 0; display: block; padding-bottom: 2rem; }
:root:not(.motion) .sample__fig-m { display: block; aspect-ratio: 16 / 9; max-width: 900px; }
.samples__stage { position: sticky; top: calc(var(--header-h) + 3vh); height: calc(100vh - var(--header-h) - 6vh); }
.samples__frame { position: relative; height: calc(100% - 2.4rem); overflow: hidden; background: var(--paper-2); }
.samples__fig { position: absolute; inset: 0; }
.samples__count { margin-top: 0.9rem; color: var(--ink-3); text-align: right; }

@media (max-width: 899px) {
  .samples__grid { grid-template-columns: 1fr; }
  .samples__stage { display: none; }
  .sample { min-height: 0; display: block; padding-bottom: 2rem; }
  .sample__name { color: var(--ink); font-size: clamp(2.8rem, 13vw, 4.6rem); }
  .sample__short { opacity: 1; }
  .sample__go { opacity: 1; transform: none; }
  .sample__fig-m { display: block; aspect-ratio: 4 / 3; }
}

/* ---------- En el estudio: render + reseña ---------- */
.studio__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2.4rem var(--gutter); align-items: start; }
.studio__fig { grid-column: 1 / 7; grid-row: 1 / 3; }
.studio__fig .fig { aspect-ratio: 1; }
.studio__body { grid-column: 8 / 13; display: grid; gap: 1.4rem; padding-top: 4vw; }
.studio__manifesto { color: var(--ink-3); max-width: 44ch; }
.review { grid-column: 8 / 13; display: grid; gap: 1rem; padding: clamp(1.6rem, 3vw, 2.6rem); background: var(--paper-2);
  position: relative; margin-top: 1rem; }
.review::before { content: ""; position: absolute; left: clamp(1.6rem, 3vw, 2.6rem); top: -9px; width: 54px; height: 14px;
  background: var(--accent); transform: rotate(var(--slant)); }
.review__stars { color: var(--accent); letter-spacing: 0.2em; font-size: 1.1rem; }
.review__quote { font-weight: 450; }
.review__author { color: var(--ink-2); }
.review__lead { color: var(--ink-3); font-size: 0.95rem; }
@media (max-width: 900px) {
  .studio__fig, .studio__body, .review { grid-column: 1 / -1; grid-row: auto; }
  .studio__body { padding-top: 0; }
}

/* ---------- Filosofía (grafito) ---------- */
.philo { background: var(--night); color: var(--night-ink); }
.philo__title { max-width: 18ch; margin: 1.6rem 0 clamp(3rem, 7vw, 6rem); text-wrap: balance; }
.pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); margin-bottom: 4rem; }
.pillar { display: grid; gap: 1rem; align-content: start; padding-top: 1.4rem; border-top: 1px solid #3c3c3a; }
.pillar__n { color: var(--night-mute); }
.pillar__tick { width: 2.6rem; fill: var(--accent); }
.pillar p { color: var(--night-mute); font-size: 0.98rem; }
@media (max-width: 1000px) { .pillars { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .pillars { grid-template-columns: 1fr; } }

/* ---------- Proceso: metro ---------- */
.ruler { background: var(--paper-2); overflow: hidden; }
.ruler__inner { min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
  padding-block: calc(var(--header-h) + 2rem) 3rem; gap: 2.4rem; }
.ruler__head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 1rem var(--gutter); }
.ruler__head .kicker { grid-column: 1 / -1; }
.ruler__readout { font-size: 0.8rem; color: var(--ink-3); }
.ruler__readout span:first-child { font-size: clamp(2rem, 4vw, 3.4rem); color: var(--accent); letter-spacing: -0.04em; }
.ruler__viewport { position: relative; padding-inline: var(--gutter); }
.ruler__scale {
  position: relative; height: 34px; margin-bottom: 2rem; border-bottom: 1px solid var(--ink);
  background-image:
    linear-gradient(90deg, var(--ink) 1.5px, transparent 1.5px),
    linear-gradient(90deg, var(--ink) 1px, transparent 1px),
    linear-gradient(90deg, var(--ink-3) 1px, transparent 1px);
  background-size: calc(100% / 6) 34px, calc(100% / 12) 20px, calc(100% / 60) 10px;
  background-position: 0 100%, 0 100%, 0 100%;
  background-repeat: repeat-x;
}
.ruler__marker {
  position: absolute; bottom: -4px; left: 0; width: 46px; height: 12px; margin-left: -23px; background: var(--accent);
  transform: rotate(var(--slant));
}
.ruler__track { display: flex; gap: 0; width: max-content; }
.step { width: clamp(280px, 30vw, 460px); padding: 0 2.4rem 0 0; display: grid; gap: 0.9rem; align-content: start;
  opacity: 0.35; transition: opacity 0.5s; }
.step.is-active { opacity: 1; }
.step__cm { color: var(--ink-3); }
.step__title { font-size: var(--fs-h2); font-weight: 500; letter-spacing: var(--track-tight); line-height: 1; }
.step__text { color: var(--ink-2); max-width: 32ch; }
.ruler__rail { display: none; }
.ruler__cta { display: flex; justify-content: flex-start; }
.no-js .step, :root:not(.motion) .step { opacity: 1; }

@media (max-width: 899px) {
  .ruler__readout { display: none; }
  .ruler__inner { min-height: 0; padding-block: var(--section); }
  .ruler__scale { display: none; }
  .ruler__viewport { padding-left: calc(var(--gutter) + 1.4rem); }
  .ruler__rail { display: block; position: absolute; left: var(--gutter); top: 0; bottom: 0; width: 6px;
    background: repeating-linear-gradient(180deg, var(--accent) 0 18px, transparent 18px 22px); }
  .ruler__track { flex-direction: column; width: auto; gap: 2.4rem; }
  .step { width: auto; opacity: 1; padding: 0; }
}

/* ---------- +40 años ---------- */
.years__grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gutter); align-items: end; }
.years__num {
  grid-column: 1 / 8; font-size: clamp(9rem, 34vw, 32rem); font-weight: 600; letter-spacing: -0.08em; line-height: 0.78;
  color: var(--ink); display: flex; align-items: flex-start;
}
.years__plus { font-size: 0.4em; color: var(--accent); margin-right: 0.04em; line-height: 1; }
.years__text { grid-column: 8 / 13; padding-bottom: 1rem; }
.years__text strong { font-weight: 600; }
@media (max-width: 760px) { .years__num, .years__text { grid-column: 1 / -1; } }

/* ---------- Marcas en espiga (tipográfica) ---------- */
.brands-home { overflow: hidden; }
.brands-home__head { display: grid; gap: 1.2rem; margin-bottom: 2rem; }
.hb { display: grid; gap: 0.4rem; padding-block: clamp(2.4rem, 6vw, 5rem); }
.hb__row { display: flex; width: max-content; }
.hb__row:nth-child(1) { rotate: calc(var(--slant) * -0.22); margin-left: -4vw; }
.hb__row:nth-child(2) { rotate: calc(var(--slant) * 0.22); margin-left: -22vw; }
.hb__word { display: flex; align-items: center; gap: clamp(1.4rem, 3vw, 3rem); padding-right: clamp(1.4rem, 3vw, 3rem);
  white-space: nowrap; font-size: clamp(3rem, 9vw, 9.5rem); font-weight: 500; letter-spacing: var(--track-display); line-height: 1.05;
  color: var(--ink); }
.hb__row:nth-child(2) .hb__word { color: transparent; -webkit-text-stroke: 1.2px var(--ink-2); }
.hb__tick { width: clamp(2rem, 5vw, 4.6rem); fill: var(--accent); flex: none; }
.brands-home__cta { display: flex; justify-content: flex-end; }

@media (max-width: 900px) {
  .welcome__kicker, .welcome__quote, .welcome__text { grid-column: 1 / -1; }
}
.motion .hero__after .pending { visibility: hidden; opacity: 0; }
