/* =========================================================
   URBEX — home
   ========================================================= */

/* ---------- hero ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 640px; max-height: 1200px; overflow: hidden; background: #141413; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 58%; transform: scale(1.12); transform-origin: 50% 60%; transition: transform 2200ms var(--ease-out); }
.is-ready .hero__img { transform: scale(1.04); }
.hero__scrim { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(10, 10, 9, .55) 0%, rgba(10, 10, 9, 0) 26%, rgba(10, 10, 9, 0) 46%, rgba(10, 10, 9, .84) 90%); }
.hero__grid { position: absolute; inset: 0; pointer-events: none; background-image: linear-gradient(90deg, rgba(237, 232, 224, .06) 1px, transparent 1px); background-size: calc(100% / 12) 100%; }
.hero__c { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; pointer-events: none; }
.hero__c a { pointer-events: auto; }
.hero__row { display: flex; justify-content: space-between; align-items: flex-end; gap: 48px; flex-wrap: wrap; padding-bottom: 48px; }
.hero__kicker { margin: 0 0 28px; display: flex; align-items: center; gap: 10px; }
.hero__kicker::before { content: ""; width: 8px; height: 8px; background: var(--red); }
.h1 { margin: 0; font-size: clamp(46px, 7vw, 112px); line-height: .94; font-weight: 300; letter-spacing: -.035em; }
.h1 .muted { color: var(--mute); }
.line { display: block; overflow: hidden; padding-bottom: .06em; }
.line > span { display: block; transform: translateY(105%); transition: transform 1100ms var(--ease-out); }
.is-ready .line > span { transform: none; }
.is-ready .line:nth-child(2) > span { transition-delay: 80ms; }
.is-ready .line:nth-child(3) > span { transition-delay: 160ms; }
.hero .late { opacity: 0; transform: translateY(12px); transition: opacity 900ms var(--ease-out) 300ms, transform 900ms var(--ease-out) 300ms; }
.is-ready .hero .late { opacity: 1; transform: none; }
.hero__side { flex: 0 1 380px; display: flex; flex-direction: column; gap: 28px; }
.hero__side p { margin: 0; font-size: 17px; line-height: 1.6; color: #E2DDD5; }
.hero__ctas { display: flex; gap: 10px; flex-wrap: wrap; }
.hero__idx { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid rgba(237, 232, 224, .22); }
.hero__idx div { padding: 18px 0 26px; display: flex; gap: 14px; align-items: baseline; font-size: 15px; }
.hero__idx div + div { padding-left: 20px; border-left: 1px solid rgba(237, 232, 224, .22); }

/* frontage dimension line */
.cota { position: absolute; left: 40px; right: 40px; top: 104px; height: 14px; pointer-events: none; }
.cota .ln { position: absolute; left: 0; right: 0; top: 7px; height: 1px; background: rgba(237, 232, 224, .55); transform: scaleX(0); transform-origin: 0 50%; transition: transform 1400ms var(--ease-in-out) 200ms; }
.cota .tk { position: absolute; top: 0; width: 1px; height: 14px; background: rgba(237, 232, 224, .75); }
.cota .tk.r { right: 0; }
.cota .lb { position: absolute; left: 50%; top: -3px; transform: translateX(-50%); padding: 2px 10px; background: #141413; font-size: 10px; opacity: 0; transition: opacity 500ms ease 900ms; }
.is-ready .cota .ln { transform: scaleX(1); }
.is-ready .cota .lb { opacity: 1; }

/* north arrow */
.north { position: absolute; right: 40px; top: 140px; display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; color: var(--bone); }
.north span:first-child { width: 54px; height: 54px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(237, 232, 224, .6); display: grid; place-items: center; }
.north .mono { font-size: 9px; }

/* crosshair with metric readout */
.xh { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 200ms ease; display: none; }
.xh.is-on { opacity: 1; }
.xh__h { position: absolute; left: 0; right: 0; top: 0; height: 1px; background: rgba(237, 232, 224, .32); }
.xh__v { position: absolute; top: 0; bottom: 0; left: 0; width: 1px; background: rgba(237, 232, 224, .32); }
.xh__l { position: absolute; left: 0; top: 0; padding: 6px 10px; border-radius: 2px; background: rgba(17, 17, 16, .7); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); white-space: nowrap; font-size: 11px; }
.xh__l i { display: inline-block; width: 6px; height: 6px; background: var(--red); margin-right: 8px; vertical-align: 1px; }
@media (hover: hover) and (pointer: fine) { .xh { display: block; } .hero { cursor: crosshair; } }

