@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --nav-bg: rgba(14, 15, 16, 0.9);
  --void: #0e0f10;
  --panel: #16171a;
  --raised: #1d1f23;
  --line: #2b2d32;
  --line-soft: #202226;

  --steel: #8b8d92;
  --steel-bright: #c2c4c9;
  --copper: #c1652f;
  --copper-bright: #e2793b;
  --brass: #9c8449;

  --ink: #ededec;
  --ink-muted: #9a9ca3;
  --ink-faint: #616469;

  --radius-s: 3px;
  --radius-m: 6px;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --shadow-card: 0 10px 24px -12px rgba(0,0,0,0.5);
  --shadow-pop: 0 18px 40px -14px rgba(0,0,0,0.55);

  --modal-backdrop: rgba(8, 8, 9, 0.82);
  --badge-bg: rgba(14, 15, 16, 0.75);
  --stage-bg: radial-gradient(circle at center, rgba(193, 101, 47, 0.04) 0%, transparent 70%);
}

/* ---------- Light theme ---------- */
:root[data-theme="light"] {
  --nav-bg: rgba(246, 244, 241, 0.92);
  --void: #f6f4f1;
  --panel: #ffffff;
  --raised: #fbf9f6;
  --line: #dedad2;
  --line-soft: #e8e5df;

  --steel: #74767c;
  --steel-bright: #3c3e44;
  --copper: #b95a26;
  --copper-bright: #973f16;
  --brass: #8a7140;

  --ink: #141517;
  --ink-muted: #53565e;
  --ink-faint: #7a7d85;

  --shadow-card: 0 10px 24px -14px rgba(28,29,32,0.12);
  --shadow-pop: 0 18px 40px -16px rgba(28,29,32,0.18);

  --modal-backdrop: rgba(28, 29, 32, 0.55);
  --badge-bg: rgba(255, 255, 255, 0.88);
  --stage-bg: radial-gradient(circle at center, rgba(185, 90, 38, 0.07) 0%, transparent 70%);
}

:root[data-theme="light"] .nav-cta {
  color: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--void);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  font-size: 16px;
  transition: background-color 0.25s ease, color 0.25s ease;
}

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

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ---------- Nav ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 999;
  background: color-mix(in srgb, var(--void) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
  transition: background-color 0.25s ease, border-color 0.25s ease;
}

.nav-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 1.1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}

.brand-mark { width: 30px; height: 30px; flex-shrink: 0; }
.brand-word { font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; letter-spacing: 0.02em; }
.brand-word span { color: var(--copper); }

.nav-menu {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 2.2rem;
}

.nav-menu a {
  text-decoration: none;
  color: var(--ink-muted);
  font-size: 0.94rem;
  font-weight: 500;
  position: relative;
  padding-bottom: 4px;
  transition: color 0.15s ease;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 0;
  height: 1px;
  background: var(--copper);
  transition: width 0.2s ease;
}

.nav-menu a:hover, .nav-menu a.active { color: var(--ink); }
.nav-menu a:hover::after, .nav-menu a.active::after { width: 100%; }

.nav-cta {
  background: var(--copper);
  color: #100701;
  font-weight: 600;
  font-size: 0.88rem;
  padding: 0.6rem 1.15rem;
  border-radius: var(--radius-s);
  text-decoration: none;
  transition: background 0.15s ease;
}
.nav-cta:hover { background: var(--copper-bright); }

