/* Calder Ridge Roofing
   Idea: roofs laid in diminishing courses, each row lapping the one below.
   Palette: moorland moss (dominant) with a sharp lichen orange accent. */

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

:root {
  /* Brand palette */
  --primary:      #3e4a36;
  --primary-mid:  #5f6d52;
  --primary-dark: #262e21;
  --accent:       #933f13;
  --accent-mid:   #f0a774;

  /* Neutrals */
  --bg:         #efe9dd;
  --surface:    #f8f4ec;
  --stone:      #e2d9c6;
  --stone-deep: #cbbfa5;
  --border:     #d3c9b5;
  --text:       #24281f;
  --text-soft:  #4f5548;
  --text-muted: #646a5d;
  --on-dark:      #eee8dc;
  --on-dark-soft: #cfd2c4;
  --field-line:   #8a8270;

  /* Typography */
  --font-display: 'Spectral', Georgia, serif;
  --font-body:    'Hanken Grotesk', 'Segoe UI', sans-serif;

  /* Spacing and shape */
  --section-pad: clamp(60px, 8vw, 120px);
  --container:   1200px;
  --radius:      12px;
  --radius-lg:   24px;
  --slate-radius: 3px 3px 12px 12px;

  /* Textures */
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.16 0 0 0 0 0.14 0 0 0 0 0.1 0 0 0 0.16 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  --grain-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 0.98 0 0 0 0 0.93 0 0 0 0.08 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  --pat-slate: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='44'%3E%3Crect width='64' height='44' fill='%23565c60'/%3E%3Crect x='1' y='1' width='30' height='19' fill='%23616870'/%3E%3Crect x='33' y='23' width='30' height='19' fill='%23515760'/%3E%3Cpath d='M0 21h64M0 43h64M0.5 0v22M32.5 22v22' stroke='%23303539' stroke-width='2'/%3E%3C/svg%3E");
  --pat-stone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='150' height='56'%3E%3Crect width='150' height='56' fill='%238e8572'/%3E%3Crect x='2' y='1' width='50' height='24' fill='%2398907c'/%3E%3Crect x='96' y='30' width='40' height='24' fill='%23847b68'/%3E%3Cpath d='M0 26h150M0 55h150M1 0v26M55 0v26M101 0v26M28 26v30M82 26v30M138 26v30' stroke='%235a5446' stroke-width='2.5'/%3E%3C/svg%3E");
}

/* ---------- Base ---------- */

html { -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
  background-image: var(--grain);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

[hidden] { display: none !important; }

h1, h2, h3 {
  font-family: var(--font-display);
  color: var(--primary-dark);
  line-height: 1.1;
  font-weight: 500;
}

h2 { font-size: clamp(1.85rem, 4.6vw, 2.9rem); letter-spacing: -0.005em; }
h3 { font-size: clamp(1.3rem, 2.6vw, 1.55rem); }

p + p { margin-top: 1rem; }

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--primary-dark);
  color: var(--on-dark);
  padding: 0.7rem 1rem;
  border-radius: 4px;
  font-weight: 600;
  transition: top 0.2s;
}
.skip-link:focus { top: 1rem; }

.top-sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 12px; pointer-events: none; }

.wrap {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 5vw, 2rem);
}

.section { padding-block: var(--section-pad); }
.section--tight { padding-block: clamp(48px, 6vw, 84px); }
.section--deep { padding-block: clamp(72px, 10vw, 150px) var(--section-pad); }

.tone-stone {
  background-color: var(--stone);
  background-image: var(--grain), radial-gradient(ellipse at 15% 0%, rgba(255, 255, 255, 0.4), transparent 60%);
}

.tone-moss {
  background-color: var(--primary);
  background-image: var(--grain-light), radial-gradient(ellipse at 85% 10%, rgba(255, 255, 255, 0.06), transparent 55%);
  color: var(--on-dark);
}

