:root {
  --bg: #000000;
  --panel: #141414;
  --panel-2: #1a1a1a;
  --ink: #f2f2f0;
  --muted: #c6c6c1;
  --dim: #9c9c97;
  --grey: #8d8d89;
  --accent: #8fcab8;
  --line: #ffffff1c;
  --line-2: #ffffff40;
  --sans: 'Inter Tight', 'Helvetica Neue', Helvetica, Arial, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; transition: color .2s; }
a:hover { color: var(--muted); }
a:focus-visible { outline: 1px solid var(--ink); outline-offset: 5px; }
::selection { background: var(--ink); color: var(--bg); }

h1, h2, h3 { font-weight: 400; margin: 0; }
h1 { font-size: clamp(42px, 6.8vw, 104px); line-height: 1; letter-spacing: -.045em; font-weight: 500; }
h2 { font-size: clamp(34px, 4.2vw, 60px); line-height: 1.04; letter-spacing: -.035em; }
h3 { font-size: 20px; line-height: 1.3; letter-spacing: -.015em; }
em { font-style: normal; color: var(--accent); }
p { margin: 0 0 20px; }


.site-header, main, footer { width: min(1320px, 90%); margin: auto; }
.site-header { padding: 26px 0; display: flex; justify-content: space-between; align-items: center; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.mark { width: 26px; height: 24px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 16; }
.brand span { font-weight: 400; margin-left: 4px; color: var(--muted); }
nav { display: flex; align-items: center; gap: 32px; font-size: 14px; color: var(--muted); }
nav a:hover { color: var(--ink); }
.nav-cta { color: var(--ink); border-bottom: 1px solid var(--ink); padding-bottom: 2px; }

.btn {
  display: inline-flex; align-items: center; gap: 18px;
  padding: 14px 22px; background: var(--ink); color: var(--bg); font-size: 15px; font-weight: 500;
  transition: background .2s;
}
.btn:hover { background: #ffffff; color: var(--bg); }
.btn span { transition: transform .2s; }
.btn:hover span { transform: translateX(3px); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line-2); font-weight: 400; }
.btn.ghost:hover { border-color: var(--ink); color: var(--ink); }

/* Hero */
.hero { padding: 24px 0 0; }
.hero-stage { position: relative; min-height: clamp(560px, 46vw, 680px); display: flex; align-items: center; overflow: hidden; }
.hero-video { position: absolute; top: 0; left: 17%; height: 100%; width: auto; max-width: none; pointer-events: none;
  --mask: linear-gradient(90deg, transparent 29%, #000 36%, #000 76%, transparent 83%), linear-gradient(180deg, transparent 0, #000 3%, #000 97%, transparent 100%);
  -webkit-mask-image: var(--mask); mask-image: var(--mask); -webkit-mask-composite: source-in; mask-composite: intersect; }
.hero-copy { position: relative; z-index: 1; max-width: 54%; padding: 40px 0; }
.hero-copy h1 { font-size: clamp(40px, 4.2vw, 60px); line-height: 1.02; }
.hero-copy p { font-size: 18px; line-height: 1.55; max-width: 500px; color: var(--muted); margin: 30px 0 34px; }
.h1-static { display: block; color: var(--grey); }
.rotator { display: block; position: relative; height: 1.1em; overflow: hidden; color: var(--accent); }
.rotator-phrase { display: inline-block; white-space: nowrap; }
.rotator-phrase .w { display: inline-block; }
.rotator-phrase.out .w { animation: wordOut .45s cubic-bezier(.6, 0, .8, .3) forwards; }
.rotator-phrase.in .w { animation: wordIn .7s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes wordOut { to { transform: translateY(-100%); opacity: 0; } }
@keyframes wordIn { from { transform: translateY(100%); opacity: 0; } }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-steps { margin: 56px 0 0; max-width: 460px; padding: 0; list-style: none; display: flex; gap: 28px; font-size: 13px; color: var(--dim); counter-reset: step; }
.hero-steps li { flex: 1; counter-increment: step; position: relative; padding-top: 12px; transition: color .4s; }
.hero-steps li:before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 1px; background: var(--line-2); transition: background .4s; }
.hero-steps li.active { color: var(--ink); }
.hero-steps li.active:before { background: var(--accent); }

/* Image slots */
.media {
  position: relative; margin: 0; min-width: 0; overflow: hidden; aspect-ratio: 1.3;
  background: repeating-linear-gradient(135deg, transparent 0 14px, #ffffff06 14px 15px), var(--panel);
}
.media-note {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  font-size: 18px; color: var(--muted); text-align: center; padding: 20px;
}
.media-note small { font-size: 13px; color: var(--dim); }
.media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.people img { object-position: 55% 65%; }
figcaption { display: flex; justify-content: space-between; gap: 15px; padding: 12px 0; color: var(--dim); font-size: 12px; }
.media figcaption { position: absolute; left: 18px; right: 18px; bottom: 0; border-top: 1px solid var(--line); }

/* Sections */
section { padding: 130px 0 0; }
.lede { margin: 26px 0 0; font-size: 19px; line-height: 1.55; color: var(--muted); max-width: 560px; }
.num { display: block; font-size: 13px; color: var(--accent); margin-bottom: 10px; font-variant-numeric: tabular-nums; }

.problem { display: grid; grid-template-columns: 1fr 1fr; gap: 8%; align-items: start; }
.problem-media { margin-top: 48px; aspect-ratio: 1; background: #0a0a0a; }
.pains { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.pain { padding: 28px 0 30px; border-bottom: 1px solid var(--line); }
.pain h3 { font-size: clamp(24px, 2.2vw, 30px); line-height: 1.15; letter-spacing: -.03em; margin-bottom: 14px; }
.fix { color: var(--muted); margin: 0; max-width: 540px; }

.carry { display: grid; grid-template-columns: 1fr 1.25fr; gap: 7%; align-items: center; }
.calc { border: 1px solid var(--line); background: var(--panel); display: grid; grid-template-columns: 1.1fr 1fr; }
.inputs { padding: 30px; display: grid; gap: 28px; }
.field { display: block; cursor: pointer; }
.field-top { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.field-top output { color: var(--ink); font-variant-numeric: tabular-nums; }
.field small { display: block; margin-top: 8px; font-size: 12px; color: var(--dim); }
.field input[type=range] { -webkit-appearance: none; appearance: none; width: 100%; height: 18px; background: transparent; margin: 0; }
.field input[type=range]::-webkit-slider-runnable-track { height: 1px; background: linear-gradient(90deg, var(--accent) var(--fill, 50%), var(--line-2) var(--fill, 50%)); }
.field input[type=range]::-moz-range-track { height: 1px; background: var(--line-2); }
.field input[type=range]::-moz-range-progress { height: 1px; background: var(--accent); }
.field input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--ink); margin-top: -6.5px; border: 0; }
.field input[type=range]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--ink); border: 0; }
.field input[type=range]:focus-visible { outline: 1px solid var(--ink); outline-offset: 6px; }
.results { border-left: 1px solid var(--line); padding: 30px; display: flex; flex-direction: column; gap: 22px; }
.results .total span { display: block; font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.results .total strong { display: block; font-weight: 300; font-size: clamp(48px, 5vw, 72px); line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; color: var(--accent); }
.split { display: flex; gap: 3px; height: 6px; }
.split i { display: block; flex: 1 1 0; min-width: 4px; }
.seg-carry { background: var(--ink); }
.seg-build { background: var(--grey); }
.seg-errors { background: var(--accent); }
.lines { margin: 0; display: grid; gap: 0; }
.lines div { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0; border-top: 1px solid var(--line); }
.lines dt { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.lines .key { width: 8px; height: 8px; display: inline-block; }
.lines dd { margin: 0; font-size: 22px; font-weight: 300; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.calc-note { margin: auto 0 0; font-size: 12px; color: var(--dim); }

/* Approach + study drawing */
.approach { display: grid; grid-template-columns: 1fr 1.2fr; gap: 7%; align-items: center; }
.points { list-style: none; margin: 40px 0 0; padding: 0; }
.points li { padding: 18px 0; border-top: 1px solid var(--line); color: var(--muted); }
.points strong { color: var(--ink); font-weight: 500; display: block; margin-bottom: 4px; }

.study { margin: 0; background: var(--panel); border: 1px solid var(--line); }
.massing { width: 100%; display: block; aspect-ratio: 1.45; }
.massing .street { fill: #121212; }
.massing .lane { stroke: #ffffff26; stroke-width: .8; stroke-dasharray: 6 6; }
.massing .context polygon { fill: #151515; stroke: #ffffff1a; stroke-width: .6; stroke-linejoin: round; }
.massing .context .face-top { fill: #1a1a1a; }
.massing .parcel { fill: #ffffff05; stroke: var(--ink); stroke-opacity: .6; stroke-width: .9; }
.massing .setback { fill: none; stroke: var(--accent); stroke-opacity: .8; stroke-dasharray: 3 4; stroke-width: .8; }
.massing .dim-line { stroke: var(--dim); stroke-width: .6; }
.massing .dim text { fill: var(--dim); font-size: 9px; font-family: var(--sans); letter-spacing: .02em; }
.massing .floor { opacity: 0; transform: translateY(12px); animation: rise .5s cubic-bezier(.2, .8, .2, 1) forwards; }
.massing .floor.leaving { animation: sink .4s ease-in forwards; }
.massing .floor polygon { stroke: #0b0b0b; stroke-opacity: .45; stroke-width: .6; stroke-linejoin: round; }
.massing .floor .face-top { fill: #ecece7; }
.massing .floor .face-side { fill: #cfcfca; }
.massing .floor .face-front { fill: #b3b3ae; }
.massing .floor .bay { stroke: #0b0b0b; stroke-opacity: .28; stroke-width: .5; }
.massing .floor.podium .face-top { fill: #5f736c; }
.massing .floor.podium .face-side { fill: #6a6a67; }
.massing .floor.podium .face-front { fill: #565654; }
.massing .floor.podium .bay { stroke: #ffffff; stroke-opacity: .22; }
.massing .tree circle { fill: var(--accent); fill-opacity: .85; stroke: #0b0b0b; stroke-opacity: .3; stroke-width: .5; }
.massing .tree .trunk { stroke: #0b0b0b; stroke-opacity: .5; stroke-width: 1; }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes sink { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-8px); } }

.readout { border-top: 1px solid var(--line); padding: 18px 22px 0; }
.ro-top { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 13px; }
.ro-top b { color: var(--ink); font-weight: 500; }
.ro-top span:last-child { color: var(--ink); }
.readout dl { margin: 16px 0 0; display: grid; grid-template-columns: repeat(5, 1fr); }
.readout dl div { padding: 0 12px; border-left: 1px solid var(--line); }
.readout dl div:first-child { padding-left: 0; border-left: 0; }
.readout dt { color: var(--dim); font-size: 12px; }
.readout dd { margin: 4px 0 0; font-size: 22px; white-space: nowrap; font-weight: 300; letter-spacing: -.03em; line-height: 1.15; font-variant-numeric: tabular-nums; transition: opacity .3s; }
.readout dd.flash { opacity: .4; }
.ro-bar { margin-top: 18px; height: 1px; background: var(--line); }
.ro-bar i { display: block; height: 100%; width: 0; background: var(--ink); }
.study figcaption { padding: 12px 22px; }

/* Services */
.section-head { border-top: 1px solid var(--ink); padding-top: 30px; margin-bottom: 48px; }
.phases { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.phases h3 { font-size: 24px; line-height: 1.15; letter-spacing: -.03em; margin-bottom: 14px; }
.phases p { color: var(--muted); font-size: 15px; margin: 0; }

.closing { display: grid; grid-template-columns: 1.1fr 1fr; gap: 8%; align-items: center; padding-bottom: 130px; }
.closing p { color: var(--muted); max-width: 440px; margin: 26px 0 34px; font-size: 18px; }
.people { aspect-ratio: 1.25; }

footer { padding: 34px 0 48px; border-top: 1px solid var(--line-2); }
.footer-top { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.fine { font-size: 12px; color: var(--dim); margin: 20px 0 0; }

/* Scroll reveal (only when JS is running) */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .8s cubic-bezier(.2, .8, .2, 1), transform .8s cubic-bezier(.2, .8, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .hero-stage { flex-direction: column; align-items: stretch; min-height: 0; }
  .hero-copy { order: 1; }
  .hero-video { order: 2; }
  .hero-copy { max-width: none; padding: 32px 0 0; }
  .hero-copy h1 { font-size: clamp(38px, 9vw, 56px); }
  .rotator { height: 2.2em; }
  .rotator-phrase { white-space: normal; }
  .hero-video { position: relative; left: auto; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; object-position: 54% 50%; margin-top: 8px; --mask: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%), linear-gradient(180deg, transparent 0, #000 4%, #000 96%, transparent 100%); }
  .hero-steps { margin-top: 36px; gap: 16px; font-size: 12px; max-width: none; }
}

@media (max-width: 1000px) {
  .problem, .approach, .carry { grid-template-columns: 1fr; gap: 50px; }
  .phases { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
}

@media (max-width: 760px) {
  nav a:not(.nav-cta) { display: none; }
  section { padding-top: 90px; }
  .lede { font-size: 17px; }
  .calc { grid-template-columns: 1fr; }
  .results { border-left: 0; border-top: 1px solid var(--line); }
  .inputs, .results { padding: 24px; }
  .readout dl { grid-template-columns: repeat(3, 1fr); row-gap: 14px; }
  .readout dl div:nth-child(4) { padding-left: 0; border-left: 0; }
  .ro-top { flex-direction: column; gap: 2px; }
  .phases { grid-template-columns: 1fr; }
  .closing { grid-template-columns: 1fr; gap: 40px; padding-bottom: 90px; }
  .media figcaption, figcaption { flex-direction: column; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *:before, *:after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; animation-delay: 0s !important; }
  .massing .floor { animation: none !important; opacity: 1; transform: none; }
}