/* ---------- Theme toggle ---------- */
.theme-toggle {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink-muted);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.theme-toggle:hover { color: var(--copper); border-color: var(--copper); }
.theme-toggle svg { width: 17px; height: 17px; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* ---------- Buttons ---------- */
.btn-primary {
  display: inline-block;
  background: var(--copper);
  color: #120802;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.9rem 1.7rem;
  border-radius: var(--radius-s);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}
:root[data-theme="light"] .btn-primary { color: #ffffff; }
.btn-primary:hover { background: var(--copper-bright); transform: translateY(-1px); }

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.9rem 1.7rem;
  border-radius: var(--radius-s);
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.btn-secondary:hover { border-color: var(--steel); background: var(--panel); }

/* ---------- Hero ---------- */
.hero {
  border-bottom: 1px solid var(--line-soft);
  background:
    linear-gradient(180deg, rgba(193,101,47,0.06), transparent 40%),
    var(--void);
}

.hero-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 5rem 2rem 4rem;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
}

.hero-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--copper);
  margin-bottom: 1.1rem;
  letter-spacing: 0.02em;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: 3.1rem;
  font-weight: 700;
  line-height: 1.12;
  max-width: 560px;
  margin-bottom: 1.3rem;
}

.hero p {
  color: var(--ink-muted);
  font-size: 1.08rem;
  max-width: 480px;
  margin-bottom: 2.1rem;
}

.hero-btns { display: flex; gap: 1rem; margin-bottom: 2.6rem; }

.hero-stats {
  display: flex;
  gap: 2.4rem;
  border-top: 1px solid var(--line-soft);
  padding-top: 1.6rem;
  max-width: 520px;
}

.hero-stat .num { font-family: var(--font-mono); font-size: 1.35rem; color: var(--ink); font-weight: 500; }
.hero-stat .lbl { font-size: 0.82rem; color: var(--ink-faint); margin-top: 0.2rem; }

/* ---------- Section scaffolding ---------- */
.section {
  padding: 4.5rem 0;
  border-bottom: 1px solid var(--line-soft);
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  margin-bottom: 2.4rem;
}

.section-head h2 { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; }
.section-head p { color: var(--ink-muted); max-width: 380px; font-size: 0.95rem; }
.dim-tick { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-faint); }

/* ---------- Finish selector (interactive) ---------- */
.finish-block {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 3rem;
  align-items: center;
}

.finish-preview {
  aspect-ratio: 4/3;
  border-radius: var(--radius-m);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  transition: background 0.4s ease, border-color 0.25s ease;
  box-shadow: var(--shadow-card);
}

.finish-preview .swatch-ring {
  width: 55%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 14px solid var(--copper);
  transition: border-color 0.4s ease, box-shadow 0.4s ease;
  box-shadow: 0 0 60px -10px var(--copper);
}

.finish-preview .swatch-label {
  position: absolute;
  bottom: 1.2rem;
  left: 1.2rem;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink);
  background: var(--badge-bg);
  border: 1px solid var(--line);
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-s);
  backdrop-filter: blur(4px);
}

.finish-list { list-style: none; display: flex; flex-direction: column; }

.finish-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0.2rem;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
  background: none;
  border-left: none; border-right: none; border-top: none;
  color: var(--ink-muted);
  font-family: var(--font-body);
  font-size: 1rem;
  width: 100%;
  text-align: left;
  transition: color 0.15s ease;
}
.finish-item:hover, .finish-item.active { color: var(--ink); }
.finish-item .dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--line);
  transition: background 0.15s ease;
}
.finish-item.active .dot { background: var(--copper); }
.finish-item .code { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-faint); }