.on-dark h1, .on-dark h2, .on-dark h3, .tone-moss h2, .tone-moss h3 { color: #f4efe5; }
.tone-moss p, .on-dark p { color: var(--on-dark-soft); }
.tone-moss a:not(.btn), .on-dark a:not(.btn) { color: var(--accent-mid); }
.tone-moss :focus-visible, .on-dark :focus-visible { outline-color: #f0c7a6; }

.measure { max-width: 60ch; }
.lead { font-size: clamp(1.1rem, 2.3vw, 1.28rem); color: var(--text-soft); line-height: 1.55; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3rem;
  padding: 0.85rem 1.35rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  border: 1.5px solid transparent;
  border-radius: var(--slate-radius);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--accent);
  color: #f8f3ea;
  box-shadow: 0 3px 0 #5f2a0e;
}
.btn-primary:hover { background: #843812; box-shadow: 0 5px 0 #5f2a0e; }

.btn-ghost {
  background: transparent;
  color: var(--primary-dark);
  border-color: var(--primary);
}
.btn-ghost:hover { background: var(--primary); color: #f4efe5; }

.tone-moss .btn-ghost, .on-dark .btn-ghost { color: #f4efe5; border-color: var(--on-dark-soft); }
.tone-moss .btn-ghost:hover, .on-dark .btn-ghost:hover { background: #f4efe5; color: var(--primary-dark); }

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid currentColor;
  padding-bottom: 0.1rem;
  transition: gap 0.2s, color 0.2s;
}
.text-link:hover { gap: 0.75rem; }
.text-link svg { width: 1.05em; height: 1.05em; }

/* ---------- Header and navigation ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: rgba(239, 233, 221, 0.96);
  background-image: var(--grain);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.25s, border-color 0.25s;
}

.site-header.scrolled {
  border-color: var(--border);
  box-shadow: 0 10px 22px -18px rgba(38, 46, 33, 0.7);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.18rem;
  line-height: 1.1;
  color: var(--primary-dark);
  text-decoration: none;
}
.brand .mark { width: 2rem; height: 2rem; flex: none; color: var(--primary); }
.mark-ridge { stroke: var(--accent); }
.on-dark .brand { color: #f4efe5; }
.on-dark .brand .mark { color: var(--on-dark-soft); }
.on-dark .mark-ridge { stroke: var(--accent-mid); }

.menu-toggle {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  width: 2.9rem;
  height: 2.9rem;
  padding: 0 0.7rem;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 4px 4px 10px 10px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.menu-toggle:hover { border-color: var(--primary); }
.menu-toggle .bar {
  display: block;
  height: 2.5px;
  border-radius: 2px;
  background: var(--primary-dark);
  transition: transform 0.25s, width 0.25s, opacity 0.2s;
}
/* three courses, diminishing toward the ridge */
.menu-toggle .bar:nth-child(1) { width: 12px; }
.menu-toggle .bar:nth-child(2) { width: 17px; }
.menu-toggle .bar:nth-child(3) { width: 22px; }
.menu-toggle[aria-expanded="true"] .bar { width: 22px; }
.menu-toggle[aria-expanded="true"] .bar:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .bar:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .bar:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.nav-links {
  list-style: none;
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  flex-direction: column;
  padding: 0.5rem clamp(1rem, 5vw, 2rem) 1.25rem;
  background-color: var(--bg);
  background-image: var(--grain);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 18px 24px -20px rgba(38, 46, 33, 0.6);
}

.site-header .nav-links.open { display: flex; }

.nav-links a {
  position: relative;
  display: block;
  padding: 0.85rem 0;
  color: var(--text);
  font-weight: 500;
  font-size: 1.08rem;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: color 0.2s;
}
.nav-links li:last-child a { border-bottom: 0; }
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.45rem;
  width: 1.6rem;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-links a[aria-current="page"] { color: var(--primary-dark); font-weight: 600; }

@media (min-width: 768px) {
  .menu-toggle { display: none; }
  .nav-links {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: clamp(1rem, 2.4vw, 1.9rem);
    padding: 0;
    background: none;
    border: 0;
    box-shadow: none;
  }
  .nav-links a { padding: 0.5rem 0.1rem; border-bottom: 0; font-size: 1rem; }
  .nav-links a::after { right: 0; width: auto; bottom: 0.1rem; }
  .nav-links .nav-cta a {
    padding: 0.55rem 1rem;
    background: var(--accent);
    color: #f8f3ea;
    border-radius: var(--slate-radius);
    transition: background 0.2s, transform 0.2s;
  }
  .nav-links .nav-cta a::after { display: none; }
  .nav-links .nav-cta a:hover { background: #843812; color: #f8f3ea; transform: translateY(-1px); }
  .nav-links .nav-cta a[aria-current="page"] { color: #f8f3ea; box-shadow: inset 0 -3px 0 #5f2a0e; }
}

/* ---------- Courses: the recurring roof detail ---------- */

.lap {
  display: block;
  height: 32px;
  background-color: #3b3831;
  background-image:
    repeating-linear-gradient(90deg, #958e7d 0 60px, #4a463d 60px 62px),
    repeating-linear-gradient(90deg, #857e6e 0 77px, #4a463d 77px 79px),
    repeating-linear-gradient(90deg, #797262 0 93px, #4a463d 93px 95px);
  background-size: 100% 7px, 100% 10px, 100% 13px;
  background-position: 0 0, 0 8px, 0 19px;
  background-repeat: no-repeat;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.2);
}

.slate-mark {
  display: inline-block;
  flex: none;
  width: 18px;
  height: 24px;
  border-radius: 2px 2px 7px 7px;
  background:
    radial-gradient(circle at 50% 22%, var(--surface) 0 2px, transparent 2.6px),
    var(--accent);
  box-shadow: 0 2px 0 rgba(38, 46, 33, 0.25);
}

.signs { list-style: none; display: grid; gap: 0.55rem; margin-top: 1.1rem; }
.signs li { position: relative; padding-left: 1.6rem; }
.signs li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 10px;
  height: 13px;
  border-radius: 1px 1px 4px 4px;
  background: var(--accent);
}
.tone-moss .signs li::before { background: var(--accent-mid); }
.signs-title { font-family: var(--font-body); font-size: 1rem; font-weight: 600; margin-top: 1.6rem; color: inherit; }

/* ---------- Home hero ---------- */

.hero { padding-block: clamp(2rem, 6vw, 4.5rem) clamp(3rem, 7vw, 6rem); }

.hero-inner { display: grid; gap: clamp(2.25rem, 5vw, 4rem); align-items: center; }

.hero-title {
  font-weight: 600;
  font-size: clamp(2.7rem, 10vw, 5.6rem);
  line-height: 0.98;
  letter-spacing: -0.015em;
  color: var(--primary-dark);
}
.hero-title .w { display: inline-block; }

.hero-strap {
  margin-top: 1.1rem;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.3rem, 3.4vw, 1.7rem);
  line-height: 1.3;
  color: var(--primary);
  max-width: 26ch;
}

.hero-lead { margin-top: 1rem; color: var(--text-soft); max-width: 44ch; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 1.9rem; }

.hero-visual { position: relative; }

.slates {
  --h: clamp(260px, 82vw, 420px);
  position: relative;
  display: flex;
  flex-direction: column;
  height: var(--h);
  border-radius: 3px 3px 0 0;
  overflow: hidden;
  background: #3b3831;
}

.course {
  position: relative;
  display: block;
  height: calc(var(--h) * var(--s));
  z-index: calc(var(--i) + 1);
  background-image: url("client-assets/stock-1.jpg");
  background-size: max(100%, calc(var(--h) * 1.5)) auto;
  background-position: 50% calc(var(--h) * var(--t) * -1);
  background-repeat: no-repeat;
  box-shadow: 0 3px 5px -1px rgba(20, 18, 14, 0.6);
  border-bottom: 1px solid rgba(255, 246, 230, 0.16);
}
.course::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(90deg, transparent 0 calc(var(--w) - 2px), rgba(26, 24, 20, 0.3) calc(var(--w) - 2px) var(--w));
  background-position: var(--o) 0;
}
.course::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(rgba(20, 18, 14, 0.32), transparent 45%);
}

.ridge {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  z-index: 20;
  background: var(--accent);
  transform-origin: left center;
}

.gutter {
  display: block;
  height: 12px;
  background: var(--primary-dark);
  border-radius: 0 0 10px 10px;
  box-shadow: inset 0 3px 0 var(--primary-mid);
}

@media (min-width: 1024px) {
  .hero-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); }
  .slates { --h: clamp(440px, 44vw, 580px); }
}

/* Entrance: courses laid from the eaves up, then the ridge. JS only. */
@keyframes lay { from { opacity: 0; transform: translateY(-22px); } }
@keyframes settle { from { opacity: 0; transform: translateY(-0.32em); } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes ridge { from { transform: scaleX(0); } }
@keyframes fade { from { opacity: 0; } }

html.js .hero .course { animation: lay 0.42s cubic-bezier(0.25, 0.8, 0.3, 1) both; animation-delay: calc(0.05s + var(--i) * 0.065s); }
html.js .hero .gutter { animation: fade 0.3s ease-out both; }
html.js .hero .ridge { animation: ridge 0.5s cubic-bezier(0.6, 0, 0.3, 1) 1s both; }
html.js .hero-title .w { animation: settle 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
html.js .hero-title .w:nth-child(1) { animation-delay: 0.25s; }
html.js .hero-title .w:nth-child(2) { animation-delay: 0.37s; }
html.js .hero-title .w:nth-child(3) { animation-delay: 0.49s; }
html.js .hero-strap { animation: rise 0.45s ease-out 0.75s both; }
html.js .hero-lead { animation: rise 0.45s ease-out 0.9s both; }
html.js .hero-actions { animation: rise 0.45s ease-out 1.1s both; }

/* ---------- Scroll reveals (brief, JS only) ---------- */

/* Content is always fully visible; no hidden initial state. */
.reveal, html.js .reveal, html.js .reveal.visible { opacity: 1; transform: none; }

/* ---------- Alternating panels ---------- */

.panel-grid { display: grid; gap: clamp(1.75rem, 4vw, 4rem); align-items: center; }
.panel-text h2 { margin-bottom: 1.1rem; }
.panel-text .text-link, .panel-text .btn-row { margin-top: 1.6rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.8rem; }

.panel-media { margin: 0; }
.panel-media img,
.panel-media .drawing {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--slate-radius);
  box-shadow: 0 5px 0 rgba(38, 46, 33, 0.22);
}
.panel-media.tall img { aspect-ratio: 4 / 4.4; }

.drawing { overflow: hidden; background: #e9e2d3; }
.drawing svg { width: 100%; height: 100%; }

@media (min-width: 768px) {
  .panel-grid { grid-template-columns: 1.1fr 1fr; }
  .panel-grid.flip { grid-template-columns: 1fr 1.1fr; }
  .panel-grid.flip > .panel-media { order: 2; }
}

@media (min-width: 1024px) {
  .panel-grid { grid-template-columns: 7fr 5fr; }
  .panel-grid.flip { grid-template-columns: 5fr 7fr; }
  .panel-grid > .panel-media { margin-left: -1.5rem; }
  .panel-grid.flip > .panel-media { margin-left: 0; margin-right: -1.5rem; }
  .panel-text { padding-block: 1rem; }
}

/* ---------- Home: services as courses ---------- */

.services-split { display: grid; gap: 2.25rem; }
.services-split .intro p { margin-top: 1rem; color: var(--text-soft); max-width: 38ch; }
.services-split .intro .text-link { margin-top: 1.4rem; }

.slate-list { list-style: none; display: grid; gap: 0.6rem; }
.slate-list a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: 1.15rem 1.15rem;
  color: var(--text);
  text-decoration: none;
  background-color: var(--surface);
  background-image: var(--grain);
  border-radius: var(--slate-radius);
  box-shadow: 0 3px 0 var(--stone-deep);
  transition: transform 0.2s, box-shadow 0.2s;
}
.slate-list a:hover { transform: translateY(-2px); box-shadow: 0 5px 0 var(--stone-deep); }
.slate-list a:hover .go { color: var(--accent); transform: translateX(3px); }
.slate-list h3 { font-size: clamp(1.3rem, 3vw, 1.6rem); }
.slate-list p { font-size: 0.98rem; color: var(--text-soft); margin-top: 0.2rem; }
.slate-list .go { width: 1.4rem; height: 1.4rem; color: var(--primary-mid); transition: transform 0.2s, color 0.2s; }

/* the first course is the deepest, like the eaves of a stone roof */
.slate-list li:nth-child(1) a { padding-block: 1.6rem; }
.slate-list li:nth-child(2) a { padding-block: 1.4rem; }
.slate-list li:nth-child(3) a { padding-block: 1.2rem; }
.slate-list li:nth-child(4) a { padding-block: 1.05rem; }

@media (min-width: 768px) {
  .slate-list li:nth-child(even) { margin-left: 2.5rem; }
  .slate-list li:nth-child(odd) { margin-right: 2.5rem; }
}

@media (min-width: 1024px) {
  .services-split { grid-template-columns: 4fr 7fr; gap: 4rem; align-items: start; }
  .services-split .intro { position: sticky; top: 6.5rem; }
}

/* ---------- Home: area ---------- */

.area-head { display: grid; gap: 1rem; }
.area-head p { color: var(--text-soft); max-width: 52ch; }
@media (min-width: 900px) {
  .area-head { grid-template-columns: 1fr 1fr; align-items: end; gap: 3rem; }
}
.terrace {
  width: 100%;
  height: clamp(150px, 25vw, 300px);
  margin-top: clamp(2rem, 5vw, 3.5rem);
}

/* ---------- Call to action ---------- */

.cta { display: grid; gap: 2rem; }
.cta h2 { max-width: 16ch; }
.cta-lines { display: grid; gap: 0.35rem; }
.cta-phone {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 6vw, 3rem);
  font-weight: 600;
  line-height: 1.1;
  color: var(--primary-dark);
  text-decoration: none;
  transition: color 0.2s;
}
.cta-phone:hover { color: var(--accent); }
.cta-email { font-weight: 600; overflow-wrap: anywhere; }
.cta .btn { justify-self: start; margin-top: 0.8rem; }
@media (min-width: 900px) {
  .cta { grid-template-columns: 1.1fr 1fr; align-items: center; gap: 4rem; }
}

/* ---------- Inner page heads ---------- */

.page-head { padding-block: clamp(2.5rem, 7vw, 5.5rem) clamp(2rem, 5vw, 3.5rem); }
.page-head .wrap { display: grid; gap: 1.5rem; }
.page-head h1 {
  font-weight: 600;
  font-size: clamp(2.5rem, 7.5vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
}
.page-head .lead { margin-top: 1rem; max-width: 50ch; }

.stack { display: none; }

@media (min-width: 768px) {
  .page-head .wrap { grid-template-columns: 1fr auto; align-items: end; gap: 3rem; }
  .stack { display: grid; gap: 4px; width: 220px; justify-items: end; }
  .stack span {
    display: block;
    height: var(--sh);
    width: var(--sw);
    border-radius: 2px 2px 6px 6px;
    background-color: #857e6e;
    background-image: repeating-linear-gradient(90deg, transparent 0 calc(var(--jw) - 2px), #4a463d calc(var(--jw) - 2px) var(--jw));
    box-shadow: 0 2px 0 rgba(38, 46, 33, 0.25);
  }
  .stack span:first-child { background-color: var(--accent); background-image: none; border-radius: 3px; }
}

.jump { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 1.6rem; list-style: none; }
.jump a {
  display: inline-block;
  padding: 0.5rem 0.95rem;
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--primary-dark);
  text-decoration: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--slate-radius);
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
}
.jump a:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

.service { scroll-margin-top: 5rem; }

/* ---------- Gallery ---------- */

.coursed { display: grid; gap: 0.7rem; }
.coursed .row { display: grid; gap: 0.7rem; }

.tile {
  position: relative;
  margin: 0;
  min-height: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--slate-radius);
  background: var(--stone);
  box-shadow: 0 4px 0 rgba(38, 46, 33, 0.22);
}
.tile img, .tile svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tile figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.7rem 0.95rem 0.8rem;
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.35;
  color: #f4efe5;
  background: rgba(38, 46, 33, 0.9);
}
.tag {
  position: absolute;
  top: 0.65rem;
  left: 0.65rem;
  z-index: 2;
  padding: 0.2rem 0.55rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  background: #f4efe5;
  border-radius: 3px;
}
.tile--slate { background: var(--pat-slate); }
.tile--repair { background: var(--pat-slate); }
.tile--repair .patch {
  position: absolute;
  top: 44px;
  left: 129px;
  width: 63px;
  height: 20px;
  background: #3f4549;
  outline: 3px solid var(--accent-mid);
  outline-offset: -1px;
}
.tile--cta {
  aspect-ratio: auto;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem;
  background-color: var(--primary);
  background-image: var(--grain-light);
}
.tile--cta h2 { font-size: clamp(1.3rem, 2.2vw, 1.75rem); color: #f4efe5; }
.tile--cta .btn { align-self: flex-start; }

@media (min-width: 768px) {
  .coursed .row .tile { aspect-ratio: auto; }
  .row--a { grid-template-columns: 1.35fr 1fr 1.15fr; min-height: 360px; }
  .row--b { grid-template-columns: 1fr 1.55fr; min-height: 300px; margin-left: 6%; }
  .row--c { grid-template-columns: 1.1fr 1fr 1.15fr; min-height: 250px; margin-right: 4%; }
}

.note { font-size: 0.95rem; color: var(--text-muted); margin-top: 1.5rem; }

/* ---------- About ---------- */

.facts { list-style: none; display: grid; gap: 0; margin-top: 1.5rem; border-top: 1px solid var(--border); }
.facts li { display: grid; gap: 0.15rem; padding: 0.9rem 0; border-bottom: 1px solid var(--border); }
.facts strong { font-weight: 600; color: var(--primary-dark); }
@media (min-width: 600px) {
  .facts li { grid-template-columns: 9.5rem 1fr; gap: 1rem; }
}

.place {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.6rem);
  line-height: 1.05;
  font-weight: 500;
  color: #f4efe5;
}

