/* Tidemark Roofing Co. — direction A, "Low Tide"
   Calm and premium: shell white, deep slate, one copper accent. */
:root {
  /* Spacing scale: use only these values */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.5rem;
  --space-6: 4rem;
  --space-7: 6rem;
  --space-8: 10rem;

  /* Color */
  --shell: #eeece6;        /* page background, weathered stucco */
  --shell-deep: #e3e0d8;   /* alternate background */
  --slate: #2a3431;        /* text, dark sections */
  --slate-deep: #1f2725;   /* darkest surfaces */
  --copper: #94512d;       /* the one accent (on light); 4.5:1 on both light backgrounds */
  --copper-light: #d08a5a; /* the same accent, on dark */
  --driftwood: #5d615b;    /* secondary text on light */
  --mist: #b9bcb4;         /* secondary text on dark */
  --line: rgba(42, 52, 49, 0.16);
  --control-line: #878b85; /* form control borders: 3:1 against white */
  --line-dark: rgba(238, 236, 230, 0.18);

  /* Type */
  --font-display: "Gambetta", Georgia, "Times New Roman", serif;
  --font-body: "Hanken Grotesk", "Segoe UI", Arial, sans-serif;

  --text-sm: 0.9375rem;
  --text-base: 1.0625rem;
  --text-md: 1.25rem;
  --text-lg: 1.5rem;
  --text-xl: clamp(1.75rem, 3.2vw, 2.5rem);
  --text-2xl: clamp(2.25rem, 5vw, 4rem);
  --text-hero: clamp(2.75rem, 7.6vw, 6.75rem);

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --header-h: 5.5rem;
  --banner-h: 2rem;
  --top-scrolled: calc(var(--banner-h) + var(--header-h) * 0.8);
  --wrap: 78rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

/* Land below the fixed top bar once it has shrunk (80% header height). */
main section[id] {
  scroll-margin-top: var(--top-scrolled);
}

body {
  margin: 0;
  background: var(--shell);
  color: var(--slate);
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1, h2, h3, p, ol, ul, dl, dd, figure, blockquote, fieldset {
  margin: 0;
}

ol, ul {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--focus, var(--copper));
  outline-offset: 3px;
}

/* Dark areas get a light focus ring; light panels inside them switch back to copper */
.hero,
.storm,
.reviews,
.book,
.site-top,
.callbar {
  --focus: var(--shell);
}

.book__card {
  --focus: var(--copper);
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

@media (min-width: 768px) {
  .wrap {
    padding-inline: var(--space-5);
  }
}

.skip-link {
  position: absolute;
  left: var(--space-3);
  top: var(--space-3);
  z-index: 100;
  padding: var(--space-2) var(--space-3);
  background: var(--shell);
  color: var(--slate);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* [NEEDED] labels */
.needed {
  display: inline-block;
  padding: var(--space-1) var(--space-2);
  background: #fff3c4;
  color: #5a4300;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.4;
}

.needed-photo {
  display: grid;
  place-items: center;
  aspect-ratio: 3 / 2;
  padding: var(--space-4);
  background: var(--shell-deep);
  border: 1px dashed var(--driftwood);
  text-align: center;
}

.needed-photo--dark {
  background: var(--slate-deep);
  border-color: var(--mist);
}

/* Buttons */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border: 1px solid transparent;
  border-radius: 999px;
  font: 600 var(--text-base) / 1.2 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  isolation: isolate;
  transition: transform 0.6s var(--ease);
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.14);
  opacity: 0;
  transition: opacity 0.6s var(--ease);
}

.btn:active {
  transform: scale(0.97);
}

/* Hover effects only where a real pointer hovers, so they don't stick after a tap */
@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    transform: translateY(-2px);
  }

  .btn:hover::after {
    opacity: 1;
  }

  .btn:hover:active {
    transform: translateY(-2px) scale(0.97);
  }
}

.btn--small {
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
}

.btn--copper {
  background: var(--copper);
  color: #fff;
}

.btn--ghost-light {
  border-color: rgba(238, 236, 230, 0.6);
  color: var(--shell);
}

.btn--plain {
  border-color: var(--line);
  background: transparent;
  color: var(--slate);
}

.btn--plain::after {
  background: rgba(42, 52, 49, 0.06);
}

.text-link {
  display: inline-block;
  color: var(--copper);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
}