/* hotspots */
.hot { position: absolute; width: 44px; height: 44px; margin: -22px 0 0 -22px; padding: 0; border: 0; background: transparent; cursor: pointer; z-index: 3; opacity: 0; transition: opacity 500ms ease 1200ms; }
.is-ready .hot { opacity: 1; }
.hot .dot { position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; background: var(--bone); box-shadow: 0 0 0 4px rgba(237, 232, 224, .25); transition: transform 160ms var(--ease-out); }
.hot:active .dot { transform: scale(.85); }
.hot .dot::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 1px solid rgba(237, 232, 224, .7); animation: ping 2400ms var(--ease-out) infinite; }
@keyframes ping { from { transform: scale(.5); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
.hot .tip { position: absolute; left: -12px; top: 36px; width: 250px; text-align: left; padding: 14px 16px; border-radius: 2px; background: rgba(17, 17, 16, .7); box-shadow: inset 0 0 0 1px var(--line), 0 12px 40px rgba(0, 0, 0, .35); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); color: var(--bone); opacity: 0; transform: scale(.97); transform-origin: 20px 0; transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out); pointer-events: none; }
.hot .tip .mono { color: var(--mute); font-size: 10px; display: block; margin-bottom: 4px; }
.hot .tip span:last-child { font-size: 14px; line-height: 1.5; }
.hot:hover .tip, .hot:focus-visible .tip { opacity: 1; transform: none; }

/* ---------- marquee ---------- */
.marq { overflow: hidden; border-block: 1px solid var(--line); }
.marq__t { display: flex; width: max-content; animation: mq 40s linear infinite; }
.marq__t span { display: flex; align-items: center; gap: 40px; padding: 26px 20px; font-weight: 300; font-size: 24px; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.marq__t b { font-weight: 300; color: transparent; -webkit-text-stroke: 1px rgba(237, 232, 224, .6); }
.marq__t i { width: 10px; height: 10px; background: var(--red); display: inline-block; }
@keyframes mq { to { transform: translateX(-50%); } }

/* ---------- studio ---------- */
.mani { margin: 28px 0 0; font-size: clamp(30px, 4.1vw, 62px); line-height: 1.08; font-weight: 300; letter-spacing: -.02em; max-width: 1180px; view-timeline-name: --mani; }
.stud { display: grid; grid-template-columns: 5fr 7fr; gap: 80px; margin-top: 120px; align-items: end; }
.stud h2 { margin: 0; font-weight: 300; font-size: clamp(30px, 3.2vw, 48px); line-height: 1.05; letter-spacing: -.02em; }
.stud p { margin: 28px 0 0; font-size: 18px; line-height: 1.65; color: var(--mute); max-width: 620px; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 56px; border-top: 1px solid var(--line); }
.facts div { padding: 24px 24px 0 0; }
.facts div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.facts p { margin: 10px 0 0; font-size: 16px; line-height: 1.5; color: var(--bone); }

/* ---------- services ---------- */
.svc { display: grid; grid-template-columns: 7fr 5fr; gap: 64px; margin-top: 64px; align-items: start; }
.svc__row { position: relative; display: block; width: 100%; text-align: left; background: transparent; border: 0; border-top: 1px solid rgba(20, 20, 19, .16); padding: 28px 0; cursor: pointer; color: var(--ink-on-paper); }
.svc__row:last-child { border-bottom: 1px solid rgba(20, 20, 19, .16); }
.svc__row::after { content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: var(--red); transform: scaleX(0); transform-origin: 0 50%; transition: transform 500ms var(--ease-out); }
.svc__row.is-on::after { transform: scaleX(1); }
.svc__h { display: flex; align-items: baseline; gap: 28px; }
.svc__n { font-family: 'IBM Plex Mono', monospace; font-size: 13px; color: var(--mute-on-paper); width: 34px; flex: none; }
.svc__t { flex: 1; font-weight: 400; letter-spacing: -.02em; font-size: clamp(26px, 3vw, 44px); line-height: 1.05; transition: transform 300ms var(--ease-out), color 200ms ease; }
.svc__a { width: 44px; height: 44px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(20, 20, 19, .25); display: grid; place-items: center; flex: none; transition: background-color 200ms ease, color 200ms ease, transform 300ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .svc__row:hover .svc__t { transform: translateX(10px); } }
.svc__row.is-on .svc__a { background: var(--red); box-shadow: none; color: #fff; transform: rotate(-45deg); }
.svc__row.is-on .svc__t { color: var(--red); }
.svc__d { display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows 300ms var(--ease-out), opacity 300ms var(--ease-out); }
.svc__row.is-on .svc__d { grid-template-rows: 1fr; opacity: 1; }
.svc__d > span { overflow: hidden; }
.svc__d p { margin: 16px 0 0 62px; max-width: 520px; font-size: 16px; line-height: 1.6; color: var(--mute-on-paper); }
.svc__vis { position: sticky; top: 120px; aspect-ratio: 4 / 5; border-radius: 2px; overflow: hidden; background: var(--paper-2); }
.svc__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; filter: blur(12px); transform: scale(1.05); transition: opacity 500ms var(--ease-out), filter 500ms var(--ease-out), transform 900ms var(--ease-out); }
.svc__img.is-on { opacity: 1; filter: blur(0); transform: scale(1); }
.svc__cap { position: absolute; left: 16px; right: 16px; bottom: 16px; display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-radius: 2px; background: rgba(17, 17, 16, .55); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); color: var(--bone); }