/* ---------- Contact ---------- */

.contact-grid { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 1024px) {
  .contact-grid { grid-template-columns: 5fr 7fr; gap: 3rem; }
}

.contact-card {
  padding: clamp(1.6rem, 4vw, 2.4rem);
  border-radius: var(--slate-radius);
  box-shadow: 0 5px 0 var(--primary-dark);
}
.contact-card h2 { font-size: clamp(1.6rem, 4vw, 2.1rem); }
.contact-card dl { display: grid; gap: 1.2rem; margin-top: 1.5rem; }
.contact-card dt { font-weight: 600; color: #f4efe5; font-size: 0.98rem; }
.contact-card dd { color: var(--on-dark-soft); overflow-wrap: anywhere; }
.contact-card a.big-phone {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 5vw, 2.2rem);
  font-weight: 600;
  line-height: 1.15;
  color: #f4efe5;
  text-decoration: none;
  transition: color 0.2s;
}
.contact-card a.big-phone:hover { color: var(--accent-mid); }

.form-wrap {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background-color: var(--surface);
  background-image: var(--grain);
  border-radius: var(--slate-radius);
  box-shadow: 0 5px 0 var(--stone-deep);
}
.form-wrap h2 { font-size: clamp(1.6rem, 4vw, 2.1rem); }
.form-wrap > p { margin-top: 0.6rem; color: var(--text-soft); }

