:root {
  color-scheme: dark;
  --gold: #d6a84b;
  --gold-soft: #f2d998;
  --ink: #070604;
  --panel: rgba(18, 15, 9, 0.68);
  --line: rgba(242, 217, 152, 0.22);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  min-width: 960px;
}

.stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  isolation: isolate;
  background:
    radial-gradient(circle at 54% 42%, rgba(214, 168, 75, 0.18), transparent 29rem),
    radial-gradient(circle at 18% 76%, rgba(124, 86, 24, 0.28), transparent 32rem),
    linear-gradient(135deg, #060504 0%, #181108 48%, #050403 100%);
}

#cadScene {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: none;
}

#cadScene.grabbing {
  cursor: grabbing;
}

.hud {
  position: absolute;
  z-index: 2;
  color: #fff7e4;
  pointer-events: none;
}

.top-left {
  top: clamp(28px, 5vh, 58px);
  left: clamp(28px, 5vw, 72px);
  width: min(440px, 42vw);
}

.eyebrow {
  display: block;
  margin-bottom: 14px;
  color: var(--gold-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(46px, 6.1vw, 96px);
  line-height: 0.88;
  letter-spacing: 0;
  text-transform: uppercase;
}

p {
  max-width: 36rem;
  margin: 22px 0 0;
  color: rgba(255, 247, 228, 0.74);
  font-size: 17px;
  line-height: 1.55;
}

.bottom-left {
  left: clamp(28px, 5vw, 72px);
  bottom: clamp(28px, 5vh, 58px);
}

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(130px, auto));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--line);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(18px);
}

.metrics div {
  min-height: 76px;
  padding: 15px 18px;
  background: var(--panel);
}

.metrics span {
  display: block;
  color: rgba(242, 217, 152, 0.72);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.metrics strong {
  display: block;
  margin-top: 9px;
  color: #fff7e4;
  font-size: 15px;
  font-weight: 650;
  white-space: nowrap;
}

.fold-button {
  position: absolute;
  right: clamp(28px, 5vw, 72px);
  bottom: clamp(28px, 5vh, 58px);
  z-index: 3;
  height: 50px;
  padding: 0 22px;
  border: 1px solid rgba(242, 217, 152, 0.48);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(242, 217, 152, 0.16), rgba(214, 168, 75, 0.08));
  color: #fff7e4;
  font: 750 13px/1 Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.36), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  cursor: pointer;
}

.fold-button:hover,
.fold-button:focus-visible {
  border-color: rgba(255, 232, 170, 0.82);
  background: linear-gradient(180deg, rgba(242, 217, 152, 0.26), rgba(214, 168, 75, 0.14));
  outline: none;
}

@media (max-width: 980px) {
  body {
    min-width: 0;
  }

  .top-left {
    width: min(420px, calc(100vw - 48px));
  }

  h1 {
    font-size: 44px;
  }

  p {
    font-size: 15px;
  }

  .metrics {
    grid-template-columns: 1fr;
    width: min(330px, calc(100vw - 48px));
  }
}
