/* ==========================================================================
   RES STONE MASONRY — Core Design System
   Timeless Stone. Modern Craft.
   Custom CSS only — third-party vendor styles live in assets/vendor/css/
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Color — extracted from the RES STONE MASONRY logo, see documentation/brand/README.md */
  --color-ivory: #faf3e8;
  --color-ivory-soft: #f3e9da;
  --color-limestone: #e8d6be;
  --color-stone: #b99676;
  --color-stone-deep: #7c5b3e;
  --color-brown: #5a3a22;
  --color-charcoal: #211714;
  --color-charcoal-soft: #2f2420;
  --color-text: #2b211c;
  --color-white: #ffffff;

  /* Semantic aliases */
  --color-bg: var(--color-ivory);
  --color-bg-alt: var(--color-limestone);
  --color-surface: var(--color-white);
  --color-border: rgba(33, 23, 20, 0.12);
  --color-border-strong: var(--color-stone);
  --color-heading: var(--color-charcoal);
  --color-body: var(--color-text);
  --color-muted: var(--color-stone-deep);
  --color-accent: var(--color-brown);
  --color-inverse-bg: var(--color-charcoal);
  --color-inverse-text: var(--color-ivory);

  /* Scrollbar (global + modal) — thin, theme-matched, never bright/oversized */
  --scrollbar-track: var(--color-limestone);
  --scrollbar-thumb: var(--color-stone);
  --scrollbar-thumb-hover: var(--color-stone-deep);
  --scrollbar-width: 10px;

  /* Typography */
  --font-display: "Bodoni Moda", "Didot", "Georgia", serif;
  --font-body: "Manrope", -apple-system, "Segoe UI", sans-serif;

  --fs-h1: clamp(2.75rem, 2rem + 3.2vw, 5.5rem);
  --fs-h2: clamp(2.1rem, 1.6rem + 2vw, 3.6rem);
  --fs-h3: clamp(1.5rem, 1.3rem + 0.9vw, 2.1rem);
  --fs-h4: clamp(1.15rem, 1.05rem + 0.4vw, 1.4rem);
  --fs-lead: clamp(1.05rem, 1rem + 0.3vw, 1.25rem);
  --fs-body: 1rem;
  --fs-small: 0.875rem;
  --fs-eyebrow: 0.8rem;

  --lh-tight: 1.08;
  --lh-heading: 1.2;
  --lh-body: 1.7;

  --ls-eyebrow: 0.22em;
  --ls-button: 0.14em;

  /* Spacing scale */
  --space-3xs: 0.25rem;
  --space-2xs: 0.5rem;
  --space-xs: 0.75rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 9rem;

  --section-pad: clamp(4.5rem, 3.5rem + 4vw, 9rem);
  --container-max: 1360px;
  --container-pad: clamp(1.25rem, 0.8rem + 2vw, 3.5rem);

  /* Shape */
  --radius-sm: 2px;
  --radius-md: 4px;
  --border-thin: 1px solid var(--color-border);
  --border-accent: 1px solid var(--color-border-strong);

  /* Motion */
  --ease-editorial: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 0.3s;
  --dur-base: 0.6s;
  --dur-slow: 0.9s;
}

/* --------------------------------------------------------------------------
   2. Reset & base
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: auto; /* Lenis drives smooth scroll; avoid double-handling */
  -webkit-text-size-adjust: 100%;
  /* Belt-and-braces against horizontal overflow — body already has
     overflow-x:hidden, but some browsers only reliably clip the viewport
     when both html and body declare it. */
  overflow-x: hidden;
  /* Firefox thin themed scrollbar */
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

/* Chromium/WebKit themed scrollbar — thin, warm-stone, not oversized or
   bright. Applied globally; .modal-body gets the same treatment below so
   the popup's internal scroll matches the page. */
::-webkit-scrollbar {
  width: var(--scrollbar-width);
  height: var(--scrollbar-width);
}

::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb);
  border-radius: var(--radius-sm);
  border: 2px solid var(--scrollbar-track);
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--scrollbar-thumb-hover);
}

body {
  margin: 0;
  background-color: var(--color-bg);
  color: var(--color-body);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img,
picture,
video,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

button {
  font-family: inherit;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

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

::selection {
  background: var(--color-stone);
  color: var(--color-charcoal);
}

/* --------------------------------------------------------------------------
   3. Typography
   -------------------------------------------------------------------------- */
h1,
h2,
h3,
h4,
.h1,
.h2,
.h3,
.h4 {
  font-family: var(--font-display);
  color: var(--color-heading);
  line-height: var(--lh-heading);
  font-weight: 500;
  margin: 0;
}

h1,
.h1 {
  font-size: var(--fs-h1);
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
}

h2,
.h2 {
  font-size: var(--fs-h2);
  line-height: var(--lh-tight);
  letter-spacing: -0.005em;
}

h3,
.h3 {
  font-size: var(--fs-h3);
}

h4,
.h4 {
  font-size: var(--fs-h4);
  font-family: var(--font-body);
  font-weight: 700;
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--color-body);
}

/* Consistent heading → supporting-copy rhythm sitewide. Headings/paragraphs
   had zero gap beyond line-height before (margin: 0 on headings, margin
   only below on <p>) — this adds breathing room without touching section
   padding, so it stays compact rather than wasting vertical space. More
   specific component rules (e.g. .final-cta h2) still win where declared. */
:where(h1, h2, h3, .h1, .h2, .h3) + :where(p, .lead) {
  margin-top: var(--space-sm);
}

:where(.eyebrow) + :where(h1, h2, h3, .h1, .h2, .h3) {
  margin-top: var(--space-xs);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-body);
  font-size: var(--fs-eyebrow);
  font-weight: 700;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--color-accent);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
}

.eyebrow--center {
  justify-content: center;
}

.eyebrow--center::before {
  display: none;
}

.number-label {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--color-stone);
  letter-spacing: 0.05em;
}

.section-intro {
  max-width: 46rem;
}

.section-intro--center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.text-muted {
  color: var(--color-muted);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-sm);
  z-index: 999;
  background: var(--color-charcoal);
  color: var(--color-ivory);
  padding: var(--space-xs) var(--space-md);
  font-size: var(--fs-small);
  letter-spacing: var(--ls-button);
  text-transform: uppercase;
}

