/* ==========================================================================
   CHALKLINE — Interior design & renovation, Tai Seng

   One aesthetic: plan in hand. Ink linework on skim-coat white for
   structure, photographs for proof, and one blue — the blue a chalk line
   leaves on the screed — for anything new. Every colour pair below was
   measured (ratios in the comments); the muted tone is the one that fails
   in practice, so it never sits on the screed grey.

   Radii are zero except on pill buttons. There is no decorative grid.
   The only rules on the page are the ones that separate a line item
   from its total.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */

:root {
  --plaster:    #F0EFEA;
  --plaster-2:  #E7E6E0;
  --screed:     #D8D7D0;
  --screed-2:   #C6C5BE;
  --ink:        #17191C;   /* 15.3:1 on plaster */
  --ink-2:      #3B3E44;   /*  9.3:1 */
  --muted:      #5C5F66;   /*  5.55:1 on plaster — never on screed */
  --chalk:      #2743C9;   /*  6.7:1 on plaster; white on it 7.7:1 */
  --chalk-deep: #1E35A8;
  --chalk-dust: #DDE2F8;
  --chalk-line: #3B5BFF;   /* the snapped line on the dark band only */
  --dark:       #1B1C1F;
  --dark-2:     #26282C;
  --on-dark:    #ECEBE6;   /* 14.3:1 on dark */
  --on-dark-mut:#A9ABB0;   /*  7.4:1 */
  --chalk-dark: #A3B4FF;   /*  8.5:1 on dark */
  --white:      #FFFFFF;
  --err:        #B3261E;   /*  6.1:1 on plaster */

  --display: 'Young Serif', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --ui:      'Golos Text', system-ui, -apple-system, 'Segoe UI', Helvetica, Arial, sans-serif;
  --mono:    'Fragment Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --wrap:   84rem;
  --tight:  56rem;
  --gutter: clamp(1.1rem, 4vw, 2.5rem);
  --bay:    clamp(4rem, 9vw, 8rem);
  --gap:    clamp(1.25rem, 2.5vw, 2rem);

  --ease: cubic-bezier(.2, .65, .25, 1);
  --shadow: 0 1px 2px rgba(23, 25, 28, .06), 0 14px 40px rgba(23, 25, 28, .09);

  color-scheme: light;
  accent-color: var(--chalk);
}

/* --------------------------------------------------------------------------
   2. Base
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--plaster);
  color: var(--ink);
  font-family: var(--ui);
  font-size: 1.0625rem;
  line-height: 1.55;
  font-feature-settings: 'kern', 'liga';
  -webkit-font-smoothing: antialiased;
}

img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration-thickness: from-font; text-underline-offset: .14em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--chalk); outline-offset: 3px; }
.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  padding: .6rem 1rem; background: var(--ink); color: var(--white);
}
.skip:focus { top: 1rem; }

.wrap { width: min(100% - var(--gutter) * 2, var(--wrap)); margin-inline: auto; }
.wrap--tight { width: min(100% - var(--gutter) * 2, var(--tight)); margin-inline: auto; }

/* --------------------------------------------------------------------------
   3. Type
   -------------------------------------------------------------------------- */

h1, h2, h3, h4 { margin: 0; font-weight: 400; line-height: 1.05; letter-spacing: -.012em; }
h1 { font-family: var(--display); font-size: clamp(2.3rem, 4.9vw, 4.3rem); }
h2 { font-family: var(--display); font-size: clamp(1.75rem, 3.1vw, 2.7rem); }
h3 { font-family: var(--ui); font-weight: 600; font-size: 1.2rem; letter-spacing: -.005em; line-height: 1.2; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

.lede { font-size: clamp(1.1rem, 1.55vw, 1.3rem); line-height: 1.5; color: var(--ink-2); max-width: 34em; }
.label {
  font-family: var(--mono); font-size: .76rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin: 0 0 .9rem;
}
.num, .mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.small { font-size: .92rem; color: var(--ink-2); }
strong, b { font-weight: 600; }

/* --------------------------------------------------------------------------
   4. Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  padding: .82em 1.35em; border-radius: 999px;
  background: var(--chalk); color: var(--white);
  font-weight: 600; font-size: .98rem; line-height: 1; text-decoration: none;
  border: 1.5px solid var(--chalk);
  transition: background .18s, border-color .18s, color .18s, transform .18s var(--ease);
}
.btn:hover { background: var(--chalk-deep); border-color: var(--chalk-deep); }
.btn:active { transform: translateY(1px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn--wa { background: var(--ink); border-color: var(--ink); }
.btn--wa:hover { background: var(--chalk); border-color: var(--chalk); }
.btn svg { width: 1.05em; height: 1.05em; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .7rem 1rem; align-items: center; margin: 1.6rem 0 0; }

/* --------------------------------------------------------------------------
   5. Header
   -------------------------------------------------------------------------- */

.top {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--plaster) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--screed);
}
.top__in { display: flex; align-items: center; gap: var(--gap); min-height: 4.25rem; }