@media (hover: hover) and (pointer: fine) {
  .text-link:hover {
    color: var(--slate);
    text-decoration-thickness: 2px;
  }
}

/* Shared section type */
.section-title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
  max-width: 16ch;
}

.section-lede {
  margin-top: var(--space-4);
  max-width: 34rem;
  font-size: var(--text-md);
  color: var(--driftwood);
}

/* ---------- Top: banner + header ---------- */
.site-top {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  transition: transform 0.6s var(--ease);
}

.sample-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--banner-h);
  padding: var(--space-1) var(--space-3);
  background: var(--slate-deep);
  color: var(--shell);
  font-size: 0.8125rem;
  line-height: 1.3;
  text-align: center;
}

.site-header {
  position: relative;
  color: var(--shell);
}

.site-header__bg {
  position: absolute;
  inset: 0;
  background: var(--slate);
  opacity: 0;
  transform-origin: top;
  transition: transform 0.6s var(--ease), opacity 0.6s var(--ease);
}

.site-header__inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  max-width: var(--wrap);
  height: var(--header-h);
  margin-inline: auto;
  padding-inline: var(--space-4);
  transition: transform 0.6s var(--ease);
}

@media (min-width: 768px) {
  .site-header__inner {
    padding-inline: var(--space-5);
  }
}

.site-header.is-scrolled .site-header__bg {
  opacity: 1;
  transform: scaleY(0.8);
}

.site-header.is-scrolled .site-header__inner {
  transform: translateY(calc(var(--header-h) * -0.1));
}

.site-header.is-scrolled .wordmark {
  transform: scale(0.9);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-right: auto;
  text-decoration: none;
  transform-origin: left center;
  transition: transform 0.6s var(--ease);
}

.wordmark__mark {
  width: 2.5rem;
  height: 2.5rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wordmark__tide {
  stroke: var(--copper-light);
  stroke-width: 5;
}

.wordmark__tide--soft {
  opacity: 0.55;
}

.wordmark__name {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.site-nav__list {
  display: flex;
  gap: var(--space-4);
}

.site-nav__list a {
  position: relative;
  display: inline-block;
  padding-block: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 500;
  text-decoration: none;
}

.site-nav__list a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: var(--space-1);
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.6s var(--ease);
}

@media (hover: hover) and (pointer: fine) {
  .site-nav__list a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
  }
}

.site-nav__toggle {
  display: none;
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.site-header__phone {
  font-weight: 600;
  font-size: var(--text-sm);
  text-decoration: none;
  white-space: nowrap;
}

@media (max-width: 1099px) {
  .site-nav__toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-3);
    border: 1px solid currentColor;
    border-radius: 999px;
    background: transparent;
    color: inherit;
    font: 500 var(--text-sm) / 1.2 var(--font-body);
    cursor: pointer;
  }

  .site-nav__toggle-lines,
  .site-nav__toggle-lines::before {
    display: block;
    width: 1rem;
    height: 1px;
    background: currentColor;
  }

  .site-nav__toggle-lines {
    position: relative;
    top: -3px;
  }

  .site-nav__toggle-lines::before {
    content: "";
    position: relative;
    top: 6px;
  }

  .site-nav__list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: var(--space-3) var(--space-4) var(--space-4);
    background: var(--shell);
    color: var(--slate);
    border-bottom: 1px solid var(--line);
    --focus: var(--copper);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.5rem);
    /* Closing: fade only; the small drop resets after it's hidden */
    transition: opacity 0.6s var(--ease), visibility 0s 0.6s, transform 0s 0.6s;
  }

  .site-nav.is-open .site-nav__list {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  }

  .site-nav__list a {
    display: block;
    padding-block: var(--space-3);
    font-family: var(--font-display);
    font-size: var(--text-lg);
    border-bottom: 1px solid var(--line);
  }

  .site-nav__list a::after {
    display: none;
  }
}

@media (max-width: 639px) {
  .site-header__actions {
    display: none;
  }

  :root {
    --header-h: 4.5rem;
    --banner-h: 2.5rem;
    /* On phones the banner slides away once you scroll, so only the header stays. */
    --top-scrolled: calc(var(--header-h) * 0.8);
  }

  .sample-banner {
    font-size: 0.75rem;
  }

  .site-top.is-scrolled {
    transform: translateY(calc(var(--banner-h) * -1));
  }

  .wordmark__name {
    font-size: 1.5rem;
  }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  padding-top: calc(var(--banner-h) + var(--header-h) + var(--space-5));
  padding-bottom: var(--space-7);
  overflow: hidden;
  color: var(--shell);
  background: var(--slate-deep);
}

