:root {
  --white: #fbfbfa;
  --soft-grey: #efefec;
  --stone: #dfddd8;
  --charcoal: #1f2226;
  --charcoal-soft: #30343a;
  --muted: #5a6068;
  --line: #d7d4ce;
  --accent: #b19a82;
  --accent-dark: #866f57;
  --radius: 16px;
  --shadow: 0 16px 40px rgba(17, 20, 24, 0.12);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Work Sans", sans-serif;
  line-height: 1.65;
  color: var(--charcoal);
  background:
    radial-gradient(circle at 0% 0%, rgba(177, 154, 130, 0.1), transparent 35%),
    radial-gradient(circle at 100% 100%, rgba(40, 44, 49, 0.08), transparent 40%),
    var(--white);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  opacity: 0.22;
  background:
    repeating-linear-gradient(45deg, transparent 0 24px, rgba(0, 0, 0, 0.015) 24px 25px),
    repeating-linear-gradient(-45deg, transparent 0 30px, rgba(0, 0, 0, 0.015) 30px 31px);
}

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

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

h1,
h2,
h3 {
  margin: 0 0 0.9rem;
  line-height: 1.2;
  font-family: "Fraunces", serif;
  letter-spacing: 0.01em;
}

p {
  margin: 0 0 1rem;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.section {
  padding: clamp(3.2rem, 6vw, 6rem) 0;
}

.section-tight {
  padding: 1.25rem 0 0.75rem;
}

.section-head {
  max-width: 700px;
  margin-bottom: 2.1rem;
}

.alt-bg {
  background: linear-gradient(180deg, rgba(31, 34, 38, 0.03), rgba(31, 34, 38, 0.01));
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stone-accent {
  position: relative;
  isolation: isolate;
}

.stone-accent::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 30%, rgba(177, 154, 130, 0.18), transparent 40%),
    radial-gradient(circle at 80% 80%, rgba(43, 46, 51, 0.14), transparent 45%);
}

.eyebrow {
  margin-bottom: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.17em;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--accent-dark);
}

.lead {
  font-size: clamp(1.05rem, 2.3vw, 1.25rem);
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.78rem 1.24rem;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.25s ease, filter 0.25s ease, background-color 0.25s ease;
}

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.02);
}

.btn-primary {
  background: var(--charcoal);
  color: #fff;
}

.btn-primary:hover {
  background: #111316;
}

.btn-light {
  background: #fff;
  color: var(--charcoal);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(31, 34, 38, 0.12);
  background: rgba(251, 251, 250, 0.9);
  backdrop-filter: blur(10px);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 82px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  color: var(--charcoal);
}

.brand img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.main-nav > ul {
  display: flex;
  gap: 0.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
  align-items: center;
}

.main-nav > ul > li {
  position: relative;
}

.main-nav a {
  display: inline-block;
  padding: 0.42rem 0.76rem;
  border-radius: 999px;
  font-weight: 500;
}

.main-nav a:hover {
  background: rgba(31, 34, 38, 0.08);
}

.main-nav a.active {
  color: #fff;
  background: var(--charcoal);
}

.has-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  min-width: 250px;
  max-width: min(360px, calc(100vw - 2rem));
  padding: 0.5rem;
  border: 1px solid rgba(31, 34, 38, 0.12);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
  display: block;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 20;
}

.has-dropdown.open > .dropdown-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

@media (hover: hover) and (pointer: fine) {
  .has-dropdown:hover > .dropdown-menu,
  .has-dropdown:focus-within > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
  }
}

.dropdown-menu li {
  width: 100%;
}

.dropdown-menu a {
  width: 100%;
  border-radius: 8px;
}

.dropdown-toggle {
  display: none;
  border: 0;
  background: transparent;
  font-family: inherit;
  font-size: 0.82rem;
  color: var(--muted);
  cursor: pointer;
}