.skip-link:focus {
  top: var(--space-sm);
}

/* --------------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

section {
  position: relative;
}

.section-pad {
  padding-block: var(--section-pad);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
}

.section-head--center {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hr-fine {
  border: none;
  border-top: var(--border-thin);
  margin: 0;
}

.bg-alt {
  background-color: var(--color-bg-alt);
}

.bg-dark {
  background-color: var(--color-inverse-bg);
  color: var(--color-inverse-text);
}

.bg-dark h1,
.bg-dark h2,
.bg-dark h3,
.bg-dark h4 {
  color: var(--color-ivory);
}

.bg-dark .eyebrow {
  color: var(--color-stone);
}

/* --------------------------------------------------------------------------
   5. Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  padding: 1rem 1.9rem;
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: var(--ls-button);
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  transition: background-color var(--dur-fast) var(--ease-editorial),
    color var(--dur-fast) var(--ease-editorial),
    border-color var(--dur-fast) var(--ease-editorial),
    transform var(--dur-fast) var(--ease-editorial);
}

.btn .arrow {
  transition: transform var(--dur-fast) var(--ease-editorial);
}

.btn:hover .arrow,
.btn:focus-visible .arrow {
  transform: translateX(4px);
}

.btn-primary {
  background-color: var(--color-charcoal);
  color: var(--color-ivory);
  border-color: var(--color-charcoal);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background-color: var(--color-brown);
  border-color: var(--color-brown);
}

.btn-outline {
  background-color: transparent;
  color: var(--color-charcoal);
  border-color: var(--color-border-strong);
}

.btn-outline:hover,
.btn-outline:focus-visible {
  background-color: var(--color-charcoal);
  color: var(--color-ivory);
  border-color: var(--color-charcoal);
}

/* Light-on-dark variant for buttons that sit on a dark panel (hero content
   panel, CTA) — reusable instead of scoping an override per-section. */
.btn-outline-inverse {
  background-color: transparent;
  color: var(--color-ivory);
  border-color: rgba(250, 243, 232, 0.4);
}

.btn-outline-inverse:hover,
.btn-outline-inverse:focus-visible {
  background-color: var(--color-ivory);
  color: var(--color-charcoal);
  border-color: var(--color-ivory);
}

/* Solid light-fill variant for a PRIMARY button on a dark panel — plain
   .btn-primary is charcoal-on-charcoal there and disappears (this exact bug
   was caught and fixed twice in earlier passes on the old hero/CTA; this
   variant exists so it doesn't need re-discovering a third time). */
.btn-primary-inverse {
  background-color: var(--color-ivory);
  color: var(--color-charcoal);
  border-color: var(--color-ivory);
}

.btn-primary-inverse:hover,
.btn-primary-inverse:focus-visible {
  background-color: var(--color-stone);
  border-color: var(--color-stone);
  color: var(--color-charcoal);
}

.bg-dark .btn-outline {
  color: var(--color-ivory);
  border-color: rgba(250, 243, 232, 0.35);
}

.bg-dark .btn-outline:hover,
.bg-dark .btn-outline:focus-visible {
  background-color: var(--color-ivory);
  color: var(--color-charcoal);
  border-color: var(--color-ivory);
}

.btn-ghost {
  padding: 0;
  border: none;
  color: var(--color-accent);
  font-weight: 700;
  border-bottom: 1px solid currentColor;
  border-radius: 0;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

/* --------------------------------------------------------------------------
   6. Header
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding-block: var(--space-md);
  /* Clean, flat warm-ivory background — no blur, no fading gradient — so
     nav text stays reliably readable without the "hazy" frosted-glass look. */
  background: rgba(250, 243, 232, 0.94);
  border-bottom: 1px solid transparent;
  transition: padding var(--dur-base) var(--ease-editorial),
    background-color var(--dur-base) var(--ease-editorial),
    background var(--dur-base) var(--ease-editorial),
    border-color var(--dur-base) var(--ease-editorial),
    box-shadow var(--dur-base) var(--ease-editorial);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.site-header--scrolled {
  padding-block: var(--space-xs);
  background: var(--color-ivory);
  border-bottom-color: var(--color-border);
  box-shadow: 0 2px 16px -4px rgba(33, 23, 20, 0.1);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2xs);
  font-family: var(--font-display);
  color: var(--color-charcoal);
}

.brand img {
  height: 56px;
  width: auto;
  transition: height var(--dur-base) var(--ease-editorial);
}

.site-header--scrolled .brand img {
  height: 42px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-text strong {
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.brand-text span {
  font-family: var(--font-body);
  font-size: 0.6rem;
  letter-spacing: 0.32em;
  color: var(--color-stone-deep);
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
}

.nav-list a {
  font-size: var(--fs-small);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-charcoal);
  position: relative;
  padding-block: var(--space-3xs);
}

.nav-list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width var(--dur-fast) var(--ease-editorial);
}

.nav-list a:hover::after,
.nav-list a:focus-visible::after,
.nav-list a[aria-current="page"]::after {
  width: 100%;
}

.header-cta {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

/* Pass 6: hamburger redesigned — a proper 44px touch target (was a bare
   30x24 icon with no hit-area padding), thicker rounded-cap lines instead
   of hairlines, a subtle hover/focus tint so it reads as an actual button,
   and a cleaner two-stage open/close transition (lines converge to center
   before rotating into the X, rather than rotating and translating at
   once) so the motion feels deliberate without being showy. */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  background: transparent;
  transition: background-color var(--dur-fast) var(--ease-editorial);
}

.nav-toggle:hover,
.nav-toggle:focus-visible {
  background-color: rgba(33, 23, 20, 0.06);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-charcoal);
  transition: transform 0.32s var(--ease-editorial),
    opacity 0.2s var(--ease-editorial),
    width 0.32s var(--ease-editorial);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
  width: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--color-ivory);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  overflow-y: auto;
  overflow-x: hidden;
  /* Fixed, generous top clearance (rather than vertical centering) so the
     first link never ends up under the fixed header, which sits above this
     panel (z-index 100) so its close button stays reachable while open. */
  padding: 8rem var(--container-pad) var(--space-2xl);
  transform: translateY(-100%);
  transition: transform var(--dur-base) var(--ease-editorial);
  /* Scrolling stays fully enabled (overflow-y: auto above) — only the
     scrollbar chrome itself is hidden, per client request. Never swap this
     for overflow:hidden, which would also block touch/wheel scrolling and
     strand menu items below the fold. */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* legacy Edge/IE */
}

