/* Shared base for every studio site. Site look lives in assets/sites/*.css */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { min-height: 100vh; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; overflow-x: clip; }
img, video, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
h1, h2, h3, h4, h5, p, ul, ol, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }

/* Image fallbacks: if every candidate fails, show a soft gradient instead of a broken icon */
img.img-failed { opacity: 0 !important; }
.img-host-failed { background: linear-gradient(135deg, #cfc6b8, #8f8577 60%, #5f574d) !important; }

/* Cover helpers */
.media { position: relative; overflow: hidden; }
.media > img, .media > picture > img { width: 100%; height: 100%; object-fit: cover; }
.media--parallax > img { height: 120%; position: absolute; inset: -10% 0 auto 0; }

/* Split text masks */
.line-mask { overflow: hidden; display: block; padding-bottom: .14em; margin-bottom: -.14em; }
.char, .word { display: inline-block; will-change: transform; }

/* Initial (pre-animation) states, only when JS runs */
.js [data-reveal], .js [data-intro] { opacity: 0; }
.js [data-split] { visibility: hidden; }
.js [data-img-reveal] { clip-path: inset(100% 0 0 0); }
.js [data-stagger] > * { opacity: 0; }

/* Page transition overlay */
.pt { position: fixed; inset: 0; z-index: 9000; pointer-events: none; display: flex; }
.pt__panel { flex: 1; height: 100%; background: var(--pt, #111); transform-origin: top; }
.pt__label { position: absolute; inset: 0; display: grid; place-items: center; color: var(--pt-ink, #fff); font-size: clamp(1.4rem, 3vw, 2.4rem); }
.no-js .pt { display: none; }
body[data-pt="wipe"] .pt__panel, body[data-pt="circle"] .pt__panel, body[data-pt="fade"] .pt__panel { position: absolute; inset: 0; }

/* Custom cursor (fine pointers only) */
.cursor { position: fixed; left: 0; top: 0; z-index: 9500; pointer-events: none; display: none; }
@media (hover: hover) and (pointer: fine) { body[data-cursor] .cursor { display: block; } }
.cursor__dot { width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--cursor, #fff); mix-blend-mode: difference; transition: width .35s, height .35s, margin .35s, opacity .3s; }
.cursor.is-hover .cursor__dot { width: 46px; height: 46px; margin: -23px 0 0 -23px; }
.cursor.has-label .cursor__dot { width: 96px; height: 96px; margin: -48px 0 0 -48px; mix-blend-mode: normal; background: var(--cursor-bg, var(--cursor, #fff)); }
.cursor__label { position: absolute; left: 0; top: 0; transform: translate(-50%, -50%) scale(.4); opacity: 0; white-space: nowrap; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--cursor-ink, #000); transition: opacity .3s, transform .35s; }
.cursor.has-label .cursor__label { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* Floating hover preview (project lists) */
.hover-preview { position: fixed; left: 0; top: 0; width: min(28vw, 380px); aspect-ratio: 4/5; z-index: 50; pointer-events: none; overflow: hidden; opacity: 0; transform: scale(.8); border-radius: var(--hp-radius, 0); }
.hover-preview img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
@media (hover: none), (pointer: coarse) { .hover-preview { display: none; } }

/* Marquee */
[data-marquee] { overflow: hidden; white-space: nowrap; direction: ltr; }
.marquee__track { display: inline-flex; will-change: transform; }

/* Menu overlay baseline */
.menu { visibility: hidden; }
.menu-open .menu { visibility: visible; }

/* Accordion */
[data-acc-body] { overflow: hidden; height: 0; }
.no-js [data-acc-body] { height: auto; }

/* Form success */
.form-success { display: none; }
.form-sent .form-success { display: block; }
.form-sent form { display: none; }

/* Visually hidden */
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
