:root {
  color-scheme: dark;
  --ink: #141413;
  --panel: #1a1917;
  --white: #f5f1e9;
  --muted: #c1bab0;
  --muted-dark: #aaa298;
  --line: #3a3731;
  --accent: #f2bc87;
  --accent-light: #ffd5ab;
  --gutter: clamp(1.25rem, 5.2vw, 4.75rem);
  --font-ui: "Geist", "Inter", "Helvetica Neue", Arial, sans-serif;
  --font-detail: "IBM Plex Mono", "Courier New", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 6rem; }
body { margin: 0; background: var(--ink); color: var(--white); font: 1rem/1.6 var(--font-ui); }
body:has(dialog[open]) { overflow: hidden; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button, input { font: inherit; }
button { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent-light); outline-offset: 4px; }
h1, h2, h3, p, figure { margin: 0; }
h1, h2, h3 { line-height: 1.05; text-wrap: balance; }
.shell { width: min(100% - var(--gutter) * 2, 84rem); margin-inline: auto; }
.skip-link { position: fixed; z-index: 10; top: .75rem; left: .75rem; padding: .5rem .9rem; transform: translateY(-200%); background: var(--accent); color: var(--ink); }
.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  z-index: 5;
  inset-block-start: 0;
  border-bottom: 1px solid var(--line);
  background: rgba(20, 20, 19, .96);
  backdrop-filter: blur(12px);
}
.header-inner { min-height: 4.6rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .66rem; color: var(--white); text-decoration: none; font-size: 1.28rem; font-weight: 650; letter-spacing: -.045em; white-space: nowrap; }
.brand b { color: var(--accent); }
.brand-mark { flex: none; position: relative; width: 1.8rem; aspect-ratio: 1; }
.brand-mark::before, .brand-mark::after { content: ""; position: absolute; inset: 0; background: var(--accent); }
.brand-mark::before { clip-path: polygon(50% 2%, 96% 25%, 96% 75%, 50% 98%, 4% 75%, 4% 25%, 50% 2%, 50% 10%, 11% 30%, 11% 70%, 50% 90%, 89% 70%, 89% 30%, 50% 10%); }
.brand-mark::after { clip-path: polygon(7% 26%, 50% 48%, 93% 26%, 93% 34%, 54% 54%, 54% 92%, 46% 92%, 46% 54%, 7% 34%); }
.site-nav { display: flex; align-items: center; gap: clamp(1.15rem, 3.4vw, 3.1rem); }
.site-nav a { text-decoration: none; color: var(--muted); font-size: .91rem; font-weight: 550; }
.site-nav a:hover, .site-nav a:focus-visible { color: var(--white); }
.site-nav .nav-contact, .menu-toggle { display: none; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: .9rem; min-height: 3.25rem; padding: .65rem 1.05rem; border: 1px solid transparent; text-decoration: none; font-weight: 700; font-size: .91rem; line-height: 1.2; transition: background-color .18s, border-color .18s, color .18s; }
.arrow { position: relative; display: inline-block; flex: none; width: .72rem; height: .72rem; }
.arrow::before, .arrow::after { content: ""; position: absolute; top: 50%; }
.arrow::before { inset-inline: 0; border-top: 1px solid currentColor; }
.arrow::after { right: 1px; width: .4rem; height: .4rem; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: translateY(-50%) rotate(45deg); }
.arrow-up-right { transform: rotate(-45deg); }
.arrow-up { transform: rotate(-90deg); }
.arrow-down { transform: rotate(90deg); }
.button-small { min-height: 2.65rem; font-size: .82rem; }
.button-primary { color: #20170e; background: var(--accent); }
.button-primary:hover { background: var(--accent-light); }
.button-outline { border-color: #676055; color: var(--white); }
.button-outline:hover { border-color: var(--accent); color: var(--accent-light); background: #28221d; }

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 77% 39%, #302921 0%, transparent 58%),
    radial-gradient(ellipse at 7% 91%, #1d1b17 0%, transparent 49%),
    var(--ink);
}
.hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(#e1bd8316 1px, transparent 1px), linear-gradient(90deg, #e1bd8316 1px, transparent 1px);
  background-size: 2.7rem 2.7rem;
  mask-image: linear-gradient(95deg, #000 8%, #0002 68%, transparent);
}
.hero-inner { display: grid; grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr); gap: clamp(2.2rem, 5vw, 5rem); align-items: center; padding-block: clamp(4rem, 6.8vw, 7.1rem); }
.hero-copy { padding-bottom: 1.8rem; }
.eyebrow { display: flex; align-items: center; gap: .66rem; color: var(--accent); font: 700 .73rem/1.45 var(--font-detail); letter-spacing: .085em; text-transform: uppercase; }
.eyebrow span { display: block; flex: none; width: 1.64rem; height: 1px; background: var(--accent); }
.hero h1 { margin-top: 1.12rem; font-size: clamp(3.6rem, 6.5vw, 7rem); letter-spacing: -.08em; line-height: .95; font-weight: 740; text-wrap: initial; }
.hero h1 em { display: block; color: var(--accent); font-style: normal; }
.hero-lead { max-width: 25rem; margin-top: 1.48rem; color: var(--muted); font-size: clamp(1.02rem, 1.5vw, 1.2rem); line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .64rem; margin-top: 1.62rem; }
.hero-figure { margin: 0; min-width: 0; }
.comparison { position: relative; --split: 54%; --handle-size: 2.65rem; background: #2e2f2a; border: 1px solid #8f7962; box-shadow: 0 1.5rem 4rem #0006; }
.comparison:focus-within { outline: 2px solid var(--accent-light); outline-offset: 4px; }
.comparison-images { position: relative; aspect-ratio: 590 / 332; overflow: hidden; }
.comparison-images img { width: 100%; height: 100%; object-fit: cover; }
.comparison-images .comparison-cut { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--split)) 0 0); }
.view-label { position: absolute; inset-block-start: .86rem; z-index: 1; padding: .35rem .56rem; background: #171510da; border: 1px solid #ffffff32; color: var(--white); pointer-events: none; font: 700 .66rem/1.35 var(--font-detail); text-transform: uppercase; letter-spacing: .055em; }
.view-label-cut { inset-inline-start: .86rem; }
.view-label-exterior { inset-inline-end: .86rem; }
.comparison-line { position: absolute; z-index: 1; inset: 0 auto 0 var(--split); width: 2px; transform: translateX(-50%); background: var(--accent-light); box-shadow: 0 0 .55rem #1b140eba; pointer-events: none; }
.comparison-handle { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: var(--handle-size); aspect-ratio: 1; transform: translate(-50%, -50%); border: 1px solid #20170e; border-radius: 50%; background: var(--accent); box-shadow: 0 2px 12px #130e08a8; }
.comparison-handle::before, .comparison-handle::after { content: ""; position: absolute; width: .45rem; height: .45rem; border: solid #20170e; border-width: 0 2px 2px 0; }
.comparison-handle::before { transform: translateX(-.31rem) rotate(135deg); }
.comparison-handle::after { transform: translateX(.31rem) rotate(-45deg); }
.comparison-input { appearance: none; position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
.comparison-input::-webkit-slider-thumb { appearance: none; width: 1px; height: 3rem; }
.comparison-input::-moz-range-thumb { width: 1px; height: 3rem; border: 0; }
.hero-figure figcaption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .32rem 1rem; margin-top: .76rem; font-size: .78rem; color: var(--muted); }
.comparison-hint { color: var(--muted-dark); }

.section { padding-block: clamp(3.2rem, 6vw, 6rem); }
.section h2 { font-size: clamp(2.5rem, 5.2vw, 4.8rem); font-weight: 710; letter-spacing: -.062em; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: clamp(1.5rem, 3.15vw, 2.75rem); }
.section-heading > p { max-width: 22rem; color: var(--muted); }
.text-link { display: inline-flex; gap: .5rem; align-items: center; color: var(--accent); text-decoration: none; font-size: .9rem; font-weight: 650; }
.text-link:hover { text-decoration: underline; text-underline-offset: .22em; }
.work-grid { display: grid; grid-template-columns: minmax(0, 1.85fr) repeat(2, minmax(0, 1fr)); gap: clamp(.95rem, 1.6vw, 1.55rem); }
.work-card { min-width: 0; }
.work-image { display: block; position: relative; overflow: hidden; height: clamp(11.5rem, 22.4vw, 20.6rem); background: var(--panel); border: 1px solid var(--line); }
.work-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .28s ease; }
.work-image:hover img, .work-image:focus-visible img { transform: scale(1.035); }
.expand-icon { position: absolute; display: grid; place-items: center; right: .7rem; bottom: .7rem; height: 2.15rem; width: 2.15rem; color: var(--white); border: 1px solid #ffffff5e; background: #161513df; font-size: 1.25rem; line-height: 1; }
.work-image:hover .expand-icon { color: var(--ink); background: var(--accent); border-color: var(--accent); }
.work-caption { padding-top: .85rem; }
.work-type { color: var(--accent); font: 700 .64rem/1.5 var(--font-detail); letter-spacing: .095em; text-transform: uppercase; }
.work-caption h3 { margin-top: .25rem; font-size: clamp(1.08rem, 1.7vw, 1.45rem); letter-spacing: -.025em; }

.services { border-block: 1px solid var(--line); background: var(--panel); }
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); }
.service { padding: clamp(1.2rem, 3vw, 2.45rem); }
.service + .service { border-left: 1px solid var(--line); }
.service-icon { display: block; position: relative; width: 2.1rem; aspect-ratio: 1; margin-bottom: 1.45rem; color: var(--accent); }
.service-icon::before, .service-icon::after { content: ""; position: absolute; }
.service-icon-view::before { inset: .2rem 0; border: 1px solid currentColor; }
.service-icon-view::after { inset: .6rem .39rem; border: 1px solid currentColor; background: linear-gradient(140deg, transparent 46%, currentColor 47% 51%, transparent 52%); }
.service-icon-model::before, .service-icon-model::after { aspect-ratio: 1; width: 64%; border: 1px solid currentColor; }
.service-icon-model::before { inset: .12rem .13rem auto auto; }
.service-icon-model::after { inset: auto auto .12rem .13rem; background: var(--panel); }
.service-icon-plan::before { inset: .06rem .27rem; border: 1px solid currentColor; }
.service-icon-plan::after { inset: .13rem .8rem .13rem .32rem; border-right: 1px solid currentColor; background: linear-gradient(transparent 46%, currentColor 47% 50%, transparent 51%); }
.service h3, .steps h3 { font-size: clamp(1.12rem, 2.05vw, 1.65rem); letter-spacing: -.035em; }
.service p, .steps p { margin-top: .66rem; max-width: 29rem; color: var(--muted); font-size: .95rem; }
.process { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 3rem; align-items: start; }
.process h2 { max-width: 8ch; }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2.5rem 1fr; padding: 1.2rem 0; border-top: 1px solid var(--line); }
.steps li:last-child { border-bottom: 1px solid var(--line); }
.steps li::before { content: "0" counter(step); margin-top: .15rem; color: var(--accent); font: 700 .73rem/1.4 var(--font-detail); letter-spacing: .06em; }
.steps p { grid-column: 2; margin-top: .43rem; }

.contact { border-block: 1px solid #55402d; background: radial-gradient(ellipse at 9% 75%, #3a2a1d, transparent 70%), #201a15; }
.contact-inner { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 3rem; align-items: end; }
.contact h2 { margin-top: 1rem; }
.contact-details { padding-bottom: .35rem; }
.contact-details p { max-width: 28rem; margin-bottom: 1rem; color: var(--muted); }
.contact-email { display: inline-block; margin: .6rem 0 .6rem .85rem; color: var(--white); font-size: .89rem; text-underline-offset: .23em; }
.contact-email:hover { color: var(--accent-light); }
.site-footer { color: var(--muted-dark); font-size: .85rem; }
.footer-inner { min-height: 5.15rem; display: flex; align-items: center; gap: .8rem 2rem; flex-wrap: wrap; padding-block: .8rem; }
.footer-inner .text-link { font-size: .84rem; }
.footer-top { margin-left: auto; }

.project-viewer { max-width: min(calc(100% - 2rem), 66rem); max-height: calc(100% - 2rem); padding: 0; border: 1px solid #756456; background: var(--panel); color: var(--white); }
.project-viewer::backdrop { background: #080706dc; }
.viewer-body { padding: .75rem; }
.viewer-header { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; margin-bottom: .7rem; }
.viewer-header h2 { font-size: clamp(1.08rem, 4vw, 1.5rem); letter-spacing: -.025em; }
.viewer-close { display: grid; place-items: center; width: 2.65rem; height: 2.65rem; background: transparent; border: 1px solid #756456; cursor: pointer; font-size: 1.75rem; line-height: 1; }
.viewer-close:hover { color: var(--accent); }
.viewer-image { width: auto; max-height: calc(100dvh - 8rem); max-width: 100%; margin-inline: auto; object-fit: contain; }

@media (max-width: 62rem) {
  .hero-inner { gap: 2.2rem; }
  .hero-copy { padding-bottom: 0; }
}

@media (max-width: 45rem) {
  html { scroll-padding-top: 4.35rem; }
  .header-inner { min-height: 3.8rem; flex-wrap: wrap; }
  .brand { font-size: 1.18rem; }
  .brand-mark { width: 1.6rem; }
  .header-contact { display: none; }
  .site-nav { width: 100%; padding: 0 0 .85rem; justify-content: space-between; gap: .6rem; }
  .site-nav .nav-contact { display: inline; }
  .menu-toggle { display: inline-block; padding: .25rem .68rem; border: 1px solid #756456; background: transparent; color: var(--white); font-size: .88rem; min-height: 2.5rem; cursor: pointer; }
  .header-inner[data-menu-open="false"] .site-nav { display: none; }
  .header-inner[data-menu-open="true"] .site-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .header-inner[data-menu-open="true"] .site-nav a { display: block; padding: .45rem .2rem; }
  .hero-inner { grid-template-columns: 1fr; padding-block: 3rem 2.55rem; gap: 1.8rem; }
  .hero h1 { font-size: clamp(3.6rem, 11.3vw, 5.6rem); }
  .hero-lead { margin-top: 1rem; }
  .hero-actions { margin-top: 1.18rem; }
  .hero-figure figcaption { margin-top: .55rem; font-size: .72rem; }
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 1.25rem; }
  .work-card-wide { grid-column: 1 / -1; }
  .work-image { height: auto; aspect-ratio: 1; }
  .work-card-wide .work-image { aspect-ratio: 16 / 9; }
  .section-heading { align-items: start; flex-direction: column; }
  .service-grid, .process, .contact-inner { grid-template-columns: 1fr; }
  .service + .service { border-left: 0; border-top: 1px solid var(--line); }
  .service-icon { margin-bottom: .9rem; }
  .process, .contact-inner { gap: 1.45rem; }
  .process h2 { max-width: none; }
  .contact-email { margin-inline-start: .65rem; }
}

@media (max-width: 24rem) {
  .hero h1 { font-size: 3.25rem; }
  .hero-actions { gap: .45rem; }
  .hero-actions .button { padding-inline: .7rem; gap: .4rem; }
  .comparison { --handle-size: 2.35rem; }
  .view-label { inset-block-start: .5rem; padding: .25rem .38rem; }
  .view-label-cut { inset-inline-start: .5rem; }
  .view-label-exterior { inset-inline-end: .5rem; }
  .contact-email { display: block; margin: .7rem 0 0; }
  .footer-inner { gap: .55rem 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