.hero__media,
.hero__shade {
  position: absolute;
  inset: 0;
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 40%;
  transform-origin: 60% 40%;
}

.hero__shade {
  background:
    linear-gradient(to bottom, rgba(31, 39, 37, 0.65) 0%, rgba(31, 39, 37, 0) 30%),
    linear-gradient(to top, rgba(31, 39, 37, 0.92) 0%, rgba(31, 39, 37, 0.55) 45%, rgba(31, 39, 37, 0.2) 100%),
    linear-gradient(to right, rgba(31, 39, 37, 0.7) 0%, rgba(31, 39, 37, 0) 70%);
}

/* On wide screens the photo is drawn wider than the screen and anchored left,
   which moves the roofer into the right third, clear of the headline. */
@media (min-width: 900px) {
  .hero__img {
    width: 125%;
    max-width: none;
  }
}

.hero__content {
  position: relative;
}

.hero__title {
  max-width: 11ch;
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.js-motion .hero__title {
  opacity: 0;
}

.js-motion.motion-fallback .hero__title,
.js-motion .hero__title.is-ready {
  opacity: 1;
}

.hero__note,
.hero__lede,
.section-lede {
  text-wrap: pretty;
}

.hero__lede {
  max-width: 36rem;
  margin-top: var(--space-4);
  font-size: var(--text-md);
  color: rgba(238, 236, 230, 0.86);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.hero__note {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--mist);
}

/* ---------- Storm damage ---------- */
.storm {
  padding-block: var(--space-7);
  background: var(--slate);
  color: var(--shell);
}

.storm__grid {
  display: grid;
  gap: var(--space-6) var(--space-6);
}

.storm .section-title {
  max-width: 12ch;
}

.storm__lede {
  max-width: 30rem;
  margin-top: var(--space-4);
  font-size: var(--text-md);
  color: rgba(238, 236, 230, 0.86);
}

.storm__call {
  display: inline-block;
  margin-top: var(--space-5);
  padding-bottom: var(--space-1);
  border-bottom: 1px solid var(--copper-light);
  font-weight: 500;
  text-decoration: none;
}

.storm__call span {
  color: var(--copper-light);
  font-weight: 600;
  white-space: nowrap;
}

.storm__steps {
  display: grid;
  gap: var(--space-5);
  padding-top: var(--space-5);
  border-top: 1px solid var(--line-dark);
}

.storm__steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--space-3);
  align-items: start;
}

.storm__num {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: 1;
  color: var(--copper-light);
}

.storm__steps h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  line-height: 1.2;
}

.storm__steps p {
  margin-top: var(--space-2);
  color: var(--mist);
}

@media (min-width: 900px) {
  .storm__grid {
    grid-template-columns: 5fr 7fr;
    align-items: end;
  }

  .storm__steps {
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ---------- Roof types (tabs) ---------- */
.roofs {
  padding-block: var(--space-7);
}

.roofs__head {
  margin-bottom: var(--space-5);
}

.tabs__list {
  display: flex;
  gap: var(--space-4);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--space-5);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.tabs__tab {
  position: relative;
  padding: var(--space-3) 0;
  border: 0;
  background: none;
  color: var(--driftwood);
  font: 500 var(--text-lg) / 1.2 var(--font-display);
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .tabs__tab:hover {
    color: var(--slate);
  }
}

.tabs__list {
  position: relative;
}

.tabs__tab[aria-selected="true"] {
  color: var(--slate);
}

/* One underline that slides to the selected tab (positioned by JS) */
.tabs__indicator {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 1px;
  height: 2px;
  background: var(--copper);
  transform-origin: left;
  pointer-events: none;
}

.tabs__indicator.is-ready {
  transition: transform 0.6s var(--ease);
}

.tabs__panels {
  display: grid;
}

.tabs__panel {
  grid-area: 1 / 1;
  display: grid;
  gap: var(--space-5);
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.5rem);
  /* Leaving: fade only, then reset position once hidden */
  transition: opacity 0.6s var(--ease), visibility 0s 0.6s, transform 0s 0.6s;
}

.tabs__panel.is-active {
  opacity: 1;
  visibility: visible;
  transform: none;
  /* Arriving: waits until the old panel is mostly gone, so the photos don't overlap */
  transition: opacity 0.6s var(--ease) 0.2s, transform 0.8s var(--ease) 0.2s;
}

.tabs__photo {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--shell-deep);
}