.mark {
  display: inline-flex; align-items: center; gap: .3rem;
  font-weight: 700; font-size: 1.05rem; letter-spacing: .16em; text-decoration: none;
  margin-right: auto;
}
.mark__line {
  display: inline-block; width: 1.5rem; height: 3px; background: var(--chalk);
  transform: translateY(-.05em);
}
.mark:hover .mark__line { width: 2.2rem; transition: width .25s var(--ease); }

.nav { display: flex; gap: 1.6rem; }
.nav a { text-decoration: none; font-weight: 500; padding: .4rem 0; border-bottom: 2px solid transparent; }
.nav a:hover { border-bottom-color: var(--screed-2); }
.nav a[aria-current="page"] { border-bottom-color: var(--chalk); }

.top__tools { display: flex; align-items: center; gap: .8rem; }
.top .btn { padding: .68em 1.1em; font-size: .92rem; }
.top .btn span { white-space: nowrap; }

.burger {
  display: none; width: 2.6rem; height: 2.6rem; padding: 0;
  border: 1.5px solid var(--ink); background: transparent; border-radius: 999px;
  align-items: center; justify-content: center;
}
.burger svg { width: 1.2rem; height: 1.2rem; }

.drawer { border-top: 1px solid var(--screed); background: var(--plaster); }
.drawer nav { display: grid; padding: 1rem 0 1.25rem; }
.drawer a { padding: .8rem 0; text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--screed); font-size: 1.1rem; }
.drawer a:last-child { border-bottom: 0; }

@media (max-width: 63.99rem) {
  .nav { display: none; }
  .burger { display: inline-flex; }
  .top .btn--wa span.txt { display: none; }
}
@media (max-width: 30rem) {
  .top__in { gap: .8rem; }
  .top__tools { gap: .5rem; }
  .mark { font-size: .95rem; letter-spacing: .12em; }
  .mark__line { width: 1.1rem; }
  /* icon only: the number lives in the aria-label and in the drawer */
  .top .btn--wa { width: 2.6rem; height: 2.6rem; padding: 0; justify-content: center; }
  .top .btn--wa span { display: none; }
  .top .btn--wa svg { width: 1.2rem; height: 1.2rem; }
}
@media (min-width: 64rem) { .drawer { display: none; } }

/* --------------------------------------------------------------------------
   6. Sections and bays
   -------------------------------------------------------------------------- */

.bay { padding-block: var(--bay); }
.bay--tight { padding-block: calc(var(--bay) * .65); }
.bay--top0 { padding-top: 0; }
.head { max-width: 40em; margin-bottom: clamp(1.75rem, 4vw, 3rem); }
.head h2 { margin-bottom: .6rem; }
.head .lede { margin-top: .6rem; }
.rule { border: 0; border-top: 1px solid var(--screed); margin: 0; }

.band--dark { background: var(--dark); color: var(--on-dark); }
.band--dark .label { color: var(--on-dark-mut); }
.band--dark .lede { color: var(--on-dark); }
.band--dark .rule { border-color: var(--dark-2); }
.band--dark .btn--ghost { color: var(--on-dark); border-color: var(--on-dark); }
.band--dark .btn--ghost:hover { background: var(--on-dark); color: var(--ink); }
.band--dark a { color: inherit; }

.band--panel { background: var(--plaster-2); }

/* --------------------------------------------------------------------------
   7. Hero
   -------------------------------------------------------------------------- */

.hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2.5rem, 5vw, 4rem); }
.hero__grid {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 5rem); align-items: start;
}
.hero__text { padding-top: clamp(.5rem, 2vw, 2rem); }
@media (min-width: 64rem) { .hero__text { position: sticky; top: 6rem; } }
.hero__text h1 { margin-bottom: 1.2rem; max-width: 9.5em; }
.hero__text .lede { margin-bottom: .4rem; }
.facts {
  display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; margin: 2rem 0 0; padding: 0; list-style: none;
  font-family: var(--mono); font-size: .8rem; color: var(--muted); letter-spacing: .02em;
}
.facts li + li::before { content: '·'; margin-right: 1.1rem; color: var(--screed-2); }

.plan-stage { position: relative; }
.plan-stage .label { display: flex; justify-content: space-between; gap: 1rem; }
.plan-stage .label b { color: var(--ink); font-weight: 400; }
.plan { background: var(--plaster); }