.menu-toggle {
  display: none;
  border: 1px solid rgba(31, 34, 38, 0.18);
  background: #fff;
  color: var(--charcoal);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.hero {
  position: relative;
  min-height: 78vh;
  display: grid;
  align-items: end;
  overflow: hidden;
  color: #fff;
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-image {
  background-image: url("https://photos.orsidicontracting.ca/mainwebsite/mainsite1.JPG");
  background-size: cover;
  background-position: center;
  transform: scale(1.08);
  animation: hero-pan 16s ease-in-out infinite alternate;
}

.hero-overlay {
  background:
    linear-gradient(110deg, rgba(8, 10, 13, 0.9), rgba(8, 10, 13, 0.45)),
    linear-gradient(0deg, rgba(8, 10, 13, 0.45), transparent 45%);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 740px;
  padding: 7rem 0 5.5rem;
}

.hero h1 {
  font-size: clamp(2.2rem, 5.8vw, 4rem);
  color: #fff;
  margin-bottom: 0.9rem;
}

.hero .lead {
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.5rem;
}

.hero .eyebrow {
  color: rgba(255, 255, 255, 0.88);
}

.page-hero {
  padding: 7.2rem 0 3.6rem;
  border-bottom: 1px solid var(--line);
}

.page-hero h1 {
  font-size: clamp(2rem, 5vw, 3.3rem);
  max-width: 18ch;
}

.page-hero .lead {
  max-width: 60ch;
}

.card-grid {
  display: grid;
  gap: 1.1rem;
}

.three-cols {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(31, 34, 38, 0.12);
  border-radius: var(--radius);
  padding: 1.4rem;
  box-shadow: 0 8px 22px rgba(20, 23, 28, 0.08);
}

.card h3 {
  margin-bottom: 0.65rem;
}

.card a {
  color: var(--accent-dark);
  font-weight: 600;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.1rem;
}

.project-card {
  background: rgba(255, 255, 255, 0.93);
  border: 1px solid rgba(31, 34, 38, 0.12);
  border-radius: var(--radius);
  overflow: hidden;
}

.project-card img {
  width: 100%;
  height: 270px;
  object-fit: cover;
}

.project-card div {
  padding: 1rem 1.2rem 1.2rem;
}

.testimonials blockquote {
  margin: 0;
  font-size: 1.03rem;
}

.testimonials cite {
  display: block;
  margin-top: 1rem;
  color: var(--muted);
  font-style: normal;
  font-weight: 600;
  font-size: 0.9rem;
}

.cta-banner {
  padding: 2.4rem 0;
  background:
    linear-gradient(100deg, rgba(21, 23, 26, 0.98), rgba(45, 49, 55, 0.92)),
    radial-gradient(circle at 80% 20%, rgba(177, 154, 130, 0.24), transparent 42%);
  color: #fff;
}

.cta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
}

.cta-row h2 {
  margin: 0;
  color: #fff;
  max-width: 24ch;
}

.cta-row .eyebrow {
  color: rgba(255, 255, 255, 0.75);
}

.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  align-items: start;
}

.image-panel {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(31, 34, 38, 0.12);
}

.image-panel img {
  width: 100%;
  height: 100%;
  min-height: 350px;
  object-fit: cover;
}

.stats-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat {
  border: 1px solid rgba(31, 34, 38, 0.12);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  padding: 1.5rem 1.2rem;
  text-align: center;
}

.stat-value {
  margin: 0 0 0.45rem;
  font-family: "Fraunces", serif;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  color: var(--charcoal-soft);
}

.feature-list {
  margin: 0;
  padding-left: 1.2rem;
}

.feature-list li + li {
  margin-top: 0.4rem;
}

.services-tabs {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.services-tabs a {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(31, 34, 38, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  padding: 0.5rem 0.92rem;
  font-size: 0.92rem;
  font-weight: 600;
}

.services-tabs a:hover {
  background: rgba(31, 34, 38, 0.08);
}

.services-section {
  scroll-margin-top: 110px;
}

.service-card {
  border: 1px solid rgba(31, 34, 38, 0.13);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 25px rgba(18, 20, 24, 0.08);
  padding: 1.5rem;
}

.service-list {
  margin: 0.8rem 0 0;
  padding-left: 1.2rem;
  columns: 2;
  column-gap: 2.2rem;
}

.service-list li {
  break-inside: avoid;
  margin-bottom: 0.52rem;
}

.gallery-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.gallery-toolbar h2 {
  margin-bottom: 0;
}

.gallery-search {
  display: grid;
  gap: 0.35rem;
  min-width: min(360px, 100%);
}

.gallery-search span {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.gallery-search input {
  width: 100%;
  border: 1px solid rgba(31, 34, 38, 0.22);
  border-radius: 999px;
  padding: 0.58rem 0.9rem;
  font: inherit;
  background: rgba(255, 255, 255, 0.94);
}

.filter-bar {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.6rem;
  margin-bottom: 0.8rem;
  overflow-x: auto;
  padding-bottom: 0.4rem;
  scrollbar-width: thin;
}

.filter-bar::-webkit-scrollbar {
  height: 8px;
}

.filter-bar::-webkit-scrollbar-thumb {
  background: rgba(31, 34, 38, 0.25);
  border-radius: 999px;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
  flex: 0 0 auto;
  border: 1px solid rgba(31, 34, 38, 0.18);
  background: rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--charcoal);
  color: #fff;
}

.filter-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(31, 34, 38, 0.08);
}

.filter-btn.active .filter-count,
.filter-btn:hover .filter-count {
  background: rgba(255, 255, 255, 0.2);
}

.gallery-results {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.gallery-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}

.gallery-item {
  margin: 0;
}

.gallery-trigger {
  width: 100%;
  border: 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  position: relative;
  padding: 0;
  cursor: pointer;
}

.gallery-trigger img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.gallery-trigger:hover img {
  transform: scale(1.04);
}

.gallery-trigger span {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.65rem 0.75rem;
  background: linear-gradient(180deg, transparent, rgba(20, 22, 25, 0.85));
  color: #fff;
  font-weight: 600;
  text-align: left;
}

.gallery-empty {
  margin: 1rem 0 0;
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid rgba(31, 34, 38, 0.14);
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
}

.gallery-actions {
  display: flex;
  justify-content: center;
  margin-top: 1.4rem;
}

.gallery-actions .btn {
  min-width: 220px;
}

.is-hidden {
  display: none !important;
}

.before-after {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(31, 34, 38, 0.15);
}

.before-after img {
  width: 100%;
  height: 520px;
  object-fit: cover;
}

.before-after .after {
  position: absolute;
  inset: 0;
  clip-path: inset(0 50% 0 0);
}

.before-after-label {
  position: absolute;
  top: 14px;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(14, 16, 20, 0.8);
  color: #fff;
  z-index: 2;
}

.before-label {
  left: 14px;
}

.after-label {
  right: 14px;
}

.before-after-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: rgba(255, 255, 255, 0.9);
  z-index: 2;
  pointer-events: none;
}