.tabs__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tabs__text h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  line-height: 1.1;
}

.tabs__text p {
  max-width: 30rem;
  margin-top: var(--space-3);
  font-size: var(--text-md);
}

.tabs__facts {
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}

.tabs__facts dt {
  font-size: var(--text-sm);
  color: var(--driftwood);
}

.tabs__facts dd {
  margin-top: var(--space-2);
}

@media (min-width: 900px) {
  .tabs__panel {
    grid-template-columns: 7fr 5fr;
    gap: var(--space-6);
    align-items: center;
  }
}

/* ---------- Services ---------- */
.services {
  padding-block: var(--space-7);
}

.has-rule,
.process:not(.is-pinned) {
  padding-top: 0;
}

.has-rule > .wrap::before,
.process:not(.is-pinned) > .wrap::before {
  content: "";
  display: block;
  height: 1px;
  background: var(--line);
  margin-bottom: var(--space-7);
}

/* The process list is itself a grid, so its gap already adds space */
.process:not(.is-pinned) > .wrap::before {
  margin-bottom: calc(var(--space-7) - var(--space-5));
}

.services > .wrap > .section-title {
  margin-bottom: var(--space-6);
}

.service {
  display: grid;
  gap: var(--space-4);
  align-items: center;
}

.service + .service {
  margin-top: var(--space-7);
}

.service__media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

/* Keep the roofers' heads in frame */
.service:first-of-type .service__media img {
  object-position: 50% 25%;
}

.service__text h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  line-height: 1.1;
}

.service__text p {
  max-width: 28rem;
  margin-top: var(--space-3);
  margin-bottom: var(--space-4);
}

.services__extras {
  margin-top: var(--space-7);
  max-width: 40rem;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: 1.35;
}

.services__trio {
  display: grid;
  gap: var(--space-6);
  margin-top: var(--space-7);
}

.service--small {
  align-items: start;
}

.services__trio .service + .service {
  margin-top: 0;
}

.service--small .service__media img {
  aspect-ratio: 4 / 5;
}

.service--small h3 {
  font-size: var(--text-lg);
}

@media (min-width: 900px) {
  .service {
    grid-template-columns: 7fr 5fr;
    gap: var(--space-6);
  }

  /* Replacement: the before/after runs the full width, text sits above it */
  .service--feature {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }

  .service--feature .service__text {
    display: grid;
    grid-template-columns: 5fr 7fr;
    column-gap: var(--space-6);
    align-items: end;
  }

  .service--feature .service__text h3 {
    grid-row: span 2;
    align-self: start;
  }

  .service--feature .service__text p {
    margin-top: 0;
  }

  .service--feature .compare__frame {
    aspect-ratio: 16 / 9;
  }

  .services__trio {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-5);
  }

  .service--small {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }
}

/* Before and after slider */
.compare__frame {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  background: var(--shell);
  touch-action: pan-y;
}

.compare__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compare__after {
  position: absolute;
  inset: 0;
  clip-path: inset(0 50% 0 0); /* updated directly by JS */
}

/* Full-width layer moved with translateX, so its left edge is the divider */
.compare__handle {
  position: absolute;
  inset: 0;
  transform: translateX(50%); /* updated directly by JS */
  pointer-events: none;
}

.compare__handle::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -1px;
  width: 2px;
  background: var(--copper-light);
}

.compare__handle span {
  position: absolute;
  top: 50%;
  left: 0;
  width: 2.75rem;
  height: 2.75rem;
  margin: -1.375rem 0 0 -1.375rem;
  border-radius: 50%;
  background: var(--copper);
  box-shadow: 0 0 0 4px rgba(238, 236, 230, 0.9);
}

.compare__handle span::before,
.compare__handle span::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  margin-top: -5px;
  border-block: 5px solid transparent;
}

.compare__handle span::before {
  left: 0.6rem;
  border-right: 6px solid #fff;
}

