/* ==========================================================================
   Home page
   ========================================================================== */

/* ---------- hero: sticky stage inside a tall scroll track ---------- */
.hero { position: relative; height: 270svh; }
.hero__stick { position: sticky; top: 0; height: 100svh; overflow: hidden; isolation: isolate; background: var(--bg); }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.4s var(--ease); }
.hero.is-ready canvas { opacity: 1; }
.hero .blueprint { z-index: 0; opacity: .7; }
.hero.is-ready .blueprint { opacity: .35; transition: opacity 2s; }

.hero__img { position: absolute; inset: 0; z-index: 1; opacity: 0; will-change: opacity, transform; }
.hero__img img { width: 100%; height: 100%; object-fit: cover; }
.hero__img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(11, 12, 14, .78) 0%, rgba(11, 12, 14, .25) 50%, rgba(11, 12, 14, 0) 75%), linear-gradient(to top, rgba(11, 12, 14, .7), rgba(11, 12, 14, 0) 45%); }
.hero__shade {
  position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background:
    linear-gradient(to top, rgba(11, 12, 14, .92) 0%, rgba(11, 12, 14, .55) 28%, rgba(11, 12, 14, 0) 55%),
    linear-gradient(to bottom, rgba(11, 12, 14, .6) 0%, rgba(11, 12, 14, 0) 22%);
}
.hero__tags { position: absolute; inset: 0; z-index: 3; pointer-events: none; }

/* HUD corners */
.hero__hud { position: absolute; z-index: 4; top: calc(var(--header-h) + 14px); left: 0; right: 0; display: flex; justify-content: space-between; gap: 24px; color: var(--muted); }
.hero__hud > div { display: grid; gap: 2px; }
.hero__hud .r { text-align: right; }
.hero__stage { display: inline-flex; gap: 14px; justify-content: flex-end; white-space: nowrap; }
.hero__stage span { transition: color .4s; }
.hero__stage span.on { color: var(--text); }
.hero__stage span.on::before { content: "■ "; color: var(--accent); }

.hero__copy { position: absolute; z-index: 4; left: 0; right: 0; bottom: clamp(84px, 13vh, 150px); }
.hero__h {
  font-size: clamp(50px, 8.6vw, 156px); font-weight: 600; line-height: .9; letter-spacing: -.052em;
  max-width: 10.5ch; margin-top: 22px;
}
.hero__h em { font-style: normal; color: var(--accent); }
/* Spanish runs longer: one step smaller so four lines stay clear of the model */
@media (min-width: 760px) and (min-height: 721px) { html[lang="es"] .hero__h { font-size: clamp(46px, 7.2vw, 132px); } }
.hero__row { margin-top: clamp(24px, 3vw, 40px); display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.hero__sub { max-width: 40ch; color: #C3C6CB; font-size: clamp(17px, 1.3vw, 19px); line-height: 1.5; }
.hero__cta { display: flex; gap: 12px; flex-wrap: wrap; }

.hero__status { position: absolute; z-index: 4; left: 0; right: 0; bottom: calc(22px + var(--safe-b)); display: flex; justify-content: flex-end; align-items: center; gap: clamp(20px, 3vw, 48px); color: var(--muted); }
.hero__status b { color: var(--text); font-weight: 500; }
.hero__status [data-status] { color: var(--accent); }
.is-solved .hero__status [data-status] { color: var(--text); }
.hero__scroll { display: inline-flex; align-items: center; gap: 10px; }
.hero__scroll i { width: 1px; height: 28px; background: var(--line-strong); position: relative; overflow: hidden; }
.hero__scroll i::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 40%; background: var(--accent); animation: drip 2s var(--ease) infinite; }
@keyframes drip { from { transform: translateY(-100%) } to { transform: translateY(260%) } }

.hero__cap { position: absolute; z-index: 4; left: 0; right: 0; bottom: clamp(84px, 13vh, 150px); opacity: 0; pointer-events: none; }
.hero__cap.on { pointer-events: auto; }
.hero__cap .mono { color: var(--text); }
.hero__cap h2 { font-size: clamp(36px, 5.6vw, 96px); font-weight: 600; letter-spacing: -.045em; line-height: .95; margin: 14px 0 22px; max-width: 12ch; }

/* annotation tag: square at the member, leader line, label */
.htag { position: absolute; left: 0; top: 0; opacity: 0; will-change: transform, opacity; }
.htag i { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border: 1px solid var(--accent); background: rgba(255, 90, 31, .25); }
.htag::before { content: ""; position: absolute; left: 3px; top: -1px; width: 26px; height: 1px; background: rgba(237, 237, 237, .45); transform-origin: 0 50%; transform: rotate(-35deg); }
.htag span {
  position: absolute; left: 22px; bottom: 14px; white-space: nowrap;
  padding: 5px 8px 4px; background: rgba(11, 12, 14, .78); border: 1px solid var(--line-strong);
  font: 400 11px/1.2 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--text);
}
.htag--l::before { left: auto; right: 3px; transform-origin: 100% 50%; transform: rotate(35deg); }
.htag--l span { left: auto; right: 22px; }
.htag--acc span { border-color: var(--accent); color: var(--accent); }