.before-after-handle::after {
  content: "< >";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  width: 44px;
  height: 44px;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  background: rgba(255, 255, 255, 0.9);
  color: #0c0f12;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.2);
}

.before-after-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  background: rgba(10, 12, 14, 0.9);
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  margin: 0;
  max-width: 980px;
}

.lightbox-content img {
  max-height: 80vh;
  border-radius: 12px;
}

.lightbox-content figcaption {
  margin-top: 0.65rem;
  color: #e7e7e5;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 20px;
  border: 0;
  border-radius: 999px;
  width: 40px;
  height: 40px;
  font-size: 1.9rem;
  line-height: 1;
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  cursor: pointer;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.1rem;
}

.contact-form {
  display: grid;
  gap: 0.58rem;
}

.contact-form label {
  font-weight: 600;
  font-size: 0.94rem;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(31, 34, 38, 0.25);
  border-radius: 10px;
  padding: 0.68rem 0.75rem;
  font: inherit;
  background: #fff;
}

.contact-form textarea {
  resize: vertical;
}

#contactStatus {
  margin: 0.2rem 0 0;
  min-height: 1.2rem;
  font-size: 0.92rem;
  color: #1f2226;
}

.contact-form button[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
}

.contact-details {
  display: grid;
  gap: 1rem;
}

.contact-details p {
  margin-bottom: 0.7rem;
}

.map-wrap iframe {
  width: 100%;
  height: 250px;
  border: 0;
  border-radius: 12px;
}

.site-footer {
  background: #15181c;
  color: rgba(255, 255, 255, 0.9);
  padding: 1rem 0;
}

.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-row p {
  margin: 0;
}

.footer-row a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes hero-pan {
  0% {
    transform: scale(1.06) translateX(0);
  }
  100% {
    transform: scale(1.12) translateX(-1.5%);
  }
}

@media (max-width: 980px) {
  .three-cols,
  .project-grid,
  .stats-grid,
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .split,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .gallery-toolbar {
    align-items: stretch;
  }

  .gallery-search {
    min-width: 0;
    width: 100%;
  }

  .service-list {
    columns: 1;
  }
}

@media (max-width: 1040px) {
  .menu-toggle {
    display: inline-flex;
  }

  .main-nav {
    position: absolute;
    top: 82px;
    left: 0;
    right: 0;
    display: none;
    border-bottom: 1px solid rgba(31, 34, 38, 0.12);
    background: rgba(251, 251, 250, 0.98);
    padding: 0.8rem 4%;
  }

  .main-nav.open {
    display: block;
  }

  .main-nav > ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
  }

  .main-nav a {
    width: 100%;
    border-radius: 10px;
  }

  .dropdown-toggle {
    display: inline-flex;
    margin: 0 0 0.4rem 0.6rem;
  }

  .dropdown-menu {
    position: static;
    display: none;
    border: 0;
    box-shadow: none;
    padding: 0.2rem 0 0.4rem 0.5rem;
    min-width: 0;
    max-width: none;
    background: transparent;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
  }

  .has-dropdown.open > .dropdown-menu {
    display: block;
  }

  .hero {
    min-height: 70vh;
  }

  .hero-content {
    padding-top: 6rem;
  }
}

@media (max-width: 640px) {
  .three-cols,
  .project-grid,
  .stats-grid,
  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .brand span {
    display: none;
  }

  .before-after img {
    height: 360px;
  }

  .cta-row {
    align-items: flex-start;
    flex-direction: column;
  }
}