.compare__handle span::after {
  right: 0.6rem;
  border-left: 6px solid #fff;
}

.compare__frame:has(.compare__range:focus-visible) .compare__handle span {
  outline: 2px solid var(--shell);
  outline-offset: 5px;
}

.compare__tag {
  position: absolute;
  bottom: var(--space-3);
  padding: var(--space-1) var(--space-2);
  background: rgba(31, 39, 37, 0.78);
  color: var(--shell);
  font-size: var(--text-sm);
  pointer-events: none;
}

.compare__tag--after {
  left: var(--space-3);
}

.compare__tag--before {
  right: var(--space-3);
}

.compare__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
}

.compare figcaption {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--driftwood);
}

/* ---------- How it works ---------- */
.process {
  padding-block: var(--space-7);
}

.process__inner {
  display: grid;
  gap: var(--space-5);
}

.process__progress {
  display: none;
}

.process__steps {
  display: grid;
  gap: var(--space-5);
}

.process__step {
  display: grid;
  grid-template-columns: 3rem 1fr;
  column-gap: var(--space-3);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
}

.process__num {
  grid-row: span 2;
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: 1;
  color: var(--copper);
}

.process__step h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  line-height: 1.2;
}

.process__step p {
  max-width: 30rem;
  margin-top: var(--space-2);
  color: var(--driftwood);
}

/* Pinned layout, switched on by JS on larger screens */
.process.is-pinned {
  display: flex;
  align-items: center;
  min-height: 100vh;
  padding-block: calc(var(--banner-h) + var(--header-h)) var(--space-5);
}

.process.is-pinned .process__inner {
  grid-template-columns: 5fr 7fr;
  gap: var(--space-6);
  align-items: center;
}

.process.is-pinned .process__progress {
  display: block;
  position: relative;
  height: 2px;
  margin-top: var(--space-5);
  max-width: 16rem;
  background: var(--line);
}

.process.is-pinned .process__progress span {
  position: absolute;
  inset: 0;
  background: var(--copper);
  transform: scaleX(0.2);
  transform-origin: left;
}

.process.is-pinned .process__steps {
  grid-template-areas: "stack";
}

.process.is-pinned .process__step {
  grid-area: stack;
  grid-template-columns: 1fr;
  border-top: 0;
  padding-top: 0;
}

.process.is-pinned .process__num {
  grid-row: auto;
  font-size: clamp(5rem, 11vw, 9rem);
  margin-bottom: var(--space-4);
}

.process.is-pinned .process__step h3 {
  font-size: var(--text-2xl);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.process.is-pinned .process__step p {
  font-size: var(--text-md);
  margin-top: var(--space-3);
}

/* ---------- Reviews ---------- */
.reviews {
  padding-block: var(--space-7);
  background: var(--slate);
  color: var(--shell);
}

.reviews .section-title {
  margin-bottom: var(--space-6);
}

.review {
  max-width: 46rem;
}

.review + .review {
  margin-top: var(--space-7);
}

@media (min-width: 900px) {
  /* Starts on the same line as the right-hand column elsewhere (5fr / 7fr split) */
  .review--offset {
    margin-left: calc((100% - var(--space-6)) * 5 / 12 + var(--space-6));
  }
}

.review__label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--copper-light);
}

.review blockquote {
  margin-top: var(--space-3);
}

.review blockquote p {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: 1.35;
  letter-spacing: -0.01em;
}

@media (min-width: 768px) {
  .review blockquote p {
    font-size: var(--text-xl);
    line-height: 1.3;
  }
}

.review figcaption {
  margin-top: var(--space-4);
  color: var(--mist);
}

/* ---------- Service area ---------- */
.area {
  padding-block: var(--space-7);
}

.area__title {
  font-size: var(--text-md);
  font-weight: 600;
  color: var(--copper);
}

.area__towns {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-4);
  margin-top: var(--space-4);
}

@media (min-width: 768px) {
  .area__towns {
    gap: var(--space-2) var(--space-5);
  }
}

.area__towns li {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 7vw, 5.5rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.025em;
}

/* ---------- Book a free inspection ---------- */
.book {
  padding-block: var(--space-7);
  background: var(--slate);
  color: var(--shell);
}

.book .section-lede {
  color: rgba(238, 236, 230, 0.8);
}

.book .section-lede a {
  color: var(--copper-light);
  font-weight: 600;
  white-space: nowrap;
}

