:root {
  --bg: #eee5d7;
  --surface: #f8f2e8;
  --card: #ffffff;
  --ink: #11100d;
  --muted: #6f6659;
  --line: #dacbb7;
  --accent: #d8bf96;
  --accent-dark: #0b0907;
  --beige: #d8bf96;
  --shadow: 0 18px 50px rgba(17, 16, 13, 0.18);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
}

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

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

button,
input,
select,
textarea {
  font: inherit;
}

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

/* Sticky navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(17, 16, 13, 0.08);
}

.nav {
  width: min(1180px, calc(100% - 32px));
  min-height: 112px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.brand-logo {
  width: clamp(172px, 20vw, 260px);
  height: 102px;
  object-fit: contain;
  object-position: left center;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: var(--beige);
  border-radius: 6px;
  font-size: 0.9rem;
}

.brand small {
  display: block;
  color: #dfcfb5;
  font-size: 0.75rem;
  font-weight: 600;
}

.nav-menu {
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
  font-weight: 700;
}

.nav-menu a {
  padding: 10px 2px;
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
  color: var(--beige);
}

.nav-cta {
  padding: 10px 18px !important;
  color: var(--ink);
  background: var(--beige);
  border-radius: var(--radius);
}

.has-dropdown {
  position: relative;
}

.dropdown {
  position: absolute;
  top: calc(100% + 14px);
  left: -18px;
  width: 240px;
  margin: 0;
  padding: 12px;
  list-style: none;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: 180ms ease;
}

.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown a {
  display: block;
  padding: 10px 12px;
  border-radius: 6px;
}

.dropdown a:hover,
.dropdown a:focus-visible {
  background: var(--surface);
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--beige);
  border-radius: var(--radius);
}

.nav-toggle span:not(.sr-only) {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
}

/* Full-width hero */
.hero {
  position: relative;
  min-height: calc(100vh - 112px);
  display: grid;
  align-items: center;
  overflow: hidden;
}

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

.hero img {
  object-fit: cover;
}

.hero-overlay {
  background: linear-gradient(90deg, rgba(17, 16, 13, 0.84), rgba(17, 16, 13, 0.56) 52%, rgba(17, 16, 13, 0.20));
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  color: #fff;
}

.hero-content h1 {
  max-width: 820px;
  margin: 10px 0 18px;
  font-size: clamp(3rem, 8vw, 6.9rem);
  line-height: 0.95;
  letter-spacing: 0;
}

.hero-content p:not(.eyebrow) {
  max-width: 620px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 1.15rem;
}

.hero-actions,
.portfolio-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 800;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, color 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  color: #fff;
  background: var(--ink);
}

.button.secondary {
  color: var(--ink);
  background: var(--beige);
}

.button.ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.08);
}

.eyebrow {
  margin: 0;
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

/* Shared page sections */
.section {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 88px 0;
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(220px, 0.85fr) minmax(0, 1.15fr);
  gap: 42px;
  align-items: start;
  margin-bottom: 36px;
}

.section-heading.compact,
.section-heading.centered {
  display: block;
  max-width: 760px;
}

.section-heading.centered {
  margin-inline: auto;
  text-align: center;
}

h2 {
  margin: 8px 0 0;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h3 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  line-height: 1.25;
}

.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 44px;
}

.about .section-heading {
  display: block;
  margin-bottom: 0;
}

.about-copy {
  color: var(--muted);
  font-size: 1.04rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 28px;
}

.stats span {
  padding: 16px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.stats strong {
  display: block;
  color: var(--ink);
  font-size: 1.6rem;
}

.services,
.blog {
  width: 100%;
  max-width: none;
  padding-inline: max(16px, calc((100% - 1180px) / 2));
  background: var(--ink);
  color: #fff;
}

.services .eyebrow,
.blog .eyebrow,
.services h2,
.blog h2 {
  color: #fff;
}

.service-grid,
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.blog-grid article {
  padding: 24px;
  color: #fff;
  background: #17130f;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
}

.blog-grid p {
  margin-bottom: 0;
  color: #dfcfb5;
}

.service-tile {
  position: relative;
  display: block;
  min-height: 265px;
  overflow: hidden;
  color: #fff;
  background: #17130f;
  border-radius: var(--radius);
  isolation: isolate;
}

.service-tile img {
  width: 100%;
  height: 100%;
  min-height: 265px;
  object-fit: cover;
  filter: saturate(0.9) brightness(0.82);
  transform: scale(1.01);
  transition: transform 260ms ease, filter 260ms ease;
}

.service-tile::before,
.service-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  transition: opacity 220ms ease;
}

