/* Cabinetry Solutions — colour chapters. Tokens first; colours sampled from the logo. */
:root {
  --paper: #f4f3f0;
  --white: #ffffff;
  --stone: #dedcd6;
  --ink: #2a221e;
  --taupe: #50443c;          /* the logo's lettering */
  --copper: #96593c;         /* the logo's copper, darkened for 5.5:1 on white */
  --copper-light: #cdbbab;   /* clay, the copper faded, for text on walnut */
  --walnut: #4f3626;
  --navy: #2f3c53;
  --sage: #9aa88c;

  --display: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
  --text: "Source Serif 4", Georgia, serif;
  --step-small: 0.875rem;
  --step-body: 1rem;
  --step-lead: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-head: clamp(1.75rem, 1.4rem + 1vw, 2.25rem);
  --step-poster: clamp(3rem, 1rem + 7.4vw, 8.5rem);

  --m: max(20px, calc((100vw - 1200px) / 2));   /* the one pair of page margins: content holds to 1200px */
  --head-h: 64px;
  --radius: 0;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--head-h); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--text); font-size: var(--step-body); line-height: 1.55; }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
p { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; margin: 0; letter-spacing: -0.035em; line-height: 0.95; text-wrap: balance; }
a { color: inherit; text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
:focus-visible { outline: 3px solid var(--copper); outline-offset: 3px; }
::selection { background: var(--copper); color: var(--white); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--m); top: 8px; z-index: 50; background: var(--white); padding: 8px 12px; }