.book__grid {
  display: grid;
  gap: var(--space-5);
}

.book__card {
  padding: var(--space-5) var(--space-4);
  background: var(--shell);
  color: var(--slate);
}

@media (min-width: 900px) {
  .book__grid {
    grid-template-columns: 5fr 7fr;
    gap: var(--space-6);
    align-items: start;
  }

  .book__card {
    padding: var(--space-5);
  }
}

.bform__progress {
  font-size: var(--text-sm);
  color: var(--driftwood);
}

.bform__step {
  padding: 0;
  border: 0;
  min-width: 0;
}

.bform__step legend {
  padding: 0;
  margin-top: var(--space-2);
  margin-bottom: var(--space-4);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  line-height: 1.15;
}

.choices {
  display: grid;
  gap: var(--space-2);
}

@media (min-width: 560px) {
  .choices {
    grid-template-columns: 1fr 1fr;
  }
}

.choice {
  position: relative;
  display: block;
  cursor: pointer;
}

.choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.choice span {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--control-line);
  border-radius: 0.25rem;
  background: #fff;
  font-weight: 500;
}

@media (hover: hover) and (pointer: fine) {
  .choice:hover span {
    border-color: var(--slate);
  }
}

.choice span::before {
  content: "";
  flex: none;
  width: 1rem;
  height: 1rem;
  border: 1px solid var(--driftwood);
  border-radius: 50%;
  box-shadow: inset 0 0 0 3px #fff;
}

.choice input:checked + span {
  border-color: var(--copper);
}

.choice input:checked + span::before {
  border-color: var(--copper);
  background: var(--copper);
}

.choice input:focus-visible + span {
  outline: 2px solid var(--copper);
  outline-offset: 2px;
}

.fields {
  display: grid;
  gap: var(--space-3);
}

@media (min-width: 560px) {
  .fields {
    grid-template-columns: 1fr 1fr;
  }
}

.field span {
  display: block;
  margin-bottom: var(--space-1);
  font-size: var(--text-sm);
  font-weight: 600;
}

.field input,
.field select {
  width: 100%;
  padding: var(--space-3);
  border: 1px solid var(--control-line);
  border-radius: 0.25rem;
  background: #fff;
  color: var(--slate);
  font: 400 var(--text-base) / 1.3 var(--font-body);
}

.field input:focus-visible,
.field select:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 1px;
  border-color: var(--copper);
}

.field [aria-invalid="true"] {
  border-color: #a3322c;
}

.bform__error {
  margin-top: var(--space-3);
  color: #9b2f29;
  font-size: var(--text-sm);
  font-weight: 600;
}

.bform__nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.bform__done h3 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  line-height: 1.15;
}

.bform__done p {
  margin-top: var(--space-3);
}

.bform__done a {
  color: var(--copper);
  font-weight: 600;
  white-space: nowrap;
}

.bform__sample {
  font-size: var(--text-sm);
  color: var(--driftwood);
}

.bform__done:focus {
  outline: none;
}

.book__card,
.bform input,
.bform select,
.bform button {
  scroll-margin-top: calc(var(--top-scrolled) + var(--space-4));
  scroll-margin-bottom: 6rem;
}

/* ---------- Footer ---------- */
.site-footer {
  padding-top: var(--space-7);
  padding-bottom: var(--space-5);
  background: var(--shell-deep);
}

.site-footer__grid {
  display: grid;
  gap: var(--space-6);
}

.site-footer__cols {
  display: grid;
  gap: var(--space-5);
}

@media (min-width: 560px) {
  .site-footer__cols {
    grid-template-columns: 1fr 1.4fr 1fr;
  }
}

@media (min-width: 900px) {
  .site-footer__grid {
    grid-template-columns: 5fr 7fr;
  }
}

.wordmark--footer {
  margin-bottom: var(--space-4);
  color: var(--slate);
}

.wordmark--footer .wordmark__tide {
  stroke: var(--copper);
}

.site-footer__brand p {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  line-height: 1.3;
}

.site-footer__brand p + p {
  margin-top: var(--space-1);
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--driftwood);
}

.site-footer__heading {
  margin-bottom: var(--space-3);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--copper);
}

.site-footer__list {
  font-size: var(--text-sm);
}

.site-footer__list li + li {
  margin-top: var(--space-2);
}