.mobile-nav::-webkit-scrollbar {
  display: none; /* Chrome/Safari/Edge (Chromium) */
}

.mobile-nav.is-open {
  transform: translateY(0);
}

/* Pass 7: divider-rule list instead of a bare gap-only stack, each row a
   generous full-width tap target, and a staggered fade/rise-in so the menu
   feels considered rather than dumped on screen all at once. Index
   numerals echo the numbering motif used for Services/Approach/Process
   elsewhere on the site, for a bit of visual hierarchy over plain text. */
.mobile-nav-list {
  display: flex;
  flex-direction: column;
}

.mobile-nav-list li {
  border-top: 1px solid rgba(33, 23, 20, 0.12);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s var(--ease-editorial),
    transform 0.45s var(--ease-editorial);
}

.mobile-nav-list li:first-child {
  border-top: none;
}

.mobile-nav.is-open .mobile-nav-list li {
  opacity: 1;
  transform: translateY(0);
}

.mobile-nav.is-open .mobile-nav-list li:nth-child(1) { transition-delay: 0.06s; }
.mobile-nav.is-open .mobile-nav-list li:nth-child(2) { transition-delay: 0.11s; }
.mobile-nav.is-open .mobile-nav-list li:nth-child(3) { transition-delay: 0.16s; }
.mobile-nav.is-open .mobile-nav-list li:nth-child(4) { transition-delay: 0.21s; }
.mobile-nav.is-open .mobile-nav-list li:nth-child(5) { transition-delay: 0.26s; }
.mobile-nav.is-open .mobile-nav-list li:nth-child(6) { transition-delay: 0.31s; }

.mobile-nav-list a {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  padding-block: var(--space-md);
  font-family: var(--font-display);
  font-size: 2.2rem;
  color: var(--color-charcoal);
}

.mobile-nav-index {
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--color-stone);
  flex-shrink: 0;
}

.mobile-nav-foot {
  margin-top: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s var(--ease-editorial),
    transform 0.45s var(--ease-editorial);
  transition-delay: 0.36s;
}

.mobile-nav.is-open .mobile-nav-foot {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   7. Hero — pass 6 removed the previous split-panel hero entirely; pass 7
   rebuilds it as a single full-bleed image with a left-aligned content
   block, deliberately kept compact (not full-viewport) per client request.
   #main-content's top padding below clears the fixed header for every page,
   hero included, so the image starts right at the header's lower edge.
   -------------------------------------------------------------------------- */
#main-content {
  padding-top: clamp(5.5rem, 4.7rem + 3.5vw, 7rem);
}

.hero {
  position: relative;
  min-height: clamp(28rem, 22rem + 18vw, 38rem);
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-charcoal);
}

.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(33, 23, 20, 0.85) 0%,
    rgba(33, 23, 20, 0.6) 40%,
    rgba(33, 23, 20, 0.22) 72%,
    rgba(33, 23, 20, 0.05) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 34rem;
}

.hero-content .eyebrow {
  color: var(--color-limestone);
}

.hero-content h1 {
  color: var(--color-white);
  font-size: clamp(2.25rem, 1.7rem + 2.6vw, 3.5rem);
  line-height: var(--lh-tight);
  margin-top: var(--space-xs);
}

.hero-sub {
  color: var(--color-ivory-soft);
  font-size: var(--fs-lead);
  max-width: 30rem;
  margin-top: var(--space-sm);
}

.hero-actions {
  margin-top: var(--space-lg);
}

/* --------------------------------------------------------------------------
   8. (formerly placeholder image blocks — every section now uses a real
   <img>; see documentation/content/README.md for what's a generated
   stand-in texture vs. real photography.)
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   9. About — unified editorial image + narrative section
   (replaces the earlier separate "Brand Statement" + "Architectural Story"
   sections with one richer, less repetitive composition)
   -------------------------------------------------------------------------- */
.about-split {
  display: grid;
  grid-template-columns: 1fr 0.92fr;
  gap: var(--space-2xl);
  align-items: center;
}

.about-media {
  position: relative;
  padding-right: clamp(1.5rem, 4vw, 3.5rem);
  padding-bottom: clamp(2rem, 5vw, 4rem);
}

.about-media-primary {
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.about-media-primary img {
  width: 100%;
  height: 116%;
  object-fit: cover;
  /* Oversized + parallax-driven by animations.js — headroom so the drift
     never exposes an edge. */
}

.about-media-secondary {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 52%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 6px solid var(--color-bg);
  box-shadow: 0 18px 40px -18px rgba(33, 23, 20, 0.35);
  /* The one arch-shaped image mask on the page, referencing the logo. */
  border-radius: 50% 50% 4px 4px / 30% 30% 4px 4px;
}

.about-media-secondary img {
  width: 100%;
  height: 118%;
  object-fit: cover;
}

.about-index {
  position: absolute;
  top: -0.5em;
  left: -0.55em;
  z-index: -1;
  font-family: var(--font-display);
  font-size: clamp(6rem, 5rem + 6vw, 11rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--color-border-strong);
  opacity: 0.6;
  pointer-events: none;
}

/* Pass 7: About page — wraps a .split-media image so it can host the large
   faint .about-index numeral (needs a non-clipping positioned ancestor,
   since .split-media itself has overflow:hidden for the photo) plus a
   small corner-bracket accent, the "architectural line" decorative touch
   requested for the page. Kept subtle and confined to the image corner
   rather than a heavier background treatment. */
.about-frame {
  position: relative;
}

.about-frame::after {
  content: "";
  position: absolute;
  bottom: -14px;
  right: -14px;
  width: 44px;
  height: 44px;
  border-bottom: 1px solid var(--color-stone);
  border-right: 1px solid var(--color-stone);
  pointer-events: none;
}

.about-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-md);
}

.about-heading {
  max-width: 16ch;
}

.about-facts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin: var(--space-sm) 0 0;
  padding-top: var(--space-md);
  border-top: var(--border-accent);
  width: 100%;
}