/* fallbacks */
.hero--nogl canvas { display: none; }
.hero--nogl .hero__stick::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: #000 url(/img/studio/4-1200.webp) center 40% / cover no-repeat;
  filter: invert(1) hue-rotate(180deg); mix-blend-mode: screen; opacity: .45;
}
@media (prefers-reduced-motion: reduce) {
  .hero { height: auto; }
  .hero__stick { position: relative; }
  .hero__img, .hero__cap { display: none; }
  .hero__scroll i::after { animation: none; }
}

@media (max-width: 759px) {
  .hero { height: 230svh; }
  .hero__hud { font-size: 10.5px; }
  .hero__hud .hide-s { display: none; }
  .hero__copy { bottom: calc(76px + var(--safe-b)); }
  .hero__h { font-size: clamp(44px, 13.4vw, 64px); max-width: 9ch; margin-top: 14px; }
  .hero__sub { font-size: 16px; max-width: 34ch; }
  .hero__row { gap: 20px; margin-top: 18px; }
  .hero__cta { width: 100%; }
  .hero__cta .btn { flex: 1 1 0; padding: 0 14px; }
  .hero__status { font-size: 10.5px; }
  .hero__status .hide-s, .hero__copy .hide-s { display: none; }
  .hero__cap { bottom: calc(76px + var(--safe-b)); }
  .hero__shade {
    background:
      linear-gradient(to top, rgba(11, 12, 14, .96) 0%, rgba(11, 12, 14, .7) 34%, rgba(11, 12, 14, 0) 62%),
      linear-gradient(to bottom, rgba(11, 12, 14, .7) 0%, rgba(11, 12, 14, 0) 20%);
  }
  .htag span { font-size: 10px; }
}

/* short landscape windows: keep the headline clear of the HUD */
@media (min-width: 760px) and (max-height: 720px) {
  .hero__h { font-size: clamp(44px, min(8.6vw, 10.4vh), 156px); margin-top: 14px; }
  .hero__copy, .hero__cap { bottom: 64px; }
  .hero__hud .hide-s, .hero__copy > .tag { display: none; }
  .hero__row { margin-top: 18px; }
}
/* phones use the entrance render (better portrait crop) */
.hero__img picture { display: contents; }
@media (max-width: 759px) { .hero__img::after { background: linear-gradient(to top, rgba(11, 12, 14, .75), rgba(11, 12, 14, 0) 50%); } }

@media (max-width: 359px) {
  .hero__hud > div:first-child { display: none; }
  .hero__cta .btn { font-size: 14px; padding: 0 10px; gap: 8px; }
  .hero__h { font-size: 40px; }
}

/* ---------- intro ---------- */
.intro__grid { row-gap: 56px; }
.intro__text { grid-column: 4 / span 9; font-size: clamp(28px, 3.6vw, 60px); font-weight: 500; line-height: 1.08; letter-spacing: -.035em; }
.intro__text .muted { color: var(--dim); }
.intro__side { grid-column: 1 / span 3; }
.intro__facts { grid-column: 4 / span 9; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); }
.intro__facts > div { padding: 20px 20px 0 0; display: grid; gap: 10px; align-content: start; }
.intro__facts > div + div { padding-left: 20px; border-left: 1px solid var(--line); }
.intro__facts .mono { color: var(--dim); }
.intro__facts p { font-size: 17px; line-height: 1.45; }
@media (max-width: 860px) {
  .intro__text, .intro__side, .intro__facts { grid-column: 1 / -1; }
  .intro__facts { grid-template-columns: 1fr; }
  .intro__facts > div, .intro__facts > div + div { padding: 18px 0; border-left: 0; border-bottom: 1px solid var(--line); }
}

