/* IPS — additions: logo colouring, footer giant, misc component fixes */

/* ---------- Logo symbol colours (brand book: main + light versions) ---------- */
.logo-symbol .lg-i { fill: #808a9b; }
.logo-symbol .lg-p { fill: #47546d; }
.logo-symbol .lg-s { fill: #202d47; }
.logo-symbol .lg-t { fill: #ffffff; }
.logo-symbol path { transition: fill .5s var(--ease); }
.header--on-dark:not(.is-solid) .logo-symbol .lg-i,
.menu-open .header .logo-symbol .lg-i,
.logo-symbol--light .lg-i { fill: #f4f5f6; }
.header--on-dark:not(.is-solid) .logo-symbol .lg-p,
.menu-open .header .logo-symbol .lg-p,
.logo-symbol--light .lg-p { fill: #e1e3e7; }
.header--on-dark:not(.is-solid) .logo-symbol .lg-s,
.menu-open .header .logo-symbol .lg-s,
.logo-symbol--light .lg-s { fill: #cdd1d8; }
.header--on-dark:not(.is-solid) .logo-symbol .lg-t,
.menu-open .header .logo-symbol .lg-t,
.logo-symbol--light .lg-t { fill: #47546d; }
.curtain__logo .logo-symbol { width: 100%; }

/* ghost (outline) version for the footer — brand book "contour" usage */
.logo-symbol--ghost path { fill: none; stroke: rgba(255, 255, 255, .16); stroke-width: 1; vector-effect: non-scaling-stroke; }
.logo-symbol--ghost .lg-t { stroke: rgba(255, 255, 255, .1); }

/* header CTA on dark hero */
.header--on-dark:not(.is-solid) .header__cta { background: rgba(255, 255, 255, .14); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.header--on-dark:not(.is-solid) .header__cta::before { background: var(--white); }
.header--on-dark:not(.is-solid) .header__cta:hover { color: var(--ink); }

/* ---------- Footer giant symbol (rises into view) ---------- */
.footer__giant { height: clamp(150px, 24vw, 380px); overflow: hidden; margin-top: 24px; }
.footer__giant-inner { width: min(1500px, 100%); margin: 0 auto; will-change: transform; }
.footer__giant .logo-symbol { width: 100%; height: auto; }

/* ---------- Projects bar + filters spacing ---------- */
.proj-bar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: clamp(28px, 3vw, 44px); }

/* ---------- Brand preview: JS drives transform each frame (no transform transition) ---------- */
.preview { transform: translate3d(-9999px, -9999px, 0); transition: opacity .45s var(--ease); }

/* ---------- Hero lines ---------- */
.hero-line { display: inline-block; }
.hero__title .row + .row { margin-top: .02em; }

/* ---------- i·p·s stage subtle grid ---------- */
.ips__stage::before {
  content: ""; position: absolute; inset: 6% 4%; pointer-events: none; opacity: .35;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 64px 64px; -webkit-mask-image: radial-gradient(closest-side, #000 40%, transparent 100%); mask-image: radial-gradient(closest-side, #000 40%, transparent 100%);
}
.ips__glyph { transition: opacity .3s linear; }
.ips__step b { font-weight: 400; }

/* ---------- Statement width on large screens ---------- */
@media (min-width: 1440px) { .statement__text { font-size: 36px; } }

/* ---------- Project page specifics ---------- */
.phero__title .w { padding-bottom: .08em; }
.pfacts-wrap { margin-top: clamp(40px, 5vw, 80px); }
.fact__value a { border-bottom: 1px solid var(--line); transition: border-color .4s; }
.fact__value a:hover { border-color: var(--ink); }
.svc-head { grid-column: 3 / span 10; padding-top: clamp(20px, 2.4vw, 34px); color: var(--text-3); }
.gallery-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; margin-bottom: clamp(24px, 3vw, 40px); }
.render-note { position: absolute; left: 14px; bottom: 14px; z-index: 2; padding: 6px 10px; border-radius: 2px; background: rgba(20,28,45,.6); color: #fff; font-family: var(--f-latin); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.pcta { display: grid; grid-template-columns: repeat(12, minmax(0,1fr)); column-gap: var(--gap); align-items: end; padding: clamp(40px, 5vw, 72px) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pcta__title { grid-column: 1 / span 7; }
.pcta__text { grid-column: 8 / span 3; color: var(--text-2); }
.pcta__btn { grid-column: 11 / span 2; justify-self: end; }
@media (max-width: 1024px) {
  .pcta__title { grid-column: 1 / -1; }
  .pcta__text { grid-column: 1 / span 8; margin-top: 18px; }
  .pcta__btn { grid-column: 1 / -1; justify-self: start; margin-top: 24px; }
}
.noimg-hero { height: min(calc(var(--vh, 1vh) * 56), 620px); }
.noimg { position: relative; }
.noimg span { position: absolute; left: 0; right: 0; bottom: 22px; text-align: center; font-size: 13px; color: var(--text-3); }

/* small helpers */
.mt-s { margin-top: 12px; } .mt-m { margin-top: 24px; } .mt-l { margin-top: 48px; }

/* ghost symbol on light background (project without photos) */
.logo-symbol--ghostdark path { fill: none; stroke: rgba(32, 45, 71, .22); stroke-width: 1; vector-effect: non-scaling-stroke; }
.noimg .logo-symbol { width: min(46%, 420px); height: auto; }

/* fix: media/title wrappers are spans inside links */
.media, .pcard__title { display: block; }
.sup { vertical-align: top; position: relative; top: .28em; }

/* collapsible full project index */
.pindex__wrap { position: relative; max-height: var(--pi-h, 560px); overflow: hidden; transition: max-height 1.2s var(--ease); }
.pindex__wrap::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 140px; background: linear-gradient(180deg, rgba(241,242,244,0), var(--paper)); pointer-events: none; transition: opacity .6s var(--ease); }
.pindex.is-open .pindex__wrap::after { opacity: 0; }
.pindex__toggle { margin-top: 26px; display: flex; justify-content: center; }

/* hero: latest-project card lives top-right (doesn't collide with the caption) */
.hero__last { top: calc(var(--header-h) + 8px); bottom: auto; }
.hero__index { display: none; }
.hero__name { font-family: var(--f-latin); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; opacity: .75; margin-right: 6px; white-space: nowrap; }
@media (max-width: 1180px) { .hero__caption { max-width: 280px; } }

/* ghost symbol must win over the coloured logo rules */
.logo-symbol--ghost path, .logo-symbol--ghostdark path { fill: none !important; }
.logo-symbol--ghost .lg-i, .logo-symbol--ghost .lg-p, .logo-symbol--ghost .lg-s { stroke: rgba(255,255,255,.2); }

/* mobile refinements */
@media (max-width: 1024px) {
  .dir::after { background: linear-gradient(180deg, rgba(20,28,45,.58) 0%, rgba(20,28,45,.62) 40%, rgba(20,28,45,.9) 100%); }
  .dir__body { top: 84px; bottom: 22px; display: flex; flex-direction: column; justify-content: flex-end; }
}
@media (max-width: 760px) {
  .ips__head { flex-direction: column; gap: 8px; }
  .ips__stage { height: calc(var(--vh, 1vh) * 34); margin-top: calc(var(--header-h) + 64px); }
  .ips__steps { height: auto; min-height: calc(var(--vh, 1vh) * 44); }
  .ips__step { top: 0; transform: none; }
  .ips__step.is-before, .ips__step.is-after { transform: translateY(18px); }
  .ips__step ul { display: none; }
  .ips__step h3 { font-size: 34px; margin-bottom: 12px; }
  .ips__step p { font-size: 15px; }
  .ips__progress { bottom: 18px; }
  .ips__progress div { font-size: 0; }
  .ips__progress i { margin-bottom: 0; }
  .dir { height: 560px; }
}

/* statement history line + CTA band subline */
.statement__sub { max-width: 620px; margin: 30px auto 0; }
.cta-band__title { font-size: clamp(40px, 6vw, 104px); font-weight: 600; letter-spacing: -.01em; }
.cta-band__text { max-width: 560px; margin: 22px auto 0; padding: 0 var(--pad); color: rgba(255,255,255,.8); }

/* stats: keep long numbers on one line */
.stat__value { white-space: nowrap; font-size: clamp(54px, 8.2vw, 150px); }
@media (max-width: 760px) { .stat__value { font-size: clamp(48px, 15vw, 84px); } }

/* brand book: English headlines in Montserrat */
html[lang="en"] .hero__title, html[lang="en"] .phero__title, html[lang="en"] .next__title,
html[lang="en"] .t-display, html[lang="en"] .t-mega, html[lang="en"] .cta-band__title, html[lang="en"] .mmenu__list a {
  font-family: var(--f-latin); font-weight: 800; letter-spacing: -.02em;
}
html[lang="en"] .hero__title { font-size: clamp(42px, 7.6vw, 140px); }
html[lang="en"] .t-h1, html[lang="en"] .t-h2, html[lang="en"] .t-h3, html[lang="en"] .dir__title { font-family: var(--f-latin); font-weight: 600; letter-spacing: -.015em; }

/* ==========================================================================
   Directions — expanding panels (smooth flex-grow; reveal lives on the row)
   ========================================================================== */
.dirs { height: clamp(560px, calc(var(--vh, 1vh) * 74), 800px); }
.dir { flex: 1 1 0%; transition: flex-grow 1.25s cubic-bezier(.22, 1, .36, 1); cursor: pointer; outline: none; }
.dirs .dir.is-open { flex-grow: 2.15; }
.dirs:hover .dir, .dirs .dir:hover { flex-grow: 1; }            /* neutralise old :hover rules */
.dirs .dir.is-open, .dirs:hover .dir.is-open { flex-grow: 2.15; }
.dir__img img { transform: scale(1.14); transition: transform 1.9s cubic-bezier(.22, 1, .36, 1); will-change: transform; }
.dir:hover .dir__img img { transform: scale(1.14); }
.dir.is-open .dir__img img { transform: scale(1.0); }
.dir::before { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(20, 28, 45, .42); transition: opacity 1.1s cubic-bezier(.22, 1, .36, 1); pointer-events: none; }
.dir.is-open::before { opacity: 0; }
.dir__body { right: auto; width: min(560px, calc(100% - 44px)); }
.dir.is-open .dir__body { width: min(560px, calc(100% - 44px)); }
.dir__title { white-space: nowrap; transition: transform 1.1s cubic-bezier(.22, 1, .36, 1); }
.dir__text { opacity: 0; transform: translateY(14px); max-height: 0; overflow: hidden;
  transition: opacity .7s cubic-bezier(.22, 1, .36, 1), transform 1s cubic-bezier(.22, 1, .36, 1), max-height 1s cubic-bezier(.22, 1, .36, 1); }
.dir.is-open .dir__text { opacity: 1; transform: none; max-height: 200px; transition-delay: .18s, .18s, 0s; }
.dir__more { transition: grid-template-rows 1.05s cubic-bezier(.22, 1, .36, 1), opacity .8s cubic-bezier(.22, 1, .36, 1); }
.dir:hover .dir__more { grid-template-rows: 0fr; opacity: 0; }
.dir.is-open .dir__more, .dir.is-open:hover .dir__more { grid-template-rows: 1fr; opacity: 1; transition-delay: .22s, .3s; }
.dir__list li { transform: translateY(10px); opacity: 0; transition: transform .8s cubic-bezier(.22, 1, .36, 1), opacity .6s; }
.dir.is-open .dir__list li { transform: none; opacity: 1; }
.dir.is-open .dir__list li:nth-child(1) { transition-delay: .30s; } .dir.is-open .dir__list li:nth-child(2) { transition-delay: .34s; }
.dir.is-open .dir__list li:nth-child(3) { transition-delay: .38s; } .dir.is-open .dir__list li:nth-child(4) { transition-delay: .42s; }
.dir.is-open .dir__list li:nth-child(5) { transition-delay: .46s; } .dir.is-open .dir__list li:nth-child(6) { transition-delay: .50s; }
.dir.is-open .dir__list li:nth-child(7) { transition-delay: .54s; } .dir.is-open .dir__list li:nth-child(8) { transition-delay: .58s; }
.dir__num { transition: opacity .6s; }
.dir:not(.is-open) .dir__num { opacity: .55; }
@media (max-width: 1024px) {
  .dir, .dirs .dir.is-open { flex: none; }
  .dir::before { display: none; }
  .dir__text, .dir__list li { opacity: 1; transform: none; max-height: none; }
  .dir__more, .dir:hover .dir__more { grid-template-rows: 1fr; opacity: 1; }
  .dir__img img, .dir:hover .dir__img img { transform: none; }
  .dir__body { width: auto; right: 22px; }
}
@media (prefers-reduced-motion: reduce) { .dir { transition: none; } }

/* ---------- Elastic cursor bubble ---------- */
.cursor { width: 104px; height: 104px; margin: -52px 0 0 -52px; background: none; transform: translate3d(-200px, -200px, 0); transition: none; display: grid; place-items: center; }
.cursor.is-on { transform: none; }
.cursor__blob { position: absolute; inset: 0; border-radius: 50%; background: var(--white); transform: scale(0); will-change: transform; box-shadow: 0 14px 34px -14px rgba(20, 28, 45, .38); }
.cursor__label { position: relative; z-index: 1; font-size: 13px; font-weight: 500; color: var(--ink); white-space: nowrap; opacity: 0; transition: opacity .35s var(--ease); will-change: transform; }
.cursor.is-on .cursor__label { opacity: 1; transition-delay: .06s; }
@media (hover: hover) and (pointer: fine) { [data-cursor] { cursor: none; } [data-cursor] a, [data-cursor] button { cursor: none; } }

/* ==========================================================================
   QA fixes
   ========================================================================== */
/* i·p·s: steps stack in one grid cell (no half-height absolute boxes); space reserved for the progress row */
.ips__sticky { padding-bottom: 76px; }
.ips__steps { height: auto; display: grid; align-self: center; }
.ips__step { grid-area: 1 / 1; position: relative; inset: auto; top: auto; transform: translateY(0); }
.ips__step.is-before { transform: translateY(-36px); }
.ips__step.is-after { transform: translateY(36px); }
@media (max-height: 860px) and (min-width: 1025px) {
  .ips__letter { font-size: min(10vw, calc(var(--vh, 1vh) * 13)); margin-bottom: 10px; }
  .ips__step ul { display: none; }
  .ips__stage { height: min(calc(var(--vh, 1vh) * 58), 560px); }
}
@media (max-width: 1024px) {
  .ips__sticky { display: flex; flex-direction: column; justify-content: center; gap: 18px; padding-top: calc(var(--header-h) + 52px); }
  .ips__stage { height: calc(var(--vh, 1vh) * 36); margin-top: 0; flex: none; }
  .ips__stage svg { width: auto; height: 100%; max-width: 88%; }
  .ips__steps { align-self: stretch; }
  .ips__step ul { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ips__steps { display: grid; gap: 48px; }
  .ips__step { grid-area: auto; opacity: 1 !important; transform: none !important; }
}

/* header never overflows (nav may shrink, CTA stays visible) */
.header__nav { min-width: 0; gap: clamp(12px, 1.25vw, 28px); }
@media (max-width: 1280px) { .header__logo .logo-text { display: none; } }

/* hero headline on 320–380px phones */
@media (max-width: 380px) { .hero__title { font-size: 10.6vw; } }

/* direction cards grow with their content on phones */
@media (max-width: 760px) {
  .dir { height: auto; min-height: 520px; }
  .dir__body { position: relative; inset: auto; width: auto; padding: 96px 22px 22px; }
}

/* placeholder card for projects without photos */
.pcard .noimg { display: grid; place-items: center; }
.pcard .noimg .logo-symbol { width: 46%; height: auto; }
.pcard .noimg > span { position: absolute; left: 0; right: 0; bottom: 18px; text-align: center; font-size: 13px; color: var(--text-3); }

/* framed blocks (hero = CTA band, full screen): same 10px inset + radius everywhere.
   clip-path keeps the corners rounded even with backdrop-filter children (Chrome/Safari drop the
   border-radius clip of overflow:hidden parents when a descendant uses backdrop-filter) */
.hero__frame, .cta-band__frame, .next__frame { clip-path: inset(0 round var(--radius)); }

/* i·p·s steps: the outgoing text fades out quickly, the incoming one fades in right after — no overlapping copy */
.ips__step { transition: opacity .32s var(--ease), transform .9s var(--ease); }
.ips__step.is-active { transition: opacity .75s var(--ease) .26s, transform .9s var(--ease); }