.about-facts dt {
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: var(--space-3xs);
}

.about-facts dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--color-heading);
}

/* --------------------------------------------------------------------------
   11. Services slider (Swiper) — scales from 6 to 10+ services without
   layout changes; see assets/js/sliders.js for the init config.
   -------------------------------------------------------------------------- */
.slider-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.slider-controls {
  display: flex;
  gap: var(--space-sm);
}

.slider-nav {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--dur-fast) var(--ease-editorial),
    background-color var(--dur-fast) var(--ease-editorial),
    border-color var(--dur-fast) var(--ease-editorial),
    color var(--dur-fast) var(--ease-editorial),
    opacity var(--dur-fast) var(--ease-editorial);
}

.slider-nav:hover,
.slider-nav:focus-visible {
  background-color: var(--color-charcoal);
  border-color: var(--color-charcoal);
  color: var(--color-ivory);
}

.slider-nav.swiper-button-disabled {
  opacity: 0.35;
  pointer-events: none;
}

.services-slider-wrap {
  margin-top: var(--space-xl);
}

/* Minimal Swiper base mechanics, in case assets/vendor/css/swiper-bundle.min.css
   fails to load for any reason — these match Swiper's own base rules, so
   there's no conflict when it does load. */
.swiper {
  position: relative;
  overflow: hidden;
}

.swiper-wrapper {
  display: flex;
}

.swiper-slide {
  flex-shrink: 0;
  width: 100%;
}

.services-swiper {
  /* Fully clipped to its own box (no viewport-edge "bleed") — a previous
     overflow:visible here let un-clipped slide content extend past the
     right edge of the page and made the whole document horizontally
     scrollable, which fails the "no horizontal overflow" requirement.
     Swiper's own translateX positioning still shows the right slides;
     this only removes the unclipped overshoot. */
  overflow: hidden;
  padding-bottom: var(--space-3xs);
}

/* Fallback if the Swiper vendor script fails to load — manual horizontal
   scroll strip with scroll-snap instead of a broken/inert slider. */
.no-swiper .swiper-wrapper {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.no-swiper .swiper-slide {
  flex: 0 0 82%;
  scroll-snap-align: start;
}

@media (min-width: 768px) {
  .no-swiper .swiper-slide {
    flex-basis: 42%;
  }
}

@media (min-width: 1200px) {
  .no-swiper .swiper-slide {
    flex-basis: 30%;
  }
}

.no-swiper ~ .slider-controls,
.no-swiper.testimonials-swiper ~ .testimonials-controls {
  display: none;
}

.service-slide {
  height: auto;
  display: flex;
  flex-direction: column;
}

.service-slide-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.service-slide-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-editorial);
}

.service-slide:hover .service-slide-media img {
  transform: scale(1.05);
}

.service-slide-body {
  padding-top: var(--space-md);
  border-top: var(--border-thin);
  margin-top: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-2xs);
  flex: 1;
}

.service-slide-num {
  font-family: var(--font-display);
  color: var(--color-stone);
  font-size: 1.1rem;
}

.service-slide-title {
  font-size: var(--fs-h4);
}

.service-slide-desc {
  color: var(--color-muted);
  font-size: var(--fs-small);
  max-width: 30rem;
}

.service-slide-link {
  margin-top: var(--space-sm);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.service-slide-link .arrow {
  transition: transform var(--dur-fast) var(--ease-editorial);
}

.service-slide-link:hover .arrow,
.service-slide-link:focus-visible .arrow {
  transform: translateX(4px);
}

/* --------------------------------------------------------------------------
   12. Gallery — pass 6: replaces the old "Featured Projects" editorial
   card layout (title/tags/case-study meta) with a clean, image-led grid.
   Same visual language as the Materials tiles below it (gradient scrim +
   bottom-left label on hover/tap) — a photo and a one-word category, no
   project write-ups.
   -------------------------------------------------------------------------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 1fr;
  gap: var(--space-sm);
}

.gallery-tile {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  /* Pass 7: tiles are now <button> elements (they open the lightbox below)
     rather than plain <div>s — reset the button chrome so they look and
     size exactly as the old div-based tiles did. */
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  text-align: left;
  color: inherit;
  cursor: pointer;
}

.gallery-tile:focus-visible {
  outline: 2px solid var(--color-stone);
  outline-offset: 2px;
}

.gallery-tile--wide {
  grid-column: span 2;
  aspect-ratio: 8 / 5;
}

.gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-editorial);
}

.gallery-tile:hover img {
  transform: scale(1.05);
}

.gallery-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(33, 23, 20, 0.58) 100%);
  pointer-events: none;
}

.gallery-tile-label {
  position: absolute;
  left: var(--space-sm);
  bottom: var(--space-sm);
  color: var(--color-ivory);
  font-size: var(--fs-small);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   12b. Gallery lightbox — pass 7. Built on the same Bootstrap Modal JS
   already loaded for the Request a Quote popup (bootstrap.bundle.min.js)
   rather than a second, separate lightbox library — one modal mechanism,
   reused, not duplicated. Only the custom markup/CSS below is RESTONE's
   own; .modal/.modal.show/.modal-backdrop from §21 already provide the
   fixed positioning, show/hide and backdrop this reuses.
   -------------------------------------------------------------------------- */
/* Targets ".lightbox-modal .modal-dialog" (not just ".lightbox-dialog")
   deliberately: Bootstrap's Modal JS actually queries for a ".modal-dialog"
   descendant at runtime (it's not purely a CSS/styling convention), so the
   dialog element carries both classes. The extra class-on-class specificity
   here is what guarantees this overrides the plain ".modal-dialog" rule in
   §21 regardless of source order, rather than relying on cascade position. */
.lightbox-modal .modal-dialog {
  position: relative;
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-xl) var(--space-md);
  opacity: 0;
  transform: scale(0.96);
  transition: opacity var(--dur-fast) var(--ease-editorial),
    transform var(--dur-fast) var(--ease-editorial);
}

.lightbox-modal.show .modal-dialog {
  opacity: 1;
  transform: scale(1);
}

