:root {
  --paper: #f6f3ee;
  --white: #ffffff;
  --ink: #1d1b18;
  --ink-2: #5d5850;
  --line: #e4ded4;
  --oak: #b88a55;
  --oak-2: #84592b;
  --sans: "Manrope", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 64px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2 { margin: 0; }
em { font-style: normal; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 28px;
  border: 0;
  border-radius: 999px;
  font: 700 15px/1 var(--sans);
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn--dark { background: var(--ink); color: #fff; box-shadow: 0 10px 30px rgba(29, 27, 24, .22); }
.btn--dark:hover { transform: translateY(-1px); background: #000; }
.stop .btn--dark { background: #fff; color: var(--ink); box-shadow: 0 10px 30px rgba(0, 0, 0, .3); }
.stop .btn--dark:hover { background: #f1ebe1; }

/* ---------- nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px var(--gutter);
  background: rgba(246, 243, 238, .78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, .05);
}
.nav__logo { display: flex; align-items: baseline; gap: 12px; font: 800 22px/1 var(--sans); letter-spacing: .18em; text-decoration: none; }
.nav__logo span { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); }
.nav__links { display: flex; gap: 28px; margin-left: auto; }
.nav__links a { font-size: 14px; font-weight: 600; text-decoration: none; color: var(--ink-2); }
.nav__links a:hover { color: var(--ink); }
.nav__cta { min-height: 42px; padding: 0 20px; font-size: 14px; }

/* ---------- film ---------- */
/* One screen of scroll per stop; film.js steps and eases between them. */
.film { position: relative; height: 600vh; height: 600svh; }
.snap { position: absolute; left: 0; width: 1px; height: 100vh; height: 100svh; pointer-events: none; }
.snap:nth-child(1) { top: 0; }
.snap:nth-child(2) { top: 100vh; top: 100svh; }
.snap:nth-child(3) { top: 200vh; top: 200svh; }
.snap:nth-child(4) { top: 300vh; top: 300svh; }
.snap:nth-child(5) { top: 400vh; top: 400svh; }
.snap:nth-child(6) { top: 500vh; top: 500svh; }
.film__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--paper);
}
.film__poster, .film__canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.film[data-ready="true"] .film__poster { visibility: hidden; }

/* The copy sits on the left over a dark warm wash, white type (as on Nextline) */
.film__wash {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(22, 19, 15, .8) 0%, rgba(22, 19, 15, .52) 32%, rgba(22, 19, 15, 0) 56%);
  opacity: 0;
  transition: opacity .45s ease;
}
.film[data-copy="on"] .film__wash { opacity: 1; transition: opacity .6s ease .05s; }

.stop {
  position: absolute;
  left: var(--gutter);
  top: 52%;
  width: min(820px, 58vw);
  translate: 0 -50%;
  opacity: 0;
  visibility: hidden;
  transform: translateX(48px);
  color: #fff;
  text-shadow: 0 2px 24px rgba(0, 0, 0, .35);
  transition: opacity .5s ease, transform .6s cubic-bezier(.2, .7, .2, 1), visibility 0s .6s;
}
.stop.is-on { opacity: 1; visibility: visible; transform: none; transition: opacity .5s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
.stop.is-gone { transform: translateX(-48px); }

.stop__eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 24px;
  font: 700 12px/1 var(--sans);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .78);
}
.stop__n {
  display: inline-grid;
  place-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 50%;
  font: 700 13px/1 var(--sans);
  letter-spacing: 0;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
/* two-line title: a bold statement and a lighter second line */
.stop__title { font: 800 clamp(40px, 4.2vw, 70px)/1.02 var(--sans); letter-spacing: -.035em; }
.stop__title em, .h2 em { display: block; font-weight: 300; color: var(--oak-2); }
.stop__title em { color: #e6c494; }
.stop__text { margin: 20px 0 0; font-size: clamp(17px, 1.3vw, 20px); line-height: 1.5; color: rgba(255, 255, 255, .86); max-width: 44ch; text-wrap: pretty; }
.fact {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 22px 0 0;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  border-color: rgba(255, 255, 255, .28) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  font-size: 14px;
  font-weight: 600;
}
.fact::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--oak); }
.stop__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 30px; }
.hint { font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, .8); }
.hint i { display: inline-block; font-style: normal; color: #e6c494; animation: nudge 1.6s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateY(4px); } }

.pills {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  bottom: 30px;
  display: flex;
  gap: 4px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .08);
}
.pills button {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  background: transparent;
  font: 700 13px/1 var(--sans);
  color: var(--ink-2);
  cursor: pointer;
  white-space: nowrap;
  transition: background .25s, color .25s;
}
.pills button:hover { color: var(--ink); }
.pills button.is-on { background: var(--ink); color: #fff; }

.film__progress { position: absolute; inset: auto 0 0; height: 3px; background: rgba(0, 0, 0, .06); }
.film__progress span { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: var(--oak); }

/* live renovation counter */
.hud {
  position: absolute;
  right: var(--gutter);
  top: 110px;
  display: grid;
  gap: 10px;
  width: 230px;
  padding: 18px 20px;
  border-radius: 16px;
  background: rgba(22, 19, 15, .55);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
}
.hud__row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.hud__row span { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: rgba(255, 255, 255, .7); }
.hud__row b { font: 800 30px/1 var(--sans); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.hud__bar { position: relative; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.hud__bar span { position: absolute; inset: 0 auto 0 0; width: 0; background: #e6c494; }

/* full-quality frames: hold the page until every frame is in */
.loader {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 24px;
  background: var(--paper);
  transition: opacity .6s ease, visibility 0s .6s;
}
.loader__logo { font: 800 34px/1 var(--sans); letter-spacing: .24em; }
.loader__bar { position: relative; width: min(300px, 70vw); height: 2px; background: var(--line); }
.loader__bar span { position: absolute; inset: 0 auto 0 0; width: calc(var(--load, 0) * 100%); background: var(--oak); }
.loader__pct { font: 700 12px/1 var(--sans); letter-spacing: .2em; color: var(--ink-2); }
.film[data-loaded="true"] .loader { opacity: 0; visibility: hidden; }
body:has(.film:not([data-loaded="true"])) { overflow: hidden; }

/* ---------- calculator ---------- */
.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; font: 700 12px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--oak-2); }
.eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--oak); }
.h2 { font: 800 clamp(32px, 3.6vw, 56px)/1.05 var(--sans); letter-spacing: -.03em; }
.lead { margin: 18px 0 0; font-size: 18px; color: var(--ink-2); max-width: 560px; }

