:root {
  --ink: #1f2427;
  --muted: #66706d;
  --paper: #f4f0ea;
  --panel: #ffffff;
  --navy: #1a1a1a;
  --navy-deep: #000000;
  --oak: #b98249;
  --sage: #607466;
  --line: #ddd6cd;
  --shadow: 0 20px 50px rgba(23, 24, 25, 0.13);
  --max: 1120px;
  --site-header-height: 136px;
}

@font-face {
  font-family: "glyphs";
  src: url("../fonts/glyphs.eot?-6tjga7");
  src:
    url("../fonts/glyphs.eot?#iefix-6tjga7") format("embedded-opentype"),
    url("../fonts/glyphs.woff?-6tjga7") format("woff"),
    url("../fonts/glyphs.ttf?-6tjga7") format("truetype"),
    url("../fonts/glyphs.svg?-6tjga7#glyphs") format("svg"),
    url("../fonts/glyphs.woff?-6tjga7") format("woff");
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

/* Keep in-page anchor jumps (#portfolio, #contact, #services, #main) clear of
   the sticky header instead of sliding underneath it. */
[id] {
  scroll-margin-top: calc(var(--site-header-height) + 1rem);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

body.lightbox-open {
  overflow: hidden;
}

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

a {
  color: inherit;
}

p,
h1,
h2,
h3,
figure {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: Arapey, Georgia, "Times New Roman", serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 1rem;
  color: var(--navy);
  font-size: 3rem;
  line-height: 1.05;
}

.hero h1 {
  color: #ffffff;
}

h2 {
  margin-bottom: 1rem;
  color: var(--navy);
  font-size: 2.15rem;
  line-height: 1.12;
}

h3 {
  margin-bottom: 0.75rem;
  color: var(--navy);
  font-size: 1.45rem;
  line-height: 1.2;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: 1rem;
  z-index: 50;
  padding: 0.65rem 0.9rem;
  background: #ffffff;
  color: var(--navy);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-shell {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--navy-deep);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.nav-shell {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.75rem 0;
}

.brand {
  width: 240px;
  flex: 0 0 auto;
}

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.primary-nav a {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.8rem;
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.92rem;
  text-decoration: none;
  border-radius: 6px;
}

.primary-nav a:hover,
.primary-nav a:focus-visible,
.primary-nav a.active {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  outline: none;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 48px;
  height: 42px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.nav-toggle:focus-visible {
  outline: 2px solid var(--oak);
  outline-offset: 2px;
}

.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: #ffffff;
  transition: transform 0.25s ease, opacity 0.2s ease;
}

.site-header.nav-open .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header.nav-open .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.site-header.nav-open .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.hero {
  position: relative;
  min-height: 460px;
  overflow: hidden;
  background: var(--navy);
}

.hero-media,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-media {
  object-fit: cover;
  transform-origin: center;
  animation: hero-kenburns 7s cubic-bezier(0.16, 0.84, 0.44, 1) both;
}

@keyframes hero-kenburns {
  from {
    transform: scale(1.09) rotate(0.7deg);
  }
  to {
    transform: scale(1) rotate(0deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-media {
    animation: none;
  }
}

.hero-shade {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.3) 38%, rgba(0, 0, 0, 0.05) 68%, rgba(0, 0, 0, 0) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  min-height: 460px;
  display: grid;
  grid-template-columns: minmax(0, 760px);
  align-items: center;
  justify-content: start;
  padding: 4.25rem 0;
}

.hero-copy {
  max-width: 720px;
}

.hero-copy .eyebrow,
.hero-copy h1,
.hero-copy .lede {
  text-shadow: 0 1px 18px rgba(0, 0, 0, 0.55);
}

.home-page .home-fold {
  min-height: calc(100svh - var(--site-header-height));
  display: grid;
  grid-template-rows: minmax(290px, 1fr) auto;
  background: #ffffff;
}

.home-page .hero,
.home-page .hero-content {
  min-height: 0;
  height: 100%;
}

.home-page .hero-content {
  padding: clamp(2rem, 5vh, 3.75rem) 0 clamp(4.25rem, 8vh, 5.5rem);
}

.fold-services {
  position: relative;
  z-index: 4;
  margin-top: -3.6rem;
  padding: 0 0 clamp(1rem, 2vh, 1.4rem);
}

.eyebrow {
  margin-bottom: 0.7rem;
  color: var(--oak);
  font-weight: 700;
  line-height: 1.25;
}

.hero .eyebrow {
  color: #f3c78f;
}

.lede {
  max-width: 670px;
  margin-bottom: 1.6rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.15rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.15rem;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease,
              color 0.18s ease, box-shadow 0.18s ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(20, 22, 24, 0.2);
  outline: none;
}

.button:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(20, 22, 24, 0.2);
}

.button.primary {
  background: var(--oak);
  color: #111111;
}

.button.primary:hover,
.button.primary:focus-visible {
  background: #a9743f;
}

.button.secondary {
  border-color: rgba(255, 255, 255, 0.7);
  color: #ffffff;
}

.button.secondary:hover,
.button.secondary:focus-visible {
  background: rgba(255, 255, 255, 0.14);
  border-color: #ffffff;
}

.button.inline-button {
  width: fit-content;
  background: var(--navy);
  color: #ffffff;
}

.button.inline-button:hover,
.button.inline-button:focus-visible {
  background: var(--oak);
  color: #111111;
}

.section {
  padding: 4.5rem 0;
}

.proof-band {
  padding: 1.2rem 0;
  background: var(--navy);
  color: #ffffff;
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: rgba(255, 255, 255, 0.18);
}

.proof-grid p {
  min-height: 96px;
  margin: 0;
  padding: 1.1rem;
  background: var(--navy);
}

.proof-grid strong,
.proof-grid span {
  display: block;
}

.proof-grid strong {
  font-family: Arapey, Georgia, "Times New Roman", serif;
  font-size: 1.25rem;
  font-style: italic;
  font-weight: 400;
}

.proof-grid span {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
}

.section-heading {
  max-width: 740px;
  margin-bottom: 2rem;
}

.section-heading.compact {
  margin-bottom: 1.35rem;
}

.section-heading p:last-child,
.story-copy p,
.portfolio-intro p,
.contact-section p {
  color: var(--muted);
}

.service-band,
.portfolio-section {
  background: #ffffff;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.service-card,
.process-grid article,
.contact-panel,
.feature-list {
  border: 1px solid var(--line);
  border-top: 5px solid var(--navy);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.service-card {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  padding: 1.35rem;
}

.home-page .service-card {
  position: relative;
  min-height: clamp(300px, 30vh, 360px);
  padding: 1.65rem 1.45rem 1.3rem;
  border-top-width: 5px;
  border-radius: 0;
  box-shadow: 8px 14px 20px rgba(20, 22, 24, 0.16);
  overflow: visible;
}

.home-page .service-card::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 115px;
  height: 110px;
  background: url("../images/box-corner.jpg") no-repeat left bottom / contain;
  opacity: 1;
  pointer-events: none;
}

.home-page .service-card::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: -1.05rem;
  height: 1rem;
  background: radial-gradient(ellipse at center, rgba(20, 22, 24, 0.24), rgba(20, 22, 24, 0) 68%);
  pointer-events: none;
}

.home-page .service-card h3 {
  margin-bottom: 1.45rem;
  color: var(--navy);
  font-size: clamp(1.42rem, 2vw, 1.82rem);
  line-height: 1.15;
  text-align: center;
}

.home-page .service-card h3::after {
  content: "\e600";
  display: block;
  margin: 0.45rem auto 0;
  color: var(--navy);
  font-family: "glyphs";
  font-size: 0.95rem;
  font-style: normal;
  font-weight: normal;
  line-height: 1;
  opacity: 0.68;
  speak: none;
  text-transform: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.service-card p {
  color: var(--muted);
}

.home-page .service-card p {
  position: relative;
  z-index: 1;
  margin-bottom: 1rem;
  color: #273238;
  font-size: 0.9rem;
  line-height: 1.7;
  text-align: justify;
}

.text-link,
.service-button {
  margin-top: auto;
  color: var(--navy);
  font-weight: 700;
  text-decoration-color: var(--oak);
  text-underline-offset: 0.2em;
}

.service-button {
  position: relative;
  z-index: 1;
  align-self: center;
  min-width: 132px;
  display: inline-flex;
  justify-content: center;
  padding: 0.82rem 1rem;
  background: var(--navy-deep);
  color: #ffffff;
  font-family: Arapey, Georgia, "Times New Roman", serif;
  font-size: 0.86rem;
  font-style: italic;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
}

.service-button:hover,
.service-button:focus-visible {
  background: var(--navy);
  outline: 2px solid var(--oak);
  outline-offset: 3px;
}

.story-section,
.intro-section,
.process-section,
.contact-section {
  background: var(--paper);
}

.split-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 2.25rem;
  align-items: center;
}

/* Allow grid columns to shrink below their content's intrinsic width so
   fixed-width embeds (e.g. YouTube iframes) can't force horizontal overflow. */
.split-layout > *,
.contact-layout > *,
.portfolio-layout > * {
  min-width: 0;
}

.story-copy {
  max-width: 660px;
}

.story-image {
  margin: 0;
}

.story-image img {
  width: 100%;
  min-height: 290px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

.story-image figcaption,
.portfolio-grid figcaption {
  color: var(--muted);
  font-size: 0.86rem;
}

.story-image figcaption {
  margin-top: 0.7rem;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: 3rem;
  align-items: center;
}

.contact-layout > div:first-child {
  max-width: 640px;
}

.contact-section h2 {
  max-width: 620px;
}

.contact-section h2::after {
  content: "\e600";
  display: block;
  margin-top: 1rem;
  color: var(--navy);
  font-family: "glyphs";
  font-size: 0.95rem;
  font-style: normal;
  font-weight: normal;
  line-height: 1;
  opacity: 0.68;
  speak: none;
  text-transform: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.contact-panel {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.75rem;
  padding: 1.8rem 1.65rem 1.55rem;
  border-radius: 0;
  box-shadow: 8px 14px 20px rgba(20, 22, 24, 0.16);
  font-style: normal;
  text-align: center;
  overflow: visible;
}

.contact-panel::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 115px;
  height: 110px;
  background: url("../images/box-corner.jpg") no-repeat left bottom / contain;
  pointer-events: none;
}

.contact-panel::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: -1.05rem;
  height: 1rem;
  background: radial-gradient(ellipse at center, rgba(20, 22, 24, 0.24), rgba(20, 22, 24, 0) 68%);
  pointer-events: none;
}

.contact-heading,
.contact-panel a,
.contact-panel span {
  position: relative;
  z-index: 1;
  overflow-wrap: anywhere;
}

.contact-heading {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--navy);
  font-family: Arapey, Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 2vw, 1.75rem);
  font-style: italic;
  line-height: 1.15;
}

.contact-heading::after {
  content: "\e600";
  display: block;
  margin: 0.45rem auto 0;
  color: var(--navy);
  font-family: "glyphs";
  font-size: 0.9rem;
  font-style: normal;
  font-weight: normal;
  line-height: 1;
  opacity: 0.68;
  speak: none;
  text-transform: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.contact-panel a {
  color: var(--navy);
  font-weight: 700;
  text-decoration-color: var(--oak);
  text-underline-offset: 0.2em;
}

.contact-panel span {
  color: var(--muted);
  max-width: 20rem;
}

.contact-panel .contact-heading,
.contact-panel .social-links {
  max-width: none;
}

.contact-panel .contact-heading {
  color: var(--navy);
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 0.35rem;
}

.social-links a {
  font-family: Arapey, Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 1rem;
}

.feature-list {
  display: grid;
  gap: 1px;
  padding: 0;
  overflow: hidden;
}

.feature-list p {
  margin: 0;
  padding: 1.2rem;
  background: #ffffff;
}

.feature-list strong,
.feature-list span {
  display: block;
}

.feature-list strong {
  color: var(--navy);
}

.feature-list span {
  color: var(--muted);
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.process-grid article {
  padding: 1.25rem;
}

.process-grid span {
  display: inline-flex;
  min-width: 42px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  border-radius: 50%;
  background: rgba(96, 116, 102, 0.13);
  color: var(--sage);
  font-weight: 800;
}

.process-grid p {
  color: var(--muted);
}

.restoration-page .process-grid article {
  position: relative;
  min-height: 245px;
  padding: 1.65rem 1.45rem 1.3rem;
  border-radius: 0;
  box-shadow: 8px 14px 20px rgba(20, 22, 24, 0.16);
  overflow: visible;
}

.restoration-page .process-grid article::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 115px;
  height: 110px;
  background: url("../images/box-corner.jpg") no-repeat left bottom / contain;
  pointer-events: none;
}

.restoration-page .process-grid article::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: -1.05rem;
  height: 1rem;
  background: radial-gradient(ellipse at center, rgba(20, 22, 24, 0.24), rgba(20, 22, 24, 0) 68%);
  pointer-events: none;
}

.restoration-page .process-grid span,
.restoration-page .process-grid h3,
.restoration-page .process-grid p {
  position: relative;
  z-index: 1;
}

.restoration-page .process-grid span {
  display: block;
  min-width: 0;
  min-height: 0;
  margin-bottom: 0.7rem;
  border-radius: 0;
  background: transparent;
  color: var(--oak);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.restoration-page .process-grid h3 {
  margin-bottom: 1.25rem;
  color: var(--navy);
  font-size: clamp(1.42rem, 2vw, 1.82rem);
  line-height: 1.15;
  text-align: center;
}

.restoration-page .process-grid h3::after {
  content: "\e600";
  display: block;
  margin: 0.45rem auto 0;
  color: var(--navy);
  font-family: "glyphs";
  font-size: 0.95rem;
  font-style: normal;
  font-weight: normal;
  line-height: 1;
  opacity: 0.68;
  speak: none;
  text-transform: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.portfolio-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.45fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

.portfolio-intro {
  position: sticky;
  top: calc(var(--site-header-height) + 1.25rem);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.85rem;
}

.portfolio-grid figure {
  margin: 0;
}

.portfolio-grid figure.lightbox-item {
  cursor: zoom-in;
}

.portfolio-grid figure.lightbox-item:focus-visible {
  outline: 3px solid var(--oak);
  outline-offset: 4px;
}

.portfolio-grid img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(23, 24, 25, 0.12);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.portfolio-grid figure.lightbox-item:hover img,
.portfolio-grid figure.lightbox-item:focus-visible img {
  box-shadow: 0 16px 30px rgba(23, 24, 25, 0.18);
  transform: translateY(-2px);
}

.portfolio-grid figcaption {
  margin-top: 0.45rem;
}

.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: clamp(1rem, 4vw, 3rem);
  border: 0;
  background: transparent;
  color: #ffffff;
  overflow: hidden;
}

.lightbox[open] {
  animation: lightbox-fade 200ms ease;
}

@keyframes lightbox-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.lightbox::backdrop {
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.lightbox-shell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.lightbox-stage {
  position: relative;
  display: flex;
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
}

.lightbox-stage img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - 8rem);
  object-fit: contain;
  background: #111111;
}

.lightbox-stage figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 2.5rem 1.25rem 1.1rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0));
  color: #ffffff;
  font-family: Arapey, Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-style: italic;
  text-align: center;
}