.lightbox-content {
  position: relative;
  width: min(94vw, 1200px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-frame {
  max-width: 100%;
  max-height: 78vh;
  line-height: 0;
}

.lightbox-frame img {
  display: block;
  max-width: 100%;
  max-height: 78vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.55);
}

.lightbox-caption {
  color: var(--color-ivory-soft);
  font-size: var(--fs-small);
  text-align: center;
  max-width: 34rem;
}

.lightbox-close,
.lightbox-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(250, 243, 232, 0.1);
  border: 1px solid rgba(250, 243, 232, 0.3);
  color: var(--color-ivory);
  transition: background-color var(--dur-fast) var(--ease-editorial);
}

.lightbox-close:hover,
.lightbox-close:focus-visible,
.lightbox-nav:hover,
.lightbox-nav:focus-visible {
  background: rgba(250, 243, 232, 0.22);
}

.lightbox-close {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 44px;
  height: 44px;
  z-index: 2;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  z-index: 2;
}

.lightbox-prev {
  left: var(--space-md);
}

.lightbox-next {
  right: var(--space-md);
}

/* --------------------------------------------------------------------------
   13. Craftsmanship (split layout)
   -------------------------------------------------------------------------- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2xl);
  align-items: center;
}

.split-media {
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.split-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.split-reverse .split-media {
  order: 2;
}

.split-labels {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-lg);
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: var(--border-thin);
}

.split-label dt {
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: var(--space-3xs);
}

.split-label dd {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--color-heading);
}

/* --------------------------------------------------------------------------
   14. Materials
   -------------------------------------------------------------------------- */
.materials-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
}

.material-tile {
  aspect-ratio: 1;
  position: relative;
  overflow: hidden;
}

.material-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-editorial);
}

.material-tile:hover img {
  transform: scale(1.06);
}

.material-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(33, 23, 20, 0.55) 100%);
  pointer-events: none;
}

.material-tile-label {
  position: absolute;
  left: var(--space-sm);
  bottom: var(--space-sm);
  color: var(--color-ivory);
  font-size: var(--fs-small);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  z-index: 1;
}

/* --------------------------------------------------------------------------
   15. Why RESTONE (numbered principles)
   -------------------------------------------------------------------------- */
.principles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: var(--border-accent);
  border-bottom: var(--border-accent);
}

.principle {
  padding: var(--space-lg) var(--space-md);
  border-left: var(--border-thin);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.principle:first-child {
  padding-left: 0;
  border-left: none;
}

.principle .number-label {
  font-size: 1.1rem;
  letter-spacing: 0.04em;
}

.principle h3 {
  letter-spacing: 0.02em;
}

.principle p {
  font-size: var(--fs-small);
}

/* --------------------------------------------------------------------------
   16. Process timeline
   -------------------------------------------------------------------------- */
/* Horizontal step-flow on desktop/tablet (STEP 01 → 02 → 03 → 04 → 05);
   collapses to a simple stacked column on smaller screens (see
   responsive.css). The connecting line is a thin absolutely-positioned
   strip pinned to the exact vertical center of the markers only — it never
   spans the text below, so it can't visually cross numbers or copy while
   scrolling (previous vertical version ran the line straight through the
   centered paragraph text; fixed by scoping the line to the marker row and
   keeping it behind the opaque marker circles via z-index). */
.process-list {
  position: relative;
}

.process-row {
  display: flex;
  align-items: flex-start;
  gap: var(--space-lg);
}

.process-line {
  position: absolute;
  top: 28px;
  left: 10%;
  right: 10%;
  height: 1px;
  background: var(--color-border);
  z-index: 0;
  overflow: hidden;
}

.process-line-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0%;
  background: var(--color-accent);
  transform-origin: left;
}

.process-step {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-3xs);
}

.process-marker {
  position: relative;
  z-index: 1;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-bg);
  border: 1px solid var(--color-border-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-xs);
}

.process-num {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--color-stone-deep);
}

.process-body h3 {
  margin-bottom: var(--space-3xs);
}

.process-body p {
  max-width: 22rem;
  margin-inline: auto;
  color: var(--color-muted);
  font-size: var(--fs-small);
}

/* --------------------------------------------------------------------------
   17. Testimonials
   -------------------------------------------------------------------------- */
/* Flat cards, left-aligned, set in the same body font used everywhere else
   on the site (no decorative display serif here) — intentionally no
   box-shadow / lift / tilt effects per client feedback, just a thin border
   for separation. Three visible at a time on desktop via Swiper. */
.testimonials-swiper {
  width: 100%;
}

.swiper-wrapper {
  align-items: stretch;
}

.testimonial {
  height: 100%;
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: var(--space-lg);
  background: var(--color-surface);
  border: var(--border-thin);
  border-radius: var(--radius-sm);
  box-shadow: none;
}

/* Head (avatar + name/role) first, so identity establishes before the
   quote — then the quote itself, then the sample-content tag pinned to
   the bottom of the card via the quote's flex:1. No client photos were
   supplied for this pass, so avatars are a plain initials monogram
   (brand-colored circle), never a fabricated headshot. */
.testimonial-head {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.testimonial-avatar {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-limestone);
  color: var(--color-stone-deep);
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.testimonial-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.testimonial-quote {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1rem;
  line-height: var(--lh-body);
  color: var(--color-text);
  flex: 1;
}

.testimonial-quote::before {
  content: "\201C";
}

.testimonial-quote::after {
  content: "\201D";
}

.testimonial-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.testimonial-name {
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: var(--fs-small);
}

.testimonial-role {
  color: var(--color-muted);
  font-size: var(--fs-small);
}

.testimonial-tag {
  display: inline-block;
  align-self: flex-start;
  margin-top: var(--space-md);
  padding: var(--space-3xs) var(--space-sm);
  border: 1px dashed var(--color-border-strong);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.testimonials-controls {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

/* --------------------------------------------------------------------------
   18. FAQ accordion
   -------------------------------------------------------------------------- */
.faq-list {
  max-width: 46rem;
  margin-inline: auto;
  border-top: var(--border-accent);
}

.faq-item {
  border-bottom: var(--border-thin);
  transition: background-color var(--dur-fast) var(--ease-editorial);
}

.faq-item:hover {
  background-color: rgba(185, 150, 118, 0.07);
}

.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-xs);
  text-align: left;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem);
  line-height: 1.4;
  color: var(--color-heading);
}