@media (max-width: 63.99rem) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__text h1 { max-width: none; }
}

/* --------------------------------------------------------------------------
   8. The plan (shared by hero, quote and work pages)
   -------------------------------------------------------------------------- */

.plan-svg { width: 100%; height: auto; display: block; font-family: var(--mono); overflow: visible; }
.plan-svg a { outline: none; }

.room { cursor: pointer; }
.room__floor { fill: var(--plaster); transition: fill .25s; }
.room.is-scoped .room__floor { fill: var(--plaster-2); }
.room__edge { fill: none; stroke: transparent; stroke-width: 6; stroke-linejoin: miter; transition: stroke .2s; pointer-events: none; }
.room:hover .room__edge, .room:focus-visible .room__edge, .room.is-on .room__edge { stroke: var(--chalk); }
.room__photo { opacity: 0; transition: opacity .35s var(--ease); pointer-events: none; }
.room:hover .room__photo, .room:focus-visible .room__photo, .room.is-on .room__photo { opacity: 1; }

.room__name { font-size: 23px; letter-spacing: .1em; fill: var(--ink-2); pointer-events: none; }
.room__name--sm { font-size: 18px; }
.room__area { font-size: 19px; fill: var(--muted); pointer-events: none; }
.room:hover .room__name, .room:focus-visible .room__name, .room.is-on .room__name,
.room:hover .room__area, .room:focus-visible .room__area, .room.is-on .room__area {
  fill: var(--white); paint-order: stroke; stroke: rgba(23, 25, 28, .55); stroke-width: 5px; stroke-linejoin: round;
}
/* rooms that carry no photograph still answer hover with chalk */
.room:not(.has-photo):hover .room__floor, .room:not(.has-photo):focus-visible .room__floor, .room:not(.has-photo).is-on .room__floor { fill: var(--chalk-dust); }
.room:not(.has-photo):hover .room__name, .room:not(.has-photo):focus-visible .room__name, .room:not(.has-photo).is-on .room__name,
.room:not(.has-photo):hover .room__area, .room:not(.has-photo):focus-visible .room__area, .room:not(.has-photo).is-on .room__area {
  fill: var(--chalk); stroke: none;
}

.plan-wall { fill: none; stroke: var(--ink); stroke-width: 9; stroke-linejoin: miter; }
.plan-wall--ext { stroke-width: 18; }
.plan-gap { stroke: var(--plaster); stroke-width: 11; }
.plan-gap--ext { stroke-width: 20; }
.plan-leaf { stroke: var(--ink); stroke-width: 3; stroke-linecap: square; }
.plan-swing { fill: none; stroke: var(--ink-2); stroke-width: 1.5; stroke-dasharray: 7 5; }
.plan-win { stroke: var(--ink); stroke-width: 2; }
.plan-glass { stroke: var(--ink); stroke-width: 2; stroke-dasharray: 16 8; }
.plan-dims line { stroke: var(--muted); stroke-width: 1.5; }
.plan-dims text { font-size: 21px; fill: var(--muted); letter-spacing: .04em; }

/* pick mode: rooms are toggles */
.plan-svg--pick .room[role="checkbox"] .room__floor { fill: var(--plaster); }
.plan-svg--pick .room:hover .room__floor, .plan-svg--pick .room:focus-visible .room__floor { fill: var(--plaster-2); }
.plan-svg--pick .room.is-picked .room__floor, .plan-svg--pick .room[aria-checked="true"] .room__floor { fill: var(--chalk-dust); }
.plan-svg--pick .room.is-picked .room__edge, .plan-svg--pick .room[aria-checked="true"] .room__edge { stroke: var(--chalk); stroke-width: 7; }
.plan-svg--pick .room.is-picked .room__name, .plan-svg--pick .room[aria-checked="true"] .room__name { fill: var(--chalk); stroke: none; }
.plan-svg--pick .room.is-picked .room__area, .plan-svg--pick .room[aria-checked="true"] .room__area { fill: var(--chalk); stroke: none; }
.plan-svg--pick .room:hover .room__name, .plan-svg--pick .room:focus-visible .room__name,
.plan-svg--pick .room:hover .room__area, .plan-svg--pick .room:focus-visible .room__area { fill: var(--ink); stroke: none; }

/* mini mode: static, the touched rooms chalked */
.plan-svg--mini .room { cursor: default; }
.plan-svg--mini .room__floor { fill: var(--plaster); }
.plan-svg--mini .room.is-scoped .room__floor { fill: var(--chalk-dust); }
.plan-svg--mini .room.is-scoped .room__edge { stroke: var(--chalk); stroke-width: 5; }
.plan-svg--mini .plan-wall { stroke-width: 10; }
.plan-svg--mini .plan-wall--ext { stroke-width: 20; }
.plan-svg--mini .room:hover .room__edge { stroke: transparent; }
.plan-svg--mini .room.is-scoped:hover .room__edge { stroke: var(--chalk); }
.plan-svg--mini .room:hover .room__floor { fill: var(--plaster); }
.plan-svg--mini .room.is-scoped:hover .room__floor { fill: var(--chalk-dust); }

