/* ==========================================================================
   Monolith – Architecture & Interior Design Studio HTML Template
   Table of contents:
   1. Tokens (light / dark)     2. Base & utilities      3. Preloader & cursor
   4. Header & menu             5. Buttons & links       6. Hero (3D)
   7. Marquee                   8. Studio & stats        9. Projects (horizontal)
   10. Case study overlay       11. Before / after       12. Materials
   13. Awards                   14. Team                 15. Contact & map
   16. Footer                   17. Generated render fallbacks
   18. Responsive               19. Motion preferences
   ========================================================================== */

/* 1. Tokens ---------------------------------------------------------------- */
:root {
    --bg: #ece8e1;
    --bg-2: #e3ded5;
    --bg-3: #d6d0c5;
    --fg: #161513;
    --muted: #6c6861;
    --line: rgba(22, 21, 19, .14);
    --accent: #a4532f;
    --accent-ink: #fbf6ef;
    --pad: clamp(20px, 4.4vw, 64px);
    --radius: 6px;
    --header-h: 72px;
    --serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
    --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
    --ease: cubic-bezier(.22, 1, .36, 1);
    --ease-io: cubic-bezier(.76, 0, .24, 1);
    --noise-fine: 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='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .7 0 0 0 -.05'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    --noise-streak: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.003 .09' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 0 0 0 -.25'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    --noise-grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.16 .006' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1.1 0 0 0 -.35'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    --noise-cloud: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='400'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0 0 0 -.12'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    color-scheme: light;
}
[data-theme="dark"] {
    --bg: #0f0f0e;
    --bg-2: #171715;
    --bg-3: #22211e;
    --fg: #ece8e1;
    --muted: #918c84;
    --line: rgba(236, 232, 225, .12);
    --accent: #d0794e;
    --accent-ink: #160b05;
    color-scheme: dark;
}

/* 2. Base & utilities -------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--header-h); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
    margin: 0; background: var(--bg); color: var(--fg);
    font: 400 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
    overflow-x: hidden; transition: background-color .6s var(--ease), color .6s var(--ease);
}
@supports (overflow: clip) { body { overflow-x: clip; } }
body.is-loading, body.menu-open, body.case-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
img, svg, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; }
h1, h2, h3 { font-weight: 300; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 300; padding: 10px 16px; background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.skip-link:focus { top: 12px; }
.mono { font-family: var(--mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; }

.section { padding: clamp(96px, 12vw, 176px) var(--pad); }
.section__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px 64px; flex-wrap: wrap; margin-bottom: clamp(40px, 6vw, 88px); }
.section__lead { max-width: 380px; margin: 0; color: var(--muted); font-size: 16px; }
.eyebrow { margin: 0 0 18px; font: 500 11.5px/1.4 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.h2 { margin: 0; font: 300 clamp(48px, 7.6vw, 124px)/.9 var(--serif); letter-spacing: -.025em; }
.h2 em { font-weight: 300; }

/* mask reveal lines: <span class="line"><span>text</span></span> */
.line { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.line > span { display: inline-block; will-change: transform; }
.js:not(.no-motion) .mask .line > span, .js:not(.no-motion) .hero__title .line > span { transform: translateY(112%); }
.js:not(.no-motion) .reveal-up { opacity: 0; transform: translateY(26px); }
.mask.is-in .line > span { transform: none !important; transition: transform 1.3s var(--ease); }
.mask.is-in .line:nth-child(2) > span { transition-delay: .09s; }
.mask.is-in .line:nth-child(3) > span { transition-delay: .18s; }

/* 3. Preloader & cursor ------------------------------------------------------ */
.preloader {
    position: fixed; inset: 0; z-index: 250; display: none; flex-direction: column; justify-content: center; align-items: center; gap: 28px;
    background: #121210; color: #ece8e1;
}
.js:not(.no-motion) .preloader { display: flex; }
.preloader__mark { width: 84px; height: 84px; fill: none; stroke: currentColor; stroke-width: 2; stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 1.6s var(--ease) forwards; }
.preloader__row { display: flex; gap: 40px; font: 400 11.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: #8f8a82; }
.preloader__row b { color: #ece8e1; font-weight: 500; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.cursor {
    position: fixed; left: 0; top: 0; z-index: 260; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%;
    background: #ece8e1; mix-blend-mode: difference; pointer-events: none; opacity: 0; display: grid; place-items: center;
    transition: width .45s var(--ease), height .45s var(--ease), margin .45s var(--ease), opacity .3s;
}
.has-cursor.cursor-moved .cursor { opacity: 1; }
.cursor.is-hover { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
.cursor.has-label { width: 88px; height: 88px; margin: -44px 0 0 -44px; mix-blend-mode: normal; background: var(--accent); }
.cursor__label { font: 500 10.5px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-ink); opacity: 0; transition: opacity .25s; }
.cursor.has-label .cursor__label { opacity: 1; }
.has-cursor, .has-cursor a, .has-cursor button { cursor: none; }
.has-cursor input, .has-cursor textarea, .has-cursor select { cursor: auto; }

/* 4. Header & menu ----------------------------------------------------------- */
.header {
    position: fixed; inset: 0 0 auto; z-index: 120; height: var(--header-h); display: flex; align-items: center; justify-content: space-between; gap: 24px;
    padding: 0 var(--pad); color: var(--fg); transition: transform .6s var(--ease), background-color .4s, color .4s, backdrop-filter .4s;
}
.header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border-bottom: 1px solid var(--line); opacity: 1; transition: opacity .4s; }
.header.is-top { color: #161513; }
.header.is-top::before { opacity: 0; }
.header.is-hidden { transform: translateY(-100%); }
.logo { display: inline-flex; align-items: center; gap: 10px; font: 500 15px var(--sans); letter-spacing: .28em; text-transform: uppercase; }
.logo svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.nav { display: flex; gap: clamp(18px, 2.4vw, 36px); }
.nav a { position: relative; font-size: 14px; padding: 6px 0; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .5s var(--ease); }
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); transform-origin: left; }
.header__actions { display: flex; align-items: center; gap: 12px; }
.header__progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; }
.header__progress span { display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(var(--progress, 0)); }