.form { display: grid; gap: 1.2rem; margin-top: 1.6rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.4rem; }
.field .opt { font-weight: 400; color: var(--text-muted); }
.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  padding: 0.85rem 0.95rem;
  background: #fffdf8;
  border: 1.5px solid var(--field-line);
  border-radius: 4px 4px 10px 10px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:hover, .field textarea:hover { border-color: var(--primary); }
.field input:focus-visible, .field textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}
.field-row { display: grid; gap: 1.2rem; }
@media (min-width: 600px) { .field-row { grid-template-columns: 1fr 1fr; } }
.form .btn { justify-self: start; }

.thanks {
  margin-top: 1.6rem;
  padding: 1.4rem 1.4rem 1.5rem;
  border-left: 6px solid var(--accent);
  background: #fffdf8;
  border-radius: 0 6px 12px 0;
}
.thanks h3 { font-size: 1.6rem; }
.thanks p { margin-top: 0.5rem; color: var(--text-soft); }
.thanks:focus { outline: none; }
.thanks:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

/* ---------- Privacy ---------- */

.prose { max-width: 68ch; }
.prose h2 { font-size: clamp(1.45rem, 3.4vw, 1.85rem); margin-top: 2.4rem; margin-bottom: 0.7rem; }
.prose h2:first-child { margin-top: 0; }
.prose ul { margin: 0.8rem 0 0 1.2rem; }
.prose li + li { margin-top: 0.35rem; }
.prose a { overflow-wrap: anywhere; }