.lightbox-control,
.lightbox-close {
  position: absolute;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font: inherit;
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: background 150ms ease, color 150ms ease, transform 150ms ease;
}

.lightbox-control:hover,
.lightbox-close:hover,
.lightbox-control:focus-visible,
.lightbox-close:focus-visible {
  background: var(--oak);
  color: #111111;
  outline: none;
}

.lightbox-control {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-control:hover,
.lightbox-control:focus-visible {
  transform: translateY(-50%) scale(1.06);
}

.lightbox-previous {
  left: clamp(0.5rem, 3vw, 2rem);
}

.lightbox-next {
  right: clamp(0.5rem, 3vw, 2rem);
}

.lightbox-close {
  top: clamp(0.75rem, 2vw, 1.5rem);
  right: clamp(0.75rem, 2vw, 1.5rem);
  font-size: 1.4rem;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
  transform: scale(1.06);
}

.lightbox-count {
  position: absolute;
  z-index: 3;
  top: clamp(0.75rem, 2vw, 1.5rem);
  left: 50%;
  transform: translateX(-50%);
  padding: 0.4rem 0.95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

@media (max-width: 640px) {
  .lightbox-control,
  .lightbox-close {
    width: 42px;
    height: 42px;
    font-size: 1.4rem;
  }
}

.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.84);
}