/* the sheet under the hero plan */
.sheet { width: 100%; border-collapse: collapse; margin-top: 1.25rem; font-size: .92rem; }
.sheet th, .sheet td { text-align: left; padding: .55rem 0; border-top: 1px solid var(--screed); vertical-align: top; }
.sheet th { font-weight: 500; white-space: nowrap; padding-right: 1rem; width: 1%; }
.sheet td.desc { color: var(--ink-2); padding-right: 1rem; }
.sheet td.amt { font-family: var(--mono); text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.sheet tr.is-on th, .sheet tr.is-on td { color: var(--chalk); }
.sheet tr.is-on th { box-shadow: inset 3px 0 0 var(--chalk); padding-left: .6rem; }
.sheet tfoot th, .sheet tfoot td { border-top: 2px solid var(--ink); font-weight: 600; }
.sheet tfoot td.amt { font-weight: 400; }
.sheet caption { text-align: left; caption-side: top; }
.sheet .out { color: var(--muted); }
@media (max-width: 40rem) {
  .sheet td.desc { display: none; }
}

/* --------------------------------------------------------------------------
   9. Before / after pair
   -------------------------------------------------------------------------- */

.pair { margin: 0; }
.pair__frame {
  position: relative; overflow: hidden; background: var(--screed);
  --x: 50%;
  aspect-ratio: 16 / 9;
  touch-action: pan-y;
}
.pair__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pair__before { clip-path: inset(0 calc(100% - var(--x)) 0 0); }
.pair__handle {
  position: absolute; top: 0; bottom: 0; left: var(--x); width: 2px; margin-left: -1px;
  background: var(--white); pointer-events: none;
  box-shadow: 0 0 0 1px rgba(23, 25, 28, .18);
}
.pair__handle::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 2.6rem; height: 2.6rem;
  transform: translate(-50%, -50%); border-radius: 999px;
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2317191C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l-5 6 5 6M15 6l5 6-5 6'/%3E%3C/svg%3E") center / 1.2rem no-repeat;
  box-shadow: 0 2px 10px rgba(23, 25, 28, .25);
}
.pair__scrub {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0;
  pointer-events: none; -webkit-appearance: none; appearance: none;
}
.pair__frame:focus-within .pair__handle::after { outline: 3px solid var(--chalk); outline-offset: 2px; }
.pair__tag {
  position: absolute; top: .7rem; padding: .3rem .55rem;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  background: rgba(23, 25, 28, .72); color: var(--white); pointer-events: none;
}
.pair__tag--b { left: .7rem; }
.pair__tag--a { right: .7rem; }
.pair figcaption { display: flex; justify-content: space-between; gap: 1rem; padding-top: .7rem; font-size: .92rem; color: var(--ink-2); }
.pair figcaption b { color: var(--ink); font-weight: 600; }
.pair figcaption .num { color: var(--muted); font-size: .8rem; white-space: nowrap; }

/* without script the pair is simply two labelled photographs */
html:not(.js) .pair__frame { aspect-ratio: auto; display: grid; gap: .5rem; touch-action: auto; }
html:not(.js) .pair__frame img { position: static; height: auto; }
html:not(.js) .pair__before { clip-path: none; order: -1; }
html:not(.js) .pair__handle, html:not(.js) .pair__scrub { display: none; }
html:not(.js) .pair__tag--a { top: auto; bottom: .7rem; right: .7rem; }
html:not(.js) .pair__tag--b { top: .7rem; }

/* --------------------------------------------------------------------------
   10. Index: the argument, featured work, process, CTA
   -------------------------------------------------------------------------- */