/* ---------- Footer ---------- */

.site-footer {
  background-color: var(--primary-dark);
  background-image: var(--grain-light);
  color: var(--on-dark);
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
}
.footer-grid { display: grid; gap: 2.25rem; }
.footer-brand p { margin-top: 0.9rem; color: var(--on-dark-soft); max-width: 34ch; }
.footer-h { font-family: var(--font-body); font-size: 1rem; font-weight: 600; color: #f4efe5; margin-bottom: 0.7rem; }
.site-footer ul { list-style: none; display: grid; gap: 0.35rem; }
.site-footer a:not(.btn) { color: var(--on-dark-soft); text-decoration: none; transition: color 0.2s; }
.site-footer a:not(.btn):hover { color: var(--accent-mid); text-decoration: underline; }
.site-footer a.brand { color: #f4efe5; }
.site-footer a.brand:hover { color: #f4efe5; text-decoration: none; }
.site-footer .contact-lines a { overflow-wrap: anywhere; }
.footer-base {
  margin-top: 2.75rem;
  padding-top: 1.4rem;
  border-top: 1px solid rgba(238, 232, 220, 0.18);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 2rem;
  font-size: 0.92rem;
  color: var(--on-dark-soft);
}
.footer-base p + p { margin-top: 0; }
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.4fr 1fr 1.2fr; gap: 3rem; }
}

/* ---------- Reduced motion: show everything at once ---------- */

@media (prefers-reduced-motion: reduce) {
  html.js .hero *, html.js .hero *::before, html.js .hero *::after { animation: none !important; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .slate-list a, .jump a { transition: none; }
}

/* ---------- Mobile nav lock: must stay last ----------
   Under 768px the links stay hidden in every header state
   unless the menu button has added .open. */
@media (max-width: 767.98px) {
  .site-header .nav-links:not(.open),
  .site-header.scrolled .nav-links:not(.open),
  .site-header.scrolled nav .nav-links:not(.open) { display: none; }
}
