/*
 * The Exterior Specialist - site stylesheet
 * One file, no build step. Sections follow the page order:
 *   1. Fonts and design tokens   5. Overlays (search, side panel, mobile menu, lightbox)
 *   2. Base elements             6. Home sections
 *   3. Layout helpers            7. Inner pages
 *   4. Header and footer         8. Motion and accessibility
 * Breakpoints (max-width): 1439, 1279, 1023, 767, 479.
 */

/* ---------- 1. Fonts and design tokens ---------- */

@font-face {
  font-family: "Bebas Neue";
  src: url("/assets/fonts/bebas-neue-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Roboto";
  src: url("/assets/fonts/roboto-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  /* Arrows used on the Definitions page */
  font-family: "Roboto";
  src: url("/assets/fonts/roboto-symbols.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+2190, U+2192, U+2194-2199;
}

:root {
  --dark: #31271e;      /* headings */
  --text: #726a68;      /* body copy */
  --muted: #8b8380;     /* form input text */
  --ink: #1d1d1d;       /* form icons and placeholders */
  --accent: #f4b941;    /* buttons */
  --icon: #eaae50;      /* feature icons */
  --hover: #d97c3f;     /* link and submit hover */
  --gray: #f4f4f4;      /* section backgrounds */
  --rule: #d5cdc0;      /* footer divider */
  --brown: #1c0c04;     /* inner-page header */
  --panel: #26160f;     /* overlays */
  --white: #fcfcfc;

  --font-display: "Bebas Neue", Impact, "Arial Narrow", sans-serif;
  --font-body: Roboto, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  /* Responsive scale, overridden per breakpoint below */
  --container: 1290px;
  --sp-huge: 120px;     /* big vertical gaps between sections */
  --sp-small: 45px;     /* gap under a section heading */
  --title-size: 57px;
  --title-lh: 57px;
  --sub-size: 19px;
  --sub-lh: 21px;
  --sub-gap: 24.7px;
  --body-lh: 1.7;
  --h3-size: 35px;
  --h3-lh: 38px;
}
html { font-size: 17px; }
@media (max-width: 1439px) {
  :root { --container: 1100px; --sp-huge: 100px; --sp-small: 35px; --sub-gap: 20.8px; }
}
@media (max-width: 1279px) {
  :root { --sp-huge: 90px; --title-size: 46px; --title-lh: 46px; --sub-size: 18px; --sub-gap: 15.3px; --h3-size: 28px; --h3-lh: 30.4px; }
}
@media (max-width: 1023px) {
  :root { --sp-huge: 80px; --sp-small: 30px; --title-size: 38px; --title-lh: 42px; --sub-gap: 10.5px; --body-lh: 1.58; --h3-size: 26px; --h3-lh: 30px; }
}
@media (max-width: 767px) {
  html { font-size: 16px; }
  :root { --sp-huge: 60px; --sp-small: 25px; --title-size: 30px; --title-lh: 34px; --sub-size: 17px; --sub-lh: 20px; --sub-gap: 10px; --h3-size: 21px; --h3-lh: 26px; }
}
@media (max-width: 479px) {
  html { font-size: 15px; }
  :root { --sp-huge: 54px; --sp-small: 20px; --title-size: 26px; --title-lh: 30px; --body-lh: 1.53; --h3-lh: 24px; }
}

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

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: var(--body-lh);
  color: var(--text);
  background: #fff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--accent); text-decoration: none; transition: color 0.3s, background-color 0.3s, border-color 0.3s; }
a:hover { color: var(--hover); }
p, ul, ol, figure { margin: 0; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-weight: 400; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
address { font-style: normal; }
strong, b { font-weight: 700; }
[hidden] { display: none !important; }

.icon { width: 1em; height: 1em; fill: currentColor; flex: none; }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}
.skip-link {
  position: absolute; left: 6px; top: -100px; z-index: 1000;
  padding: 4px 8px; background: #fff; color: var(--accent); font-size: 1rem;
}
.skip-link:focus { top: 6px; }

/*
 * Font-icon box: reproduces how the original icon font sat on its line, so the
 * SVG icons land exactly where the old glyphs did. Set --fs (icon size), and per
 * icon --w (advance width), --x/--y (ink offset) and --ih (ink height), all in em.
 */
.fi {
  position: relative;
  display: inline-block;
  vertical-align: top;
  font-size: var(--fs, 1em);
  width: calc(var(--w, 1) * 1em);
  height: 1.1em;
}
.fi .icon {
  position: absolute;
  left: calc(var(--x, 0) * 1em);
  top: calc(0.05em + var(--y, 0) * 1em);
  width: auto;
  height: calc(var(--ih, 1) * 1em);
}

/* ---------- 3. Layout helpers ---------- */

.container { width: var(--container); max-width: 100%; margin-inline: auto; }
@media (max-width: 1279px) { .container { width: auto; margin-inline: 30px; } }
@media (max-width: 479px) { .container { margin-inline: 20px; } }

/* Section heading block: small label, big title, intro text, button */
.sub {
  display: block;
  margin: 0 0 var(--sub-gap);
  font: 400 var(--sub-size)/var(--sub-lh) var(--font-display);
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--dark);
}
.title {
  margin: 0;
  font: 400 var(--title-size)/var(--title-lh) var(--font-display);
  text-transform: uppercase;
  color: var(--dark);
}
.lead { margin-top: 1.2em; }
.center { text-align: center; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 18px 25px 16px 37px;
  font: 400 18px/22px var(--font-display);
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  transition: background-color 0.3s, color 0.3s;
}
.btn:hover, .btn:focus-visible { color: #fff; background: var(--dark); }
.btn__arrow { width: 14.5px; height: 10px; margin-left: 24.5px; fill: currentColor; }
.btn--sm { padding: 13px 28px 11px; font-size: 16px; }
.btn--sm .btn__arrow { margin-left: 13.5px; }
.btn-row { margin-top: 34px; line-height: 0; }
@media (max-width: 1439px) {
  .lead { margin-top: 18px; }
  .btn-row { margin-top: 31.7px; }
}
@media (max-width: 1279px) {
  .btn { padding: 16px 25px 14px 35px; font-size: 17px; }
  .lead { margin-top: 17px; }
  .btn-row { margin-top: 26px; }
}
@media (max-width: 1023px) {
  .lead { margin-top: 14px; }
  .btn-row { margin-top: 19px; }
}
@media (max-width: 767px) {
  .btn { padding: 14px 25px 12px 35px; }
  .lead { margin-top: 11.5px; }
  .btn-row { margin-top: 18px; }
}
@media (max-width: 479px) {
  .lead { margin-top: 11px; }
}

/* ---------- 4. Header and footer ---------- */

.hdr { position: relative; z-index: 20; color: var(--white); }
.hdr--overlay { position: absolute; inset: 0 0 auto; }
.hdr--solid { background: var(--brown); }
.hdr__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 121px;
  padding: 0 70px;
}
.hdr__logo { flex: none; display: block; }
.hdr__logo img { width: 267px; height: 50px; }
.hdr__nav { position: absolute; left: 50%; top: 31px; transform: translateX(-50%); }
.hdr__nav ul { display: flex; list-style: none; margin: 0; padding: 0; }
.hdr__nav a {
  position: relative;
  display: block;
  padding: 16.2px 16px 17.8px;
  font: 400 18px/27px var(--font-display);
  text-transform: uppercase;
  color: var(--white);
}
.hdr__nav a:hover { color: var(--white); }
.hdr__nav a::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 12px;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transition: transform 0.3s ease;
}
.hdr__nav a:hover::after, .hdr__nav a[aria-current="page"]::after { transform: scaleX(1); }
.hdr__tools { display: flex; align-items: center; }
.hdr__icon { display: grid; place-items: center; width: 24px; height: 24px; color: var(--white); }
.hdr__icon .icon { width: 100%; height: 100%; }
.hdr__search { margin-right: 33px; }
.hdr__panel { width: 21px; height: 21px; margin-right: 31px; }
.hdr__panel .icon { fill: none; }
.hdr__burger { display: none; width: 23px; height: 16px; margin-right: 33px; }
.hdr__cta:hover, .hdr__cta:focus-visible { background: #fff; color: var(--dark); }
.hdr__cta { padding: 13px 28px 11px; font-size: 16px; }

@media (max-width: 1439px) {
  .hdr__inner { height: 118px; }
  .hdr__nav a { padding: 15.5px 14.4px; }
  .hdr__nav a::after { left: 14.4px; right: 14.4px; bottom: 11px; }
}
@media (max-width: 1279px) {
  .hdr__inner { height: 93px; padding: 0 30px; }
  .hdr__logo img { width: 240px; height: 45px; }
  .hdr__nav, .hdr__panel { display: none; }
  .hdr__search { margin-right: 25px; }
  .hdr__burger { display: grid; }
}
@media (max-width: 767px) {
  .hdr__inner { height: 80px; }
  .hdr__logo img { width: 214px; height: 40px; }
  .hdr__search { width: 22px; height: 22px; margin-right: 24px; }
  .hdr__burger { margin-right: 0; }
  .hdr__cta { display: none; }
}
@media (max-width: 479px) {
  .hdr__inner { height: auto; padding: 20px; }
  .hdr__logo { width: 50%; max-width: 214px; }
  .hdr__logo img { width: 100%; height: auto; }
  .hdr__search { width: 21px; height: 21px; margin-right: 23px; }
}

/* Footer */
.ftr { padding: 116px 0 31px; }
.ftr__cols { display: flex; margin: 0 -15px; }
.ftr__col { width: 25%; padding: 0 15px; }
.ftr__title {
  margin: 0 0 23px;
  font: 400 19px/28px var(--font-display);
  letter-spacing: 0.35px;
  text-transform: uppercase;
  color: var(--dark);
}
.ftr p, .ftr li { line-height: 1.66; }
.ftr__hours p + p { margin-top: 11.8px; }
.ftr__mail { margin-top: 22.3px; }
.ftr__email { color: var(--text); }
.ftr__email span {
  padding-bottom: 3.4px;
  background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 100% 1px;
  transition: color 0.3s, background-size 0.3s;
}
.ftr__email:hover { color: var(--text); }
.ftr__email:hover span { color: var(--dark); background-size: 0 1px; }
.ftr__phone { margin-top: 24.8px; }
.ftr__phone a { font-size: 19px; line-height: 28.5px; letter-spacing: 0.2px; color: var(--text); }
.ftr__phone span { color: #797c7f; transition: color 0.3s; }
.ftr__phone a:hover, .ftr__phone a:hover span { color: var(--dark); }
.ftr__links { list-style: none; margin: 0; padding: 0; }
.ftr__links li + li { margin-top: 14px; }
.ftr__links a { display: inline-block; line-height: 1.2; color: var(--text); transition: color 0.3s, transform 0.3s; }
.ftr__links a span { display: inline-block; border-bottom: 1px solid transparent; transition: border-color 0.3s; }
.ftr__links a:hover { color: var(--dark); transform: translateX(9px); }
.ftr__links a:hover span { border-color: var(--dark); }
.ftr__social {
  display: grid;
  place-items: center;
  width: 45px;
  height: 45px;
  margin-top: 32px; /* collapses with the title's bottom margin */
  border: 1px solid rgba(49, 39, 30, 0.15);
  color: var(--dark);
}
.ftr__social .icon { width: 16px; height: 16px; }
.ftr__social:hover { color: #c862dc; }
.ftr__rule { height: 1px; margin: 58.5px 0 28px; border: 0; background: var(--rule); }
.ftr .ftr__copy { font-size: 16px; line-height: 28.22px; color: #817874; }

@media (max-width: 1439px) { .ftr { padding-top: 95px; } .ftr__rule { margin: 48.8px 0 28px; } }
@media (max-width: 1279px) {
  .ftr { padding-top: 83px; }
  .ftr__col:nth-child(1) { width: 28%; }
  .ftr__col:nth-child(2) { width: 26%; }
  .ftr__col:nth-child(3) { width: 15%; }
  .ftr__col:nth-child(4) { width: 31%; }
  .ftr__title { font-size: 18px; line-height: 26.5px; }
  .ftr__phone a { font-size: 18px; line-height: 25.2px; letter-spacing: 0; }
  .ftr__social { width: 43px; height: 43px; }
  .ftr__social .icon { width: 15px; height: 15px; }
}
@media (max-width: 1023px) {
  .ftr { padding: 75px 0 27px; }
  .ftr__rule { margin: 45.4px 0 25px; }
  .ftr__title { line-height: 22px; margin-bottom: 17px; }
  .ftr__hours p + p { margin-top: 4.8px; }
  .ftr__mail { margin-top: 16px; }
  .ftr__phone { margin-top: 17px; }
  .ftr__links li + li { margin-top: 11px; }
  .ftr__social { margin-top: 26px; }
}
@media (max-width: 767px) {
  .ftr { padding: 60px 0 15px; }
  .ftr__cols { display: block; margin: 0; }
  .ftr__col { width: auto !important; padding: 0; }
  .ftr__col + .ftr__col { margin-top: 29.5px; }
  .ftr__title { line-height: 19px; margin-bottom: 15px; }
  .ftr__hours p + p { margin-top: 0.3em; }
  .ftr__mail { margin-top: 9.2px; }
  .ftr__phone { margin-top: 9.1px; }
  .ftr__links li + li { margin-top: 8px; }
  .ftr__social { width: 40px; height: 40px; margin-top: 24.5px; }
  .ftr__social .icon { width: 14px; height: 14px; }
  .ftr__rule { margin: 44px 0 15px; }
  .ftr .ftr__copy { font-size: 15px; line-height: 1.4; }
}
@media (max-width: 479px) {
  .ftr { padding-top: 58px; }
  .ftr__links li + li { margin-top: 6px; }
  .ftr__social { margin-top: 24px; }
  .ftr__rule { margin: 35px 0 14px; }
}

/* ---------- 5. Overlays ---------- */

dialog { padding: 0; border: 0; max-width: none; max-height: none; color: inherit; }
dialog::backdrop { background: transparent; }
html.is-locked { overflow: hidden; scroll-behavior: auto; }

.close-btn { display: grid; place-items: center; color: var(--white); }
.close-btn .icon { width: 100%; height: 100%; }

/* Search: dark panel that drops from the top */
.search {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  background: rgba(0, 0, 0, 0);
  transition: background-color 0.4s;
}
.search.is-open { background: rgba(0, 0, 0, 0.35); }
.search__panel {
  height: 470px;
  background: var(--panel);
  color: var(--white);
  transform: translateY(-100%);
  transition: transform 0.4s ease;
}
.search.is-open .search__panel { transform: none; }
.search__top { display: flex; align-items: center; justify-content: space-between; padding-top: 71px; }
.search__top img { width: 214px; height: 40px; }
.search__close { width: 24px; height: 24px; }
.search__form { position: relative; display: flex; align-items: center; margin-top: 117px; }
.search__field {
  flex: 1;
  height: 108px;
  max-width: calc(100% - 177px);
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(252, 252, 252, 0.2);
  border-radius: 0;
  background: none;
  color: var(--white);
  font: 400 30px/1.2 var(--font-display);
  text-transform: uppercase;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.search__field::placeholder { color: rgba(252, 252, 252, 0.55); opacity: 1; }
.search__field:focus-visible { outline: none; border-bottom-color: rgba(252, 252, 252, 0.6); }
.search__field::-webkit-search-cancel-button { display: none; }
.search__submit { margin-left: auto; width: 24px; height: 24px; color: var(--white); }
.search__submit .icon { width: 24px; height: 24px; }
.search__results { list-style: none; margin: 18px 0 0; padding: 0; max-height: 120px; overflow: auto; }
.search__results li + li { margin-top: 6px; }
.search__results a { color: var(--white); font: 400 20px/1.3 var(--font-display); text-transform: uppercase; }
.search__results a:hover, .search__results a:focus-visible { color: var(--accent); }
.search__results p { color: rgba(252, 252, 252, 0.6); font-size: 15px; line-height: 1.5; }
@media (max-width: 1439px) { .search__panel { height: 420px; } .search__form { margin-top: 82px; } }
@media (max-width: 1279px) { .search__panel { height: 360px; } .search__top { padding-top: 30px; } .search__close { width: 20px; height: 20px; } .search__form { margin-top: 55px; } .search__field { height: 80px; font-size: 26px; max-width: calc(100% - 60px); } }
@media (max-width: 767px) { .search__panel { height: 280px; } .search__form { margin-top: 40px; } .search__field { height: 60px; font-size: 20px; } }
@media (max-width: 479px) {
  .search__panel { height: 240px; }
  .search__top { padding-top: 31px; align-items: flex-start; }
  .search__close { width: 18px; height: 18px; margin-top: 4px; }
  .search__form { margin-top: 60px; }
  .search__field { height: 50px; max-width: calc(100% - 48px); }
  .search__submit, .search__submit .icon { width: 21px; height: 21px; }
}

/* Side panel (grid icon in the desktop header) */
.panel {
  position: fixed;
  inset: 0 0 0 auto;
  width: 388px;
  height: 100%;
  margin: 0;
  background: var(--panel);
  color: var(--white);
  transform: translateX(100%);
  transition: transform 0.5s ease;
}
.panel.is-open { transform: none; }
.panel__inner {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 50px 50px 42px;
}
.panel__logo { align-self: flex-start; }
.panel__logo img { width: 240px; height: auto; }
.panel__social { display: inline-flex; align-items: center; gap: 22px; align-self: flex-start; color: var(--white); font: 400 19px/1 var(--font-display); text-transform: uppercase; }
.panel__social .icon { width: 18px; height: 18px; }
.panel__social:hover { color: var(--accent); }
.panel__contact { padding-top: 55px; border-top: 1px solid rgba(252, 252, 252, 0.12); }
.panel__phone { display: block; font: 400 28px/1.2 var(--font-display); color: var(--white); }
.panel__email { display: block; margin-top: 12px; font-size: 17px; color: rgba(252, 252, 252, 0.6); }
.panel__phone:hover, .panel__email:hover { color: var(--accent); }
.panel__close {
  position: absolute;
  top: 48px;
  right: 50px;
  width: 47px;
  height: 47px;
  padding: 15.5px;
  background: rgba(252, 252, 252, 0.06);
}

/* Mobile and tablet menu */
.mmenu {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  display: none;
  background: #241610;
  color: #a49d9a;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.mmenu[open] { display: flex; }
.mmenu.is-open { opacity: 1; }
.mmenu__main { flex: 1; display: flex; flex-direction: column; padding: 40px 30px 30px; min-width: 0; }
.mmenu__logo { align-self: flex-start; }
.mmenu__logo img { width: 340px; height: 95px; margin-left: 15px; }
.mmenu__nav { margin-top: 65px; }
.mmenu__nav ul { list-style: none; margin: 0; padding: 0; }
.mmenu__nav a { display: inline-block; padding: 5px 0; font: 400 30px/45px var(--font-display); text-transform: uppercase; color: #a49d9a; }
.mmenu__nav a:hover { color: var(--white); }
.mmenu__social { margin-top: auto; padding-top: 30px; border-top: 1px solid rgba(164, 157, 154, 0.15); }
.mmenu__social a { display: inline-block; color: var(--white); }
.mmenu__social .icon { width: 17px; height: 17px; }
.mmenu__extra {
  width: 307px;
  flex: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 50px;
  padding: 0 30px 0 45px;
  background: #1a0d07;
}
.mmenu__label { font: 400 17px/22px var(--font-display); text-transform: uppercase; color: var(--white); }
.mmenu__extra a {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  margin-top: 9px;
  font: 400 23.8px/31px var(--font-display);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--white);
}
.mmenu__extra a:hover { color: var(--accent); }
.mmenu__extra .icon { width: 30px; height: 8px; fill: var(--accent); }
.mmenu__extra .mmenu__mail { font-size: 19px; line-height: 26px; letter-spacing: 0.2px; border-bottom: 1px solid currentColor; overflow-wrap: anywhere; }
.mmenu__close {
  position: absolute;
  top: 78px;
  right: 45px;
  display: flex;
  align-items: center;
  gap: 15px;
  color: #a49d9a;
  font-size: 17px;
  line-height: 1;
}
.mmenu__close .icon { width: 19px; height: 19px; color: var(--white); }
@media (max-width: 1023px) { .mmenu__extra { width: 262px; padding: 0 20px 0 35px; } .mmenu__close { top: 73px; right: 32px; } .mmenu__logo img { margin-left: 2px; } .mmenu__nav { margin-top: 105px; } }
@media (max-width: 767px) {
  .mmenu { background: var(--panel); }
  .mmenu__extra, .mmenu__close span { display: none; }
  .mmenu__main { padding: 28px 20px 30px; }
  .mmenu__logo img { width: 145px; height: auto; margin-left: 0; }
  .mmenu__nav { margin-top: 49px; }
  .mmenu__nav a { font-size: 22px; line-height: 29px; }
  .mmenu__social { margin-top: 24px; padding-top: 18px; }
  .mmenu__social .icon { width: 14px; height: 14px; }
  .mmenu__close { top: 35px; right: 20px; }
}

/* Gallery lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  background: rgba(0, 0, 0, 0.9);
  color: #fff;
  opacity: 0;
  transition: opacity 0.3s;
}
.lightbox.is-open { opacity: 1; }
.lightbox__figure { position: absolute; inset: 70px 90px 0; display: flex; flex-direction: column; align-items: center; }
.lightbox__img { max-width: 100%; max-height: calc(100% - 70px); width: auto; height: auto; object-fit: contain; }
.lightbox__caption { margin-top: 27px; font-size: 15px; line-height: 30px; color: rgba(255, 255, 255, 0.85); text-align: center; }
.lightbox__count { position: absolute; top: 18px; left: 24px; font-size: 14px; line-height: 24px; color: rgba(255, 255, 255, 0.9); }
.lightbox__btn { position: absolute; display: grid; place-items: center; color: rgba(255, 255, 255, 0.9); }
.lightbox__btn:hover { color: #fff; }
.lightbox__btn .icon { width: 100%; height: 100%; }
.lightbox__close { top: 16px; right: 18px; width: 28px; height: 28px; padding: 6px; }
.lightbox__prev, .lightbox__next { top: 50%; width: 56px; height: 56px; margin-top: -28px; padding: 20px 16px; }
.lightbox__prev { left: 26px; }
.lightbox__next { right: 26px; }
.lightbox__prev .icon { transform: rotate(90deg); }
.lightbox__next .icon { transform: rotate(-90deg); }
@media (max-width: 767px) {
  .lightbox__figure { inset: 60px 12px; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 8px; margin-top: 0; }
}

/* Back-to-top button */
.to-top {
  position: fixed;
  right: 34px;
  bottom: 102px;
  z-index: 30;
  display: grid;
  place-items: center;
  width: 59.5px;
  height: 59.5px;
  background: var(--dark);
  color: #fff;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s, background-color 0.3s;
}
.to-top .icon { width: 11px; height: 16px; }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover, .to-top:focus-visible { background: var(--accent); }
@media (max-width: 1279px) { .to-top { right: 1rem; bottom: 1rem; width: 2.5rem; height: 2.5rem; } }

/* ---------- 6. Home sections ---------- */

/*
 * Hero slider. Sizes follow the original slider's four layouts; --s scales them
 * with the screen like the original did (the smaller of width and height ratio).
 */
.hero {
  --s: min(calc(100vw / 1440), calc(100vh / 660));
  --k-size: 18px; --k-lh: 24px;
  --t-size: 109; --t-lh: 92;
  --gap1: 40; --gap2: 24; --gap3: 18;
  --b-size: 17px; --b-lh: 54px; --b-h: 55px; --b-arrow: 23.4px;
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 480px;
  overflow: hidden;
  background: #111;
  color: var(--white);
}
@media (min-width: 1461px) {
  .hero { --s: min(calc(100vw / 1920), calc(100vh / 930)); --k-size: 19px; --k-lh: 26px; --t-size: 140; --t-lh: 120; --gap1: 60; --gap2: 30; --gap3: 24; --b-size: 18px; }
}
@media (max-width: 785px) {
  .hero { --s: min(calc(100vw / 778), calc(100vh / 680)); --t-size: 99; --t-lh: 84; --gap2: 20; --b-lh: 48px; --b-h: 49px; --b-arrow: 14.4px; }
}
@media (max-width: 500px) {
  .hero { --s: min(calc(100vw / 480), calc(100vh / 580)); --t-size: 66; --t-lh: 56; --gap1: 30; --gap2: 16; --gap3: 16; --b-size: 15px; --b-h: 48px; --b-arrow: 15.4px; }
}
.hero__slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; }
.hero__slide.is-active { opacity: 1; z-index: 1; }
.hero__slide picture, .hero__img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero__img { object-fit: cover; }
.hero__slide.is-active .hero__img { animation: hero-zoom 10s linear forwards; }
@keyframes hero-zoom { from { transform: scale(1); } to { transform: scale(1.1); } }
.hero__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  text-align: center;
}
.hero__heading { display: flex; flex-direction: column; align-items: center; padding-top: calc(var(--gap1) * var(--s)); font-weight: 400; }
.hero__kicker {
  display: block;
  font: 400 var(--k-size)/var(--k-lh) var(--font-display);
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(250, 245, 237, 0.9);
}
.hero__title {
  display: block;
  margin-top: calc(var(--gap2) * var(--s));
  font-family: var(--font-display);
  font-size: calc(var(--t-size) * var(--s));
  line-height: calc(var(--t-lh) * var(--s));
  text-transform: uppercase;
  color: var(--white);
}
.hero__actions { display: flex; justify-content: center; gap: 10px; margin-top: calc(var(--gap3) * var(--s)); }
.hero__btn {
  display: inline-flex;
  align-items: center;
  height: var(--b-h);
  padding: 0 27px 0 37px;
  font: 400 var(--b-size)/var(--b-lh) var(--font-display);
  text-transform: uppercase;
  color: var(--white);
  background: var(--accent);
}
.hero__btn:hover, .hero__btn:focus-visible { color: #fff; background: #dba33b; }
.hero__btn--dark { color: #fff; background: #212020; }
.hero__btn--dark:hover, .hero__btn--dark:focus-visible { background: #383838; }
.hero__btn .icon { width: 14.6px; height: 10px; margin-left: var(--b-arrow); }
@media (max-width: 500px) { .hero__btn { letter-spacing: 1px; } .hero__btn--dark { display: none; } }
.hero__dots { position: absolute; left: 50%; bottom: 60px; z-index: 2; display: flex; gap: 22px; transform: translateX(-50%); }
.hero__dots button { width: 7px; height: 7px; background: #f2eeec; transition: background-color 0.3s; }
.hero__dots button[aria-current="true"], .hero__dots button:hover { background: #ee8d4d; }
/* Text reveal: each character slides up out of a mask (split by site.js) */
.hero__mask { display: inline-block; overflow: hidden; vertical-align: top; }
.split .ch { display: inline-block; transform: translateY(110%); }
.hero__slide.is-active .split .ch { animation: hero-rise 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards; animation-delay: calc(var(--d, 0ms) + var(--i) * var(--step, 10ms)); }
.js .hero__actions { overflow: hidden; }
.js .hero__slide .hero__btn { transform: translateY(110%); }
.hero__slide.is-active .hero__btn { animation: hero-rise 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards; animation-delay: var(--d, 0ms); }
@keyframes hero-rise { from { transform: translateY(110%); } to { transform: none; } }

/* About: four icon columns */
.about { padding: var(--sp-huge) 0; background: var(--gray); }
.about__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin: var(--sp-small) 0 0;
  padding: 0;
  list-style: none;
}
.about__item { padding: 3.2rem 2rem 2rem; transition: box-shadow 0.3s ease-out; }
.about__item:hover { box-shadow: 0 7px 30px rgba(0, 0, 0, 0.05); }
.about__item .about__icon::after { transition: opacity 0.3s ease-out; }
.about__item:hover .about__icon::after { opacity: 0; }
.about__icon { --fs: 68px; color: var(--icon); z-index: 0; }
.about__icon::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -0.22em;
  right: -0.343em;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: #faf5ed;
}
.about__name {
  margin-top: 1.8rem;
  font: 400 22.66px/27.19px var(--font-display);
  letter-spacing: 0.55px;
  text-transform: uppercase;
  color: var(--dark);
}
.about__item p { margin-top: 0.3em; font-size: 16px; line-height: 25.6px; }
@media (max-width: 1279px) { .about__grid { grid-template-columns: repeat(2, 1fr); } .about__item p { line-height: 24px; } }
@media (max-width: 767px) {
  .about__grid { grid-template-columns: 1fr; row-gap: 20px; }
  .about__icon { --fs: 64px; }
  .about__name { margin-top: 1.3rem; font-size: 21.33px; line-height: 25.6px; letter-spacing: 0; }
}
@media (max-width: 479px) { .about__icon { --fs: 60px; } .about__name { font-size: 20px; line-height: 24px; } .about__item p { font-size: 15px; line-height: 22.5px; } }

/* Services: intro on the left, staggered cards on the right */
.services { padding: var(--sp-huge) 0; }
.services__inner { display: grid; grid-template-columns: 2fr 1fr 1fr; align-items: start; }
.services__intro { align-self: center; padding-right: 18%; }
.services__col { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 30px; }
.services__col--a { padding: 30px 15px 0 0; }
.services__col--b { padding-left: 15px; }
.card { padding: 2.4rem 2.2rem; background: var(--gray); transition: background-color 0.3s ease-out; }
.card:hover { background: var(--accent); }
.card:hover .fi, .card:hover .card__name { color: #fff; }
.card .fi, .card__name { transition: color 0.3s ease-out; }
.card .fi { --fs: 3.6rem; display: block; color: var(--accent); }
.card__name {
  margin-top: 74.7px;
  font: 400 24px/28.8px var(--font-display);
  letter-spacing: 0.55px;
  text-transform: uppercase;
  color: var(--dark);
}
@media (max-width: 1439px) { .card__name { margin-top: 57.8px; } }
@media (max-width: 1279px) {
  .services__inner { grid-template-columns: 1fr 1fr; column-gap: 30px; }
  .services__intro { grid-column: 1 / -1; padding-right: 55%; }
  .services__col--a { grid-row: 2; padding: 30px 0 0; }
  .services__col--b { grid-row: 2; padding: 0; }
}
@media (max-width: 767px) {
  .services__inner { grid-template-columns: 1fr; }
  .services__intro { padding-right: 0; }
  .services__col--a, .services__col--b { grid-row: auto; }
  .services__col { gap: 20px; }
  .services__col--b { padding-top: 30px; }
  .card__name { margin-top: 41.7px; font-size: 22.59px; line-height: 27.11px; letter-spacing: 0; }
}
@media (max-width: 479px) { .card__name { margin-top: 39.2px; font-size: 21.18px; line-height: 25.42px; } }

/* Plain gray band between Services and "What we offer" */
.band { height: var(--sp-huge); background: var(--gray); }

/* What we offer: centred title with typed last word */
.offer { padding: var(--sp-huge) 0 calc(27px + 2 * var(--sp-huge)); text-align: center; }
.offer .title { max-width: 800px; margin-inline: auto; }
.typed { white-space: nowrap; }
@media (max-width: 1279px) { .offer { padding-bottom: calc(15px + 2 * var(--sp-huge)); } .offer .title { max-width: 68%; } }
@media (max-width: 767px) { .offer { padding-bottom: calc(10px + 2 * var(--sp-huge)); } .offer .title { max-width: 92%; } }

/* What we do: image slider + text with title tabs */
.wwd { padding-bottom: var(--sp-huge); }
.wwd--gray { padding-bottom: 0; background: var(--gray); }
.wwd__inner { display: grid; grid-template-columns: 1fr 1fr; column-gap: 30px; align-items: center; }
.wwd__media { position: relative; width: 83%; aspect-ratio: 9 / 11; overflow: hidden; background: var(--gray); }
.wwd__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.6s ease; }
.wwd__media img.is-active { opacity: 1; }
.wwd__tabs { list-style: none; margin: 25px 0 0; padding: 0; }
.wwd__tabs li + li { margin-top: 22px; }
.wwd__tabs button {
  position: relative;
  display: block;
  padding-left: 20px;
  font: 400 18px/23.4px var(--font-body);
  color: var(--text);
  text-align: left;
  transition: color 0.3s;
}
.wwd__tabs button::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8.7px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.wwd__tabs button[aria-selected="true"], .wwd__tabs button:hover { color: var(--dark); }
.wwd__tabs button[aria-selected="true"]::before { background: #212020; }
.wwd .btn-row { margin-top: 35px; }
.wwd__text .title, .wwd__text .lead { max-width: 95%; }
@media (max-width: 1279px) {
  .wwd__text .title, .wwd__text .lead { max-width: none; }
  .wwd__media { width: 100%; }
  .wwd__text { padding-left: 20px; }
  .wwd__tabs { margin-top: 20px; }
  .wwd__tabs li + li { margin-top: 18px; }
  .wwd .btn-row { margin-top: 28px; }
}
@media (max-width: 767px) {
  .wwd__inner { grid-template-columns: 1fr; }
  .wwd__text { padding: 30px 0 0; }
  .wwd__tabs { margin-top: 16px; }
  .wwd__tabs li + li { margin-top: 11px; }
  .wwd__tabs button { font-size: 17px; line-height: 22.1px; }
  .wwd__tabs button::before { top: 8px; }
  .wwd .btn-row { margin-top: 21px; }
}
@media (max-width: 479px) { .wwd__tabs li + li { margin-top: 10px; } .wwd__tabs button { font-size: 16px; line-height: 20.8px; } .wwd__tabs button::before { top: 7.4px; } }

/* ---------- 7. Inner pages ---------- */

.page-title {
  margin: 0;
  padding: 50px 0;
  font: 400 var(--title-size)/var(--title-lh) var(--font-display);
  text-transform: uppercase;
  text-align: center;
  color: var(--dark);
}
.page-title--flush { padding-bottom: 0; }

/* Projects gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}
.gallery a { display: block; aspect-ratio: 3 / 4; overflow: hidden; background: var(--gray); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
/* A lone photo on the last row spans the full width, as in the original justified gallery */
.gallery li:last-child:nth-child(4n + 1) { grid-column: 1 / -1; }
.gallery li:last-child:nth-child(4n + 1) a { aspect-ratio: auto; height: 500px; }
@media (max-width: 1439px) {
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .gallery li:last-child:nth-child(4n + 1) { grid-column: auto; }
  .gallery li:last-child:nth-child(4n + 1) a { aspect-ratio: 3 / 4; height: auto; }
  .gallery li:last-child:nth-child(3n + 1) { grid-column: 1 / -1; }
  .gallery li:last-child:nth-child(3n + 1) a { aspect-ratio: auto; height: 500px; }
}
@media (max-width: 1023px) {
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery li:last-child:nth-child(3n + 1) { grid-column: auto; }
  .gallery li:last-child:nth-child(3n + 1) a { aspect-ratio: 3 / 4; height: auto; }
  .gallery li:last-child:nth-child(2n + 1) { grid-column: 1 / -1; }
  .gallery li:last-child:nth-child(2n + 1) a { aspect-ratio: auto; height: 500px; }
}
@media (max-width: 767px) { .gallery li:last-child:nth-child(2n + 1) a { aspect-ratio: 3 / 4; height: auto; } }
@media (max-width: 479px) { .gallery { grid-template-columns: 1fr; } }

/* Contact page */
.contact { padding: var(--sp-huge) 0; }
.contact__inner { display: grid; grid-template-columns: 1fr 1fr; align-items: start; }
.contact__intro { padding-right: 29%; }
.contact__list { list-style: none; margin: 30px 0 0 -3px; padding: 0; }
.contact__list li { display: flex; align-items: flex-start; }
.contact__list li + li { margin-top: 18.7px; }
.contact__icon { flex: none; width: 27.2px; height: 27.2px; color: var(--icon); }
.contact__icon .fi { --fs: 22.1px; margin-top: 1.45px; }
.contact__text { margin-left: 13.6px; line-height: 28.9px; }
.contact__phone { display: inline-block; padding-top: 2px; font: 400 20px/24px var(--font-display); color: var(--dark); }
.contact__phone:hover { color: var(--hover); }
.contact__mail { position: relative; display: inline-block; padding-bottom: 7px; line-height: 20px; color: var(--text); }
.contact__mail::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}
.contact__mail:hover { color: var(--dark); }
.contact__mail:hover::after { transform: scaleX(1); }
@media (max-width: 1279px) {
  .contact__intro { padding-right: 12%; }
  .contact__list li + li { margin-top: 11.9px; }
  .contact__icon { margin-top: -3px; }
  .contact__text { font-size: 16px; line-height: 24px; }
  .contact__phone { font-size: 19px; line-height: 22px; }
  .contact__mail { line-height: 18px; }
}
@media (max-width: 767px) {
  .contact__inner { grid-template-columns: 1fr; }
  .contact__intro { padding-right: 0; }
  .contact__list { margin-top: 25px; }
  .contact__list li + li { margin-top: 16px; }
}
@media (max-width: 479px) {
  .contact .br-wide { display: none; }
  .contact__icon { width: 24px; height: 24px; margin-top: -2px; }
  .contact__icon .fi { --fs: 19.5px; margin-top: 1.27px; }
  .contact__text { margin-left: 7.5px; font-size: 15px; line-height: 22.5px; }
  .contact__phone { font-size: 18px; }
}

/* Contact form */
.form { --ft: 8px; --flh: 28.9px; padding: 69px 0 0 15px; }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 37px 30px; }
.form__field { position: relative; display: block; }
.form__field--wide { grid-column: 1 / -1; }
.form__field > .fi { position: absolute; left: 0; top: calc(var(--ft) + (var(--flh) - 1.1 * var(--fs)) / 2); z-index: 1; color: var(--ink); pointer-events: none; }
.form__field input, .form__field select, .form__field textarea {
  display: block;
  width: 100%;
  height: 48px;
  margin: 0;
  padding: 13px 0 13px 36px;
  border: 0;
  border-bottom: 1px solid rgba(49, 39, 30, 0.2);
  border-radius: 0;
  background: transparent linear-gradient(var(--dark), var(--dark)) no-repeat 0 100% / 0 1px;
  font: 400 14px/21px var(--font-body);
  color: var(--muted);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: background-size 0.4s ease;
}
.form__field input:focus, .form__field select:focus, .form__field textarea:focus { background-size: 100% 1px; }
.form__field ::placeholder { color: var(--ink); opacity: 1; }
.form__field select { padding-right: 42px; color: var(--ink); cursor: pointer; }
.form__field > .form__chevron { position: absolute; left: auto; right: 14px; top: 21px; width: 9px; height: 6px; color: var(--muted); pointer-events: none; }
.form__field textarea { height: 6.2em; resize: none; }
.form__submit {
  display: inline-flex;
  align-items: center;
  margin-top: 55.2px;
  padding: 18px 35px 16px;
  font: 400 18px/22px var(--font-display);
  text-transform: uppercase;
  color: #fff;
  background: var(--accent);
  transition: background-color 0.3s;
}
.form__submit .icon { width: 16px; height: 16px; margin-right: 13px; }
.form__submit:hover, .form__submit:focus-visible { background: var(--hover); }
.form__submit[disabled] { cursor: progress; }
.form__submit.is-sent { background: #28a745; }
.form__submit.is-error { background: #dc3545; }
.form__consent { position: relative; display: block; margin-top: 10px; padding-left: 25.2px; font-size: 14px; line-height: 22px; color: var(--text); cursor: pointer; }
.form__consent input { position: absolute; left: 0; top: 2.8px; width: 16px; height: 16px; margin: 0; accent-color: var(--dark); }
.form__consent a { display: inline-block; line-height: 14px; color: var(--text); border-bottom: 1px solid currentColor; }
.form__consent a:hover { color: var(--dark); }
.form__status { font-size: 14px; line-height: 22px; }
.form__status:empty { display: none; }
@media (max-width: 1279px) {
  .form { padding-top: 44px; }
  .form__grid { row-gap: 30px; }
  .form__submit { margin-top: 35.2px; padding: 16px 35px 14px; font-size: 17px; }
  .form__submit .icon { margin-right: 9px; }
}
@media (max-width: 1023px) {
  .form { --ft: 9px; --flh: 26.86px; }
  .form__grid { row-gap: 25px; }
  .form__submit { margin-top: 25.2px; }
}
@media (max-width: 767px) {
  .form { --flh: 25.28px; padding: 31.5px 0 0; }
  .form__grid { grid-template-columns: 1fr; row-gap: 18px; }
  .form__field input, .form__field select { height: 45.5px; padding-top: 11px; padding-bottom: 11px; font-size: 15px; line-height: 22.5px; }
  .form__field textarea { padding-top: 11px; padding-bottom: 11px; font-size: 15px; line-height: 22.5px; }
  .form__field > .form__chevron { top: 20px; }
  .form__submit { margin-top: 28px; padding: 14px 30px 12px; }
  .form__submit .icon { margin-right: 11px; }
}
@media (max-width: 479px) {
  .form { --flh: 22.95px; padding-top: 26.5px; }
  .form__grid { row-gap: 12px; }
  .form__submit { margin-top: 22px; }
}

/* Price It calculator. The sign-up form shows until html gets .calc-unlocked (set by site.js). */
.calc { padding-bottom: var(--sp-huge); }
.calc__head { max-width: 760px; margin: 0 auto; text-align: center; }
.calc__title { margin-bottom: 14px; font: 400 var(--h3-size)/var(--h3-lh) var(--font-display); text-transform: uppercase; color: var(--dark); }
.calc-gate { max-width: 760px; margin: 0 auto; padding: 40px 0 0; }
.calc-gate__intro { margin-bottom: 6px; font-weight: 500; color: var(--dark); }
.calc-gate .form__submit .icon { width: 14.5px; height: 10px; margin: 0 0 0 16px; }
.calc__app { display: none; margin-top: 50px; outline: none; }
.calc-unlocked .calc__app { display: block; }
.calc-unlocked .calc-gate { display: none; }

.calc__bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 15px 30px; margin-bottom: 25px; }
.calc__note { font-size: 15px; line-height: 22px; }
.calc__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.calc__actions--end { justify-content: flex-end; margin-top: 20px; }
.btn--ghost { color: var(--dark); background: transparent; box-shadow: inset 0 0 0 1px var(--dark); }
.btn--ghost:hover, .btn--ghost:focus-visible { color: #fff; background: var(--dark); }

.calc__table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 14px; line-height: 20px; color: var(--dark); }
.calc__table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 13px 8px 11px;
  font: 400 15px/17px var(--font-display);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  text-align: right;
  vertical-align: bottom;
  color: #fff;
  background: var(--brown);
}
.calc__table thead th:nth-child(-n + 2) { text-align: left; }
.calc__table thead th:nth-child(1) { width: 16%; padding-left: 14px; }
.calc__table thead th:nth-child(2) { width: 14%; }
.calc__group-head th { padding: 0; background: var(--gray); }
.calc__toggle {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 14px 14px 12px;
  font: 400 18px/22px var(--font-display);
  letter-spacing: 0.4px;
  text-transform: uppercase;
  text-align: left;
  color: var(--dark);
}
.calc__toggle-title { flex: 1; }
.calc__subtotal { margin-left: 20px; font: 500 15px/22px var(--font-body); letter-spacing: 0; }
.calc__chevron { width: 9px; height: 6px; margin-left: 16px; transition: transform 0.3s; }
.calc__toggle[aria-expanded="false"] .calc__chevron { transform: rotate(-90deg); }
.calc__group.is-collapsed tr:not(.calc__group-head) { display: none; }
.calc__table tbody tr:not(.calc__group-head) > * { border-bottom: 1px solid #ebe6e0; }
.calc__table tbody th { padding: 6px 8px 6px 14px; font-weight: 500; text-align: left; }
.calc__table td { padding: 6px 4px; text-align: right; white-space: nowrap; }
.calc__c-with-waste, .calc__c-labor-total, .calc__c-material-total { color: var(--text); }
.calc__table .calc__c-total { padding-right: 10px; font-weight: 700; }
/* Rows with a take-off are marked; the rest recede */
.calc__table tbody tr.is-active > th { box-shadow: inset 3px 0 0 var(--accent); }
.calc__table tbody tr:not(.is-active) .calc__c-total { color: var(--text); font-weight: 400; }
.calc__table tbody tr:not(.calc__group-head):not(.is-active) input[type="number"]:not(:focus) { color: var(--text); }

.calc__app input {
  display: block;
  width: 100%;
  height: 36px;
  margin: 0;
  padding: 7px 9px;
  border: 1px solid rgba(49, 39, 30, 0.2);
  border-radius: 0;
  font: 400 14px/20px var(--font-body);
  color: var(--dark);
  text-align: right;
  background: #fff;
  outline: none;
  -moz-appearance: textfield;
  appearance: textfield;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.calc__app input[type="text"] { text-align: left; }
.calc__app input::-webkit-outer-spin-button, .calc__app input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.calc__app input::placeholder { color: var(--muted); opacity: 1; }
.calc__app input:focus { border-color: var(--dark); box-shadow: inset 0 0 0 1px var(--dark); }
.calc__app .calc__name { margin-left: -9px; font-weight: 500; border-color: transparent; background: transparent; }
.calc__app .calc__name:hover { border-color: rgba(49, 39, 30, 0.2); background: #fff; }
.calc__app .calc__name:focus { border-color: var(--dark); background: #fff; }

/* Running total that stays in view while the table scrolls */
.calc__sticky {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: baseline;
  gap: 4px 36px;
  margin-top: 20px;
  padding: 13px 20px 11px;
  font-size: 14px;
  line-height: 20px;
  color: rgba(255, 255, 255, 0.8);
  background: var(--brown);
}
.calc__sticky b { margin-left: 10px; font: 400 24px/26px var(--font-display); letter-spacing: 0.5px; color: #fff; }
.calc__sticky span:last-child b { color: var(--accent); }

.calc__lower { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 50px; margin-top: 60px; }
.calc__h3 { margin-bottom: 22px; font: 400 var(--h3-size)/var(--h3-lh) var(--font-display); text-transform: uppercase; color: var(--dark); }
.calc__field { display: block; font-size: 15px; line-height: 22px; font-weight: 500; color: var(--dark); }
.calc__field + .calc__field { margin-top: 20px; }
.calc__app .calc__field input { height: 46px; margin-top: 8px; font-size: 16px; text-align: left; }
.calc__req { color: var(--hover); }
.calc__results { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin: 0; }
.calc__results div { padding: 20px 22px 18px; background: var(--gray); }
.calc__results dt { font-size: 14px; line-height: 20px; }
.calc__results dd { margin: 8px 0 0; font: 400 30px/32px var(--font-display); letter-spacing: 0.5px; color: var(--dark); overflow-wrap: anywhere; }
.calc__results .is-sell { background: var(--brown); }
.calc__results .is-sell dt { color: rgba(255, 255, 255, 0.8); }
.calc__results .is-sell dd { color: var(--accent); }

.calc__toast {
  position: fixed;
  left: 50%;
  bottom: 84px;
  z-index: 30;
  padding: 12px 22px;
  font-size: 15px;
  line-height: 22px;
  color: #fff;
  background: #1e7e34;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 0.3s, transform 0.3s;
}
.calc__toast.is-shown { opacity: 1; transform: translate(-50%, 0); }
.calc__toast.is-error { background: #c82333; }

.calc__info { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 50px; margin-top: 80px; padding-top: 60px; border-top: 1px solid var(--rule); }
.calc__list { margin: 0; padding-left: 1.15em; }
.calc__list li + li { margin-top: 6px; }
.calc__list b, .calc__info b { font-weight: 500; color: var(--dark); }
.calc__info p + p { margin-top: 14px; }

@media (max-width: 1279px) {
  .calc__table { font-size: 13px; }
  .calc__table thead th { padding-inline: 5px; font-size: 14px; }
  .calc__table thead th:nth-child(1) { width: 18%; padding-left: 10px; }
  .calc__table thead th:nth-child(2) { width: 12%; }
  .calc__table tbody th { padding-left: 10px; }
  .calc__table td { padding-inline: 3px; }
  .calc__table .calc__c-total { padding-right: 6px; }
  .calc__toggle { padding-inline: 10px; }
  .calc__app input { padding-inline: 6px; font-size: 13px; }
  .calc__sticky { padding-right: 76px; }
}
/* Phones and tablets: each line item becomes a card */
@media (max-width: 1023px) {
  .calc__table, .calc__table tbody, .calc__table tr, .calc__table th, .calc__table td { display: block; }
  .calc__table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .calc__table thead th { position: static; }
  .calc__group { margin-bottom: 10px; border: 1px solid #e5e0da; }
  .calc__toggle { padding: 14px 16px 12px; }
  .calc__table tbody tr:not(.calc__group-head) {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-areas:
      "name name name total"
      "description description description description"
      "takeoff waste labor material"
      "with-waste with-waste labor-total material-total";
    gap: 10px 12px;
    padding: 14px 16px 16px;
    border-top: 1px solid #e5e0da;
  }
  .calc__table tbody tr:not(.calc__group-head) > * { padding: 0; border: 0; }
  .calc__table tbody tr.is-active { box-shadow: inset 3px 0 0 var(--accent); }
  .calc__table tbody tr.is-active > th { box-shadow: none; }
  .calc__table tbody th { grid-area: name; align-self: center; padding: 0; font-size: 16px; line-height: 22px; }
  .calc__table td { display: flex; flex-direction: column; justify-content: flex-end; font-size: 14px; white-space: normal; }
  .calc__table td::before { content: attr(data-label); margin-bottom: 4px; font-size: 12px; font-weight: 400; line-height: 15px; color: var(--text); }
  .calc__table .calc__c-description::before { content: none; }
  .calc__c-description { grid-area: description; }
  .calc__c-with-waste { grid-area: with-waste; }
  .calc__c-labor-total { grid-area: labor-total; }
  .calc__c-material-total { grid-area: material-total; }
  .calc__table .calc__c-takeoff { grid-area: takeoff; text-align: left; }
  .calc__table .calc__c-waste { grid-area: waste; text-align: left; }
  .calc__table .calc__c-labor { grid-area: labor; text-align: left; }
  .calc__table .calc__c-material { grid-area: material; text-align: left; }
  .calc__table .calc__c-total { grid-area: total; justify-content: center; padding: 0; font-size: 16px; }
  .calc__app .calc__name { margin-left: -7px; font-size: 16px; }
  .calc__app input { height: 40px; font-size: 16px; }
  .calc__lower { grid-template-columns: 1fr; gap: 40px; margin-top: 45px; }
  .calc__info { gap: 40px; margin-top: 60px; padding-top: 50px; }
}
@media (max-width: 767px) {
  .calc-gate { padding-top: 30px; }
  .calc__app { margin-top: 35px; }
  .calc__results { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .calc__results div { padding: 16px 16px 14px; }
  .calc__results dd { font-size: 26px; line-height: 28px; }
  .calc__info { grid-template-columns: 1fr; }
  .calc__toast { bottom: 72px; width: max-content; max-width: calc(100% - 40px); }
}
@media (max-width: 479px) {
  .calc__table tbody tr:not(.calc__group-head) {
    grid-template-areas:
      "name name total total"
      "description description description description"
      "takeoff waste labor material"
      "with-waste with-waste labor-total material-total";
    column-gap: 8px;
    padding-inline: 14px;
  }
  .calc__actions { width: 100%; }
  .calc__actions .btn { flex: 1 1 auto; justify-content: center; padding-inline: 14px; }
  .calc__sticky span:first-child { display: none; }
  .calc__info { margin-top: 50px; padding-top: 40px; }
}

/* Shop: "Opening soon" */
.soon { padding-top: 60px; text-align: center; }
.soon h1 { margin: 32px 0; font: 400 var(--title-size)/1 var(--font-display); text-transform: uppercase; color: var(--text); }
@media (max-width: 1439px) { .soon { padding-top: 50px; } }
@media (max-width: 1023px) { .soon { padding-top: 45px; } }
@media (max-width: 767px) { .soon { padding-top: 35px; } }
@media (max-width: 479px) { .soon { padding-top: 30px; } }

/* Definitions */
.defs { padding-bottom: 50px; text-align: center; }
.defs p + figure, .defs figure + p { margin-top: 50px; }
.defs img { width: 300px; margin-inline: auto; }
@media (max-width: 1279px) { .defs figure { width: 344px; max-width: 100%; } }

/* Legal text (Terms, Privacy) */
.prose { padding-bottom: 0; }
.prose h2 {
  margin: 1.18em 0 0.55em;
  font: 400 var(--h3-size)/var(--h3-lh) var(--font-display);
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--dark);
}
.prose p, .prose ul { margin-bottom: 1.8em; }
.prose ul { padding-left: 1.5em; }
.prose ul ul { margin: 0; }
.prose a { color: var(--accent); }
.prose a:hover { color: var(--hover); }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose a[href^="mailto:"] { color: var(--dark); }
.prose a[href^="mailto:"]:hover { color: var(--hover); }
@media (max-width: 1279px) { .prose p, .prose ul { margin-bottom: 1em; } }
@media (max-width: 1023px) { .prose h2 { margin: 25px 0 16px; } }
@media (max-width: 767px) { .prose h2 { margin: 24px 0 14px; } }
@media (max-width: 479px) { .prose h2 { margin: 22px 0 13px; } }

/* 404 */
.notfound { padding: 0 0 120px; text-align: center; }

/* ---------- 8. Motion and accessibility ---------- */

/* Fade-up on scroll, only when JS is running */
.js .reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease, transform 0.8s ease; }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal-seq > * { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease, transform 0.8s ease; }
.js .reveal-seq.is-in > * { opacity: 1; transform: none; }
.js .reveal-seq.is-in > :nth-child(2) { transition-delay: 0.1s; }
.js .reveal-seq.is-in > :nth-child(3) { transition-delay: 0.2s; }
.js .reveal-seq.is-in > :nth-child(4) { transition-delay: 0.3s; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0ms !important; }
  .js .reveal, .js .reveal-seq > * { opacity: 1; transform: none; }
  .split .ch, .js .hero__slide .hero__btn { transform: none; }
}