.footer-layout {
  min-height: 86px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.footer-layout p {
  margin: 0;
}

.footer-layout nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 1rem;
}

.footer-layout a {
  color: #ffffff;
  text-decoration: none;
}

.footer-layout a:hover,
.footer-layout a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

@media (max-width: 900px) {
  .hero-content,
  .split-layout,
  .contact-layout,
  .portfolio-layout {
    grid-template-columns: 1fr;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .nav-shell {
    flex-wrap: wrap;
  }

  .primary-nav {
    flex-basis: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    width: 100%;
    margin-top: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s cubic-bezier(0.22, 0.61, 0.36, 1),
                opacity 0.35s ease,
                margin-top 0.45s ease;
  }

  .site-header.nav-open .primary-nav {
    max-height: 80vh;
    margin-top: 0.6rem;
    opacity: 1;
    overflow-y: auto;
  }

  .primary-nav a {
    width: 100%;
    justify-content: flex-start;
    padding: 0.8rem 0.9rem;
    border-radius: 8px;
    font-size: 1rem;
    /* per-link reveal */
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1),
                background 0.15s ease;
  }

  .site-header.nav-open .primary-nav a {
    opacity: 1;
    transform: translateY(0);
  }

  .site-header.nav-open .primary-nav a:nth-child(1) { transition-delay: 0.06s; }
  .site-header.nav-open .primary-nav a:nth-child(2) { transition-delay: 0.11s; }
  .site-header.nav-open .primary-nav a:nth-child(3) { transition-delay: 0.16s; }
  .site-header.nav-open .primary-nav a:nth-child(4) { transition-delay: 0.21s; }
  .site-header.nav-open .primary-nav a:nth-child(5) { transition-delay: 0.26s; }
  .site-header.nav-open .primary-nav a:nth-child(6) { transition-delay: 0.31s; }
  .site-header.nav-open .primary-nav a:nth-child(7) { transition-delay: 0.36s; }
  .site-header.nav-open .primary-nav a:nth-child(8) { transition-delay: 0.41s; }

  @media (prefers-reduced-motion: reduce) {
    .primary-nav,
    .primary-nav a {
      transition: none;
    }
  }

  .hero,
  .hero-content {
    min-height: 430px;
  }

  .home-page .home-fold {
    min-height: auto;
    display: block;
  }

  .home-page .hero,
  .home-page .hero-content {
    min-height: 380px;
    height: auto;
  }

  .hero-content {
    padding: 2.25rem 0 3rem;
  }

  .fold-services {
    margin-top: -2rem;
  }

  .hero-copy {
    text-align: center;
  }

  .hero-copy h1,
  .hero-copy .lede {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .proof-grid,
  .service-grid,
  .process-grid {
    grid-template-columns: 1fr;
  }

  .portfolio-intro {
    position: static;
  }

  .testimonial-grid {
    columns: 1;
  }
}

@media (max-width: 640px) {
  body {
    font-size: 15px;
  }

  h1 {
    font-size: 1.95rem;
    line-height: 1.07;
  }

  h2 {
    font-size: 1.85rem;
  }

  .site-shell {
    width: min(100% - 1.25rem, var(--max));
  }

  .brand {
    width: 180px;
  }

  .nav-shell {
    min-height: 0;
    gap: 0.55rem;
    padding: 0.55rem 0;
  }

  .hero,
  .hero-content {
    min-height: 380px;
  }

  .home-page .hero,
  .home-page .hero-content {
    min-height: 320px;
  }

  .hero-content {
    gap: 0.75rem;
    padding-top: 1.5rem;
    padding-bottom: 1.75rem;
  }

  .hero-copy .eyebrow {
    margin-bottom: 0.45rem;
  }

  .hero-copy h1 {
    margin-bottom: 0.7rem;
  }

  .lede {
    margin-bottom: 0.9rem;
    font-size: 1rem;
    line-height: 1.45;
  }

  .hero-actions {
    gap: 0.55rem;
  }

  .button {
    min-height: 42px;
    padding: 0.65rem 0.85rem;
    font-size: 0.92rem;
  }

  .section {
    padding: 3.25rem 0;
  }

  .service-card {
    min-height: 0;
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-layout {
    flex-direction: column;
    justify-content: center;
    gap: 1.1rem;
    text-align: center;
  }

  .footer-layout nav {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
  }
}

@media (max-width: 420px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------------------------------------
   SilverStripe port additions: CMS-driven contact form + AJAX reveal modal.
   (The static mockups had no form, so these styles are theme-specific.)
--------------------------------------------------------------------------- */
.contact-layout:has(.contact-form) {
  align-items: start;
}

.contact-form {
  max-width: 660px;
}

.contact-form > p {
  color: var(--muted);
}

.contact-form form {
  margin-top: 1.4rem;
  padding: 1.85rem 1.7rem 1.6rem;
  border: 1px solid var(--line);
  border-top: 5px solid var(--navy);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.contact-form fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.contact-form .field {
  margin-bottom: 1.15rem;
}

.contact-form .field:last-child {
  margin-bottom: 0;
}

.contact-form label {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--navy);
  font-size: 0.95rem;
  font-weight: 700;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

.contact-form textarea {
  min-height: 150px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--oak);
  outline: none;
  box-shadow: 0 0 0 3px rgba(185, 130, 73, 0.22);
}

.contact-form small {
  display: block;
  margin-top: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.contact-form .field.error label,
.contact-form .field.error small {
  color: #b3261e;
}

.contact-form .field.error input,
.contact-form .field.error textarea {
  border-color: #b3261e;
}

.contact-form .alert-box {
  margin-bottom: 1.2rem;
  padding: 0.75rem 0.9rem;
  border-radius: 6px;
  background: rgba(185, 130, 73, 0.12);
  color: var(--navy);
}

.contact-form .alert-box.alert {
  background: rgba(179, 38, 30, 0.1);
  color: #b3261e;
}

.contact-form .Actions {
  margin-top: 1.35rem;
}

.contact-form input[type="submit"],
.contact-form button[type="submit"],
.contact-form .Actions .button {
  min-height: 48px;
  padding: 0.78rem 1.6rem;
  border: 0;
  border-radius: 6px;
  background: var(--oak);
  color: #111111;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: background 140ms ease;
}

.contact-form input[type="submit"]:hover,
.contact-form button[type="submit"]:hover,
.contact-form .Actions .button:hover {
  background: #a9743f;
}

.contact-form .print-only {
  display: none;
}

/* Testimonials page: masonry-style card grid */
.testimonials-section .section-heading {
  margin-bottom: 2.25rem;
}

.testimonials-section .section-heading p:not(.eyebrow) {
  color: var(--muted);
}

.testimonial-grid {
  columns: 2;
  column-gap: 1.5rem;
}

.testimonial-card {
  position: relative;
  break-inside: avoid;
  margin: 0 0 1.5rem;
  padding: 1.6rem 1.55rem 1.9rem;
  border: 1px solid var(--line);
  border-top: 5px solid var(--navy);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 24px rgba(23, 24, 25, 0.1);
  overflow: hidden;
}

.testimonial-card::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 115px;
  height: 110px;
  background: url("../images/box-corner.jpg") no-repeat left bottom / contain;
  pointer-events: none;
}

.testimonial-card blockquote,
.testimonial-card figcaption {
  position: relative;
  z-index: 1;
}

.testimonial-card blockquote {
  margin: 0;
  color: var(--ink);
  white-space: pre-line;
}

.testimonial-card blockquote::before {
  content: "\201C";
  display: block;
  margin-bottom: 0.2rem;
  color: var(--oak);
  font-family: Arapey, Georgia, "Times New Roman", serif;
  font-size: 2.6rem;
  font-style: italic;
  line-height: 0.5;
}

.testimonial-card figcaption {
  margin-top: 1.1rem;
  color: var(--oak);
  font-family: Arapey, Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-style: italic;
  text-align: right;
}

/* Foundation reveal modal used to show the AJAX submission response */
.reveal-modal {
  display: none;
  position: fixed;
  left: 50%;
  top: 12vh;
  z-index: 60;
  width: min(92vw, 520px);
  transform: translateX(-50%);
  padding: 2rem 1.75rem;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
  text-align: center;
}

.reveal-modal.open,
.reveal-modal[style*="display: block"] {
  display: block;
}

.reveal-modal .close-reveal-modal {
  position: absolute;
  top: 0.5rem;
  right: 0.85rem;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--muted);
  text-decoration: none;
}

.reveal-modal h2.complete {
  color: var(--navy);
}

.reveal-modal-bg {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(0, 0, 0, 0.7);
}

/* ---------------------------------------------------------------------------
   Interior page intro: prose + sticky highlights card, and scroll reveal.
--------------------------------------------------------------------------- */
.intro-section .split-layout {
  align-items: start;
}

.intro-section .feature-list,
.intro-section .intro-video-wrap {
  position: sticky;
  top: calc(var(--site-header-height) + 1.25rem);
}

.intro-video-wrap {
  width: 100%;
  padding: 6px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--navy);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.intro-video-wrap .intro-video {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  border-radius: 4px;
  background: #000000;
}

.story-section .intro-video-wrap {
  margin: 0 auto;
}

.story-section .split-layout {
  align-items: start;
}

@media (max-width: 900px) {
  .intro-section .feature-list,
  .intro-section .intro-video-wrap {
    position: static;
  }

  .intro-video-wrap {
    margin: 0 auto;
  }
}

/* Subtle scroll-reveal (progressive enhancement; classes added by JS) */
.js-reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}

.js-reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js-reveal,
  .js-reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------------------------------------------------------------------------
   Responsive embeds inside CMS content (e.g. YouTube videos) so fixed-width
   iframes can't overflow the page on mobile.
--------------------------------------------------------------------------- */
.story-copy iframe,
.story-copy embed,
.story-copy object,
.story-copy video,
.flex-video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  border: 0;
}