.theme-toggle { width: 40px; height: 40px; border-radius: 50%; border: 1px solid currentColor; display: grid; place-items: center; opacity: .85; transition: opacity .3s; }
.theme-toggle:hover { opacity: 1; }
.theme-toggle span { width: 14px; height: 14px; border-radius: 50%; background: linear-gradient(90deg, currentColor 50%, transparent 50%); border: 1.5px solid currentColor; transition: transform .6s var(--ease); }
[data-theme="dark"] .theme-toggle span { transform: rotate(180deg); }
.menu-toggle { display: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid currentColor; position: relative; z-index: 2; }
.menu-toggle span { position: absolute; left: 13px; right: 13px; height: 1.5px; background: currentColor; transition: transform .5s var(--ease); }
.menu-toggle span:first-child { top: 18px; } .menu-toggle span:last-child { top: 24px; }
.menu-open .menu-toggle span:first-child { transform: translateY(3px) rotate(45deg); }
.menu-open .menu-toggle span:last-child { transform: translateY(-3px) rotate(-45deg); }
.menu-open .header { color: #ece8e1; }
.menu-open .header::before { opacity: 0; }

.mobile-menu {
    position: fixed; inset: 0; z-index: 110; display: flex; flex-direction: column; justify-content: space-between;
    padding: calc(var(--header-h) + 32px) var(--pad) 32px; background: #121210; color: #ece8e1;
    clip-path: circle(0 at calc(100% - 44px) 36px); visibility: hidden; transition: clip-path .9s var(--ease-io), visibility 0s .9s;
}
.menu-open .mobile-menu { clip-path: circle(150% at calc(100% - 44px) 36px); visibility: visible; transition: clip-path .9s var(--ease-io); }
.mobile-menu__links { display: flex; flex-direction: column; }
.mobile-menu__links a { display: flex; align-items: baseline; gap: 16px; padding: 6px 0; font: 300 clamp(42px, 11vw, 76px)/1.05 var(--serif); border-bottom: 1px solid rgba(236, 232, 225, .1); opacity: 0; transform: translateY(30px); transition: opacity .6s, transform .8s var(--ease); }
.mobile-menu__links small { font: 400 11px var(--mono); color: #8f8a82; }
.menu-open .mobile-menu__links a { opacity: 1; transform: none; }
.menu-open .mobile-menu__links a:nth-child(2) { transition-delay: .05s; } .menu-open .mobile-menu__links a:nth-child(3) { transition-delay: .1s; }
.menu-open .mobile-menu__links a:nth-child(4) { transition-delay: .15s; } .menu-open .mobile-menu__links a:nth-child(5) { transition-delay: .2s; }
.menu-open .mobile-menu__links a:nth-child(6) { transition-delay: .25s; }
.mobile-menu__foot { display: flex; flex-direction: column; gap: 6px; font-size: 14px; color: #8f8a82; }

/* 5. Buttons & links --------------------------------------------------------- */
.btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 28px; overflow: hidden; isolation: isolate;
    border-radius: 999px; background: var(--fg); color: var(--bg); font-weight: 500; font-size: 15px; letter-spacing: .01em; white-space: nowrap;
    transition: color .5s var(--ease);
}
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--accent); border-radius: inherit; transform: translateY(101%); transition: transform .6s var(--ease); }
.btn:hover { color: var(--accent-ink); }
.btn:hover::before { transform: none; }
.btn > span { position: relative; display: inline-block; }
.btn--small { min-height: 40px; padding: 0 18px; font-size: 13.5px; }
.btn--ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 1px currentColor; }
.link-arrow, .link-line { position: relative; display: inline-flex; align-items: center; gap: 10px; font-weight: 500; }
.link-arrow::after { content: "\2192"; transition: transform .5s var(--ease); }
.link-arrow:hover::after { transform: translateX(6px); }
.link-line { background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .5s var(--ease); }
.link-line:hover { background-size: 100% 1px; }
.magnetic { will-change: transform; }