.faq-item[data-open="true"] .faq-question {
  color: var(--color-accent);
}

.faq-question-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  position: relative;
}

.faq-question-icon::before,
.faq-question-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--color-charcoal);
  transition: transform var(--dur-fast) var(--ease-editorial);
}

.faq-question-icon::before {
  width: 14px;
  height: 1px;
  transform: translate(-50%, -50%);
}

.faq-question-icon::after {
  width: 1px;
  height: 14px;
  transform: translate(-50%, -50%);
}

.faq-item[data-open="true"] .faq-question-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
  opacity: 0;
}

.faq-answer {
  overflow: hidden;
  height: 0;
}

.faq-answer-inner {
  padding: 0 var(--space-xs) var(--space-lg);
  max-width: 42rem;
  color: var(--color-muted);
  font-size: 1rem;
  line-height: 1.75;
}

/* --------------------------------------------------------------------------
   19. Final CTA — rebuilt for pass 5: a compact horizontal conversion bar,
   not a tall centered card. Still no image (client instruction carried over
   from pass 4) — a single clean diagonal gradient plus one thin inset frame
   is the entire background treatment, deliberately restrained (no repeating
   texture layer, no oversized decorative arch, no corner brackets — those
   added visual weight/height without adding to conversion). Left: heading +
   one line of support copy. Right: phone number + Request a Quote, sized to
   read as the obvious next action rather than a generic banner.
   -------------------------------------------------------------------------- */
.final-cta {
  padding-block: clamp(2.5rem, 2rem + 2vw, 3.5rem);
}

.cta-bar {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  padding: clamp(1.75rem, 1.35rem + 1.8vw, 2.5rem) clamp(1.5rem, 1rem + 2vw, 2.75rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-xl);
  background: linear-gradient(120deg, var(--color-charcoal) 0%, var(--color-brown) 100%);
}

.cta-bar::after {
  /* One thin inset frame for a touch of structure — no corner brackets, no
     oversized glow shape, kept intentionally quiet. */
  content: "";
  position: absolute;
  inset: 0.6rem;
  border: 1px solid rgba(250, 243, 232, 0.12);
  border-radius: calc(var(--radius-md) - 4px);
  pointer-events: none;
}

.cta-bar-text {
  position: relative;
  z-index: 1;
  max-width: 30rem;
}

.cta-bar-text .eyebrow {
  color: var(--color-limestone);
}

.final-cta h2 {
  color: var(--color-white);
  font-size: clamp(1.5rem, 1.28rem + 1vw, 2rem);
  margin-block: var(--space-2xs) var(--space-2xs);
}

.cta-bar-sub {
  color: var(--color-ivory-soft);
  font-size: var(--fs-small);
  margin: 0;
}

.cta-bar-action {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  flex-shrink: 0;
}

.cta-bar-phone {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  color: var(--color-ivory);
  transition: opacity var(--dur-fast) var(--ease-editorial);
}

.cta-bar-phone:hover,
.cta-bar-phone:focus-visible {
  opacity: 0.8;
}

.cta-bar-phone-icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(250, 243, 232, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cta-bar-phone-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  white-space: nowrap;
}

.cta-bar-phone-label {
  font-size: 0.7rem;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--color-limestone);
}

.cta-bar-phone-number {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--color-white);
}

/* Base .btn-primary is dark-on-dark charcoal — invisible against this
   panel's charcoal/brown gradient. Flipped to ivory here for strong
   contrast (this was the exact bug fixed on the old image CTA in pass 3
   and again on the pass-4 panel; guarding against it recurring here too). */
.final-cta .btn-primary {
  background-color: var(--color-ivory);
  color: var(--color-charcoal);
  border-color: var(--color-ivory);
  white-space: nowrap;
  transition: background-color var(--dur-fast) var(--ease-editorial),
    border-color var(--dur-fast) var(--ease-editorial),
    transform var(--dur-fast) var(--ease-editorial);
}

.final-cta .btn-primary:hover,
.final-cta .btn-primary:focus-visible {
  background-color: var(--color-stone);
  border-color: var(--color-stone);
  color: var(--color-charcoal);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   19b. Inner page banner — pass 6, new inner pages. A compact ~400–500px
   image banner (heading + one short line), reused identically across every
   inner page rather than a different treatment per page.
   -------------------------------------------------------------------------- */
.inner-banner {
  position: relative;
  min-height: clamp(25rem, 21rem + 8vw, 31.25rem);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--color-charcoal);
}

.inner-banner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
}

.inner-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(33, 23, 20, 0.72) 0%, rgba(33, 23, 20, 0.6) 100%);
}

.inner-banner-content {
  position: relative;
  z-index: 1;
  max-width: 38rem;
  padding-inline: var(--container-pad);
  text-align: center;
  color: var(--color-ivory);
}

.inner-banner-content .eyebrow {
  color: var(--color-limestone);
}

.inner-banner-content h1 {
  color: var(--color-white);
  font-size: clamp(2rem, 1.6rem + 2vw, 3rem);
  line-height: var(--lh-tight);
  margin-block: var(--space-sm);
}

.inner-banner-content p {
  color: var(--color-ivory-soft);
  font-size: var(--fs-lead);
  max-width: 32rem;
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   19c. Inner-page components — Services listing grid, Blog listing grid,
   legal/prose pages, 404. New in pass 6 alongside the inner pages
   themselves; the Contact page's enquiry form intentionally reuses
   .quote-form/.form-field/.form-note/.form-success as-is (see style rules
   above under §21 Modal) rather than duplicating that styling.
   -------------------------------------------------------------------------- */
.svc-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.svc-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.svc-card-media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  position: relative;
}

.svc-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-editorial);
}

.svc-card:hover .svc-card-media img {
  transform: scale(1.05);
}

.svc-card-title {
  font-size: clamp(1.2rem, 1.1rem + 0.5vw, 1.5rem);
}

.svc-card-desc {
  color: var(--color-muted);
  font-size: var(--fs-small);
}

.svc-card-link {
  margin-top: var(--space-3xs);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2xs);
  font-size: var(--fs-small);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-accent);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-lg);
}

.blog-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.blog-card-media {
  aspect-ratio: 16 / 11;
  overflow: hidden;
}

.blog-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card-tag {
  font-size: var(--fs-small);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-stone-deep);
}

