:root {
  --charcoal: #1f1f1c;
  --charcoal-deep: #121210;
  --rust: #9a5134;
  --rust-dark: #6f3424;
  --moss: #566348;
  --moss-dark: #333c2d;
  --tan: #c3aa7b;
  --paper: #ded0aa;
  --paper-dark: #b79d6d;
  --ink: #171713;
  --soft: #f2e5c5;
  --shadow: rgba(0, 0, 0, 0.45);
  --hero-padding: clamp(7rem, 9vw, 11rem);
  --section-padding: clamp(4.5rem, 8vw, 7rem);
  --max-width: 1180px;
  --transition: 220ms ease;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  font-family: "Special Elite", Georgia, serif;
  color: var(--soft);
  background:
    radial-gradient(circle at 10% 20%, rgba(154, 81, 52, 0.17), transparent 30%),
    radial-gradient(circle at 80% 10%, rgba(86, 99, 72, 0.18), transparent 32%),
    linear-gradient(135deg, var(--charcoal-deep), var(--charcoal));
  line-height: 1.65;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 20;
  opacity: 1;.18;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    radial-gradient(circle, rgba(255, 255, 255, 0.12) 1px, transparent 1px);
  background-size: 44px 44px, 44px 44px, 7px 7px;
  mix-blend-mode: overlay;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

p {
  margin: 0;
}

ul {
  margin: 1rem 0 0;
  padding-left: 1.2rem;
}

li + li {
  margin-top: 0.45rem;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  background:
    linear-gradient(90deg, rgba(18, 18, 16, 0.94), rgba(31, 31, 28, 0.88)),
    repeating-linear-gradient(45deg, transparent 0 12px, rgba(195, 170, 123, 0.04) 12px 14px);
  border-bottom: 2px solid rgba(195, 170, 123, 0.18);
  box-shadow: 0 18px 40px var(--shadow);
  backdrop-filter: blur(10px);
}

.brand-mark {
  max-width: 300px;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(1rem, 2.4vw, 1.35rem);
  letter-spacing: 0.09em;
  line-height: 1;
  color: var(--tan);
  text-decoration: none;
  text-transform: uppercase;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  font-family: "Bebas Neue", Impact, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-nav a {
  position: relative;
  padding: 0.4rem 0.15rem;
  color: var(--soft);
  text-decoration: none;
  font-size: 1.05rem;
}

.site-nav a::after,
.text-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0.1rem;
  width: 100%;
  height: 2px;
  background: var(--rust);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition);
}

.site-nav a:hover::after,
.site-nav a:focus-visible::after,
.text-link:hover::after,
.text-link:focus-visible::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  border: 2px solid var(--tan);
  padding: 0.55rem 0.8rem;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: var(--tan);
  background: var(--charcoal);
  cursor: pointer;
}

.hero-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  min-height: 100vh;
  padding: var(--hero-padding) clamp(1rem, 5vw, 4rem) clamp(4rem, 8vw, 7rem);
  background:
    linear-gradient(120deg, rgba(31, 31, 28, 0.96), rgba(18, 18, 16, 0.9)),
    radial-gradient(circle at 20% 30%, rgba(154, 81, 52, 0.3), transparent 34%);
}

.hero-copy,
.section-copy,
.connect-card {
  position: relative;
  z-index: 1;
}

.eyebrow {
  margin-bottom: 0.85rem;
  font-family: "Rock Salt", cursive;
  font-size: clamp(0.78rem, 1.5vw, 0.98rem);
  color: var(--tan);
}

h1,
h2,
h3,
.section-title,
.card-title,
.dept-title {
  margin: 0;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-weight: 400;
  letter-spacing: 0.055em;
  line-height: 0.95;
  text-transform: uppercase;
}

h1 {
  max-width: 820px;
  margin-bottom: 1.3rem;
  font-size: clamp(3.3rem, 8vw, 7.8rem);
  color: var(--paper);
  text-shadow: 5px 5px 0 rgba(154, 81, 52, 0.34);
}