.site-footer__list a {
  text-decoration: none;
}

.site-footer__list a:hover {
  text-decoration: underline;
}

.site-footer__sample {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line);
  color: var(--driftwood);
  font-size: var(--text-sm);
}

/* ---------- Phone call bar ---------- */
.callbar {
  display: none;
}

@media (max-width: 767px) {
  body {
    padding-bottom: 4.5rem;
  }

  .callbar {
    position: fixed;
    inset: auto 0 0;
    z-index: 60;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2);
    padding: var(--space-2);
    padding-bottom: max(var(--space-2), env(safe-area-inset-bottom));
    background: var(--slate-deep);
  }

  .callbar a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
  }

  .callbar__call {
    border: 1px solid rgba(238, 236, 230, 0.5);
    color: var(--shell);
  }

  .callbar__book {
    background: var(--copper);
    color: #fff;
  }

}

/* Reveal starting state is set by JS only, so content is visible without it. */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

.storm__media,
.service__media {
  overflow: hidden;
}

.storm__media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.area__note {
  margin-top: var(--space-5);
  font-size: var(--text-md);
  color: var(--driftwood);
}

.area__note a {
  color: var(--copper);
  font-weight: 600;
  white-space: nowrap;
}

/* ===================================================================
   Inner pages (services, storm damage, about, contact, privacy, 404)
   Same tokens, type and motion as the homepage.
   =================================================================== */

/* Current page in the menu */
.site-nav__list a[aria-current="page"]::after {
  transform: scaleX(1);
}

@media (max-width: 1099px) {
  .site-nav__list a[aria-current="page"] {
    color: var(--copper);
  }
}

/* Page heroes: shorter than the homepage, same photo + shade treatment */
.hero--page {
  min-height: 72vh;
  min-height: 72svh;
}

@media (min-width: 900px) {
  .hero--page .hero__img {
    width: 100%;
  }
}

.hero--page .hero__title,
.hero--plain .hero__title {
  max-width: 15ch;
  font-size: clamp(2.5rem, 6vw, 5.25rem);
}

.hero--plain {
  min-height: auto;
  padding-top: calc(var(--banner-h) + var(--header-h) + var(--space-7));
  background: var(--slate);
}

.hero--full {
  min-height: 100vh;
  min-height: 100svh;
  align-items: center;
}

/* Generic sections */
.section {
  padding-block: var(--space-7);
}

.section--dark {
  background: var(--slate);
  color: var(--shell);
  --focus: var(--shell);
}

.section--dark .section-lede,
.section--dark .split__body p {
  color: rgba(238, 236, 230, 0.86);
}

.split {
  display: grid;
  gap: var(--space-5);
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 5fr 7fr;
    gap: var(--space-6);
  }
}

.split__body > * + * {
  margin-top: var(--space-4);
}

.split__body p {
  max-width: 38rem;
  font-size: var(--text-md);
}

.split__body h3 {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  line-height: 1.2;
}

/* A list with hairlines between items (what's included, what you get) */
.ruled-list {
  border-bottom: 1px solid var(--line);
}

.ruled-list li {
  padding-block: var(--space-3);
  border-top: 1px solid var(--line);
}

.section--dark .ruled-list,
.section--dark .ruled-list li {
  border-color: var(--line-dark);
}

/* Static numbered list, reusing the homepage's process look */
.steps-list .process__step p {
  max-width: 36rem;
}

/* ---------- Services page ---------- */
.svc-layout {
  display: grid;
  gap: var(--space-6);
}

.svc-index ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
}

.svc-index a {
  display: inline-block;
  padding-block: var(--space-1);
  color: var(--driftwood);
  font: 500 var(--text-md) / 1.3 var(--font-display);
  text-decoration: none;
}

.svc-index a.is-active,
.svc-index a:hover {
  color: var(--slate);
}

@media (min-width: 900px) {
  .svc-layout {
    grid-template-columns: 5fr 7fr;
    gap: var(--space-6);
  }

  .svc-index {
    position: sticky;
    top: calc(var(--top-scrolled) + var(--space-6));
    align-self: start;
  }

  .svc-index ul {
    display: block;
  }

  .svc-index a {
    position: relative;
    padding-block: var(--space-2);
    padding-left: var(--space-5);
    font-size: var(--text-lg);
  }

  /* A short copper line marks the service you're reading */
  .svc-index a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: var(--space-4);
    height: 2px;
    background: var(--copper);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s var(--ease);
  }

  .svc-index a.is-active::before {
    transform: scaleX(1);
  }
}