/* 6. Hero (3D) ------------------------------------------------------------- */
.hero {
    --hero-ink: #161513; --hero-paper: #ece8e1; --hero-p: 0;
    position: relative; height: 100vh; height: 100svh; min-height: 580px; overflow: hidden; color: var(--hero-ink);
    background: linear-gradient(#b4c1c8, #e9e3d9 62%, #cfc8bd 62%);
}
.hero__gl { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__fallback { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero.has-gl .hero__fallback { display: none; }
.hero__shade { position: absolute; inset: 0; pointer-events: none; }
.hero__shade::before, .hero__shade::after { content: ""; position: absolute; inset: 0; }
.hero__shade::before { background: radial-gradient(120% 90% at 0% 100%, rgba(236, 232, 225, .78), rgba(236, 232, 225, 0) 58%); opacity: calc(1 - var(--hero-p)); }
.hero__shade::after { background: radial-gradient(120% 90% at 0% 100%, rgba(10, 10, 16, .62), rgba(10, 10, 16, 0) 60%); opacity: var(--hero-p); }
.hero__inner { position: absolute; left: var(--pad); right: var(--pad); bottom: clamp(36px, 6vh, 72px); z-index: 2; max-width: 980px; }
.hero__inner .eyebrow { color: inherit; opacity: .72; }
.hero__title { margin: 0 0 clamp(22px, 3vh, 36px); font: 300 clamp(54px, 8.6vw, 148px)/.88 var(--serif); letter-spacing: -.03em; }
.hero__title em { font-weight: 300; }
.hero__bottom { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 22px 48px; }
.hero__lead { margin: 0; max-width: 400px; font-size: 16px; opacity: .85; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero .btn:not(.btn--ghost) { background: var(--hero-ink); color: var(--hero-paper); }
.hero .btn:not(.btn--ghost):hover { color: var(--accent-ink); }
.hero__hud { position: absolute; z-index: 2; top: calc(var(--header-h) + 28px); right: var(--pad); display: flex; flex-direction: column; align-items: flex-end; gap: 12px; text-align: right; }
.hero__hud b { font-weight: 500; }
.hud__dial { position: relative; width: 64px; height: 64px; border-radius: 50%; border: 1px solid currentColor; opacity: .7; }
.hud__dial::before { content: ""; position: absolute; left: 6px; right: 6px; top: 50%; height: 1px; background: currentColor; opacity: .4; }
.hud__dial i { position: absolute; inset: 0; transform: rotate(calc(-150deg + var(--hero-p) * 120deg)); }
.hud__dial i::after { content: ""; position: absolute; left: 50%; top: -5px; width: 9px; height: 9px; margin-left: -4.5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.hero__scroll { position: absolute; z-index: 2; right: var(--pad); bottom: clamp(36px, 6vh, 72px); display: flex; align-items: center; gap: 12px; opacity: .75; }
.hero__scroll span { position: relative; width: 1px; height: 46px; background: currentColor; opacity: .35; overflow: hidden; }
.hero__scroll span::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--hero-ink); animation: scrollcue 2.2s var(--ease-io) infinite; }
@keyframes scrollcue { to { top: 110%; } }

/* 7. Marquee ----------------------------------------------------------------- */
.marquee { overflow: hidden; padding: clamp(18px, 2.6vw, 34px) 0; border-bottom: 1px solid var(--line); }
.marquee__track { display: flex; align-items: center; gap: clamp(24px, 3vw, 48px); width: max-content; font: 300 clamp(36px, 5.4vw, 84px)/1 var(--serif); white-space: nowrap; }
.marquee__track i { width: 12px; height: 12px; border: 1px solid var(--accent); transform: rotate(45deg); flex: none; }
.no-js-anim .marquee__track, .no-motion .marquee__track { animation: none; }

/* 8. Studio & stats ---------------------------------------------------------- */
.studio__grid { display: grid; grid-template-columns: minmax(160px, 1fr) 3fr; gap: 24px 48px; }
.studio__text { margin: 0 0 clamp(48px, 6vw, 80px); font: 300 clamp(30px, 3.7vw, 60px)/1.12 var(--serif); letter-spacing: -.01em; max-width: 22ch; max-width: 1100px; }
.studio__text .w { opacity: .16; transition: opacity .3s; }
.studio__text .w.is-lit { opacity: 1; }
.no-motion .studio__text .w { opacity: 1; }
.disciplines { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.disciplines li { display: flex; flex-direction: column; gap: 4px; padding: 22px 18px 6px 0; font: 400 24px/1.2 var(--serif); }
.disciplines .mono { color: var(--accent); margin-bottom: 8px; }
.disciplines small { font: 400 13.5px/1.5 var(--sans); color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: clamp(64px, 9vw, 130px); }
.stat { border-top: 1px solid var(--line); padding-top: 18px; }
.stat b { display: block; font: 300 clamp(60px, 7.5vw, 120px)/.95 var(--serif); letter-spacing: -.03em; }
.stat span { font-size: 14px; color: var(--muted); }

/* 9. Projects (pinned horizontal gallery) ---------------------------------- */
.projects { position: relative; padding-top: clamp(80px, 10vw, 140px); }
.projects__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px 64px; flex-wrap: wrap; padding: 0 var(--pad) clamp(32px, 4vw, 56px); }
.projects__pin { position: relative; overflow: hidden; }
.projects__track { display: flex; align-items: center; gap: clamp(40px, 6vw, 110px); padding: 110px var(--pad) 72px; width: max-content; }
.proj { position: relative; flex: none; width: clamp(300px, 30vw, 460px); }
.proj:nth-child(even) { margin-top: 8vh; }
.proj__num {
    position: absolute; z-index: 0; left: -.2em; top: -.36em; font: 300 clamp(160px, 18vw, 300px)/1 var(--serif); letter-spacing: -.05em;
    color: transparent; -webkit-text-stroke: 1px color-mix(in srgb, var(--fg) 30%, transparent); pointer-events: none; user-select: none;
}
.proj__link { position: relative; z-index: 1; display: block; }
.proj__media { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--radius); background: var(--bg-3); }
.proj__media canvas { width: 100%; height: 100%; transform: scale(1.04); transition: transform 1.2s var(--ease); }
.proj__link:hover .proj__media canvas, .proj__link:focus-visible .proj__media canvas { transform: scale(1); }
.ripple-gl { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .3s; pointer-events: none; }
.ripple-gl.is-on { opacity: 1; }
.proj__info { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-top: 16px; }
.proj__title { font: 400 clamp(28px, 2.6vw, 40px)/1.05 var(--serif); }
.proj__meta { color: var(--muted); text-align: right; }
.proj__tag { position: absolute; z-index: 2; right: -18px; top: 26px; padding: 8px 14px; border-radius: 999px; background: var(--bg); color: var(--fg); box-shadow: 0 10px 30px rgba(0, 0, 0, .12); }
.proj--end { width: clamp(280px, 30vw, 440px); }
.proj__end-text { margin: 0 0 22px; font: 300 clamp(34px, 3.2vw, 50px)/1.05 var(--serif); }
.projects__bar { position: absolute; left: var(--pad); right: var(--pad); bottom: 28px; height: 1px; background: var(--line); }
.projects__bar span { display: block; height: 100%; background: var(--fg); transform-origin: left; transform: scaleX(var(--p, 0)); }

/* 10. Case study overlay ----------------------------------------------------- */
.cases { position: relative; }
.cases__close { display: none; }
.case { border-top: 1px solid var(--line); }
.case__media { position: relative; display: block; height: 70vh; min-height: 360px; overflow: hidden; background: var(--bg-3); }
.case__media canvas { width: 100%; height: 100%; }
.case__wrap { max-width: 1240px; margin: 0 auto; padding: clamp(48px, 6vw, 96px) var(--pad) clamp(80px, 8vw, 120px); }
.case__head { display: grid; grid-template-columns: 1fr; gap: 12px; margin-bottom: clamp(36px, 5vw, 64px); }
.case__title { margin: 0; font: 300 clamp(56px, 9vw, 150px)/.9 var(--serif); letter-spacing: -.03em; }
.case__meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin: 28px 0 0; border-top: 1px solid var(--line); padding-top: 20px; }
.case__meta dt { font: 400 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.case__meta dd { margin: 4px 0 0; font-size: 15px; }
.case__text { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px 64px; margin-bottom: clamp(56px, 8vw, 110px); }
.case__lead { margin: 0; font: 300 clamp(26px, 2.6vw, 40px)/1.18 var(--serif); }
.case__text p:not(.case__lead) { margin: 0; color: var(--muted); }
.case__plan { margin: 0 0 clamp(56px, 8vw, 110px); padding: clamp(20px, 3vw, 44px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.case__plan svg { width: 100%; height: auto; overflow: visible; }
.case__plan path { fill: none; stroke: var(--fg); stroke-linecap: square; }
.pl-walls path { stroke-width: 6; }
.pl-walls path.thin { stroke-width: 2.5; }
.pl-detail path { stroke-width: 1.2; opacity: .75; }
.pl-detail path.dim { stroke: var(--accent); opacity: 1; }
.pl-labels text { font: 500 10.5px var(--mono); letter-spacing: .1em; text-transform: uppercase; fill: var(--muted); text-anchor: middle; }
.pl-labels .dim-t { fill: var(--accent); }
.js .case__plan path { stroke-dasharray: 1 1; }
.case__plan figcaption { margin-top: 18px; color: var(--muted); }
.case__duo { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(28px, 5vw, 80px); align-items: center; margin-bottom: clamp(56px, 8vw, 110px); }
.case__duo .render { aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden; }
.case__duo canvas { width: 100%; height: 100%; }
.case__duo blockquote { margin: 0; }
.case__duo blockquote p { margin: 0 0 18px; font: 300 italic clamp(26px, 2.6vw, 40px)/1.2 var(--serif); }
.case__duo cite { font-style: normal; color: var(--muted); }
.case__next { display: flex; flex-direction: column; gap: 8px; padding-top: 28px; border-top: 1px solid var(--line); font: 300 clamp(44px, 7vw, 110px)/1 var(--serif); letter-spacing: -.02em; transition: color .4s; }
.case__next .mono { color: var(--muted); }
.case__next:hover { color: var(--accent); }

/* overlay mode (with JS) */
.js .cases {
    position: fixed; inset: 0; z-index: 140; overflow-y: auto; overscroll-behavior: contain; background: var(--bg);
    visibility: hidden; opacity: 0; transition: opacity .5s var(--ease), visibility 0s .5s;
}
.js .cases.is-open { visibility: visible; opacity: 1; transition: opacity .5s var(--ease); }
.js .case { display: none; border: 0; }
.js .case.is-active { display: block; }
.js .cases__close {
    position: fixed; z-index: 3; top: 18px; right: var(--pad); display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
    background: var(--fg); color: var(--bg); transition: transform .5s var(--ease);
}
.js .cases__close span { position: absolute; width: 20px; height: 1.5px; background: currentColor; transform: rotate(45deg); }
.js .cases__close span + span { transform: rotate(-45deg); }
.js .cases__close:hover { transform: rotate(90deg); }
.case__wrap > * { transition: opacity .7s var(--ease), transform .9s var(--ease); }
.cases.is-entering .case__wrap > * { opacity: 0; transform: translateY(40px); }
.flip-clone { position: fixed; z-index: 150; overflow: hidden; pointer-events: none; border-radius: var(--radius); }
.flip-clone canvas { width: 100%; height: 100%; }

/* 11. Before / after ---------------------------------------------------------- */
.compare__frame { position: relative; aspect-ratio: 16 / 8; overflow: hidden; border-radius: var(--radius); background: var(--bg-3); touch-action: pan-y; user-select: none; }
.compare__layer { position: absolute; inset: 0; }
.compare__layer canvas { width: 100%; height: 100%; }
.compare__before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare__handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 1px; background: #fff; pointer-events: none; }
.compare__handle span { position: absolute; top: 50%; left: 0; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: rgba(255, 255, 255, .9); backdrop-filter: blur(8px); box-shadow: 0 10px 30px rgba(0, 0, 0, .2); }
.compare__handle span::before, .compare__handle span::after { content: ""; position: absolute; top: 50%; width: 8px; height: 8px; margin-top: -4px; border: solid #161513; border-width: 0 0 1.5px 1.5px; }
.compare__handle span::before { left: 16px; transform: rotate(45deg); }
.compare__handle span::after { right: 16px; transform: rotate(-135deg); }
.compare__frame:has(.compare__range:focus-visible) .compare__handle span { outline: 2px solid var(--accent); outline-offset: 4px; }
.compare__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; -webkit-appearance: none; appearance: none; }
.compare__label { position: absolute; top: 20px; padding: 7px 12px; border-radius: 999px; background: rgba(255, 255, 255, .85); color: #161513; pointer-events: none; }
.compare__label--l { left: 20px; } .compare__label--r { right: 20px; }
.steps { list-style: none; margin: clamp(48px, 6vw, 80px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.steps li { border-top: 1px solid var(--line); padding-top: 18px; color: var(--muted); font-size: 14.5px; }
.steps b { display: block; margin: 10px 0 6px; font: 400 30px/1 var(--serif); color: var(--fg); }
.steps .mono { color: var(--accent); }

/* 12. Materials ---------------------------------------------------------------- */
.mats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(14px, 2vw, 28px); perspective: 1200px; }
.mat { --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%; position: relative; aspect-ratio: 5 / 4; border-radius: var(--radius); overflow: hidden; outline-offset: 4px;
    transform: rotateX(var(--rx)) rotateY(var(--ry)); transform-style: preserve-3d; transition: transform .6s var(--ease), box-shadow .6s var(--ease); box-shadow: 0 1px 0 var(--line); }
.mat:hover, .mat:focus-visible { box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .35); }
.mat__surface { position: absolute; inset: -4%; transition: transform 1s var(--ease); }
.mat:hover .mat__surface, .mat:focus-visible .mat__surface { transform: scale(1.06); }
.mat::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(circle at var(--mx) var(--my), rgba(255, 255, 255, .38), rgba(255, 255, 255, 0) 45%); mix-blend-mode: soft-light; opacity: 0; transition: opacity .4s; }
.mat:hover::after, .mat:focus-visible::after { opacity: 1; }
.mat__info { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding: 18px 20px;
    background: linear-gradient(transparent, rgba(0, 0, 0, .45)); color: #f4f0ea; transform: translateZ(30px); }
.mat__info b { font: 400 clamp(22px, 2vw, 30px)/1.05 var(--serif); }
.mat__info .mono { opacity: .8; text-align: right; }
.mat--concrete .mat__surface { background: var(--noise-fine), repeating-linear-gradient(180deg, rgba(0, 0, 0, 0) 0 46px, rgba(0, 0, 0, .1) 46px 47px, rgba(255, 255, 255, .08) 47px 48px), radial-gradient(circle at 30% 30%, #b9b5ad, #8f8a82); }
.mat--travertine .mat__surface { background: var(--noise-streak), var(--noise-fine), linear-gradient(175deg, #e3d4bc, #cdb999 60%, #d9c8ab); background-size: 140% 100%, auto, auto; }
.mat--oak .mat__surface { background: var(--noise-grain), var(--noise-grain), linear-gradient(90deg, #4a3527, #5c4331 30%, #3f2d21 60%, #574032); background-size: 260px 100%, 400px 140%, auto; }
.mat--brass .mat__surface { background: var(--noise-fine), var(--noise-cloud), linear-gradient(120deg, #6b5532 0%, #b6955a 28%, #e7cf98 42%, #9c7d45 58%, #5e7a6a 100%); }
.mat--glass .mat__surface { background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .5) 0 2px, rgba(255, 255, 255, .06) 6px 16px, rgba(0, 0, 0, .14) 22px 24px), linear-gradient(160deg, #a8b8b6, #6f8584 50%, #c9d4cf); }
.mat--lime .mat__surface { background: var(--noise-cloud), var(--noise-fine), linear-gradient(140deg, #efe9de, #ddd4c4); }
.mat--glass:hover .mat__surface { transform: scale(1.06) translateX(calc((var(--mx) - 50%) * .1)); }

/* 13. Awards ------------------------------------------------------------------- */
.award-list { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.award { display: grid; grid-template-columns: 90px 1.6fr 1fr 120px; align-items: baseline; gap: 18px; padding: clamp(18px, 2.2vw, 28px) 0; border-top: 1px solid var(--line); transition: opacity .4s, padding .5s var(--ease); }
.award b { font: 300 clamp(28px, 3.4vw, 54px)/1 var(--serif); transition: transform .6s var(--ease); }
.award > span:not(.mono) { color: var(--muted); }
.award > .mono:last-child { text-align: right; }
.award-list:hover .award { opacity: .35; }
.award-list:hover .award:hover { opacity: 1; }
.award:hover b { transform: translateX(14px); }
.award-preview { position: fixed; left: 0; top: 0; z-index: 90; width: 300px; aspect-ratio: 4 / 3; margin: -110px 0 0 -150px; pointer-events: none; border-radius: var(--radius); overflow: hidden;
    clip-path: inset(50% 50% 50% 50%); transition: clip-path .6s var(--ease); box-shadow: 0 30px 60px rgba(0, 0, 0, .25); }
.award-preview.is-on { clip-path: inset(0 0 0 0); }
.award-preview canvas { width: 100%; height: 100%; }

/* 14. Team --------------------------------------------------------------------- */
.people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 3vw, 44px) clamp(16px, 2vw, 28px); }
.person b { display: block; margin-top: 16px; font: 400 28px/1.1 var(--serif); }
.person .mono { color: var(--muted); }
.person p { margin: 8px 0 0; font-size: 14.5px; color: var(--muted); max-width: 32ch; }
.person__art { position: relative; display: block; aspect-ratio: 4 / 4.6; border-radius: var(--radius); overflow: hidden;
    background: var(--noise-fine), linear-gradient(165deg, hsl(var(--hue) 22% 84%), hsl(var(--hue) 14% 64%)); }
[data-theme="dark"] .person__art { background: var(--noise-fine), linear-gradient(165deg, hsl(var(--hue) 14% 34%), hsl(var(--hue) 12% 16%)); }
.person__art::before { content: ""; position: absolute; inset: -20%; background: linear-gradient(115deg, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, .35) 46%, rgba(255, 255, 255, 0) 54%); transform: translateX(-30%); transition: transform 1.4s var(--ease); }
.person:hover .person__art::before { transform: translateX(30%); }
.person__art i { --c1: hsl(var(--hue) 10% 46%); --c2: hsl(var(--hue) 16% 16%); position: absolute; left: 50%; bottom: 0; width: 70%; height: 80%; transform: translateX(-50%); transition: transform 1s var(--ease); filter: drop-shadow(18px 10px 24px rgba(0, 0, 0, .18)); }
.person__art i::before, .person__art i::after { content: ""; position: absolute; left: 50%; transform: translateX(-50%); }
.person__art i::before { z-index: 1; top: 19%; width: 30%; aspect-ratio: .82; border-radius: 50% 50% 46% 46%; background: radial-gradient(circle at 34% 30%, var(--c1), var(--c2) 78%); }
.person__art i::after { bottom: 0; width: 100%; height: 50%; border-radius: 48% 48% 0 0 / 70% 70% 0 0; background: radial-gradient(ellipse 80% 90% at 30% 10%, var(--c1), var(--c2) 75%); }
[data-theme="dark"] .person__art i { --c1: hsl(var(--hue) 10% 62%); --c2: hsl(var(--hue) 12% 28%); }
.person:hover .person__art i { transform: translateX(-50%) scale(1.04) translateY(-2%); }

/* 15. Contact & map ------------------------------------------------------------ */
.contact__title { margin: 0 0 clamp(48px, 6vw, 88px); font: 300 clamp(56px, 10vw, 170px)/.88 var(--serif); letter-spacing: -.035em; }
.contact__grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 5vw, 80px); align-items: start; }
.contact__map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.contact__map svg { width: 100%; height: auto; }
.map-land { fill: var(--bg-2); }
.map-water { fill: color-mix(in srgb, #7f9aa3 30%, var(--bg-2)); }
.map-park { fill: color-mix(in srgb, #8c9a6f 26%, var(--bg-2)); }
.map-roads path { fill: none; stroke: var(--line); stroke-width: 6; stroke-linecap: round; }
.map-roads path.major { stroke: color-mix(in srgb, var(--fg) 22%, transparent); stroke-width: 9; }
.js .map-roads path { stroke-dasharray: 1 1; stroke-dashoffset: 1; transition: stroke-dashoffset 2.4s var(--ease-io); }
.js .contact__map.is-in .map-roads path, .no-motion .map-roads path { stroke-dashoffset: 0; }
.map-blocks rect { fill: color-mix(in srgb, var(--fg) 7%, transparent); }
.map-label { font: 500 10.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; fill: var(--muted); }
.map-pin__body { fill: var(--accent); }
.map-pin__dot { fill: var(--bg); }
.map-pulse { fill: none; stroke: var(--accent); stroke-width: 1.5; transform-origin: 0 0; animation: pulse 2.4s ease-out infinite; }
.map-pulse--2 { animation-delay: 1.2s; }
@keyframes pulse { from { transform: scale(.4); opacity: 1; } to { transform: scale(3); opacity: 0; } }
.js .map-pin path, .js .map-pin__dot { transform: translateY(-140px); opacity: 0; }
.contact__map.is-in .map-pin path, .contact__map.is-in .map-pin__dot, .no-motion .map-pin path, .no-motion .map-pin__dot { animation: pindrop 1s 1.2s var(--ease) forwards; }
@keyframes pindrop { 0% { transform: translateY(-140px); opacity: 0; } 60% { transform: translateY(4px); opacity: 1; } 100% { transform: none; opacity: 1; } }
.contact__blocks { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-bottom: clamp(36px, 4vw, 56px); }
address { font-style: normal; margin-bottom: 12px; }
.hours { margin: 0; }
.hours div { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.hours dd { margin: 0; color: var(--muted); }
.status { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; color: var(--muted); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.status.is-open::before { background: #4c9a5f; box-shadow: 0 0 0 4px rgba(76, 154, 95, .18); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 24px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--wide { grid-column: 1 / -1; }
.field label { font: 500 11px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; padding: 10px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; border-radius: 0; font-size: 16px; transition: border-color .3s; resize: vertical; }
.field select { -webkit-appearance: none; appearance: none; background: linear-gradient(45deg, transparent 50%, currentColor 50%) right 6px center / 6px 6px no-repeat, linear-gradient(-45deg, transparent 50%, currentColor 50%) right 0 center / 6px 6px no-repeat; }
.field select option { background: var(--bg); color: var(--fg); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--fg); }
.field [aria-invalid="true"] { border-color: #c0392b; }
.field__err { min-height: 1em; font-size: 12.5px; color: #c0392b; }
[data-theme="dark"] .field__err { color: #ff8a7a; }
[data-theme="dark"] .field [aria-invalid="true"] { border-color: #ff8a7a; }
.form .btn { justify-self: start; }
.form__done { grid-column: 1 / -1; margin: 0; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius); }

/* 16. Footer ------------------------------------------------------------------- */
.footer { position: relative; overflow: hidden; padding: clamp(72px, 9vw, 130px) var(--pad) 28px; background: #121210; color: #ece8e1; }
.footer__top { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; }
.footer__claim { margin: 0; max-width: 16ch; font: 300 clamp(34px, 4.4vw, 70px)/1.02 var(--serif); }
.footer__up { flex: none; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%; border: 1px solid rgba(236, 232, 225, .3); transition: background .4s, color .4s; }
.footer__up:hover { background: #ece8e1; color: #121210; }
.footer__up svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.footer__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 220px)); gap: 32px; margin-top: clamp(48px, 6vw, 80px); }
.footer__cols div { display: flex; flex-direction: column; gap: 6px; font-size: 14.5px; }
.footer__cols .eyebrow { color: #8f8a82; }
.footer__cols a { width: fit-content; opacity: .85; } .footer__cols a:hover { opacity: 1; color: var(--accent); }
.footer__word { margin: clamp(40px, 6vw, 80px) -.04em -.12em; font: 300 clamp(80px, 23.5vw, 420px)/.85 var(--serif); letter-spacing: -.045em; white-space: nowrap; color: transparent; -webkit-text-stroke: 1px rgba(236, 232, 225, .42); }
.footer__base { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 22px; border-top: 1px solid rgba(236, 232, 225, .14); color: #8f8a82; }

/* 17. Generated render fallbacks (shown until the canvas is drawn, or without JS) */
.render { background: linear-gradient(#cdb79c 0 60%, #b99c7a 60%); }
.render--kiln, .render--kiln-int { background: linear-gradient(#c4ccd0, #ece7df 62%, #b8664a 62% 78%, #b7aea1 78%); }
.render--halden, .render--halden-int { background: linear-gradient(#1d2236, #d08a6c 70%, #1f1d22 70%); }
.render--sora, .render--sora-int { background: linear-gradient(#d9dcdc, #f3f2ee 64%, #9aa3a5 64%); }
.render--sketch { background: #efebe3; }
.render canvas { display: block; }

/* 18. Responsive ------------------------------------------------------------ */
@media (max-width: 1100px) {
    .nav { display: none; }
    .menu-toggle { display: block; }
    .header__actions .btn { display: none; }
    .disciplines { grid-template-columns: repeat(2, 1fr); }
    .award { grid-template-columns: 70px 1.5fr 1fr; }
    .award > .mono:last-child { display: none; }
}
@media (max-width: 900px) {
    .studio__grid { grid-template-columns: 1fr; }
    .stats { grid-template-columns: repeat(2, 1fr); row-gap: 36px; }
    .projects__pin { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .projects__pin::-webkit-scrollbar { display: none; }
    .projects__track { gap: 22px; padding: 20px var(--pad) 56px; }
    .proj { width: 78vw; scroll-snap-align: center; }
    .proj:nth-child(even) { margin-top: 0; }
    .proj__num { font-size: 140px; }
    .proj__tag { right: 10px; top: 12px; }
    .proj--end { width: 70vw; }
    .projects__bar { display: none; }
    .case__meta { grid-template-columns: repeat(2, 1fr); }
    .case__text, .case__duo { grid-template-columns: 1fr; }
    .compare__frame { aspect-ratio: 4 / 5; }
    .steps { grid-template-columns: repeat(2, 1fr); }
    .mats { grid-template-columns: repeat(2, 1fr); }
    .people { grid-template-columns: repeat(2, 1fr); }
    .contact__grid { grid-template-columns: 1fr; }
    .award-preview { display: none; }
}
@media (max-width: 600px) {
    :root { --header-h: 64px; }
    .header__actions { gap: 8px; }
    .hero { min-height: 560px; }
    .hero__title { font-size: clamp(48px, 14vw, 72px); }
    .hero__lead { font-size: 15px; }
    .hero__hud { top: calc(var(--header-h) + 16px); }
    .hud__dial { width: 46px; height: 46px; }
    .hero__scroll { display: none; }
    .hero__ctas .btn { min-height: 48px; padding: 0 22px; }
    .disciplines { grid-template-columns: 1fr; }
    .disciplines li { padding-top: 16px; }
    .award { grid-template-columns: 1fr; gap: 4px; }
    .mats { grid-template-columns: 1fr; }
    .mat { aspect-ratio: 16 / 10; }
    .contact__blocks, .form { grid-template-columns: 1fr; }
    .people { grid-template-columns: 1fr 1fr; gap: 28px 14px; }
    .person b { font-size: 22px; }
    .person p { display: none; }
    .footer__top { flex-direction: column; }
    .footer__cols { grid-template-columns: 1fr 1fr; }
    .case__media { height: 56vh; }
    .js .cases__close { top: 12px; width: 48px; height: 48px; }
}

/* 19. Motion preferences ------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .js .mask .line > span, .js .hero__title .line > span, .js .reveal-up { transform: none !important; opacity: 1 !important; }
    .studio__text .w { opacity: 1 !important; }
    .js .map-roads path { stroke-dashoffset: 0; }
    .js .map-pin path, .js .map-pin__dot { transform: none; opacity: 1; }
    .cursor { display: none; }
}