h2,
.section-title {
  margin-bottom: 1.3rem;
  font-size: clamp(2.5rem, 5vw, 5rem);
  color: var(--tan);
  text-shadow: 3px 3px 0 rgba(31, 31, 28, 0.6);
}

h3,
.card-title,
.dept-title {
  margin-bottom: 0.7rem;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  color: var(--paper);
}

.hero-copy p:not(.eyebrow) + p,
.section-copy p:not(.eyebrow) + p,
.connect-card p:not(.eyebrow):not(.section-title) + p {
  margin-top: 1rem;
}

.hero-links,
.connect-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.7rem;
}

.text-link {
  position: relative;
  display: inline-flex;
  padding: 0.75rem 0;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1.25rem;
  letter-spacing: 0.08em;
  color: var(--tan);
  text-decoration: none;
  text-transform: uppercase;
}

.text-link.muted {
  color: var(--paper);
}

.hero-media,
.about-image,
.team-photo {
  position: relative;
  margin: 0;
  border: 4px solid rgba(195, 170, 123, 0.35);
  background: var(--rust-dark);
  box-shadow: 18px 18px 0 rgba(86, 99, 72, 0.35), 0 24px 60px var(--shadow);
  transform: rotate(1deg);
}

.hero-media::before,
.about-image::before,
.team-photo::before {
  content: "";
  position: absolute;
  inset: -14px;
  z-index: -1;
  background: rgba(195, 170, 123, 0.13);
  clip-path: polygon(0 4%, 94% 0, 100% 88%, 6% 100%);
}

.hero-media img,
.about-image img,
.team-photo img {
  width: 100%;
  min-height: 420px;
  object-fit: cover;
  filter: sepia(0.28) contrast(1.08) saturate(0.72);
  mix-blend-mode: luminosity;
}

.hero-media figcaption {
  padding: 0.85rem 1rem;
  color: var(--paper);
  background: rgba(18, 18, 16, 0.82);
  font-size: 0.92rem;
}

.paper-section {
  position: relative;
  padding: var(--section-padding) clamp(1rem, 5vw, 4rem);
  color: var(--ink);
  background:
    linear-gradient(rgba(222, 208, 170, 0.92), rgba(195, 170, 123, 0.92)),
    repeating-linear-gradient(0deg, rgba(31, 31, 28, 0.04) 0 2px, transparent 2px 9px);
}

.paper-section h2,
.paper-section .section-title,
.paper-section h3,
.paper-section .card-title,
.paper-section .dept-title {
  color: var(--rust-dark);
  text-shadow: 2px 2px 0 rgba(255, 255, 255, 0.25);
}

.paper-section .eyebrow {
  color: var(--moss-dark);
}

.about-section {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}

.section-copy {
  max-width: 820px;
}

.centered {
  max-width: 900px;
  margin-inline: auto;
  text-align: center;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.stat-stack {
  display: grid;
  grid-template-columns: 0.22fr 1fr;
  gap: 0.35rem 1rem;
  align-items: start;
  padding: 1.4rem;
  border: 2px solid rgba(31, 31, 28, 0.32);
  background:
    linear-gradient(135deg, rgba(86, 99, 72, 0.22), rgba(154, 81, 52, 0.15)),
    rgba(255, 255, 255, 0.12);
}

.stat-number {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 3rem;
  line-height: 1;
  color: var(--rust-dark);
}

.stat-label {
  padding-top: 0.25rem;
}

.services-section,
.case-section,
.team-section,
.faq-section {
  position: relative;
  padding: var(--section-padding) clamp(1rem, 5vw, 4rem);
  background:
    radial-gradient(circle at 85% 15%, rgba(154, 81, 52, 0.22), transparent 28%),
    radial-gradient(circle at 12% 80%, rgba(86, 99, 72, 0.23), transparent 30%),
    linear-gradient(135deg, var(--charcoal), var(--charcoal-deep));
}

.torn-top {
  clip-path: polygon(0 2.2rem, 7% 0.9rem, 17% 2rem, 29% 0.5rem, 41% 2rem, 56% 0.8rem, 69% 2rem, 82% 0.5rem, 100% 1.8rem, 100% 100%, 0 100%);
}

.torn-bottom {
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 2rem), 88% calc(100% - 0.5rem), 73% calc(100% - 1.8rem), 58% calc(100% - 0.7rem), 41% calc(100% - 2rem), 25% calc(100% - 0.7rem), 9% calc(100% - 1.8rem), 0 calc(100% - 0.6rem));
}