.argue { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.argue__text h2 { margin-bottom: 1rem; }
.argue__text p { max-width: 32em; }

.quote-row { border-top: 1px solid var(--ink); }
.quote-row + .quote-row { border-top-color: var(--screed); }
.quote-row dl { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: .25rem 1.25rem; margin: 0; padding: .9rem 0; align-items: baseline; }
.quote-row dt { font-weight: 500; }
.quote-row dd { margin: 0; font-family: var(--mono); font-size: .9rem; color: var(--ink-2); text-align: right; white-space: nowrap; }
.quote-row dd.tot { color: var(--ink); }
.quote-row .how { grid-column: 1 / -1; font-family: var(--mono); font-size: .8rem; color: var(--muted); }
.quote-total { display: flex; justify-content: space-between; gap: 1rem; padding: .9rem 0; border-top: 2px solid var(--ink); font-weight: 600; }
.quote-total .num { font-weight: 400; }
.quote-foot { margin-top: 1rem; font-size: .92rem; color: var(--ink-2); }
@media (max-width: 40rem) {
  .quote-row dl { grid-template-columns: minmax(0, 1fr) auto; }
  .quote-row dd:not(.tot) { grid-column: 1 / -1; text-align: left; font-size: .8rem; color: var(--muted); }
}

.feat { display: grid; gap: clamp(2rem, 4vw, 3.5rem); }
.feat .pair { max-width: none; }
.feat__row { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--gap) clamp(1.5rem, 4vw, 4rem); align-items: center; }
.feat__row:nth-child(even) .pair { order: 2; }
.feat__meta h3 { font-family: var(--display); font-weight: 400; font-size: clamp(1.4rem, 2.2vw, 1.9rem); margin-bottom: .5rem; }
.feat__meta .facts { margin-top: .9rem; }
.feat__meta p { max-width: 30em; color: var(--ink-2); }
.feat__meta a { font-weight: 500; }

/* weeks: a dimension string laid along the job */
.weeks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); gap: 0; border-top: 1.5px solid var(--ink); }
.weeks li { position: relative; padding: 1.1rem 1rem 0 0; font-size: .95rem; color: var(--ink-2); }
.weeks li::before { content: ''; position: absolute; top: -1px; left: 0; width: 1.5px; height: 12px; background: var(--ink); }
.weeks li b { display: block; font-family: var(--mono); font-weight: 400; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); margin-bottom: .35rem; }
.weeks li.wk--wet b { color: var(--chalk); }

.pay { display: grid; grid-template-columns: minmax(7.5rem, 10fr) 40fr 40fr minmax(7.5rem, 10fr); gap: 4px; margin-top: 1.5rem; }
.pay div { background: var(--plaster-2); padding: .9rem .7rem; min-width: 0; }
.pay div:nth-child(2), .pay div:nth-child(3) { background: var(--chalk-dust); }
.pay b { display: block; font-family: var(--mono); font-weight: 400; font-size: 1.15rem; margin-bottom: .2rem; color: var(--chalk); }
.pay span { font-size: .84rem; color: var(--ink-2); display: block; line-height: 1.3; }
.process { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.process__aside p { color: var(--ink-2); max-width: 28em; }
.process--gap { margin-top: clamp(2rem, 4vw, 3.5rem); }
.h3--gap { margin-top: 2.5rem; }
@media (max-width: 40rem) {
  .pay { grid-template-columns: 1fr 1fr; }
}

.cta { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.cta h2 { margin-bottom: 1rem; }
.flats { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--dark-2); }
.flats a {
  display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 1rem;
  padding: 1.05rem 0; text-decoration: none; border-bottom: 1px solid var(--dark-2);
  transition: padding-left .25s var(--ease);
}
.flats a:hover { padding-left: .8rem; }
.flats a:hover b { color: var(--chalk-dark); }
.flats b { font-family: var(--display); font-weight: 400; font-size: 1.35rem; }
.flats span { font-family: var(--mono); font-size: .8rem; color: var(--on-dark-mut); }
.flats small { grid-column: 1 / -1; font-size: .9rem; color: var(--on-dark-mut); }

@media (max-width: 63.99rem) {
  .argue, .process, .cta { grid-template-columns: 1fr; }
  .feat__row { grid-template-columns: 1fr; align-items: start; }
  .feat__row:nth-child(even) .pair { order: 0; }
}

/* --------------------------------------------------------------------------
   11. Work page
   -------------------------------------------------------------------------- */

.filters { display: flex; flex-wrap: wrap; gap: 1.5rem 2.5rem; align-items: flex-start; margin-bottom: clamp(1.5rem, 4vw, 3rem); }
.filters fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.filters legend { font-family: var(--mono); font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .55rem; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.chip span {
  display: inline-block; padding: .45rem .85rem; border: 1.5px solid var(--screed-2); border-radius: 999px;
  font-size: .9rem; font-weight: 500; cursor: pointer; background: var(--plaster);
  transition: background .15s, border-color .15s, color .15s;
}
.chip input:checked + span { background: var(--ink); color: var(--white); border-color: var(--ink); }
.chip input:focus-visible + span { outline: 2px solid var(--chalk); outline-offset: 2px; }
.chip span:hover { border-color: var(--ink); }
.filter-status { font-family: var(--mono); font-size: .8rem; color: var(--muted); margin-bottom: 1.5rem; }

.project { padding-block: clamp(2.5rem, 5vw, 4.5rem); border-top: 1.5px solid var(--ink); }
.project__head { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--gap) clamp(1.5rem, 4vw, 4rem); align-items: start; margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.project__head h2 { margin-bottom: .6rem; }
.project__head p { max-width: 34em; color: var(--ink-2); }
.project__spec { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem 1.5rem; }
.project__spec li { border-top: 1px solid var(--screed); padding-top: .5rem; font-size: .92rem; }
.project__spec b { display: block; font-family: var(--mono); font-weight: 400; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: .15rem; }
.project__spec .num { font-size: 1rem; }
.project__mini { max-width: 24rem; justify-self: end; width: 100%; }
.project__mini .label { display: flex; justify-content: space-between; }
.pairs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.5rem, 3vw, 2.5rem) var(--gap); }
.pairs .pair--wide { grid-column: 1 / -1; }
.project__mats { margin-top: clamp(1.5rem, 3vw, 2.5rem); display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem 2rem; }
.project__mats div { border-top: 1px solid var(--screed); padding-top: .6rem; font-size: .92rem; color: var(--ink-2); }
.project__mats b { display: block; font-weight: 600; color: var(--ink); margin-bottom: .2rem; }
.project__more { margin-top: 2rem; }
.work-empty { padding: 3rem 0; color: var(--ink-2); border-top: 1.5px solid var(--ink); }