.blog-card-title {
  font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.4rem);
}

.blog-card-excerpt {
  color: var(--color-muted);
  font-size: var(--fs-small);
}

/* Simple prose block for Privacy/Terms — plain, readable, no template
   filigree, since this is standard-language content pending client/counsel
   review, not a marketing section. */
.prose {
  max-width: 44rem;
}

.prose h2 {
  margin-top: var(--space-xl);
  font-size: var(--fs-h4);
}

.prose h2:first-child {
  margin-top: 0;
}

.prose p,
.prose li {
  color: var(--color-body);
}

.prose ul {
  padding-left: 1.2rem;
  margin: 0 0 var(--space-md);
}

.prose li {
  margin-bottom: var(--space-3xs);
}

/* Contact page: info column + enquiry form column */
.contact-layout {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-2xl);
  align-items: start;
}

.contact-info-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.contact-info-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.contact-info-item span {
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.contact-info-item a,
.contact-info-item p {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--color-heading);
  margin: 0;
}

.contact-form-card {
  background: var(--color-surface);
  border: var(--border-thin);
  padding: clamp(1.5rem, 1.2rem + 1.5vw, 2.5rem);
}

/* Pass 7: Contact page map, below the info/form grid. aspect-ratio (rather
   than a fixed pixel height) keeps it responsive at any viewport width
   without a separate media-query override, and rules out horizontal
   overflow on mobile since the iframe is 100% of its (already
   container-padded) parent. */
.contact-map {
  overflow: hidden;
  border-radius: var(--radius-md);
  border: var(--border-thin);
  aspect-ratio: 16 / 7;
}

.contact-map iframe {
  display: block;
  width: 100%;
  height: 100%;
}

/* 404 */
.error-page {
  text-align: center;
  /* No extra padding-block here — the wrapping .section-pad already
     provides generous vertical rhythm; stacking both left a large empty
     gap above the footer on short pages (404, Thank You). */
}

.error-code {
  font-family: var(--font-display);
  font-size: clamp(4rem, 3rem + 5vw, 7rem);
  color: var(--color-stone);
  line-height: 1;
}

.error-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-md);
  margin-top: var(--space-lg);
  flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   20. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  position: relative;
  background-color: var(--color-charcoal);
  color: var(--color-ivory-soft);
  padding-block: var(--space-2xl) var(--space-lg);
  overflow: hidden;
}

/* Subtle background enhancement — pure CSS (pass 4: the previous webp
   texture image was removed in favor of a CSS-only pattern per client
   instruction not to use a background image here). A soft top highlight
   plus a faint architectural hairline grid, kept low-opacity enough that
   the footer content stays the clear focus. Structure/colors unchanged. */
.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(120% 60% at 50% 0%, rgba(185, 150, 118, 0.12) 0%, rgba(185, 150, 118, 0) 60%),
    repeating-linear-gradient(90deg, rgba(250, 243, 232, 0.05) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(0deg, rgba(250, 243, 232, 0.05) 0 1px, transparent 1px 64px);
  pointer-events: none;
}

.site-footer::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(33, 23, 20, 0.4) 0%, var(--color-charcoal) 70%);
  pointer-events: none;
}

.site-footer .container {
  position: relative;
  z-index: 1;
}

.footer-logo-link {
  display: inline-flex;
}

.footer-logo-patch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xs) var(--space-sm);
  background: var(--color-ivory);
  border-radius: var(--radius-sm);
}

.footer-logo-patch img {
  height: 40px;
  width: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1.2fr;
  gap: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid rgba(250, 243, 232, 0.14);
}

.footer-brand-text {
  font-family: var(--font-body);
  font-size: 0.6rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--color-stone);
  margin-top: var(--space-sm);
}

.footer-desc {
  margin-top: var(--space-md);
  max-width: 26rem;
  color: rgba(250, 243, 232, 0.65);
  font-size: var(--fs-small);
}

.footer-social {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.footer-social a {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(250, 243, 232, 0.25);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--dur-fast) var(--ease-editorial),
    border-color var(--dur-fast) var(--ease-editorial);
}

.footer-social a:hover {
  background-color: var(--color-stone);
  border-color: var(--color-stone);
}

.footer-heading {
  font-size: var(--fs-eyebrow);
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--color-stone);
  margin-bottom: var(--space-md);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.footer-links a,
.footer-contact a {
  font-size: var(--fs-small);
  color: rgba(250, 243, 232, 0.75);
  transition: color var(--dur-fast) var(--ease-editorial);
}

.footer-links a:hover,
.footer-contact a:hover {
  color: var(--color-ivory);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  font-size: var(--fs-small);
}

.footer-hours {
  color: rgba(250, 243, 232, 0.75);
  line-height: 1.6;
}

.footer-hours em {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: rgba(250, 243, 232, 0.5);
  font-style: italic;
}

.footer-bottom {
  padding-top: var(--space-lg);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-sm);
  font-size: 0.8rem;
  color: rgba(250, 243, 232, 0.5);
}

.footer-legal {
  display: flex;
  gap: var(--space-md);
}

.footer-legal a:hover {
  color: var(--color-ivory);
}

/* --------------------------------------------------------------------------
   21. Quote request modal
   Custom-styled markup driven by Bootstrap's Modal JS component
   (assets/vendor/js/bootstrap.bundle.min.js) — only the JS is used, the
   visual design below is RESTONE's own (no bootstrap.min.css loaded).
   -------------------------------------------------------------------------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 1055;
  display: none;
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  outline: 0;
}

.modal.show {
  display: block;
}

.modal-dialog {
  position: relative;
  width: auto;
  margin: var(--space-md);
  display: flex;
  align-items: center;
  min-height: calc(100% - 2 * var(--space-md));
  transform: translateY(-16px);
  transition: transform var(--dur-fast) var(--ease-editorial);
}

.modal.show .modal-dialog {
  transform: none;
}

@media (min-width: 576px) {
  .modal-dialog {
    max-width: 560px;
    margin: var(--space-xl) auto;
    min-height: calc(100% - 2 * var(--space-xl));
  }
}

/* modal-content is height-bounded to the viewport with margin subtracted,
   so it can never extend past the screen; only .modal-body scrolls inside
   it (min-height:0 is required for a flex child to actually shrink and let
   overflow:auto engage instead of pushing the card taller than the
   viewport). Header stays put and stays usable/closable at all times. */