/* ---------- featured work ---------- */
.fw { row-gap: clamp(56px, 7vw, 120px); align-items: start; }
.fw .card:nth-child(6n+1) { grid-column: 1 / span 7; }
.fw .card:nth-child(6n+1) .media { aspect-ratio: 16 / 10; }
.fw .card:nth-child(6n+2) { grid-column: 9 / span 4; margin-top: 16vw; }
.fw .card:nth-child(6n+2) .media { aspect-ratio: 4 / 5; }
.fw .card:nth-child(6n+3) { grid-column: 2 / span 5; }
.fw .card:nth-child(6n+3) .media { aspect-ratio: 1 / 1; }
.fw .card:nth-child(6n+4) { grid-column: 7 / span 6; margin-top: 10vw; }
.fw .card:nth-child(6n+4) .media { aspect-ratio: 4 / 3; }
.fw .card:nth-child(6n+5) { grid-column: 1 / span 6; }
.fw .card:nth-child(6n+5) .media { aspect-ratio: 4 / 3; }
.fw .card:nth-child(6n) { grid-column: 8 / span 5; margin-top: 12vw; }
.fw .card:nth-child(6n) .media { aspect-ratio: 4 / 5; }
.fw__more { margin-top: clamp(64px, 8vw, 120px); display: flex; justify-content: space-between; align-items: center; gap: 24px; border-top: 1px solid var(--line); padding-top: 24px; flex-wrap: wrap; }
@media (max-width: 860px) {
  .fw { row-gap: 56px; }
  .fw .card:nth-child(n) { grid-column: 1 / -1; margin-top: 0; }
  .fw .card:nth-child(n) .media { aspect-ratio: 4 / 3; }
}

/* ---------- services spec sheet ---------- */
.spec { border-top: 1px solid var(--line-strong); }
.spec__row {
  display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(12px, 1.6vw, 24px);
  padding: clamp(28px, 3.4vw, 48px) 0; border-bottom: 1px solid var(--line); position: relative;
  transition: background-color .5s;
}
.spec__row::before { content: ""; position: absolute; left: 0; top: -1px; height: 1px; width: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .8s var(--ease); }
.spec__row:hover::before { transform: scaleX(1); }
.spec__no { grid-column: 1 / span 1; color: var(--accent); padding-top: .5em; }
.spec__row h3 { grid-column: 2 / span 4; font-size: clamp(30px, 3.4vw, 56px); font-weight: 600; letter-spacing: -.04em; line-height: 1; }
.spec__row p { grid-column: 6 / span 4; color: #BFC3C8; font-size: 17px; }
.spec__row ul { grid-column: 10 / span 3; display: grid; gap: 6px; }
.spec__row li { font-family: var(--f-mono); font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); display: flex; gap: 10px; }
.spec__row li::before { content: "—"; color: var(--dim); }
@media (max-width: 960px) {
  .spec__no { grid-column: 1 / -1; padding: 0 0 12px; }
  .spec__row h3 { grid-column: 1 / -1; }
  .spec__row p { grid-column: 1 / span 12; margin-top: 16px; }
  .spec__row ul { grid-column: 1 / -1; margin-top: 18px; }
}