.service-tile::before {
  background: linear-gradient(180deg, rgba(17, 16, 13, 0.10), rgba(17, 16, 13, 0.72));
}

.service-tile::after {
  background: rgba(216, 191, 150, 0.76);
  opacity: 0;
}

.service-tile span {
  position: absolute;
  right: 58px;
  bottom: 22px;
  left: 22px;
  z-index: 2;
  max-width: min(21ch, calc(100% - 90px));
  color: #fff;
  font-size: clamp(1.05rem, 1.75vw, 1.55rem);
  font-weight: 800;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.service-tile span::after {
  content: "";
  position: absolute;
  right: -34px;
  bottom: 0.16em;
  width: 18px;
  height: 18px;
  border-top: 2px solid #fff;
  border-right: 2px solid #fff;
  transform: rotate(45deg);
}

.service-tile:hover img,
.service-tile:focus-visible img {
  filter: saturate(0.7) sepia(0.28) brightness(0.95);
  transform: scale(1.06);
}

.service-tile:hover::after,
.service-tile:focus-visible::after {
  opacity: 0.86;
}

/* Rendering feature section */
.rendering-feature {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.2fr);
  gap: 52px;
  align-items: center;
  width: 100%;
  max-width: none;
  padding-inline: max(16px, calc((100% - 1180px) / 2));
  color: #fff;
  background: #0b0907;
}

.rendering-copy {
  max-width: 520px;
}

.rendering-copy .eyebrow {
  color: var(--beige);
}

.rendering-copy h2 {
  color: #fff;
}

.rendering-copy p {
  color: #dfcfb5;
}

.rendering-copy .button.primary {
  margin-top: 18px;
  color: var(--ink);
  background: var(--beige);
}

.rendering-stack {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.rendering-stack img {
  display: block;
  width: 100%;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
}

.rendering-stack .render-main {
  height: clamp(260px, 30vw, 390px);
  object-fit: contain;
  background: #17130f;
}

.render-float {
  height: clamp(220px, 24vw, 320px);
}

/* Portfolio tabs and responsive image grid */
.portfolio-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
}

.tab {
  padding: 10px 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 800;
}

.tab.active {
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

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

.project-card {
  position: relative;
  min-height: 260px;
  padding: 0;
  overflow: hidden;
  color: #fff;
  background: var(--ink);
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(26, 39, 40, 0.12);
}

.project-card[hidden] {
  display: none;
}

.project-card img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 240ms ease;
}

.project-card::after {
  content: "";
  position: absolute;
  inset: 42% 0 0;
  background: linear-gradient(rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.66));
}

.project-card span {
  position: absolute;
  right: 18px;
  bottom: 16px;
  left: 18px;
  z-index: 1;
  text-align: left;
  font-weight: 800;
}

.project-card:hover img,
.project-card:focus-visible img {
  transform: scale(1.05);
}

.portfolio-cta {
  justify-content: center;
}

.before-after-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 34px;
}

.before-after-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(26, 39, 40, 0.12);
}

.ba-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.ba-images figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  background: var(--ink);
}

.ba-images img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.ba-images figcaption {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 6px 10px;
  color: #fff;
  background: rgba(17, 16, 13, 0.78);
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.before-after-card h3 {
  margin: 20px 20px 8px;
}

.before-after-card p {
  margin: 0 20px 22px;
  color: var(--muted);
}

/* Trex-style comparison area */
.comparison {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 48px;
  align-items: center;
  width: min(1180px, calc(100% - 32px));
  padding: 52px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.compare-slider {
  position: relative;
  --compare-position: 50%;
  --before-mask: inset(0 50% 0 0);
  min-height: 430px;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  touch-action: none;
  user-select: none;
}

.compare-image,
.compare-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.compare-image.reveal {
  width: 100%;
  overflow: hidden;
  clip-path: inset(0 0 0 50%);
  z-index: 2;
}

.compare-slider::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--compare-position);
  width: 3px;
  background: #fff;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 3;
}

.compare-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 54px;
  height: 54px;
  padding: 0;
  background: var(--surface);
  border: 0;
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  transform: translate(-50%, -50%);
  cursor: ew-resize;
  z-index: 4;
}

.compare-handle span::before,
.compare-handle span::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 9px;
  height: 9px;
  border-top: 2px solid var(--ink);
  border-left: 2px solid var(--ink);
}