/* ---------- featured project ---------- */
.feat-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; flex-wrap: wrap; }
.feat-top .giant { font-size: clamp(72px, 14vw, 232px); line-height: .82; text-transform: uppercase; }
.feat-img { display: block; margin-top: 56px; height: clamp(420px, 52vw, 760px); }
.feat-img img { transform: scale(1.06); transition: transform 1200ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) { .feat-img:hover img { transform: scale(1.09); } }
.meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 40px; border-top: 1px solid var(--line); }
.meta div { padding: 22px 24px 0 0; }
.meta div + div { padding-left: 24px; border-left: 1px solid var(--line); }
.meta b { display: block; margin-top: 10px; font-weight: 400; font-size: 17px; line-height: 1.4; }

/* ---------- horizontal tour ---------- */
.hs__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; margin-bottom: 48px; }
.hs__head h2 { margin: 0; font-weight: 300; font-size: clamp(34px, 4vw, 60px); line-height: 1; letter-spacing: -.02em; }
.hs__sticky { overflow-x: auto; padding-bottom: 24px; }
.hs__track { display: flex; gap: 24px; width: max-content; padding: 0 40px; }
.card { width: min(560px, 78vw); flex: none; text-decoration: none; transition: transform 160ms var(--ease-out); }
.card:active { transform: scale(.985); }
.card .ph { height: min(640px, 90vw); }
.card .ph img { transition: transform 900ms var(--ease-out); }
.card__num { position: absolute; left: 16px; top: 16px; z-index: 3; padding: 8px 12px; border-radius: 2px; background: rgba(17, 17, 16, .55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
@media (hover: hover) and (pointer: fine) { .card:hover .ph img { transform: scale(1.05); } }
.card__cap { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 0; border-bottom: 1px solid var(--line); }
.card__cap h3 { margin: 0; font-weight: 400; letter-spacing: -.01em; font-size: 24px; }
.card p { margin: 14px 0 0; color: var(--mute); font-size: 15px; line-height: 1.55; }
.card-end { width: min(440px, 78vw); flex: none; height: min(640px, 90vw); border-radius: 2px; background: var(--red); color: #fff; display: flex; flex-direction: column; justify-content: space-between; padding: 36px; text-decoration: none; transition: background-color 200ms ease, transform 160ms var(--ease-out); }
.card-end:active { transform: scale(.985); }
.card-end strong { font-size: 40px; line-height: 1.05; font-weight: 300; letter-spacing: -.02em; }
@media (hover: hover) and (pointer: fine) { .card-end:hover { background: var(--red-hi); } }

/* ---------- process ---------- */
.proc { display: grid; grid-template-columns: 6fr 6fr; gap: 80px; }
.proc__l { position: sticky; top: 110px; align-self: start; }
.proc__l h2 { margin: 24px 0 0; font-weight: 300; font-size: clamp(40px, 4.6vw, 72px); line-height: .98; letter-spacing: -.02em; }
.proc__plan { margin-top: 36px; border-radius: 2px; overflow: hidden; background: #161615; box-shadow: inset 0 0 0 1px var(--line); }
.proc__plan svg, .proc__plan img { width: 100%; height: auto; }
.proc__r { position: relative; }
.proc__r::before { content: ""; position: absolute; left: 31px; top: 40px; bottom: 40px; width: 1px; background: var(--draft); transform-origin: 50% 0; }
.step { position: relative; display: grid; grid-template-columns: 64px 1fr; gap: 24px; padding: 40px 0; }
.step__n { position: relative; z-index: 1; width: 64px; height: 64px; border-radius: 50%; box-shadow: inset 0 0 0 1px var(--draft); background: var(--ink-2); display: grid; place-items: center; font-size: 22px; font-weight: 300; }
.step > div { padding-top: 22px; }
.step h3 { margin: 0 0 12px; font-weight: 400; letter-spacing: -.01em; font-size: 30px; }
.step p { margin: 0; color: var(--mute); font-size: 16px; line-height: 1.65; max-width: 520px; }

/* ---------- plan-set deck ---------- */
.deck { position: relative; height: 480px; margin-top: 56px; }
.sh { position: absolute; left: 50%; top: 40px; width: 440px; margin-left: -220px; padding: 0; border: 0; background: transparent; cursor: pointer; transform: var(--pos); transition: transform 450ms var(--ease-out), filter 300ms ease; }
.sh__lift { display: block; transition: transform 300ms var(--ease-out); }
.sh__in { position: relative; display: block; background: #fff; border-radius: 3px; box-shadow: 0 1px 0 rgba(0, 0, 0, .05), 0 18px 40px rgba(0, 0, 0, .45); transition: box-shadow 300ms ease; }
.sh img { width: 100%; height: auto; border-radius: 3px; }
.sh__tag { position: absolute; left: 10px; bottom: 10px; padding: 5px 9px; border-radius: 2px; background: #141413; color: var(--bone); font-size: 10px; }
.sh:active .sh__lift { transform: scale(.98); }
.sh:not(.is-on) { filter: brightness(.55); }
.sh.is-on { transform: translateX(0) translateY(-24px) rotate(0) scale(1.18); filter: none; z-index: 20 !important; }
.sh.is-on .sh__in { box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
@media (hover: hover) and (pointer: fine) { .sh:not(.is-on):hover { filter: brightness(1); } .sh:not(.is-on):hover .sh__lift { transform: translateY(-28px); } }
.deck__cap { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; padding-top: 28px; border-top: 1px solid var(--line); }
.deck__code { font-size: 64px; font-weight: 200; line-height: 1; letter-spacing: -.02em; }
.deck__cap h3 { margin: 0; font-size: 28px; font-weight: 300; }
.deck__cap p { margin: 8px 0 0; color: var(--mute); font-size: 16px; line-height: 1.55; max-width: 520px; }

/* ---------- values ---------- */
.vals { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 64px; }
.val { position: relative; overflow: hidden; padding: 32px; border-radius: 2px; background: var(--paper-2); min-height: 300px; display: flex; flex-direction: column; justify-content: space-between; transition: color 300ms ease; }
.val::before { content: ""; position: absolute; inset: 0; background: var(--ink); clip-path: inset(100% 0 0 0); transition: clip-path 450ms var(--ease-in-out); }
.val > * { position: relative; }
.val__i { width: 52px; height: 52px; border-radius: 50%; box-shadow: inset 0 0 0 1px currentColor; display: grid; place-items: center; transition: transform 450ms var(--ease-out); }
.val h3 { margin: 0 0 10px; font-weight: 400; font-size: 26px; letter-spacing: -.01em; }
.val p { margin: 0; color: var(--mute-on-paper); line-height: 1.6; font-size: 15.5px; transition: color 300ms ease; }
@media (hover: hover) and (pointer: fine) {
  .val:hover::before { clip-path: inset(0 0 0 0); }
  .val:hover { color: var(--bone); }
  .val:hover p { color: var(--mute); }
  .val:hover .val__i { transform: rotate(-12deg); }
}

/* ---------- contact CTA ---------- */
.cta { display: grid; grid-template-columns: 5fr 7fr; gap: 80px; margin-top: 64px; }
.cta__info { display: flex; flex-direction: column; gap: 28px; }
.cta__info div { padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.cta__info div:last-child { border-bottom: 0; }
.cta__info b { display: block; margin-top: 8px; font-weight: 300; font-size: 20px; }
.cta__box { display: flex; flex-direction: column; justify-content: space-between; gap: 40px; padding: 36px; border-radius: 2px; box-shadow: inset 0 0 0 1px var(--line); }
.cta__box p { margin: 0; font-size: clamp(22px, 2.2vw, 30px); line-height: 1.35; font-weight: 300; max-width: 560px; }

/* ---------- scroll-driven (calm) ---------- */
@supports (animation-timeline: view()) {
  .hero__media { animation: heroz linear both; animation-timeline: scroll(root); animation-range: 0 900px; }
  .hero__c { animation: herofade linear both; animation-timeline: scroll(root); animation-range: 0 700px; }
  .mani .w { opacity: .35; animation: wd linear both; animation-timeline: --mani; }
  .giant .gl { display: inline-block; animation: gl linear both; animation-timeline: view(); animation-range: entry 0% contain 25%; }
  .deck .sh__in { animation: deal linear both; animation-timeline: view(); animation-range: entry 10% contain 35%; }
  .proc__r::before { animation: dy linear both; animation-timeline: view(); animation-range: entry 10% cover 70%; }
  .foot__word { animation: wordup linear both; animation-timeline: view(); animation-range: entry 0% entry 100%; }
  @media (min-width: 901px) {
    .hs { height: 2600px; view-timeline-name: --hs; }
    .hs__sticky { position: sticky; top: 0; height: min(100vh, 940px); overflow: hidden; display: flex; flex-direction: column; justify-content: center; padding: 0; }
    .hs__track { animation: hsx linear both; animation-timeline: --hs; animation-range: contain 0% contain 100%; }
  }
}
.hero__media { position: absolute; inset: 0; }
@keyframes heroz { from { transform: none; } to { transform: scale(1.06) translateY(24px); } }
@keyframes herofade { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-16px); } }
@keyframes wd { from { opacity: .35; } to { opacity: 1; } }
@keyframes gl { from { transform: translateY(12%); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes deal { from { opacity: 0; transform: translateY(40px) rotate(-2deg); } to { opacity: 1; transform: none; } }
@keyframes dy { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes wordup { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes hsx { to { transform: translateX(calc(-100% + 100vw)); } }

@media (max-width: 900px) {
  .hero__idx { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero__idx div:nth-child(3) { padding-left: 0; border-left: 0; }
  .hero__idx div { border-top: 1px solid rgba(237, 232, 224, .22); }
  .hot, .north { display: none; }
  .cota { left: 20px; right: 20px; top: 96px; }
  .stud, .svc, .proc, .cta { grid-template-columns: 1fr; gap: 48px; }
  .facts, .meta { grid-template-columns: 1fr 1fr; }
  .facts div:nth-child(3), .meta div:nth-child(3) { padding-left: 0; border-left: 0; }
  .vals { grid-template-columns: 1fr; }
  .svc__vis, .proc__l { position: relative; top: 0; }
  .svc__vis { aspect-ratio: 4 / 3; order: -1; }
  .hs__track { padding: 0 20px; }
  .deck { height: auto; display: flex; gap: 14px; overflow-x: auto; padding: 10px 0 20px; }
  .deck .sh { position: relative; left: 0; top: 0; margin: 0; width: 300px; flex: none; transform: none !important; filter: none; }
  .deck .sh__in { animation: none !important; }
  .deck .sh.is-on .sh__in { box-shadow: 0 0 0 3px var(--red); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__img, .line > span, .hero .late, .cota .ln { transition: none !important; }
  .mani .w { opacity: 1; }
}