.svc {
  scroll-margin-top: calc(var(--top-scrolled) + var(--space-5));
}

.svc + .svc {
  margin-top: var(--space-7);
  padding-top: var(--space-7);
  border-top: 1px solid var(--line);
}

.svc__media {
  overflow: hidden;
}

.svc__media img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.svc h2 {
  margin-top: var(--space-5);
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.svc__intro {
  max-width: 36rem;
  margin-top: var(--space-3);
  font-size: var(--text-md);
}

.svc__label {
  margin-top: var(--space-5);
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--copper);
}

@media (min-width: 768px) {
  .svc .ruled-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: var(--space-5);
  }
}

.svc .btn {
  margin-top: var(--space-5);
}

/* ---------- Big call band (storm page, about page) ---------- */
.call-band {
  padding-block: var(--space-7);
  background: var(--slate-deep);
  color: var(--shell);
  --focus: var(--shell);
}

.call-band__title {
  max-width: 18ch;
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.call-band p {
  max-width: 34rem;
  margin-top: var(--space-4);
  font-size: var(--text-md);
  color: rgba(238, 236, 230, 0.86);
}

.call-band__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

.btn--large {
  padding: var(--space-4) var(--space-5);
  font-size: var(--text-lg);
}

/* ---------- About page ---------- */
.statement {
  max-width: 30ch;
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.principle {
  padding-top: var(--space-5);
  border-top: 1px solid var(--line);
}

.principle + .principle {
  margin-top: var(--space-6);
}

/* The section's own hairline sits above the first one */
.has-rule .principle:first-child {
  padding-top: 0;
  border-top: 0;
}

.principle h2 {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  line-height: 1.1;
}

.photo-pair {
  display: grid;
  gap: var(--space-4);
}

.photo-pair figure {
  overflow: hidden;
}

.photo-pair img {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

@media (min-width: 900px) {
  .photo-pair {
    grid-template-columns: 7fr 5fr;
    gap: var(--space-5);
  }

  .photo-pair figure:last-child img {
    aspect-ratio: auto;
  }
}

/* ---------- Contact page ---------- */
.contact-details {
  margin-top: var(--space-5);
}

.contact-details div + div {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--line-dark);
}

.contact-details dt {
  font-size: var(--text-sm);
  color: var(--mist);
}

.contact-details dd {
  margin-top: var(--space-1);
  font-size: var(--text-md);
}

.contact-details a {
  color: var(--shell);
  text-decoration-color: var(--copper-light);
  text-underline-offset: 0.25em;
}

.contact-details__phone {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  line-height: 1.1;
}

/* ---------- Privacy page ---------- */
.prose > * {
  max-width: 42rem;
}

.prose h2 {
  margin-top: var(--space-6);
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 500;
  line-height: 1.15;
}

.prose p,
.prose ul {
  margin-top: var(--space-3);
}

.prose ul {
  padding-left: var(--space-4);
  list-style: disc;
}

.prose li + li {
  margin-top: var(--space-2);
}

.prose a {
  color: var(--copper);
  font-weight: 600;
}

.sample-note {
  padding: var(--space-4);
  border-left: 2px solid var(--copper);
  background: var(--shell-deep);
}

/* ---------- 404 ---------- */
.notfound__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

/* Text links on dark backgrounds */
.hero .text-link,
.storm .text-link,
.reviews .text-link,
.section--dark .text-link,
.call-band .text-link {
  color: var(--copper-light);
}

@media (hover: hover) and (pointer: fine) {
  .hero .text-link:hover,
  .storm .text-link:hover,
  .section--dark .text-link:hover,
  .call-band .text-link:hover {
    color: var(--shell);
  }
}

.storm__more {
  margin-top: var(--space-4);
}

.services__more {
  margin-top: var(--space-4);
}

/* Contact page: the booking section continues the dark page header */
.book--flush {
  padding-top: 0;
}

.book--flush .contact-details {
  margin-top: 0;
}

.roofs__note {
  max-width: 40rem;
  margin-top: var(--space-5);
  font-size: var(--text-sm);
  color: var(--driftwood);
}