.tabbed-services {
  max-width: 980px;
  margin: 2.4rem auto 0;
  border: 3px solid rgba(195, 170, 123, 0.28);
  background:
    linear-gradient(135deg, rgba(18, 18, 16, 0.88), rgba(31, 31, 28, 0.9)),
    repeating-linear-gradient(45deg, rgba(195, 170, 123, 0.04) 0 7px, transparent 7px 14px);
  box-shadow: 0 22px 50px var(--shadow);
}

.tab-buttons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 3px solid rgba(195, 170, 123, 0.24);
}

.tab-button {
  min-height: 62px;
  border: 0;
  border-right: 2px solid rgba(195, 170, 123, 0.22);
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1.4rem;
  letter-spacing: 0.08em;
  color: var(--paper);
  background: rgba(86, 99, 72, 0.18);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.tab-button:last-child {
  border-right: 0;
}

.tab-button.active,
.tab-button:hover,
.tab-button:focus-visible {
  color: var(--charcoal-deep);
  background: var(--tan);
}

.tab-pane {
  display: none;
  padding: clamp(1.4rem, 4vw, 2.4rem);
}

.tab-pane.active {
  display: block;
  animation: grainFade 420ms ease both;
}

.process-section {
  padding: var(--section-padding) clamp(1rem, 5vw, 4rem);
}

.benefit-grid,
.quote-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  max-width: var(--max-width);
  margin: 2.3rem auto 0;
}

.benefit-card,
.quote-card {
  padding: 1.5rem;
  border: 2px solid rgba(31, 31, 28, 0.28);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.12), rgba(86, 99, 72, 0.14)),
    rgba(195, 170, 123, 0.16);
  box-shadow: 10px 10px 0 rgba(31, 31, 28, 0.12);
}

.benefit-card:nth-child(2),
.quote-card.featured {
  background:
    linear-gradient(135deg, rgba(154, 81, 52, 0.2), rgba(255, 255, 255, 0.12)),
    rgba(195, 170, 123, 0.18);
}

.masonry-grid {
  columns: 3 300px;
  column-gap: 1.2rem;
  max-width: var(--max-width);
  margin: 2.4rem auto 0;
}

.case-card {
  display: inline-block;
  width: 100%;
  margin: 0 0 1.2rem;
  overflow: hidden;
  border: 3px solid rgba(195, 170, 123, 0.28);
  background: rgba(18, 18, 16, 0.85);
  box-shadow: 0 18px 40px var(--shadow);
  break-inside: avoid;
}

.case-card img {
  width: 100%;
  object-fit: cover;
  filter: sepia(0.35) saturate(0.76) contrast(1.08);
}

.case-card.tall img {
  min-height: 420px;
}

.case-card.medium img {
  min-height: 330px;
}

.case-content {
  padding: 1.3rem;
}

.gallery-section {
  overflow: hidden;
}

.slideshow {
  position: relative;
  max-width: var(--max-width);
  min-height: 440px;
  margin: 2.5rem auto 0;
  overflow: hidden;
  border: 4px solid rgba(31, 31, 28, 0.34);
  box-shadow: 18px 18px 0 rgba(154, 81, 52, 0.18), 0 24px 60px rgba(0, 0, 0, 0.3);
  background: var(--charcoal);
}

.slide {
  display: none;
  min-height: 440px;
}

.slide.active {
  display: block;
  animation: noiseReveal 680ms ease both;
}

.slide img {
  width: 100%;
  height: 520px;
  object-fit: cover;
  filter: sepia(0.32) contrast(1.05) saturate(0.7);
}