@media (max-width: 63.99rem) {
  .project__head { grid-template-columns: 1fr; }
  .project__mini { justify-self: start; max-width: 20rem; }
}
@media (max-width: 48rem) {
  .pairs { grid-template-columns: 1fr; }
}

/* --------------------------------------------------------------------------
   12. Quote page
   -------------------------------------------------------------------------- */

.q { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.q__side { position: sticky; top: 5.5rem; max-height: calc(100vh - 6rem); overflow-y: auto; overscroll-behavior: contain; }
.step { padding-block: clamp(1.75rem, 4vw, 3rem); border-top: 1.5px solid var(--ink); }
.step:first-of-type { border-top: 0; padding-top: 0; }
.step__head { display: flex; gap: 1rem; align-items: baseline; margin-bottom: 1.25rem; }
.step__head .n { font-family: var(--mono); font-size: .8rem; letter-spacing: .1em; color: var(--chalk); flex: none; }
.step__head h2 { font-size: clamp(1.4rem, 2.3vw, 1.9rem); }
.step__head p { margin: .35rem 0 0; color: var(--ink-2); font-size: .98rem; }

.types { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: .6rem; }
.type { position: relative; }
.type input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.type span {
  display: block; padding: .9rem 1rem; border: 1.5px solid var(--screed-2); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.type span b { display: block; font-family: var(--display); font-weight: 400; font-size: 1.25rem; margin-bottom: .2rem; }
.type span small { font-family: var(--mono); font-size: .76rem; color: var(--muted); }
.type input:checked + span { border-color: var(--chalk); background: var(--chalk-dust); }
.type input:checked + span small { color: var(--chalk); }
.type input:focus-visible + span { outline: 2px solid var(--chalk); outline-offset: 2px; }
.type span:hover { border-color: var(--ink); }

.pick { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
.pick__plan { max-width: 40rem; }
.pick__hint { font-family: var(--mono); font-size: .78rem; color: var(--muted); margin: .6rem 0 0; }

.rooms { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--screed); }
.rm { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .5rem .9rem; align-items: center; padding: .7rem 0; border-bottom: 1px solid var(--screed); }
.rm input[type="checkbox"] { width: 1.15rem; height: 1.15rem; margin: 0; }
.rm label { font-weight: 500; cursor: pointer; }
.rm label small { font-family: var(--mono); font-weight: 400; font-size: .76rem; color: var(--muted); margin-left: .5rem; }
.rm .amt { font-family: var(--mono); font-size: .9rem; color: var(--muted); text-align: right; min-width: 5.5em; font-variant-numeric: tabular-nums; }
.rm:has(input[type="checkbox"]:checked) .amt { color: var(--ink); }
.rm .scope { grid-column: 2 / -1; display: none; gap: .35rem; flex-wrap: wrap; }
.rm:has(input[type="checkbox"]:checked) .scope { display: flex; }
.rm.is-open .scope { display: flex; }
.scope label { position: relative; }
.scope input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.scope span { display: inline-block; padding: .3rem .7rem; border: 1.5px solid var(--screed-2); border-radius: 999px; font-size: .82rem; cursor: pointer; }
.scope input:checked + span { background: var(--chalk); color: var(--white); border-color: var(--chalk); }
.scope input:focus-visible + span { outline: 2px solid var(--chalk); outline-offset: 2px; }
.scope input:disabled + span { opacity: .4; cursor: not-allowed; }
.scope .scope__note { grid-column: 1 / -1; font-family: var(--mono); font-size: .74rem; color: var(--muted); width: 100%; }

/* estimate card */
.est { background: var(--dark); color: var(--on-dark); padding: clamp(1.4rem, 3vw, 2rem); }
.est .label { color: var(--on-dark-mut); margin-bottom: .5rem; }
.est__band { font-family: var(--display); font-size: clamp(1.7rem, 3vw, 2.3rem); line-height: 1.1; margin: 0 0 .4rem; letter-spacing: -.01em; }
.est__meta { font-family: var(--mono); font-size: .82rem; color: var(--on-dark-mut); margin: 0 0 1rem; }
.est__meta b { color: var(--on-dark); font-weight: 400; }
.est__empty { color: var(--on-dark-mut); margin: 0; }
.est__line { position: relative; height: 3px; background: var(--dark-2); margin: 1.1rem 0 1.2rem; overflow: hidden; }
.est__line::after { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: var(--fill, 0%); background: var(--chalk-line); transition: width .4s var(--ease); }
.est details { border-top: 1px solid var(--dark-2); }
.est summary { cursor: pointer; padding: .8rem 0; font-weight: 500; list-style: none; display: flex; justify-content: space-between; }
.est summary::-webkit-details-marker { display: none; }
.est summary::after { content: '+'; font-family: var(--mono); color: var(--on-dark-mut); }
.est details[open] summary::after { content: '–'; }
.work { font-family: var(--mono); font-size: .78rem; line-height: 1.5; }
.work h4 { font-family: var(--ui); font-size: .95rem; font-weight: 600; margin: 1rem 0 .3rem; display: flex; justify-content: space-between; gap: 1rem; }
.work h4 span { font-family: var(--mono); font-weight: 400; }
.work dl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .15rem 1rem; margin: 0; }
.work dt { color: var(--on-dark-mut); }
.work dd { margin: 0; text-align: right; white-space: nowrap; }
.work .qty { color: var(--on-dark-mut); }
.work .tot { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--dark-2); padding: .6rem 0 .2rem; margin-top: .8rem; font-family: var(--ui); font-weight: 600; font-size: .95rem; }
.est .btn-row { margin-top: 1.4rem; }
.est .btn--ghost { color: var(--on-dark); border-color: var(--on-dark); }
.est .btn--ghost:hover { background: var(--on-dark); color: var(--ink); }
.est__note { font-size: .84rem; color: var(--on-dark-mut); margin: 1.2rem 0 0; }