/* One button shape */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 20px;
  font-family: var(--display); font-weight: 700; font-size: .9375rem; letter-spacing: -0.01em;
  background: var(--copper); color: var(--white); text-decoration: none;
  border: 2px solid var(--copper); border-radius: var(--radius); cursor: pointer;
  transition: transform .18s var(--ease), background-color .18s var(--ease), color .18s var(--ease);
}
.btn:hover { background: #7d4930; border-color: #7d4930; transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: .875rem; }
.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-ink { background: var(--ink); border-color: var(--ink); }
.btn-ink:hover { background: var(--walnut); border-color: var(--walnut); }
.link-light { color: var(--paper); font-weight: 600; text-decoration: underline; }
.link-light:hover { color: var(--copper-light); }

/* ---------- Header: takes the colour of the chapter beneath it ---------- */
.top {
  position: fixed; inset: 0 0 auto; z-index: 20; height: var(--head-h);
  display: flex; align-items: center; gap: 32px; padding: 0 var(--m);
  background: var(--white); color: var(--ink);
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.logo { flex: none; position: relative; width: 150px; }
.logo img { width: 100%; transition: opacity .3s var(--ease); }
.logo-light { position: absolute; inset: 0; opacity: 0; }
.top[data-ink="light"] .logo-dark { opacity: 0; }
.top[data-ink="light"] .logo-light { opacity: 1; }
.top-nav { display: flex; gap: 24px; margin-left: auto; font-size: var(--step-small); }
.top-nav a { text-decoration: none; padding: 8px 0; }
.top-nav a:hover { text-decoration: underline; }
.menu-btn { display: none; margin-left: auto; min-height: 40px; padding: 0 12px; font: inherit; font-size: var(--step-small); background: transparent; color: inherit; border: 2px solid currentColor; cursor: pointer; }
.menu-btn[aria-expanded="true"] { background: var(--ink); color: var(--white); border-color: var(--ink); }

/* ---------- Chapter 1: banner ---------- */
.hero { background: var(--walnut); color: var(--paper); padding-top: var(--head-h); }
.carousel { position: relative; height: clamp(200px, 36vw, 480px); max-height: 46svh; min-height: 200px; overflow: hidden; background: #3a281c; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1.6s var(--ease); }
.slide.is-on { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 7s linear; }
.slide.is-on img { transform: scale(1); }
.slide figcaption { position: absolute; left: var(--m); bottom: 20px; background: var(--paper); color: var(--ink); font-size: var(--step-small); padding: 6px 12px; }
.dots { position: absolute; right: var(--m); bottom: 20px; display: flex; gap: 6px; }
.dots button { width: 44px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; position: relative; }
.dots button::after { content: ""; position: absolute; left: 8px; right: 8px; top: 19px; height: 6px; background: var(--paper); opacity: .55; transition: opacity .2s var(--ease); }
.dots button[aria-current="true"]::after, .dots button:hover::after { opacity: 1; }
.band {
  display: grid; grid-template-columns: 7fr 5fr; gap: 24px var(--m); align-items: end;
  padding: 36px var(--m) 40px;
  min-height: 0;
}
.hero h1 { font-size: clamp(2.5rem, 1.2rem + 3.6vw, 4.5rem); line-height: 0.88; text-transform: uppercase; letter-spacing: -0.04em; }
.hero h1 span { display: block; }
.hero h1 .l1 { color: var(--paper); }
.hero h1 .l2 { color: var(--copper-light); }
.band-shown { margin-top: 14px; font-size: var(--step-small) !important; color: var(--copper-light); }
.band-side p { max-width: 34ch; font-size: var(--step-lead); line-height: 1.4; }
.band-actions { margin-top: 24px; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; }

/* ---------- Chapter 2: the white strip ---------- */
.strip {
  background: var(--white); color: var(--ink);
  display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 12px;
  padding: 16px var(--m);
}
.strip-item {
  background: var(--stone); padding: 22px 24px 24px;
  border-left: 8px solid var(--copper);
  display: flex; flex-direction: column; justify-content: center;
}
.strip-big { font-family: var(--display); font-weight: 700; font-size: clamp(1.25rem, 1rem + .6vw, 1.5rem); letter-spacing: -0.02em; line-height: 1.1; margin-bottom: 6px; }
.strip-num { color: var(--copper); }
.strip-item p:not(.strip-big) { max-width: 32ch; color: var(--taupe); font-size: var(--step-body); line-height: 1.45; }
.strip-act { background: var(--walnut); color: var(--paper); border-left-color: var(--copper-light); }
.strip-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.btn-paper { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-paper:hover { background: var(--white); border-color: var(--white); color: var(--ink); }

/* ---------- Chapter 3: about, highlighted words, project highlights ---------- */
.about { background: var(--stone); padding: 72px var(--m); }
.about h2 { font-size: var(--step-head); margin-bottom: 24px; }
.about-text {
  columns: 2; column-gap: 32px;
  font-size: 1.125rem; line-height: 1.5; color: var(--taupe);
  text-align: justify; hyphens: auto;
}
.about-text strong { color: var(--ink); font-weight: 600; }
mark { color: var(--ink); padding: 0 .1em; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hl-copper { background: #e7c3ad; }
.hl-sage { background: #c9d2bf; }
.hl-white { background: var(--white); }
.hl-end { background: var(--copper); color: var(--white); padding: 0 .15em; text-decoration: none; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.hl-end:hover { background: var(--walnut); }
.projects { list-style: none; margin: 48px 0 0; padding: 0; display: grid; grid-template-columns: 5fr 4fr 3fr; gap: 24px; align-items: start; }
.projects li:nth-child(2) { margin-top: 32px; }
.projects li:nth-child(3) { margin-top: 64px; }
.projects a { display: block; text-decoration: none; }
.projects img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .5s var(--ease); }
.projects a:hover img { transform: scale(1.02); }
.pj-name { display: block; margin-top: 10px; font-family: var(--display); font-size: 1.0625rem; letter-spacing: -0.02em; }
.pj-meta { display: block; color: var(--taupe); font-size: var(--step-small); }
.projects a:hover .pj-name { text-decoration: underline; }

/* ---------- Chapter 4: what we offer ---------- */
.offer {
  background: var(--navy); color: var(--paper);
  padding: 72px var(--m);
  display: grid; grid-template-columns: 5fr 7fr; gap: 40px 56px; align-items: start;
}
.offer-head { position: sticky; top: calc(var(--head-h) + 40px); }
.offer h2 { font-size: var(--step-head); }
.offer-head p { margin-top: 20px; max-width: 34ch; font-size: var(--step-lead); line-height: 1.4; }
.offer-pic { margin-top: 28px; width: 100%; aspect-ratio: 5 / 4; object-fit: cover; }
.row { display: grid; grid-template-columns: 2fr 3fr; gap: 32px; align-items: start; }
.row + .row { margin-top: 36px; }
.row-pic { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.row h3 { font-size: 1.375rem; letter-spacing: -0.03em; }
.row p { margin: 14px 0 16px; }

/* ---------- Chapter 5: sample doors ---------- */
.doors {
  background: var(--sage); color: var(--ink); padding: 72px var(--m);
  display: grid; grid-template-columns: 4fr 8fr; gap: 40px 56px; align-items: start;
}
.doors h2 { font-size: var(--step-head); }
.doors-head p { margin: 20px 0 32px; max-width: 32ch; font-size: var(--step-lead); line-height: 1.4; }
.door-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 24px 16px; }
.door-list a { display: flex; flex-direction: column; text-decoration: none; }
.dr { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 600 / 688; padding: 14% 24%; background: #f3eee6; transition: transform .3s var(--ease); }
.dr svg { height: 100%; width: auto; display: block; box-shadow: 0 6px 14px rgba(42, 34, 30, .18); }
.door-list a[aria-current] .dr { outline: 3px solid var(--ink); outline-offset: -3px; }
.dn { margin-top: 10px; font-family: var(--display); font-weight: 700; font-size: 1rem; letter-spacing: -0.02em; line-height: 1.1; }
.dl { font-size: var(--step-body); }
.door-list a:hover .dr { transform: translateY(-4px); }
.door-list a:hover .dn { text-decoration: underline; }

/* ---------- Door style pages ---------- */
.style-head { background: var(--sage); color: var(--ink); padding: calc(var(--head-h) + 40px) var(--m) 48px; }
.crumbs { font-size: var(--step-small); margin: 0 0 12px; }
.crumbs a { color: inherit; }
.style-head h1 { font-size: clamp(2rem, 1.5rem + 1.8vw, 3rem); letter-spacing: -0.03em; line-height: 1.05; }
.style-lead { margin: 16px 0 0; max-width: 56ch; font-size: var(--step-lead); line-height: 1.45; }
.style-count { margin: 12px 0 0; font-weight: 600; }
.style-colours { background: var(--paper); padding: 56px var(--m) 72px; }
.door-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--cols, 4), 1fr); gap: 24px; }
.door-card { background: var(--white); padding: 16px 16px 20px; }
.door-card img { display: block; width: 100%; height: auto; aspect-ratio: 600 / 688; object-fit: cover; background: #f3eee6; }
.door-card h3 { margin-top: 14px; font-size: 1.125rem; letter-spacing: -0.02em; }
.door-card p { margin: 2px 0 10px; color: var(--taupe); }
.door-card-link { color: var(--copper); font-weight: 600; }
.door-card-help { background: var(--copper); color: var(--white); padding: 32px 28px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.door-card-help h3 { margin-top: 0; font-size: 1.5rem; }
.door-card-help p { color: inherit; margin: 12px 0 24px; }
.door-card-phone { margin-top: 20px; font-family: var(--display); font-weight: 700; font-size: clamp(1.25rem, 0.9rem + 0.8vw, 1.625rem); white-space: nowrap; color: var(--white); text-decoration: none; }
.doors-more .door-list { grid-template-columns: repeat(6, 1fr); }

/* ---------- Chapter 6: the action tile ---------- */
.cta {
  background: var(--paper);
  display: grid; grid-template-columns: 2fr 8fr 2fr; gap: 12px;
  padding: 64px var(--m);
}
.tile { min-height: 260px; border-radius: var(--radius); }
.tile-photo { overflow: hidden; }
.tile-photo img { width: 100%; height: 100%; object-fit: cover; }
.tile-flat { background: var(--navy); }
.tile-main { background: var(--copper); color: var(--white); padding: 36px 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px 48px; align-content: center; align-items: end; }
.tile-text { grid-row: span 2; align-self: center; }
.tile-or { font-size: var(--step-body); }
.tile-phone { display: block; margin-top: 4px; font-family: var(--display); font-weight: 700; font-size: clamp(1.75rem, 1.3rem + 1.2vw, 2.375rem); letter-spacing: -0.03em; line-height: 1; color: var(--white); text-decoration: none; }
.tile-phone:hover { text-decoration: underline; text-decoration-thickness: 3px; }
.tile-main h2 { font-size: var(--step-head); letter-spacing: -0.03em; }
.tile-main p { margin-top: 16px; max-width: 44ch; }
.book-form { display: flex; width: min(100%, 460px); background: var(--paper); }
.book-form input { flex: 1; min-width: 0; min-height: 48px; border: 0; background: transparent; padding: 0 18px; font: inherit; color: var(--ink); }
.book-form input::placeholder { color: var(--taupe); }
.book-form .btn { min-height: 48px; }
.form-note { width: min(100%, 460px); margin: 0; padding: 14px 18px; background: var(--paper); color: var(--ink); font-weight: 600; }

/* ---------- Footer: the walnut close ---------- */
.foot { background: var(--walnut); color: var(--paper); padding: 56px var(--m) 28px; }
.foot-name { margin: 0; }
.foot-name img { width: 200px; }
.foot-row { display: grid; grid-template-columns: 5fr 7fr; gap: 32px 48px; margin-top: 32px; }
.places { list-style: none; margin: 0; padding: 0; }
.places li + li { margin-top: 10px; }
.places a { color: var(--copper-light); font-size: 1.125rem; line-height: 1.2; text-decoration: none; }
.places a:hover { text-decoration: underline; }
.foot-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.foot-links p { font-weight: 600; margin-bottom: 10px; }
.foot-links a { display: block; font-size: .9375rem; padding: 4px 0; text-decoration: none; }
.foot-links a:hover { text-decoration: underline; }
.legal { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 40px; font-size: var(--step-small); }

/* ---------- Entrances, only with script ---------- */
/* Content is always visible; sections only lift slightly as they arrive */
.js .rise { transition: transform .6s var(--ease); transition-delay: var(--d, 0ms); }
.js .rise:not(.in) { transform: translateY(12px); }
@media (prefers-reduced-motion: reduce) {
  .js .rise { opacity: 1; transform: none; transition: none; }
  .slide, .slide img { transition: none; }
}

/* ---------- Tablet ---------- */
@media (max-width: 1080px) {
  .menu-btn { display: inline-block; }
  .top-nav {
    display: none; position: absolute; top: var(--head-h); left: 0; right: 0;
    flex-direction: column; gap: 0; margin: 0; padding: 8px var(--m) 16px;
    background: var(--white); color: var(--ink); font-size: 1rem;
    box-shadow: 0 12px 24px rgba(42, 34, 30, .18);
  }
  .top-nav.open { display: flex; }
  .top-nav a { padding: 12px 0; }
  .band { grid-template-columns: 1fr; padding-top: 32px; padding-bottom: 40px; min-height: 0; }
  .tile-main { grid-template-columns: 1fr; }
  .tile-text { grid-row: auto; }
  .strip { grid-template-columns: 1fr 1fr; }
  .strip-act { grid-column: 1 / -1; }
  .offer, .doors { grid-template-columns: 1fr; }
  .door-list, .doors-more .door-list { grid-template-columns: repeat(3, 1fr); }
  .door-cards { grid-template-columns: repeat(3, 1fr); }
  .offer-head { position: static; }
  .offer-pic { max-width: 560px; }
  .foot-row { grid-template-columns: 1fr; }
}

/* ---------- Phone ---------- */
@media (max-width: 680px) {
  :root { --head-h: 64px; }
  .top { gap: 12px; }
  .top .btn-small { padding: 0 12px; font-size: .875rem; }
  .hide-phone { display: none; }
  .logo { width: 120px; }
  .carousel { height: 56vw; max-height: 40svh; }
  .hero h1 { font-size: 11vw; }
  .band { padding: 32px var(--m) 40px; min-height: 0; }
  .strip { grid-template-columns: 1fr; padding: 12px var(--m); gap: 12px; }
  .strip-buttons .btn { flex: 1 1 100%; }
  .about-text { columns: 1; text-align: left; hyphens: manual; }
  .hl-end { display: inline-block; margin-top: 16px; padding: 10px 14px; }
  .projects { grid-template-columns: 1fr 1fr; }
  .projects li:nth-child(2) { margin-top: 48px; }
  .projects li:nth-child(3) { grid-column: 1 / -1; width: 70%; justify-self: end; margin-top: 8px; }
  .row { grid-template-columns: 1fr; gap: 16px; }
  .row + .row { margin-top: 48px; }
  .door-list, .doors-more .door-list { grid-template-columns: repeat(3, 1fr); gap: 20px 12px; }
  .door-cards { grid-template-columns: 1fr 1fr; gap: 16px 12px; }
  .door-card-help { grid-column: 1 / -1; padding: 24px 20px; }
  .door-card { padding: 10px 10px 14px; }
  .style-colours { padding: 32px var(--m) 48px; }
  .cta { grid-template-columns: 1fr 1fr; padding: 56px var(--m); }
  .tile-main { grid-column: 1 / -1; grid-row: 1; padding: 32px 24px; min-height: 0; grid-template-columns: 1fr; }
  .tile-text { grid-row: auto; }
  .tile-side { min-height: 120px; }
  .book-form { flex-direction: column; background: transparent; gap: 8px; }
  .book-form input { background: var(--paper); }
  .foot-links { grid-template-columns: 1fr 1fr; }
  .legal { margin-top: 64px; }
}