.slide-control {
  position: absolute;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  border: 2px solid var(--tan);
  padding: 0.7rem 0.9rem;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1rem;
  letter-spacing: 0.08em;
  color: var(--paper);
  background: rgba(18, 18, 16, 0.78);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.slide-control:hover,
.slide-control:focus-visible {
  color: var(--charcoal);
  background: var(--tan);
}

.prev-slide {
  left: 0;
}

.next-slide {
  right: 0;
}

.slide-dots {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  display: flex;
  gap: 0.65rem;
  transform: translateX(-50%);
}

.dot {
  width: 2rem;
  height: 0.35rem;
  border: 1px solid var(--tan);
  background: rgba(18, 18, 16, 0.75);
  cursor: pointer;
}

.dot.active {
  background: var(--rust);
}

.team-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: stretch;
  max-width: var(--max-width);
  margin: 2.5rem auto 0;
}

.department-stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.department-panel {
  padding: 1.35rem;
  border: 2px solid rgba(195, 170, 123, 0.25);
  background:
    linear-gradient(135deg, rgba(86, 99, 72, 0.2), rgba(154, 81, 52, 0.12)),
    rgba(18, 18, 16, 0.72);
}

.quote-card {
  margin: 0;
  color: var(--ink);
}

.quote-card p {
  font-size: clamp(1.08rem, 2vw, 1.45rem);
  line-height: 1.45;
}

.quote-card footer {
  margin-top: 1rem;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  color: var(--rust-dark);
}

.chat-faq {
  max-width: 900px;
  margin: 2.4rem auto 0;
}

.faq-item {
  margin-bottom: 1rem;
}

.faq-question {
  width: 100%;
  border: 2px solid rgba(195, 170, 123, 0.32);
  padding: 1.1rem 1.25rem;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: clamp(1.2rem, 2.6vw, 1.65rem);
  letter-spacing: 0.06em;
  text-align: left;
  color: var(--paper);
  background:
    linear-gradient(135deg, rgba(86, 99, 72, 0.42), rgba(31, 31, 28, 0.88));
  cursor: pointer;
}

.faq-question:hover,
.faq-question:focus-visible,
.faq-question[aria-expanded="true"] {
  color: var(--charcoal);
  background: var(--tan);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 1.25rem;
  border-left: 2px solid rgba(195, 170, 123, 0.25);
  border-right: 2px solid rgba(195, 170, 123, 0.25);
  border-bottom: 2px solid rgba(195, 170, 123, 0.25);
  background: rgba(18, 18, 16, 0.72);
  transition: max-height 260ms ease, padding 260ms ease;
}

.faq-answer.open {
  max-height: 260px;
  padding: 1rem 1.25rem 1.2rem;
}

.connect-section {
  display: flex;
  justify-content: center;
  align-items: center;
}

.connect-card {
  width: min(920px, 100%);
  margin-inline: auto;
  padding: clamp(1.5rem, 5vw, 3rem);
  text-align: center;
  border: 3px solid rgba(31, 31, 28, 0.34);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(86, 99, 72, 0.12)),
    rgba(222, 208, 170, 0.58);
  box-shadow: 15px 15px 0 rgba(31, 31, 28, 0.13);
}

.paper-form {
  display: grid;
  gap: 0.85rem;
  width: min(720px, 100%);
  margin: 2rem auto 0;
  text-align: left;
}

.field-line {
  display: grid;
  grid-template-columns: 0.34fr 1fr;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 2px dashed rgba(31, 31, 28, 0.35);
  background: rgba(255, 255, 255, 0.12);
}

.field-line span {
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
  color: var(--rust-dark);
  text-transform: uppercase;
}

.site-footer {
  padding: 2rem clamp(1rem, 5vw, 4rem);
  text-align: center;
  color: var(--paper);
  background:
    linear-gradient(135deg, var(--charcoal-deep), var(--charcoal)),
    repeating-linear-gradient(45deg, rgba(195, 170, 123, 0.05) 0 10px, transparent 10px 20px);
  border-top: 2px solid rgba(195, 170, 123, 0.2);
}

.site-footer p:first-child {
  margin-bottom: 0.4rem;
  font-family: "Bebas Neue", Impact, sans-serif;
  font-size: 1.4rem;
  letter-spacing: 0.08em;
  color: var(--tan);
  text-transform: uppercase;
}

