/* 3D portfolio book (lab prototype) */
.book-page { background: #000; }
.book-stage { position: relative; height: 100svh; min-height: 620px; overflow: hidden; background: #000; }
.book-light { position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(104deg, transparent 0 8%, rgba(255,255,255,0.055) 8% 14%, transparent 14% 16.5%, rgba(255,255,255,0.05) 16.5% 22%, transparent 22% 24.5%, rgba(255,255,255,0.035) 24.5% 29%, transparent 29%),
    radial-gradient(60% 55% at 50% 58%, rgba(255,255,255,0.10), rgba(255,255,255,0.03) 55%, transparent 78%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 70%, transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 22%, #000 70%, transparent 100%);
  opacity: .9; transition: opacity .6s; }
.book-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: pan-y; outline: none; opacity: 0; transition: opacity .6s; }
.is-ready .book-canvas { opacity: 1; }
.book-intro { position: relative; z-index: 2; pointer-events: none; transition: opacity .45s, transform .45s; }
.book-intro .hv3-btn { pointer-events: auto; }
.book-intro .hv3-title { max-width: 5.2em; }
.book-foot { z-index: 2; pointer-events: none; transition: opacity .45s; }
.is-open .book-intro { opacity: 0; transform: translate3d(-24px, 0, 0); }
.is-open .book-intro .hv3-btn { pointer-events: none; }
.is-open .book-foot { opacity: 0; }

.book-hud { position: absolute; left: 0; right: 0; bottom: 30px; z-index: 3; display: flex; justify-content: center; align-items: flex-end; gap: 26px; opacity: 0; pointer-events: none; transition: opacity .45s; }
.is-open .book-hud { opacity: 1; pointer-events: auto; }
.book-arrow { width: 40px; height: 40px; display: grid; place-items: center; background: transparent; border: 1px solid #fff; border-radius: 0; color: #fff; font: 400 16px/1 var(--font-sans); cursor: pointer; transition: background-color .16s, color .16s, opacity .16s; }
.book-arrow:hover:not(:disabled) { background: #fff; color: #000; }
.book-arrow:disabled { opacity: .3; cursor: default; }
.book-arrow:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
.book-progress { width: min(340px, 46vw); display: flex; flex-direction: column; align-items: center; gap: 14px; padding-bottom: 19px; }
.book-label { min-height: 12px; font: 500 11px/1 var(--font-sans); letter-spacing: 2.5px; text-transform: uppercase; color: rgba(255,255,255,.75); }
.book-bar { position: relative; display: block; width: 100%; height: 1px; background: rgba(255,255,255,.28); }
.book-fill { position: absolute; left: 0; top: -1px; width: 100%; height: 3px; background: var(--gold); transform: scaleX(0); transform-origin: left center; transition: transform .5s cubic-bezier(0.23, 1, 0.32, 1); }

.no-webgl .book-canvas, .no-webgl .book-hud { display: none; }
.no-webgl .book-intro { opacity: 1; transform: none; }

/* plain list: search engines, no-WebGL, reduced motion */
.book-list { box-sizing: border-box; width: calc(100% - 48px); max-width: 1240px; margin: 0 auto; padding: 96px 0 120px; }
.book-list-title { margin: 0 0 48px; font-family: "Fira Sans Extra Condensed", "Arial Narrow", Impact, sans-serif; font-weight: 800; font-size: clamp(40px, 4.4vw, 64px); line-height: .95; text-transform: uppercase; color: #fff; }
.bl { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(255,255,255,.16); }
.bl-item { display: grid; grid-template-columns: 56px minmax(200px, 1fr) minmax(0, 1.5fr) auto; gap: 8px 32px; align-items: baseline; padding: 26px 0; border-bottom: 1px solid rgba(255,255,255,.16); }
.bl-num { font: 500 12px/1 var(--font-sans); letter-spacing: 2.5px; color: rgba(255,255,255,.6); }
.bl-main h3 { margin: 0 0 8px; font-family: "Fira Sans Extra Condensed", "Arial Narrow", Impact, sans-serif; font-weight: 800; font-size: 34px; line-height: 1; text-transform: uppercase; color: #fff; }
.bl-service { margin: 0; font: 500 11px/1.5 var(--font-sans); letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,.75); }
.bl-text { margin: 0; font-size: 16px; line-height: 1.6; color: #c4c4c4; }
.bl-link { font: 500 12px/1 var(--font-sans); letter-spacing: 2px; text-transform: uppercase; color: #fff; text-decoration: none; border-bottom: 1px solid var(--gold); padding-bottom: 4px; white-space: nowrap; }
.bl-link:hover { color: var(--gold); }

@media (max-width: 900px) {
  .book-stage { height: 100vh; height: 100svh; min-height: min(560px, 100svh); }
  body.v3 .book-page-x, body.v3 .book-intro.hv3-inner { padding: 96px 0 0; }
  .book-intro .hv3-desc { display: none; }
  .book-intro .hv3-title { font-size: clamp(44px, 13vw, 64px); max-width: none; }
  .book-intro .hv3-desc { font-size: 15px; margin-top: 16px; }
  .book-intro .hv3-ctas { margin-top: 22px; }
  .book-intro .hv3-btn { flex: 0 1 auto; }
  .book-foot { display: none; }
  .book-hud { bottom: 18px; gap: 16px; }
  .book-list { width: calc(100% - 40px); padding: 64px 0 88px; }
  .bl-item { grid-template-columns: 40px 1fr; }
  .bl-text, .bl-link { grid-column: 2; }
  .bl-link { justify-self: start; margin-top: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .book-intro, .book-foot, .book-hud, .book-fill, .book-canvas { transition: none; }
}

/* header bits that live inline on the homepages */
.lang-switch{display:flex;gap:2px;align-items:center;margin-right:14px}
.lang-switch .lang-link{font-size:12px;font-weight:600;letter-spacing:.04em;color:rgba(255,255,255,.45);text-decoration:none;padding:4px 7px;transition:color .2s,background .2s}
.lang-switch .lang-link:hover{color:#fff}
.lang-switch .lang-link.is-active{color:#0a0a0a;background:#fff}
@media(max-width:991px){.nav-container{gap:10px}.navbar .burger{position:absolute;right:16px;top:50%;transform:translateY(-50%);margin:0}.nav-right{gap:0;padding-right:42px}.lang-switch{margin-right:0}.lang-switch .lang-link{font-size:11px;padding:3px 6px}}

/* atmosphere: film grain + vignette over the scene, sound toggle */
.book-light { display: none; }
.book-stage::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5  0 0 0 0 .5  0 0 0 0 .5  0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px; opacity: .05; mix-blend-mode: overlay; }
.book-stage::before { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(120% 95% at 50% 50%, transparent 52%, rgba(0,0,0,.6) 100%); }
.book-sound { position: absolute; left: max(24px, calc((100% - 1240px) / 2)); bottom: 34px; z-index: 3; display: inline-flex; align-items: center; gap: 10px; padding: 8px 0; background: none; border: 0; cursor: pointer; font: 500 11px/1.4 var(--font-sans); letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,.45); opacity: 0; pointer-events: none; transition: opacity .45s, color .16s; }
.is-open .book-sound { opacity: 1; pointer-events: auto; }
.book-sound i { width: 6px; height: 6px; background: rgba(255,255,255,.35); transition: background-color .16s; }
.book-sound.is-on { color: rgba(255,255,255,.8); }
.book-sound.is-on i { background: var(--gold); }
.book-sound:hover { color: #fff; }
.book-sound:focus-visible { outline: 2px solid #fff; outline-offset: 4px; }
@media (max-width: 900px) { .book-sound { left: auto; right: 20px; bottom: auto; top: 84px; } }

/* first screen: stats row and client names */
.book-stats { list-style: none; display: flex; gap: 40px; margin: 34px 0 0; padding: 0; }
.book-stats li { display: flex; flex-direction: column; gap: 8px; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.22); min-width: 86px; }
.book-stats b { font-family: "Fira Sans Extra Condensed", "Arial Narrow", Impact, sans-serif; font-weight: 800; font-size: 46px; line-height: .9; color: #fff; }
.book-stats span { font: 500 11px/1.3 var(--font-sans); letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,.6); }
.book-intro .hv3-ctas { margin-top: 34px; }
.book-names { position: absolute; left: 0; right: 0; bottom: 78px; z-index: 2; box-sizing: border-box; width: calc(100% - 48px); max-width: 1240px; margin: 0 auto; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.12); font: 500 11px/1.9 var(--font-sans); letter-spacing: 2.2px; text-transform: uppercase; color: rgba(255,255,255,.42); pointer-events: none; transition: opacity .45s; }
.is-open .book-names { opacity: 0; }
@media (max-width: 900px) {
  .book-names { display: none; }
  .book-stats { gap: 22px; margin-top: 18px; }
  .book-stats li { min-width: 0; padding-top: 10px; gap: 6px; }
  .book-stats b { font-size: 32px; }
  .book-stats span { font-size: 10px; letter-spacing: 1.6px; }
}
@media (max-height: 760px) and (min-width: 901px) { .book-intro.hv3-inner { padding-top: 130px; } .book-stats { margin-top: 24px; } }

@media (max-width: 900px) { .book-hud { bottom: calc(18px + var(--cc, 0px)); transition: opacity .45s, bottom .3s; } }

.is-open .book-hud { pointer-events: none; }
.is-open .book-hud .book-arrow { pointer-events: auto; }

@media (max-width: 900px) { body.v3 .book-intro.hv3-inner { padding-top: 60px; } .book-hud { bottom: calc(18px + var(--cc, 0px)); } .book-arrow { width: 44px; height: 44px; } }

/* phones: project text under the book (the spread itself is too small to read) */
.book-cap { display: none; }
@media (max-width: 900px) {
  .book-cap { display: block; position: absolute; left: 20px; right: 20px; top: var(--cap-top, 320px); z-index: 2; opacity: 0; pointer-events: none; }
  .is-open .book-cap.is-in { opacity: 1; pointer-events: auto; transition: opacity .35s ease .12s; }
  .book-cap-num { margin: 0 0 14px; padding-top: 14px; border-top: 1px solid var(--gold); display: inline-block; font: 500 11px/1 var(--font-sans); letter-spacing: 2.5px; text-transform: uppercase; color: rgba(255,255,255,.75); }
  .book-cap-name { margin: 0; font-family: "Fira Sans Extra Condensed", "Arial Narrow", Impact, sans-serif; font-weight: 800; font-size: clamp(40px, 12vw, 56px); line-height: .92; text-transform: uppercase; color: #fff; }
  .book-cap-svc { margin: 12px 0 0; font: 500 11px/1.5 var(--font-sans); letter-spacing: 2px; text-transform: uppercase; color: #fff; }
  .book-cap-text { margin: 10px 0 0; font-size: 15px; line-height: 1.55; color: #c4c4c4; }
  .book-cap-btn { margin-top: 18px; }
  .book-cap-btn[hidden] { display: none; }
}
@media (max-width: 900px) and (max-height: 640px) { .book-cap-text { display: none; } .book-cap-name { font-size: 38px; } }
@media (prefers-reduced-motion: reduce) { .book-cap { transition: none !important; } }

/* no WebGL: plain page, nothing book-only left on screen */
.no-webgl .book-cap, .no-webgl .book-sound { display: none !important; }
.no-webgl .book-intro .hv3-btn { pointer-events: auto; }
/* phone held sideways: let the stage grow so the caption and arrows fit under the book */
@media (max-width: 900px) and (max-height: 520px) { .book-stage { height: auto; min-height: 660px; } }
