:root {
  color-scheme: light;
  --canvas: #f6f5f1;
  --paper: #fffefa;
  --ink: #242928;
  --muted: #505958;
  --line: #d9dcd5;
  --rust: #874626;
  --night: #233330;
  --copper: #f1b593;
  --wash: #ebede5;
  --viewer: #e1e7dc;
  --grid: #23333016;
  --viewer-halo: #fdfef9;
  --shadow: #29362e1c;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --canvas: #171d1d;
  --paper: #222b29;
  --ink: #f3f3ec;
  --muted: #bcc8c1;
  --line: #3b4b45;
  --rust: #ffc5a5;
  --night: #263631;
  --copper: #f1b593;
  --wash: #202826;
  --viewer: #22312c;
  --grid: #d8ead71c;
  --viewer-halo: #466354;
  --shadow: #0609084d;
}
.site-header { background: var(--canvas); }
.nav-row { min-height: 76px; gap: 16px; }
.desktop-nav { gap: clamp(10px, 1.6vw, 24px); }
.header-actions { position: static; }
.button { color: #221b16; }
.button-dark { color: #fff; box-shadow: 0 3px 0 #10191735; }
.button-outline, .button-light { color: var(--ink); background: var(--paper); border-color: var(--line); }
.button-outline:hover, .button-light:hover { color: var(--ink); background: var(--wash); }
.theme-toggle, .viewer-reset {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  border-radius: 9px;
}
.theme-toggle:hover, .viewer-reset:hover { background: var(--wash); }
.theme-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-shadow: inset 5px -4px currentColor;
  transform: rotate(-16deg);
}
[data-theme="dark"] .theme-icon {
  width: 10px;
  height: 10px;
  box-shadow: 0 -8px 0 -3px, 0 8px 0 -3px, 8px 0 0 -3px, -8px 0 0 -3px,
    6px 6px 0 -3px, -6px -6px 0 -3px, -6px 6px 0 -3px, 6px -6px 0 -3px;
  background: currentColor;
  transform: none;
}
:focus-visible { outline-color: var(--rust); }

.hero {
  color: var(--ink);
  background: radial-gradient(ellipse at 20% 42%, var(--wash), transparent 75%), var(--canvas);
  border-block-end: 1px solid var(--line);
}
.hero-inner {
  grid-template-columns: minmax(0, .86fr) minmax(0, 1.14fr);
  gap: clamp(24px, 4vw, 60px);
  padding-block: clamp(30px, 5vw, 73px);
  min-height: 0;
}
.hero-copy h1 { font-size: clamp(2.55rem, 5.3vw, 4.65rem); }
.hero-copy em { color: var(--rust); }
.hero-copy p { color: var(--muted); }
.viewer {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 20px 48px var(--shadow);
}
.viewer-header, .viewer-controls { padding: 10px clamp(12px, 2vw, 20px); }
.viewer-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.viewer-header h2 { font-size: 1rem; }
.viewer-reset { height: auto; min-height: 34px; padding: 3px 10px; font-size: .78rem; }
.viewer-stage {
  position: relative;
  height: clamp(230px, 25vw, 330px);
  overflow: hidden;
  border-block: 1px solid var(--line);
  background:
    repeating-linear-gradient(0deg, var(--grid) 0 1px, transparent 1px 29px),
    repeating-linear-gradient(90deg, var(--grid) 0 1px, transparent 1px 29px),
    radial-gradient(ellipse at 42% 38%, var(--viewer-halo), var(--viewer) 73%);
}
.viewer-fallback { display: block; width: 100%; height: 100%; object-fit: cover; }
#alloy-model { display: block; width: 100%; height: 100%; cursor: grab; touch-action: none; }
#alloy-model:active { cursor: grabbing; }
#alloy-model:focus-visible { outline-offset: -4px; }
.viewer-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.viewer-controls select {
  max-width: 100%;
  min-height: 39px;
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--canvas);
  color: var(--ink);
  font: inherit;
  font-size: .86rem;
}
.viewer-controls p { color: var(--muted); font-size: .8rem; }
.company { background: var(--wash); }
.experience { color: var(--ink); background: var(--paper); border: 1px solid var(--line); }
.experience strong { color: var(--rust); }
.product-card, .catalog-card, .post-grid article { box-shadow: 0 6px 16px var(--shadow); }
.interior-title { background: var(--wash); color: var(--ink); border-bottom: 1px solid var(--line); }
.interior-title p { color: var(--muted); }
.site-footer { background: var(--wash); color: var(--ink); }
.footer-grid p, .footer-grid address, .footer-posts, .footer-bottom { color: var(--muted); }
.footer-bottom { border-color: var(--line); }
.footer-grid a:hover, .footer-bottom a:hover { color: var(--rust); }

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .product-card { transition: transform .25s ease, border-color .2s, box-shadow .25s ease; }
  .product-card:hover { transform: perspective(900px) translateY(-5px) rotateX(3deg); box-shadow: 0 17px 28px var(--shadow); }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .hero-copy, .viewer { animation: appear .65s cubic-bezier(.2,.7,.25,1) both; }
  .viewer { animation-delay: .09s; }
  @keyframes appear { from { opacity: .52; translate: 0 12px; } }
}
@media (max-width: 910px) {
  .nav-row { min-height: 66px; }
  .hero-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
}
@media (max-width: 720px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-copy h1 { font-size: clamp(2.4rem, 8vw, 3.3rem); }
  .hero-copy p { margin-block: 14px 18px; }
  .header-cta { display: none; }
  .search-tools { position: static; }
  .search-tools .search-form { inset-inline: 0; top: calc(100% + 6px); width: 100%; }
}
@media (max-width: 380px) {
  .brand { gap: 7px; font-size: .86rem; }
  .brand img { width: 35px; height: 35px; }
  .nav-row, .header-actions { gap: 6px; }
}