/* the send step */
.form { display: grid; gap: 1.1rem; max-width: 40rem; }
.field { display: grid; gap: .35rem; }
.field label { font-weight: 500; }
.field label small { font-weight: 400; color: var(--muted); margin-left: .4rem; }
.field input, .field select, .field textarea {
  width: 100%; padding: .75rem .85rem; background: var(--white); border: 1.5px solid var(--screed-2);
  border-radius: 0; min-height: 2.9rem;
}
.field textarea { min-height: 6.5rem; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--chalk); outline-offset: 0; border-color: var(--chalk); }
.field .err { display: none; font-size: .86rem; color: var(--err); }
.field input:user-invalid, .field select:user-invalid { border-color: var(--err); }
.field input:user-invalid ~ .err, .field select:user-invalid ~ .err, .field input.user-invalid-fallback ~ .err { display: block; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }
.form__actions { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; }
.form__actions .small { flex-basis: 100%; }
.preview { margin-top: 1.25rem; border-top: 1px solid var(--screed); padding-top: 1rem; }
.preview pre { white-space: pre-wrap; font-family: var(--mono); font-size: .8rem; color: var(--ink-2); margin: 0; }

/* on a phone the card sits under the form, so a fixed bar carries the live band */
.est-bar {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  background: var(--dark); color: var(--on-dark); padding: .7rem var(--gutter);
  align-items: center; justify-content: space-between; gap: 1rem;
  box-shadow: 0 -8px 30px rgba(23, 25, 28, .18);
}
.est-bar b { font-family: var(--display); font-weight: 400; font-size: 1.15rem; letter-spacing: -.01em; }
.est-bar small { display: block; font-family: var(--mono); font-size: .7rem; color: var(--on-dark-mut); letter-spacing: .06em; text-transform: uppercase; }
.est-bar a { flex: none; font-weight: 600; text-decoration: none; padding: .55em 1em; border-radius: 999px; background: var(--chalk); color: var(--white); font-size: .9rem; }