@keyframes grainFade {
  from {
    opacity: 1;
    transform: translateY(10px) scale(0.98);
    filter: contrast(1.35);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: contrast(1);
  }
}

@keyframes noiseReveal {
  from {
    opacity: 1;.25;
    transform: scale(1.03);
    filter: sepia(0.55) contrast(1.35);
  }

  to {
    opacity: 1;
    transform: scale(1);
    filter: sepia(0.32) contrast(1.05) saturate(0.7);
  }
}

@media (max-width: 980px) {
  .menu-toggle {
    display: inline-flex;
  }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 1rem;
    right: 1rem;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    background: rgba(18, 18, 16, 0.97);
    border: 2px solid rgba(195, 170, 123, 0.24);
  }

  .site-nav.open {
    display: flex;
  }

  .hero-section,
  .about-section,
  .team-layout {
    grid-template-columns: 1fr;
  }

  .hero-media,
  .about-image,
  .team-photo {
    transform: none;
  }

  .benefit-grid,
  .quote-grid {
    grid-template-columns: 1fr;
  }

  .masonry-grid {
    columns: 1;
  }
}

@media (max-width: 700px) {
  :root {
    --hero-padding: 7.5rem;
  }

  .site-header {
    align-items: flex-start;
  }

  .brand-mark {
    max-width: 210px;
  }

  .tab-buttons {
    grid-template-columns: 1fr;
  }

  .tab-button {
    border-right: 0;
    border-bottom: 2px solid rgba(195, 170, 123, 0.22);
  }

  .tab-button:last-child {
    border-bottom: 0;
  }

  .field-line {
    grid-template-columns: 1fr;
  }

  .slide,
  .slideshow {
    min-height: 320px;
  }

  .slide img {
    height: 360px;
  }

  .slide-control {
    top: auto;
    bottom: 3.1rem;
    transform: none;
  }

  .hero-links,
  .connect-links {
    justify-content: center;
  }
}

/* Visible state helpers */
+ .animate-fade-in-up.visible,
+ .animate-fade-in-left.visible,
+ .animate-fade-in-right.visible,
+ .animate-bounce-y.visible,
+ .section-scroll-animate.visible,
+ .text-animate-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Universal Icon Fixes for Buttons */
button svg, .carousel-next svg, .carousel-prev svg, .slider-next svg, .slider-prev svg,
.next svg, .prev svg, .tab-button svg, .tab-btn svg {
    display: inline-block;
    vertical-align: middle;
    pointer-events: none;
    width: 1em;
    height: 1em;
    fill: currentColor;
}

button i, .carousel-next i, .carousel-prev i, .slider-next i, .slider-prev i,
.next i, .prev i, .tab-button i, .tab-btn i {
    display: inline-block;
    vertical-align: middle;
    pointer-events: none;
    font-style: normal;
}

button .icon, .carousel-next .icon, .carousel-prev .icon,
.slider-next .icon, .slider-prev .icon, .tab-button .icon {
    display: inline-block;
    vertical-align: middle;
    pointer-events: none;
}

/* Ensure carousel buttons are clickable even with icons */
.carousel-next, .carousel-prev, .slider-next, .slider-prev,
.next, .prev, .next-btn, .prev-btn {
    cursor: pointer;
    position: relative;
}

.carousel-next *, .carousel-prev *, .slider-next *, .slider-prev *,
.next *, .prev *, .next-btn *, .prev-btn * {
    pointer-events: none;
}

/* Tab button icon fixes */
.tab-button, .tab-btn, .tab {
    cursor: pointer;
    position: relative;
}

.tab-button *, .tab-btn *, .tab * {
    pointer-events: none;
}

/* Ensure icons don't block clicks */
button > svg, button > i, button > .icon,
.carousel-next > svg, .carousel-prev > svg,
.tab-button > svg, .tab-button > i {
    pointer-events: none !important;
}

/* Enhanced: Missing animation classes from JS */
.reveal-on-scroll {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.reveal-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}
.scroll-progress {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.scroll-progress.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Safe visibility overrides (auto-added) */
:root, html, body, main, header, footer, section, .container, .content {
  opacity: 1 !important;
  visibility: visible !important;
}