.modal-content {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: 0 30px 70px -24px rgba(33, 23, 20, 0.5);
  max-height: calc(100vh - 2 * var(--space-md));
  max-height: calc(100dvh - 2 * var(--space-md));
}

@media (min-width: 576px) {
  .modal-content {
    max-height: calc(100vh - 2 * var(--space-xl));
    max-height: calc(100dvh - 2 * var(--space-xl));
  }
}

.modal-header {
  flex-shrink: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-lg) var(--space-lg) var(--space-md);
  border-bottom: var(--border-thin);
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--color-heading);
}

.modal-subtitle {
  margin-top: var(--space-3xs);
  color: var(--color-muted);
  font-size: var(--fs-small);
}

.modal-close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: var(--border-thin);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--dur-fast) var(--ease-editorial),
    color var(--dur-fast) var(--ease-editorial);
}

.modal-close:hover,
.modal-close:focus-visible {
  background-color: var(--color-charcoal);
  color: var(--color-ivory);
}

.modal-body {
  padding: var(--space-lg);
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  /* Pass 6: client asked for the popup scrollbar to not be visible at all —
     scrolling itself stays fully enabled (overflow-y: auto above), only the
     scrollbar chrome is hidden, same technique as .mobile-nav. */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* legacy Edge/IE */
}

.modal-body::-webkit-scrollbar {
  display: none; /* Chrome/Safari/Edge (Chromium) */
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1050;
  background-color: rgba(33, 23, 20, 0.62);
  opacity: 0;
  transition: opacity var(--dur-fast) linear;
}

.modal-backdrop.show {
  opacity: 1;
}

body.modal-open {
  overflow: hidden;
}

.quote-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.quote-form .form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-3xs);
}

.quote-form .form-field--full {
  grid-column: 1 / -1;
}

.quote-form label {
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.quote-form input,
.quote-form select,
.quote-form textarea {
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  transition: border-color var(--dur-fast) var(--ease-editorial);
}

.quote-form input:focus-visible,
.quote-form select:focus-visible,
.quote-form textarea:focus-visible {
  border-color: var(--color-brown);
  outline: none;
}

.quote-form textarea {
  resize: vertical;
  min-height: 5.5rem;
}

.quote-form .btn {
  grid-column: 1 / -1;
  justify-content: center;
  margin-top: var(--space-2xs);
}

.form-note {
  grid-column: 1 / -1;
  font-size: 0.78rem;
  color: var(--color-muted);
}

.form-success {
  display: none;
  text-align: center;
  padding: var(--space-lg) 0;
}

.form-success.is-visible {
  display: block;
}

.form-success h3 {
  margin-bottom: var(--space-xs);
}

/* --------------------------------------------------------------------------
   22. Floating action buttons — WhatsApp + Call stack on the right,
   Back to Top on its own on the left (pass 4: split from a single right-
   hand stack so Back to Top no longer competes with WhatsApp/Call).
   -------------------------------------------------------------------------- */
.floating-actions {
  position: fixed;
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  opacity: 1;
  transition: opacity var(--dur-base) var(--ease-editorial);
}

.floating-actions--right {
  right: clamp(1rem, 3vw, 2rem);
  align-items: flex-end;
}

.floating-actions--left {
  left: clamp(1rem, 3vw, 2rem);
  align-items: flex-start;
}

/* Footer-avoidance (navigation.js): fade the whole stack out once the
   footer scrolls within reach, rather than trying to dodge individual
   rows — the mobile footer is a single full-width stacked column, so any
   vertical offset would overlap something. */
.floating-actions.is-footer-near {
  opacity: 0;
  pointer-events: none;
}

.fab {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 28px -10px rgba(33, 23, 20, 0.4);
  transition: opacity var(--dur-base) var(--ease-editorial),
    transform var(--dur-base) var(--ease-editorial),
    background-color var(--dur-fast) var(--ease-editorial);
}

.fab-back-to-top {
  background: var(--color-charcoal);
  color: var(--color-ivory);
  border: 1px solid var(--color-charcoal);
  opacity: 0;
  transform: translateY(14px) scale(0.92);
  pointer-events: none;
}

.fab-back-to-top.is-visible {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.fab-back-to-top:hover,
.fab-back-to-top:focus-visible {
  background: var(--color-brown);
  border-color: var(--color-brown);
}

.fab-whatsapp {
  background: #25d366;
  color: #ffffff;
  border: 1px solid #25d366;
  opacity: 0;
  transform: translateY(14px) scale(0.92);
}

.fab-whatsapp.is-visible {
  opacity: 1;
  transform: none;
}

.fab-whatsapp:hover,
.fab-whatsapp:focus-visible {
  filter: brightness(1.06);
}

/* Call — same size/shape as WhatsApp for a matched pair, brand tone (not a
   third-party brand color like WhatsApp's green) since it's just a tel:
   link, not an external service. */
.fab-call {
  background: var(--color-brown);
  color: var(--color-ivory);
  border: 1px solid var(--color-brown);
  opacity: 0;
  transform: translateY(14px) scale(0.92);
}

.fab-call.is-visible {
  opacity: 1;
  transform: none;
}

.fab-call:hover,
.fab-call:focus-visible {
  background: var(--color-charcoal);
  border-color: var(--color-charcoal);
}

/* --------------------------------------------------------------------------
   23. Scroll-reveal utility hooks (animated via animations.js / GSAP)
   -------------------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
}

.reveal-ready [data-reveal] {
  transition: opacity var(--dur-slow) var(--ease-editorial),
    transform var(--dur-slow) var(--ease-editorial);
}

.no-js [data-reveal] {
  opacity: 1;
  transform: none;
}

/* IntersectionObserver fallback path (used only if GSAP/ScrollTrigger fail to load) */
.is-visible[data-reveal] {
  opacity: 1;
  transform: none;
}

/* FAQ answer height transition (height set inline by navigation.js) */
.faq-answer {
  transition: height var(--dur-base) var(--ease-editorial);
}

/* --------------------------------------------------------------------------
   24. Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }

  .scroll-cue-line::after {
    animation: none;
  }
}