.compare-handle span::before {
  left: 16px;
  transform: translateY(-50%) rotate(-45deg);
}

.compare-handle span::after {
  right: 16px;
  transform: translateY(-50%) rotate(135deg);
}

.comparison-copy {
  max-width: 560px;
}

.comparison-copy p {
  color: var(--muted);
}

.benefit-list {
  display: grid;
  gap: 12px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.benefit-list li {
  position: relative;
  padding-left: 32px;
  color: var(--ink);
  font-weight: 700;
}

.benefit-list li::before {
  content: "";
  position: absolute;
  top: 0.45em;
  left: 0;
  width: 14px;
  height: 14px;
  background: var(--ink);
  border-radius: 50%;
  box-shadow: inset 0 0 0 4px var(--beige);
}

.blog-grid {
  grid-template-columns: repeat(3, 1fr);
}

.blog-grid span {
  display: block;
  margin-bottom: 14px;
  color: var(--beige);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.8fr);
  gap: 48px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto 88px;
  padding: 48px;
  color: #fff;
  background: var(--ink);
  border-radius: var(--radius);
}

.contact .eyebrow,
.contact p {
  color: #dfcfb5;
}

.contact-form {
  display: grid;
  gap: 14px;
}

.contact-form label {
  display: grid;
  gap: 6px;
  color: #f8f3ea;
  font-weight: 700;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  color: var(--ink);
  background: #fff;
  border: 1px solid transparent;
  border-radius: 6px;
}


.form-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  min-height: 1.4em;
  margin: 0;
  color: #dfcfb5;
  font-weight: 800;
}

.form-status.success {
  color: #ffffff;
}

.form-status.error {
  color: #f2b8a8;
}

.contact-form button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 34px max(16px, calc((100% - 1180px) / 2));
  color: #f8f3ea;
  background: #0b0907;
}

.footer-brand {
  display: grid;
  gap: 4px;
}

.membership-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.membership-logos span {
  display: grid;
  place-items: center;
  min-height: 42px;
  padding: 8px 12px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

/* Portfolio lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 72px 80px;
  background: rgba(5, 10, 11, 0.88);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox figure {
  width: min(980px, 100%);
  margin: 0;
  color: #fff;
}

.lightbox img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.lightbox figcaption {
  margin-top: 16px;
  text-align: center;
  font-weight: 700;
}

.lightbox-close,
.lightbox-arrow {
  position: absolute;
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  cursor: pointer;
}

.lightbox-close {
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  font-size: 2rem;
  line-height: 1;
}

.lightbox-arrow {
  top: 50%;
  width: 50px;
  height: 64px;
  font-size: 3rem;
  transform: translateY(-50%);
}

.lightbox-arrow.prev {
  left: 20px;
}

.lightbox-arrow.next {
  right: 20px;
}

@media (max-width: 980px) {
  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: absolute;
    top: 112px;
    right: 16px;
    left: 16px;
    display: none;
    align-items: stretch;
    padding: 14px;
    color: var(--ink);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
  }

  .nav-menu.open {
    display: grid;
    gap: 4px;
  }

  .nav-menu a {
    display: block;
    padding: 12px;
  }

  .dropdown {
    position: static;
    width: auto;
    padding: 2px 0 0 14px;
    border: 0;
    box-shadow: none;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .about,
  .rendering-feature,
  .comparison,
  .contact {
    grid-template-columns: 1fr;
  }

  .render-main {
    height: clamp(320px, 54vw, 500px);
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 14px;
  }

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

  .contact {
    padding: 32px;
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: 720px;
  }

  .hero-overlay {
    background: rgba(10, 18, 19, 0.62);
  }

  .hero-content h1 {
    font-size: 3rem;
  }

  .section {
    padding: 64px 0;
  }

  .stats,
  .service-grid,
  .portfolio-grid,
  .before-after-grid,
  .blog-grid {
    grid-template-columns: 1fr;
  }

  .rendering-stack {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .rendering-stack .render-main,
  .render-float {
    height: 260px;
  }

  .rendering-stack .render-main {
    height: 300px;
  }

  .render-float {
    grid-column: 1 / -1;
  }

  .compare-slider {
    min-height: 340px;
  }

  .contact {
    width: calc(100% - 32px);
    margin-bottom: 64px;
    padding: 24px;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .lightbox {
    padding: 72px 16px;
  }

  .lightbox-arrow {
    top: auto;
    bottom: 20px;
    transform: none;
  }
}
