:root {
  --ink: #16211d;
  --muted: #65726d;
  --line: #dce4df;
  --paper: #fbfcf8;
  --white: #ffffff;
  --stone: #e8e3d8;
  --sage: #8da394;
  --moss: #3e6757;
  --clay: #b76042;
  --steel: #486575;
  --gold: #c79a45;
  --shadow: 0 18px 50px rgba(31, 42, 37, 0.12);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body.nav-open {
  overflow: hidden;
}

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

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

button {
  cursor: pointer;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 76px;
  padding: 14px clamp(18px, 4vw, 56px);
  background: rgba(251, 252, 248, 0.92);
  border-bottom: 1px solid rgba(220, 228, 223, 0.8);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: max-content;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--white);
  background: linear-gradient(135deg, var(--moss), var(--steel));
  border-radius: 8px;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  margin-left: auto;
  color: var(--muted);
  font-size: 14px;
}

.site-nav a:hover {
  color: var(--moss);
}

.header-actions,
.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.solid-btn,
.ghost-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 750;
  white-space: nowrap;
}

.solid-btn {
  color: var(--white);
  background: var(--moss);
  box-shadow: 0 10px 25px rgba(62, 103, 87, 0.18);
}

.solid-btn:hover {
  background: #315848;
}

.ghost-btn {
  color: var(--ink);
  background: var(--white);
  border-color: var(--line);
}

.ghost-btn:hover {
  border-color: var(--sage);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(360px, 1.08fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  min-height: calc(100vh - 76px);
  padding: clamp(42px, 6vw, 80px) clamp(18px, 5vw, 72px) 34px;
  overflow: hidden;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--clay);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 740px;
  margin: 0;
  font-size: clamp(42px, 6.5vw, 82px);
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-text {
  max-width: 640px;
  margin: 24px 0;
  color: var(--muted);
  font-size: clamp(16px, 1.7vw, 19px);
}

.hero-stats {
  grid-column: 1;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 560px;
  margin: -118px 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.hero-stats div {
  padding: 18px 18px 18px 0;
}

.hero-stats dt {
  font-size: 32px;
  font-weight: 850;
}

.hero-stats dd {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.hero-visual {
  position: relative;
  min-height: 420px;
}

.hero-visual img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.layer-tag {
  position: absolute;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 7px 10px;
  color: var(--white);
  background: rgba(22, 33, 29, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  animation: floatTag 5.5s ease-in-out infinite;
}

.tag-facade {
  top: 14%;
  right: 12%;
}

.tag-window {
  top: 35%;
  right: 4%;
  animation-delay: -1s;
}

.tag-interior {
  left: 8%;
  bottom: 24%;
  animation-delay: -2s;
}

.tag-mep {
  right: 17%;
  bottom: 13%;
  animation-delay: -3s;
}

.tag-structure {
  left: 18%;
  top: 16%;
  animation-delay: -4s;
}

@keyframes floatTag {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-9px);
  }
}

.section {
  padding: clamp(54px, 8vw, 96px) clamp(18px, 5vw, 72px);
}

.section-heading {
  max-width: 820px;
  margin-bottom: 28px;
}

.section-heading.compact {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  max-width: none;
}

.section-heading h2,
.sample-copy h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: 0;
}

.section-heading p:not(.eyebrow),
.sample-copy p {
  max-width: 660px;
  color: var(--muted);
}

.anatomy-section {
  background: var(--white);
}

.anatomy-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.95fr) minmax(280px, 1.05fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}

.house-stack {
  position: relative;
  height: 430px;
  perspective: 1000px;
}

.stack-layer {
  position: absolute;
  left: 8%;
  right: 8%;
  height: 72px;
  display: flex;
  align-items: center;
  padding: 0 22px;
  color: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 18px 45px rgba(22, 33, 29, 0.16);
  transform: rotateX(58deg) rotateZ(-8deg);
  animation: separateLayer 4.5s ease-in-out infinite alternate;
}

.stack-layer span {
  font-weight: 850;
}

.layer-structure {
  bottom: 24px;
  background: var(--steel);
}

.layer-mep {
  bottom: 78px;
  background: #6f8fa3;
  animation-delay: 0.12s;
}

.layer-interior {
  bottom: 132px;
  background: var(--sage);
  animation-delay: 0.24s;
}

.layer-furniture {
  bottom: 186px;
  background: var(--gold);
  animation-delay: 0.36s;
}

.layer-doors {
  bottom: 240px;
  background: var(--clay);
  animation-delay: 0.48s;
}

.layer-facade {
  bottom: 294px;
  background: var(--moss);
  animation-delay: 0.6s;
}

@keyframes separateLayer {
  from {
    translate: 0 0;
  }
  to {
    translate: 36px -12px;
  }
}

.anatomy-steps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: anatomy;
}

.anatomy-steps li {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 18px 18px 18px 66px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.anatomy-steps li::before {
  counter-increment: anatomy;
  content: counter(anatomy, decimal-leading-zero);
  position: absolute;
  left: 18px;
  top: 18px;
  color: var(--moss);
  font-weight: 900;
}

.anatomy-steps span {
  color: var(--muted);
}

.category-grid,
.material-grid,
.video-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.category-card,
.material-card,
.video-card,
.request-panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.category-card {
  min-height: 210px;
  padding: 22px;
}

.category-card span {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin-bottom: 18px;
  color: var(--white);
  background: var(--moss);
  border-radius: 8px;
  font-weight: 900;
}

.category-card h3,
.video-card h3,
.request-panel h3 {
  margin: 0 0 10px;
  font-size: 20px;
}

.category-card p,
.category-card small,
.video-card p,
.video-card small {
  color: var(--muted);
}

.category-card ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.category-card li,
.platform-pill,
.spec-pill {
  padding: 6px 9px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.filter-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.filter-chip,
.tab-btn {
  min-height: 38px;
  padding: 8px 13px;
  color: var(--muted);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 760;
}

.filter-chip.active,
.tab-btn.active {
  color: var(--white);
  background: var(--ink);
  border-color: var(--ink);
}

.material-card {
  overflow: hidden;
}

.material-image {
  min-height: 210px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.26), rgba(255, 255, 255, 0)),
    var(--card-color);
}