/* tools marquee */
.tools { margin-top: clamp(64px, 8vw, 120px); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); overflow: hidden; }
.tools__head { display: flex; justify-content: space-between; align-items: center; padding-top: 6px; padding-bottom: 6px; color: var(--dim); border-bottom: 1px solid var(--line); }
.marquee { display: flex; width: max-content; animation: mq 38s linear infinite; padding: clamp(18px, 2.4vw, 32px) 0; }
.tools:hover .marquee { animation-play-state: paused; }
.marquee span { display: inline-flex; align-items: center; gap: clamp(24px, 3vw, 48px); padding-right: clamp(24px, 3vw, 48px); font-size: clamp(36px, 6vw, 104px); font-weight: 600; letter-spacing: -.045em; line-height: 1; white-space: nowrap; }
.marquee span:nth-child(even) { color: #2c2f34; } /* dim fill, not text-stroke: Firefox strokes the overlapping contours of variable fonts */
.marquee span::after { content: ""; width: .18em; height: .18em; background: var(--accent); flex: none; }
@keyframes mq { to { transform: translateX(-50%); } }

/* ---------- model to site (sticky crossfade) ---------- */
.site { position: relative; height: 420svh; border-top: 1px solid var(--line); }
.site__stick { position: sticky; top: 0; height: 100svh; overflow: hidden; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(12px, 1.6vw, 24px); align-items: center; }
.site__text { grid-column: 1 / span 4; position: relative; z-index: 2; }
.site__text h2 { margin: 20px 0 24px; }
.site__text p { color: #BFC3C8; max-width: 38ch; }
.site__frames { grid-column: 6 / span 7; position: relative; aspect-ratio: 4 / 3; background: var(--surface); overflow: hidden; }
.site__frames .media { position: absolute; inset: 0; opacity: 0; }
.site__frames .media:first-child { opacity: 1; }
.site__frames .media img { transform: scale(1.08); transition: opacity .9s var(--ease); }
.site__hud { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; gap: 16px; padding: 14px 16px; background: linear-gradient(to top, rgba(11, 12, 14, .85), transparent); }
.site__cap { color: var(--text); }
.site__n { color: var(--muted); flex: none; }
.site__bar { margin-top: 32px; display: grid; grid-template-columns: repeat(var(--n, 5), 1fr); gap: 6px; max-width: 360px; }
.site__bar i { height: 2px; background: var(--line-strong); position: relative; overflow: hidden; }
.site__bar i b { position: absolute; inset: 0; background: var(--accent); transform-origin: left; transform: scaleX(0); }
.site__frames .ticks::before, .site__frames .ticks::after { opacity: 1; transform: none; }
.site__link { margin-top: 28px; }
@media (max-width: 860px) {
  .site { height: 380svh; }
  .site__stick { display: flex; flex-direction: column; justify-content: center; gap: 28px; padding-top: var(--header-h); }
  .site__frames { width: 100%; order: -1; }
  .site__text h2 { margin: 14px 0 14px; }
  .site__text p { font-size: 16px; }
  .site__bar { margin-top: 20px; }
  .site__link { margin-top: 10px; }
}
@media (max-width: 860px) and (max-height: 700px) { .site__text p { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .site { height: auto; }
  .site__stick { position: relative; height: auto; padding: var(--section) 0; }
}

/* ---------- approach statement (word-by-word lights up) ---------- */
.state p { font-size: clamp(32px, 4.6vw, 80px); font-weight: 500; line-height: 1.04; letter-spacing: -.04em; max-width: 22ch; }
.state .wd { color: var(--dim); transition: color .2s; }
.state .wd.on { color: var(--text); }
.state__foot { margin-top: clamp(40px, 5vw, 72px); display: flex; gap: 24px; justify-content: space-between; align-items: center; flex-wrap: wrap; }

/* ---------- sectors ---------- */
.sect { border-top: 1px solid var(--line-strong); }
.sect__row {
  position: relative; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr) 32px; align-items: baseline;
  column-gap: clamp(12px, 1.6vw, 24px); padding: clamp(18px, 2.2vw, 30px) 0; border-bottom: 1px solid var(--line); isolation: isolate;
}
.sect__row::before { content: ""; position: absolute; inset: 0 calc(var(--gutter) * -1); z-index: -1; background: var(--surface); opacity: 0; transition: opacity .4s; }
.sect__name { font-size: clamp(30px, 4.4vw, 76px); font-weight: 600; letter-spacing: -.045em; line-height: 1; transition: transform .6s var(--ease), color .3s; }
.sect__eg { color: var(--muted); font-size: var(--t-small); }
.sect__eg .mono { color: var(--dim); margin-right: 6px; }
.sect__go { color: var(--accent); justify-self: end; opacity: 0; transform: translateX(-8px); transition: opacity .4s, transform .6s var(--ease); }
.sect__row:hover::before, .sect__row:focus-visible::before { opacity: 1; }
.sect__row:hover .sect__name, .sect__row:focus-visible .sect__name { transform: translateX(10px); color: var(--accent); }
.sect__row:hover .sect__go, .sect__row:focus-visible .sect__go { opacity: 1; transform: none; }
@media (max-width: 760px) {
  .sect__row { grid-template-columns: 1fr auto; row-gap: 8px; }
  .sect__name { grid-column: 1 / -1; }
  .sect__go { opacity: 1; transform: none; }
}