@media (max-width: 63.99rem) {
  .q { grid-template-columns: 1fr; }
  .q__side { position: static; max-height: none; overflow: visible; }
  .grid-2 { grid-template-columns: 1fr; }
  .est-bar:not([hidden]) { display: flex; }
  .est-bar--pad { padding-bottom: 4.5rem; }
}

/* --------------------------------------------------------------------------
   13. Studio page
   -------------------------------------------------------------------------- */

.studio-hero { position: relative; }
.studio-hero__img { aspect-ratio: 21 / 9; overflow: hidden; background: var(--screed); }
.studio-hero__img img { width: 100%; height: 100%; object-fit: cover; }
.studio-hero__text { padding-top: clamp(2rem, 5vw, 4rem); max-width: 42em; }
.studio-hero__text h1 { margin-bottom: 1rem; }
@media (max-width: 48rem) { .studio-hero__img { aspect-ratio: 4 / 3; } }

.people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.5rem 2rem; }
.people li { border-top: 1.5px solid var(--ink); padding-top: 1rem; }
.people b { display: block; font-family: var(--display); font-weight: 400; font-size: 1.35rem; margin-bottom: .2rem; }
.people .role { font-family: var(--mono); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--chalk); margin-bottom: .6rem; }
.people p { color: var(--ink-2); font-size: .96rem; }

.spec { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1.25rem 2rem; }
.spec li { border-top: 1px solid var(--screed); padding-top: .75rem; font-size: .96rem; color: var(--ink-2); }
.spec b { display: block; color: var(--ink); font-weight: 600; margin-bottom: .25rem; }

.two { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 6fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; }
.two figure { margin: 0; }
.two figcaption { font-family: var(--mono); font-size: .78rem; color: var(--muted); padding-top: .6rem; }
.promises { list-style: none; margin: 0; padding: 0; }
.promises li { display: grid; grid-template-columns: auto 1fr; gap: 1rem; padding: 1rem 0; border-top: 1px solid var(--screed); }
.promises li::before { content: ''; width: 1.6rem; height: 3px; background: var(--chalk); margin-top: .75rem; }
.promises b { display: block; font-weight: 600; margin-bottom: .2rem; }
.promises p { color: var(--ink-2); font-size: .96rem; }
@media (max-width: 63.99rem) { .two { grid-template-columns: 1fr; } }

.visit { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1.5rem 2.5rem; }
.visit div { border-top: 1px solid var(--screed); padding-top: .75rem; }
.visit b { display: block; font-family: var(--mono); font-weight: 400; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .4rem; }
.visit p { color: var(--ink-2); }

/* --------------------------------------------------------------------------
   14. Footer
   -------------------------------------------------------------------------- */

.foot { border-top: 1.5px solid var(--ink); padding: clamp(2.5rem, 5vw, 4rem) 0 2rem; }
.foot__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 2rem; }
.foot h2 { font-family: var(--mono); font-weight: 400; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: .8rem; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.foot a { text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot p { color: var(--ink-2); font-size: .96rem; }
.foot .mark { margin-bottom: 1rem; display: inline-flex; }
.foot__bar { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: space-between; margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--screed); font-family: var(--mono); font-size: .76rem; color: var(--muted); }
@media (max-width: 63.99rem) { .foot__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 40rem) { .foot__grid { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   15. Reveals and motion
   -------------------------------------------------------------------------- */

.js-anim .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js-anim .reveal.in { opacity: 1; transform: none; }
.js-anim .reveal.d1 { transition-delay: .08s; }
.js-anim .reveal.d2 { transition-delay: .16s; }

/* the plan draws itself once, on load, then holds still */
.js-anim .plan-svg--hero .plan-wall, .js-anim .plan-svg--hero .plan-leaf, .js-anim .plan-svg--hero .plan-swing, .js-anim .plan-svg--hero .plan-win {
  stroke-dasharray: 2400; stroke-dashoffset: 2400;
  animation: draw 1.4s var(--ease) forwards;
}
.js-anim .plan-svg--hero .plan-swing { animation-delay: .5s; stroke-dasharray: 2400; }
.js-anim .plan-svg--hero .plan-win { animation-delay: .35s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

@media (prefers-reduced-motion: reduce) {
  .js-anim .reveal { opacity: 1; transform: none; transition: none; }
  .js-anim .plan-svg--hero .plan-wall, .js-anim .plan-svg--hero .plan-leaf, .js-anim .plan-svg--hero .plan-swing, .js-anim .plan-svg--hero .plan-win {
    animation: none; stroke-dasharray: none; stroke-dashoffset: 0;
  }
  .room__photo, .room__floor, .room__edge, .btn, .flats a, .est__line::after { transition: none; }
}