.material-swatch {
  width: 100%;
  height: 178px;
  border-radius: var(--radius);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0 2px, transparent 2px 16px),
    var(--card-color);
  border: 1px solid rgba(255, 255, 255, 0.38);
}

.material-body {
  padding: 18px;
}

.material-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.material-card h3 {
  margin: 0 0 10px;
  font-size: 21px;
}

.material-card p {
  min-height: 48px;
  color: var(--muted);
}

.card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.small-btn {
  min-height: 36px;
  padding: 8px 11px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.small-btn.primary {
  color: var(--white);
  background: var(--moss);
  border-color: var(--moss);
}

.video-section {
  background: #eef3ef;
}

.video-card {
  padding: 18px;
}

.video-thumb {
  display: grid;
  place-items: center;
  height: 156px;
  margin-bottom: 16px;
  color: var(--white);
  background:
    linear-gradient(135deg, rgba(22, 33, 29, 0.18), rgba(22, 33, 29, 0.02)),
    var(--video-color);
  border-radius: var(--radius);
}

.play-mark {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 50%;
  font-size: 25px;
}

.platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 14px;
}

.sample-section {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(320px, 1.2fr);
  gap: clamp(22px, 4vw, 54px);
  align-items: center;
  background: var(--ink);
  color: var(--white);
}

.sample-copy p {
  color: rgba(255, 255, 255, 0.72);
}

.sample-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.sample-flow div {
  display: grid;
  gap: 8px;
  min-height: 158px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
}

.sample-flow span {
  color: var(--gold);
  font-weight: 900;
}

.sample-flow small {
  color: rgba(255, 255, 255, 0.68);
}

.form-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.forms-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}

.request-form {
  display: none;
  gap: 14px;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.request-form.active {
  display: grid;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--moss);
  box-shadow: 0 0 0 3px rgba(62, 103, 87, 0.12);
}

.request-panel {
  padding: 20px;
}

.request-panel ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
}

.material-dialog {
  width: min(1040px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.material-dialog::backdrop {
  background: rgba(22, 33, 29, 0.54);
}

.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 38px;
  height: 38px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 24px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.88fr) minmax(320px, 1.12fr);
  gap: 24px;
  padding: 24px;
}

.detail-gallery {
  display: grid;
  gap: 10px;
}

.detail-main {
  min-height: 340px;
  background:
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0 2px, transparent 2px 18px),
    var(--detail-color);
  border-radius: var(--radius);
}

.detail-thumbs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.detail-thumbs div {
  min-height: 84px;
  background: var(--detail-color);
  border-radius: var(--radius);
  opacity: 0.78;
}

.detail-content h2 {
  margin: 0 44px 8px 0;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
}

.detail-content p {
  color: var(--muted);
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.spec-item {
  padding: 11px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.spec-item small,
.detail-video small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.spec-item strong {
  display: block;
  margin-top: 4px;
}

.detail-video {
  margin: 16px 0;
  padding: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.related-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  transform: translateY(18px);
  opacity: 0;
  max-width: min(360px, calc(100vw - 40px));
  padding: 13px 15px;
  color: var(--white);
  background: var(--ink);
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 22px;
  padding: 36px clamp(18px, 5vw, 72px);
  color: rgba(255, 255, 255, 0.72);
  background: #101816;
}

.site-footer strong {
  color: var(--white);
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

@media (max-width: 1080px) {
  .site-nav,
  .header-actions {
    display: none;
  }

  .nav-toggle {
    display: inline-grid;
    place-items: center;
    margin-left: auto;
  }

  .site-header.nav-open .site-nav,
  .site-header.nav-open .header-actions {
    position: fixed;
    left: 18px;
    right: 18px;
    display: grid;
    background: var(--white);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  .site-header.nav-open .site-nav {
    top: 82px;
    padding: 18px;
    border-radius: var(--radius) var(--radius) 0 0;
  }

  .site-header.nav-open .header-actions {
    top: 265px;
    padding: 0 18px 18px;
    border-top: 0;
    border-radius: 0 0 var(--radius) var(--radius);
  }

  .hero,
  .anatomy-grid,
  .sample-section,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-stats {
    grid-row: auto;
    margin: 0;
  }

  .hero-visual {
    min-height: 0;
  }

  .category-grid,
  .material-grid,
  .video-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .hero {
    padding-top: 28px;
  }

  .hero-actions,
  .hero-stats,
  .section-heading.compact,
  .forms-grid,
  .form-row,
  .site-footer {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .site-footer {
    display: grid;
  }

  .hero-stats {
    display: grid;
  }

  .category-grid,
  .material-grid,
  .video-grid,
  .sample-flow {
    grid-template-columns: 1fr;
  }

  .forms-grid {
    display: grid;
  }

  .house-stack {
    height: 360px;
  }

  .stack-layer {
    left: 0;
    right: 0;
  }

  .spec-grid,
  .detail-thumbs {
    grid-template-columns: 1fr;
  }

  .layer-tag {
    font-size: 11px;
    max-width: 128px;
  }
}