/* ---------- Door Material Picker ---------- */
.door-material-picker {
  margin-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.material-pills { display: flex; gap: 0.5rem; flex-wrap: wrap; }

.mat-btn {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-s);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.mat-btn:hover { border-color: var(--steel); color: var(--ink); }
.mat-btn.active {
  border-color: var(--copper);
  color: var(--copper);
  background: var(--raised);
  font-weight: 600;
}

/* Surface backgrounds */
.finish-preview[data-surface="walnut"] { background: radial-gradient(circle at center, #2e2017, #130d0a); }
.finish-preview[data-surface="oak"] { background: radial-gradient(circle at center, #d8bc97, #8e7350); }
.finish-preview[data-surface="charcoal"] { background: radial-gradient(circle at center, #23252a, #0d0e10); }
.finish-preview[data-surface="concrete"] { background: radial-gradient(circle at center, #787a80, #414349); }

/* ---------- Category tiles ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
}

.cat-tile {
  background: var(--panel);
  padding: 2rem 1.6rem;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  transition: background 0.15s ease;
  min-height: 190px;
  justify-content: space-between;
}
.cat-tile:hover { background: var(--raised); }
.cat-tile svg { width: 34px; height: 34px; color: var(--copper); }
.cat-tile h3 { font-family: var(--font-display); font-size: 1.05rem; font-weight: 600; }
.cat-tile .count { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-faint); }

/* ---------- CTA banner ---------- */
.cta-band {
  padding: 4rem 2rem;
  text-align: left;
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}
.cta-band h2 { font-family: var(--font-display); font-size: 1.7rem; font-weight: 700; max-width: 480px; }

/* ---------- Catalogue toolbar ---------- */
.catalogue-toolbar {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
  margin-bottom: 2.4rem;
  padding-top: 2.5rem;
}

.catalogue-toolbar h1 { font-family: var(--font-display); font-size: 2rem; font-weight: 700; }
.search-row { display: flex; gap: 0.8rem; align-items: center; }

.search-box {
  flex: 1;
  padding: 0.9rem 1.2rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  color: var(--ink);
  font-size: 0.96rem;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.15s, background-color 0.25s ease;
}
.search-box:focus { border-color: var(--copper); }

.filter-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.filter-pill {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--ink-muted);
  padding: 0.45rem 1rem;
  border-radius: 50px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.15s ease;
}
.filter-pill:hover { border-color: var(--steel); color: var(--ink); }
.filter-pill.active {
  background: var(--copper);
  color: #120802;
  font-weight: 600;
  border-color: var(--copper);
}
:root[data-theme="light"] .filter-pill.active { color: #ffffff; }

#itemCount { font-family: var(--font-mono); font-size: 0.8rem; color: var(--ink-faint); }

/* ---------- Product grid & cards ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.1rem;
  margin-bottom: 3rem;
  perspective: 1200px;
}

.product-card {
  background: var(--panel);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-m);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  position: relative;
  transform-style: preserve-3d;
  will-change: transform;
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.25s ease;
}
.product-card:hover {
  border-color: var(--line);
  box-shadow: var(--shadow-card);
}

.product-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-m);
  background: radial-gradient(circle 180px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255, 255, 255, 0.08), transparent 80%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

:root[data-theme="light"] .product-card::before {
  background: radial-gradient(circle 180px at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(193, 101, 47, 0.08), transparent 80%);
}

.product-card:hover::before { opacity: 1; }

.card-img-wrapper {
  width: 100%;
  aspect-ratio: 4/3;
  background: #111214;
  border-radius: var(--radius-s);
  overflow: hidden;
  margin-bottom: 1rem;
  border: 1px solid var(--line-soft);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.product-card:hover .card-img { transform: scale(1.06); }

.card-wa-quick {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #25d366;
  color: #06210f;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px -2px rgba(0,0,0,0.4);
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.18s ease, transform 0.18s ease, filter 0.15s ease;
  z-index: 3;
}
.card-wa-quick svg { width: 17px; height: 17px; }
.card-wa-quick:hover { filter: brightness(1.08); }
.product-card:hover .card-wa-quick,
.card-wa-quick:focus-visible { opacity: 1; transform: translateY(0); }
@media (hover: none) { .card-wa-quick { opacity: 1; transform: none; } }

.card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.7rem; }
.category-tag { font-family: var(--font-mono); font-size: 0.7rem; color: var(--copper); }
.card-id { font-family: var(--font-mono); font-size: 0.74rem; color: var(--ink-faint); }

.product-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 0.4rem; color: var(--ink); }
.product-spec { font-size: 0.85rem; color: var(--ink-muted); margin-bottom: 0.9rem; line-height: 1.5; }

.finish-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 1.1rem; }
.finish-badge {
  font-size: 0.68rem;
  background: var(--raised);
  border: 1px solid var(--line);
  color: var(--steel-bright);
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-s);
}

.card-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  border-top: 1px solid var(--line-soft);
  padding-top: 0.9rem;
}

.product-price { font-family: var(--font-mono); font-size: 1.1rem; font-weight: 500; color: var(--ink); }

.wa-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: #25d366;
  color: #06210f;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.65rem 0.9rem;
  border-radius: 50px;
  text-decoration: none;
  transition: filter 0.15s ease, transform 0.15s ease;
  white-space: nowrap;
}
.wa-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.wa-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }

/* ---------- Scroll Reveal ---------- */
.reveal-init {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal-visible { opacity: 1; transform: translateY(0); }

/* ---------- Interactive Modal (Quick View) ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(8, 8, 9, 0);
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: background-color 0.35s cubic-bezier(0.16, 1, 0.3, 1), backdrop-filter 0.35s, opacity 0.35s, visibility 0.35s;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
  background: var(--modal-backdrop);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.modal-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  max-width: 820px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  box-shadow: var(--shadow-pop);
  opacity: 0;
  transform: scale(0.92) translateY(24px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s, border-color 0.3s ease;
}

.modal-overlay.open .modal-box { opacity: 1; transform: scale(1) translateY(0); }

.modal-img {
  background: #0c0d0e;
  aspect-ratio: 1;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 1px solid var(--line-soft);
}

.modal-img img {
  width: 100%; height: 100%; object-fit: contain; padding: 1.2rem;
  opacity: 0; transform: scale(0.94);
  transition: transform 0.55s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.45s ease;
}
.modal-overlay.open .modal-img img { opacity: 1; transform: scale(1); transition-delay: 0.08s; }

.modal-body { padding: 2.2rem 2rem; display: flex; flex-direction: column; }
.modal-body > * {
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.open .modal-body > .modal-close { opacity: 1; transform: translateY(0); transition-delay: 0.05s; }
.modal-overlay.open .modal-body > .modal-category { opacity: 1; transform: translateY(0); transition-delay: 0.12s; }
.modal-overlay.open .modal-body > .modal-title { opacity: 1; transform: translateY(0); transition-delay: 0.18s; }
.modal-overlay.open .modal-body > .modal-spec-desc { opacity: 1; transform: translateY(0); transition-delay: 0.24s; }
.modal-overlay.open .modal-body > .modal-finishes { opacity: 1; transform: translateY(0); transition-delay: 0.28s; }
.modal-overlay.open .modal-body > .modal-spec-table { opacity: 1; transform: translateY(0); transition-delay: 0.32s; }
.modal-overlay.open .modal-body > .modal-wa-btn { opacity: 1; transform: translateY(0); transition-delay: 0.36s; }

.modal-close {
  align-self: flex-end; background: none; border: none; color: var(--ink-faint);
  font-size: 1.5rem; cursor: pointer; line-height: 1; margin-bottom: 0.4rem;
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: color 0.18s ease, background-color 0.18s ease, transform 0.25s ease;
}
.modal-close:hover { color: var(--ink); background: var(--line-soft); transform: rotate(90deg); }

.modal-body h2 { font-family: var(--font-display); font-size: 1.45rem; margin-bottom: 0.3rem; line-height: 1.25; color: var(--ink); }
.modal-spec-table { margin: 1.2rem 0; border-top: 1px solid var(--line-soft); }
.modal-spec-table div { display: flex; justify-content: space-between; padding: 0.65rem 0; border-bottom: 1px solid var(--line-soft); font-size: 0.88rem; }
.modal-spec-table span:first-child { color: var(--ink-faint); }
.modal-spec-table span:last-child { font-family: var(--font-mono); color: var(--ink); text-align: right; }

/* ---------- 3D Hardware Switcher Rig ---------- */
.interactive-rig-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
}

.model-switch-tabs {
  display: flex;
  gap: 0.4rem;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 0.3rem;
  border-radius: var(--radius-s);
  box-shadow: var(--shadow-card);
}

.tab-btn {
  background: transparent;
  border: none;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 0.76rem;
  padding: 0.4rem 0.8rem;
  border-radius: var(--radius-s);
  cursor: pointer;
  transition: all 0.2s ease;
}
.tab-btn:hover { color: var(--ink); }
.tab-btn.active {
  background: var(--void);
  color: var(--copper);
  border: 1px solid var(--line-soft);
  font-weight: 600;
}

.hinge-stage {
  position: relative;
  width: 100%;
  max-width: 440px;
  height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  cursor: crosshair;
  user-select: none;
  background: var(--stage-bg);
  border-radius: var(--radius-m);
}

.model-3d {
  position: relative;
  width: 220px;
  height: 260px;
  transform-style: preserve-3d;
  display: none;
  align-items: center;
  justify-content: center;
  transition: transform 0.1s ease-out;
}
.model-3d.active { display: flex; }

/* 1. Hinge */
.hinge-knuckle {
  position: absolute;
  width: 16px;
  height: 240px;
  background: linear-gradient(90deg, #5c451f, var(--copper), #ecd5a0, #5c451f);
  border-radius: 8px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}

.knuckle-segment {
  width: 100%;
  height: 19%;
  border-bottom: 1.5px solid rgba(14, 15, 16, 0.85);
  border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.hinge-leaf {
  position: absolute;
  width: 95px;
  height: 210px;
  background: linear-gradient(135deg, #2b2520 0%, #1a1614 50%, #12100e 100%);
  border: 1.5px solid var(--copper);
  border-radius: 2px;
  box-shadow: inset 0 0 15px rgba(193, 101, 47, 0.25), 0 15px 35px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  padding: 1.2rem 0;
  transform-style: preserve-3d;
}

.leaf-left { right: 50%; transform-origin: right center; border-right: none; }
.leaf-right { left: 50%; transform-origin: left center; border-left: none; transform: rotateY(-45deg); transition: transform 0.1s ease-out; }

.screw-hole {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: radial-gradient(circle, #000 45%, var(--copper) 90%);
  border: 1px solid #100701;
}

/* 2. Lever */
.lever-rose {
  position: absolute;
  width: 44px;
  height: 160px;
  left: 30px;
  background: linear-gradient(180deg, #2a241f, #151311);
  border: 1.5px solid var(--copper);
  border-radius: 4px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.rose-core { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--copper); background: #0e0f10; }
.lever-stem { position: absolute; left: 52px; width: 140px; height: 24px; transform-origin: left center; transform-style: preserve-3d; cursor: grab; }
.lever-handle-bar {
  width: 100%; height: 100%; border-radius: 0 12px 12px 0;
  background: linear-gradient(90deg, #ecd5a0 0%, var(--copper) 40%, #5c451f 100%);
  border: 1px solid rgba(255,255,255,0.25);
  box-shadow: 0 8px 20px rgba(0,0,0,0.5);
}

/* 3. Knob */
.knob-base { position: absolute; width: 70px; height: 70px; border-radius: 50%; background: #1a1614; border: 1.5px solid var(--copper); box-shadow: 0 10px 25px rgba(0,0,0,0.5); }
.knob-stem { position: absolute; width: 24px; height: 24px; border-radius: 50%; background: linear-gradient(135deg, var(--copper), #5c451f); transform: translateZ(20px); }
.knob-head {
  position: absolute; width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, #382c22, #181412 85%);
  border: 2px solid var(--copper);
  transform: translateZ(45px);
  transform-style: preserve-3d;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 15px 35px rgba(0,0,0,0.6), inset 0 0 15px rgba(193,101,47,0.3);
}
.knob-flute { position: absolute; width: 100%; height: 2px; background: rgba(193, 101, 47, 0.45); }
.knob-center-cap {
  position: absolute; width: 40px; height: 40px; border-radius: 50%;
  background: radial-gradient(circle, #ecd5a0, var(--copper) 70%, #5c451f);
  border: 1px solid rgba(0,0,0,0.5); transform: translateZ(5px);
}

/* Overlays & Measurements */
.hinge-overlay { position: absolute; inset: 0; pointer-events: none; }
.dimension-callout { position: absolute; font-family: var(--font-mono); font-size: 0.75rem; color: var(--copper); display: flex; align-items: center; gap: 0.4rem; }
.dim-top { top: 20px; left: 50%; transform: translateX(-50%); }
.dim-top .dim-line { width: 32px; height: 1px; background: var(--copper); }
.dim-angle {
  bottom: 55px; right: 12px; color: var(--steel-bright);
  background: var(--badge-bg); border: 1px solid var(--line-soft);
  padding: 3px 7px; border-radius: var(--radius-s);
  backdrop-filter: blur(4px);
}

.dimension-bar { position: absolute; bottom: 8px; left: 8%; right: 8%; display: flex; flex-direction: column; align-items: center; }
.dimension-bar .bar-line { width: 100%; height: 1px; background: var(--line); position: relative; }
.dimension-bar .bar-tick { position: absolute; top: -4px; width: 1px; height: 9px; background: var(--line); }
.dimension-bar .bar-tick.left { left: 0; }
.dimension-bar .bar-tick.right { right: 0; }
.dimension-bar .bar-label { font-family: var(--font-mono); font-size: 0.73rem; color: var(--ink-faint); margin-top: 5px; }

/* ---------- Content pages (about/contact) ---------- */
.page-hero { padding: 4rem 2rem 3rem; border-bottom: 1px solid var(--line-soft); }
.page-hero .hero-label { margin-bottom: 0.9rem; }
.page-hero h1 { font-family: var(--font-display); font-size: 2.4rem; font-weight: 700; max-width: 640px; margin-bottom: 1rem; color: var(--ink); }
.page-hero p { color: var(--ink-muted); max-width: 560px; font-size: 1.02rem; }

.content-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; padding: 3.5rem 0; }
.content-cols p { color: var(--ink-muted); margin-bottom: 1rem; }
.content-cols h3 { font-family: var(--font-display); margin-bottom: 0.8rem; font-size: 1.1rem; color: var(--ink); }

.process-list { list-style: none; counter-reset: step; }
.process-list li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 3rem 1fr;
  gap: 1rem;
  padding: 1.4rem 0;
  border-top: 1px solid var(--line-soft);
}
.process-list li:last-child { border-bottom: 1px solid var(--line-soft); }
.process-list li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-mono);
  color: var(--copper);
  font-size: 0.9rem;
  padding-top: 0.1rem;
}
.process-list h4 { font-size: 1rem; margin-bottom: 0.3rem; color: var(--ink); }
.process-list p { color: var(--ink-muted); font-size: 0.9rem; }

.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  margin: 2rem 0;
}
.spec-cell { background: var(--panel); padding: 1.6rem; }
.spec-cell h4 { font-size: 0.95rem; margin-bottom: 0.5rem; color: var(--ink); }
.spec-cell p { color: var(--ink-muted); font-size: 0.87rem; margin: 0; }

/* ---------- Contact ---------- */
.contact-wrapper { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 3rem; padding: 3.5rem 0; }
.contact-info h2, .contact-form h2 { font-family: var(--font-display); font-size: 1.4rem; margin-bottom: 1.5rem; color: var(--ink); }

.info-row { display: flex; justify-content: space-between; padding: 1rem 0; border-top: 1px solid var(--line-soft); font-size: 0.92rem; }
.info-row:last-of-type { border-bottom: 1px solid var(--line-soft); }
.info-row span:first-child { color: var(--ink-faint); }
.info-row span:last-child { font-family: var(--font-mono); color: var(--ink); text-align: right; }

.method-toggle { display: flex; gap: 0.6rem; margin: 1.6rem 0; }
.method-btn {
  flex: 1; padding: 0.7rem; text-align: center;
  border: 1px solid var(--line); border-radius: var(--radius-s);
  background: var(--panel); color: var(--ink-muted); font-size: 0.85rem; cursor: pointer;
  transition: all 0.15s ease;
}
.method-btn.active { border-color: var(--copper); color: var(--copper); background: var(--raised); font-weight: 600; }

.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-size: 0.85rem; margin-bottom: 0.45rem; color: var(--ink-muted); }
.form-control {
  width: 100%; padding: 0.85rem 1rem;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius-s); color: var(--ink);
  font-family: inherit; font-size: 0.95rem; outline: none;
  transition: border-color 0.15s, background-color 0.25s ease;
}
.form-control:focus { border-color: var(--copper); }
.form-note { font-size: 0.8rem; color: var(--copper); margin-top: 0.9rem; display: none; }
.form-note.show { display: block; }

/* ---------- Footer ---------- */
.footer { padding: 3rem 2rem 2.2rem; }
.footer-inner {
  max-width: 1240px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 1rem;
}
.footer p { color: var(--ink-faint); font-size: 0.85rem; }
.footer .brand-word { font-size: 1rem; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .interactive-rig-container { order: -1; max-width: 360px; margin: 0 auto; }
  .finish-block { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .content-cols { grid-template-columns: 1fr; }
  .contact-wrapper { grid-template-columns: 1fr; }
  .modal-box { grid-template-columns: 1fr; }
  .modal-img { aspect-ratio: 16/10; }
}

@media (max-width: 600px) {
  .hero h1 { font-size: 2.2rem; }
  .nav-menu { gap: 1.1rem; }
  .nav-menu li:nth-child(n+3) { display: none; }
  .nav-menu li.nav-theme-item { display: flex; }
  .cat-grid { grid-template-columns: 1fr; }
  .cta-band { flex-direction: column; align-items: flex-start; }
  .hero-stats { gap: 1.5rem; flex-wrap: wrap; }
}

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--copper);
  outline-offset: 2px;
}

/* ---------- 3D Hardware Model Light Mode Palette ---------- */
:root[data-theme="light"] .hinge-leaf {
  background: linear-gradient(135deg, #f5ecd8 0%, #e8d7b5 50%, #d8be8d 100%);
  border: 1.5px solid var(--copper);
  box-shadow: 
    inset 0 0 12px rgba(185, 90, 38, 0.15),
    0 15px 30px rgba(0, 0, 0, 0.1);
}

:root[data-theme="light"] .screw-hole {
  background: radial-gradient(circle, #5a3e20 40%, var(--copper) 85%);
  border: 1px solid #d4b88a;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.4);
}

:root[data-theme="light"] .knuckle-segment {
  border-bottom: 1.5px solid rgba(138, 113, 64, 0.35);
  border-top: 1px solid rgba(255, 255, 255, 0.7);
}

:root[data-theme="light"] .lever-rose {
  background: linear-gradient(180deg, #f4ebd9, #dccab0);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
}

:root[data-theme="light"] .rose-core {
  background: #fbf9f6;
}

:root[data-theme="light"] .knob-base {
  background: linear-gradient(180deg, #ecdcc4, #dcc5a1);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

:root[data-theme="light"] .knob-head {
  background: radial-gradient(circle, #fbf4ea 0%, #ebd7be 65%, #d8ba8e 100%);
  box-shadow: 
    0 12px 28px rgba(0, 0, 0, 0.12), 
    inset 0 0 12px rgba(185, 90, 38, 0.15);
}

:root[data-theme="light"] .knob-flute {
  background: rgba(185, 90, 38, 0.28);
}