.calc { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 96px); align-items: center; padding: clamp(80px, 10vw, 140px) var(--gutter); }
.calc__box { display: grid; gap: 28px; padding: clamp(24px, 3vw, 40px); background: var(--white); border-radius: 18px; box-shadow: 0 30px 80px rgba(60, 45, 25, .1); }
.calc__area { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: baseline; font-weight: 700; }
.calc__area output { font: 800 32px/1 var(--sans); letter-spacing: -.02em; }
.calc__area input { grid-column: 1 / -1; width: 100%; accent-color: var(--ink); }
.calc__types { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0; padding: 0; border: 0; }
.calc__types legend { margin-bottom: 12px; font-weight: 700; }
.calc__types label { position: relative; cursor: pointer; }
.calc__types input { position: absolute; opacity: 0; }
.calc__types span { display: grid; gap: 4px; height: 100%; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; font-size: 13px; color: var(--ink-2); transition: border-color .2s, background .2s; }
.calc__types b { font-size: 15px; color: var(--ink); }
.calc__types input:checked + span { border-color: var(--ink); background: var(--paper); }
.calc__types input:focus-visible + span { outline: 2px solid var(--oak); outline-offset: 2px; }
.calc__result { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; padding-top: 22px; border-top: 1px solid var(--line); }
.calc__result span { display: block; font-size: 13px; color: var(--ink-2); }
.calc__result b { font: 800 clamp(26px, 2.4vw, 36px)/1.1 var(--sans); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.calc__note { margin: -12px 0 0; font-size: 12px; color: var(--ink-2); }

/* ---------- final ---------- */
.final { padding: clamp(80px, 10vw, 140px) var(--gutter); background: var(--white); }
.final__card { max-width: 640px; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; margin-top: 30px; }
.form label { display: grid; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-2); }
.form input:not([type="checkbox"]) { height: 52px; padding: 0 16px; border: 1px solid #d8d1c5; border-radius: 10px; background: var(--paper); font: 400 16px var(--sans); color: var(--ink); }
.form input:focus { outline: none; border-color: var(--ink); }
.form__consent { display: flex !important; align-items: center; gap: 10px !important; text-transform: none !important; letter-spacing: 0 !important; font-weight: 500 !important; font-size: 14px !important; }
.form__consent input { width: 18px; height: 18px; accent-color: var(--ink); }
.form__wide { grid-column: 1 / -1; }
.form__done { margin: 0; color: var(--ink-2); font-size: 14px; }

.footer { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; padding: 30px var(--gutter); border-top: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }
.footer__logo { margin-right: auto; font: 800 18px/1 var(--sans); letter-spacing: .18em; color: var(--ink); }

/* ---------- phone ---------- */
/* the phone frames pan from the kitchen to the living room; the copy sits on
   the ceiling at the top, over a light wash */
@media (max-width: 860px) {
  .nav { gap: 12px; padding: 12px 16px; }
  .nav__links, .nav__logo span { display: none; }
  .nav__logo { font-size: 18px; }
  .nav__cta { margin-left: auto; min-height: 38px; padding: 0 14px; font-size: 12px; }

  .film__wash { background: linear-gradient(180deg, rgba(22, 19, 15, .88) 0%, rgba(22, 19, 15, .62) 36%, rgba(22, 19, 15, 0) 56%); }
  .stop { left: 16px; right: 16px; top: 76px; width: auto; translate: none; }
  .hud { top: auto; bottom: 64px; right: 16px; width: 170px; padding: 12px 14px; gap: 6px; }
  .hud__row b { font-size: 20px; }
  .hud__row span { font-size: 9px; }
  .stop__eyebrow { margin-bottom: 14px; font-size: 10px; gap: 10px; }
  .stop__n { width: 30px; height: 30px; font-size: 11px; }
  .stop__title { font-size: 34px; }
  .stop__text { margin-top: 10px; font-size: 16px; max-width: none; }
  .fact { margin-top: 12px; font-size: 13px; padding: 8px 14px; }
  .stop__actions { margin-top: 16px; }
  .stop__actions .btn { min-height: 46px; }
  .hint { display: none; }
  .pills { left: 10px; right: 10px; translate: none; bottom: 16px; gap: 0; padding: 4px; justify-content: space-between; overflow-x: auto; }
  .pills button { padding: 8px 8px; font-size: 10.5px; }

  .calc { grid-template-columns: 1fr; }
  .calc__types { grid-template-columns: 1fr; }
  .calc__result b { font-size: 24px; }
  .form { grid-template-columns: 1fr; }
  .lead { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .stop, .stop.is-on { transition: none; }
  .hint i { animation: none; }
}
