/* Showroom for vehicle-mounted machines: a quiet light-grey workshop page, one red accent from the brand,
   wide industrial display type, monospace for model codes and specs. Cards slide sideways on a snap rail. */
:root {
  --bg: #f1f1ef;
  --panel: #ffffff;
  --ink: #1d1d20;
  --mute: #7d7d79;
  --line: #e1e1dd;
  --accent: #c4232b;
  --display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.55 var(--display);
  font-variation-settings: 'wdth' 100;
  -webkit-font-smoothing: antialiased;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.mono { font-family: var(--mono); letter-spacing: .08em; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 1240px; margin: 0 auto; padding-block: 22px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 750; font-variation-settings: 'wdth' 112; letter-spacing: .02em; text-transform: uppercase; font-size: 15px; }
.mark { width: 12px; height: 22px; background: var(--accent); display: block; }
.tag { font-size: 11px; color: var(--mute); text-transform: uppercase; }

main { max-width: 1240px; margin: 0 auto; }
.intro { padding-block: 56px 28px; max-width: 760px; }
.eyebrow { font-size: 11px; color: var(--accent); margin: 0 0 14px; }
h1 { font-size: clamp(34px, 6vw, 64px); line-height: 1; margin: 0; font-weight: 800; font-variation-settings: 'wdth' 115; letter-spacing: -.015em; text-wrap: balance; }
h1 em { font-style: normal; color: var(--accent); }
.lede { font-size: 18px; color: #4c4c50; max-width: 60ch; margin: 20px 0 0; }

.rail { padding-bottom: 48px; }
.rail-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.count { font-size: 12px; color: var(--mute); margin: 0; }
.count span { color: var(--ink); font-weight: 600; }
.arrows { display: flex; gap: 8px; }
.arrow { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); cursor: pointer; text-decoration: none; font-size: 17px; transition: border-color .15s, color .15s; }
.arrow:hover { border-color: var(--accent); color: var(--accent); }
.track { display: grid; grid-auto-flow: column; grid-auto-columns: min(560px, 86%); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding-bottom: 6px; scrollbar-width: none; overscroll-behavior-x: contain; }
.track::-webkit-scrollbar { display: none; }
.card { scroll-snap-align: start; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.shot { position: relative; display: block; aspect-ratio: 16 / 10; background: #e7e7e4; overflow: hidden; }
.shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s cubic-bezier(.16, 1, .3, 1); }
.shot:hover img { transform: scale(1.03); }
.noimg { position: absolute; inset: 0; display: grid; place-items: center; font-size: 40px; color: #c9c9c5; }
.badge { position: absolute; left: 12px; top: 12px; font-size: 10px; background: rgba(255, 255, 255, .92); padding: 5px 9px; border-radius: 3px; }
.body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.model { font-size: 11px; color: var(--accent); margin: 0; }
h2 { margin: 0; font-size: 28px; line-height: 1.05; font-weight: 750; font-variation-settings: 'wdth' 110; }
.desc { margin: 0; color: #55555a; font-size: 15px; }
.specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; margin: 6px 0 4px; }
.specs div { border-top: 1px solid var(--line); padding-block: 8px; min-width: 0; }
.specs dt { font-size: 10px; color: var(--mute); text-transform: uppercase; }
.specs dd { margin: 2px 0 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.cta { margin-top: auto; align-self: flex-start; display: inline-flex; gap: 10px; align-items: center; background: var(--accent); color: #fff; text-decoration: none; font-weight: 650; padding: 12px 18px; border-radius: 6px; }
.cta span { transition: transform .2s; }
.cta:hover span { transform: translateX(3px); }
.cta.off { background: #e7e7e4; color: var(--mute); }
.dots { display: flex; gap: 6px; justify-content: center; margin-top: 18px; }
.dots button { width: 22px; height: 4px; border: 0; border-radius: 2px; background: var(--line); cursor: pointer; padding: 0; }
.dots button.on { background: var(--accent); }
.empty { padding: 48px 0 80px; color: var(--mute); }

.foot { max-width: 1240px; margin: 0 auto; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 22px 32px; border-top: 1px solid var(--line); font-size: 11px; color: var(--mute); }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--accent); }

/* the 3D viewer */
body.viewer { height: 100dvh; display: flex; flex-direction: column; padding: 0; overflow: hidden; background: #ededeb; }
.vbar { display: flex; align-items: center; gap: 14px; padding-block: 8px; padding-left: max(14px, env(safe-area-inset-left, 0px)); padding-right: max(14px, env(safe-area-inset-right, 0px)); padding-top: max(8px, env(safe-area-inset-top, 0px)); background: var(--panel); border-bottom: 1px solid var(--line); }
.back { font-size: 12px; text-decoration: none; white-space: nowrap; }
.back:hover { color: var(--accent); }
.vname { flex: 1; min-width: 0; display: flex; align-items: baseline; gap: 10px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.vname strong { font-weight: 700; font-variation-settings: 'wdth' 108; overflow: hidden; text-overflow: ellipsis; }
.vname .model { font-size: 11px; }
.vnav { display: flex; align-items: center; gap: 8px; }
.vnav .arrow { width: 36px; height: 36px; font-size: 15px; }
.vcount { font-size: 11px; color: var(--mute); }
.stage { flex: 1; position: relative; background: #ededeb; }
.stage iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.rotate { display: none; }
@media (max-width: 640px) {
  .vname .model, .vcount { display: none; }
  .intro { padding-block: 34px 20px; }
  .lede { font-size: 16px; }
}
@media (orientation: portrait) and (max-width: 640px) {
  body.viewer .rotate { display: block; margin: 0; padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px)); text-align: center; font-size: 10px; color: var(--mute); background: var(--panel); border-top: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) { .track { scroll-behavior: auto; } * { transition: none !important; } }

/* the logo in the bar */
.bar-logo { height: 38px; width: auto; display: block; }

/* the intro: the logo on white, a red line drawing under it, then the page */
.splash { position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; gap: 22px; background: #fff; animation: splash-out .55s cubic-bezier(.6, 0, .9, .35) 1.5s forwards; pointer-events: none; }
.splash img { width: min(420px, 72vw); height: auto; animation: splash-in .8s cubic-bezier(.16, 1, .3, 1) both; }
.splash i { display: block; height: 3px; background: var(--accent); transform-origin: left; animation: splash-line .9s cubic-bezier(.65, 0, .35, 1) .25s both; }
@keyframes splash-in { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes splash-line { from { transform: scaleX(0); } }
@keyframes splash-out { to { opacity: 0; visibility: hidden; } }

/* the entry screen: the form on the left, the first machine on the right under a red band */
body.gate { min-height: 100dvh; padding: 0; background: var(--bg); }
.gate-wrap { max-width: none; margin: 0; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); }
.gate-form { display: flex; align-items: center; background: #fff; padding-block: 48px; padding-left: max(24px, env(safe-area-inset-left, 0px)); padding-right: 24px; }
.gate-in { width: min(440px, 100%); margin: 0 auto; display: flex; flex-direction: column; gap: 14px; animation: splash-in .8s cubic-bezier(.16, 1, .3, 1) both; }
.gate-logo { width: min(340px, 100%); height: auto; margin-bottom: 26px; }
.gate-in .eyebrow { margin: 0; }
.gate-in h1 { font-size: clamp(36px, 5vw, 54px); }
.gate-in .lede { margin: 0 0 10px; font-size: 16px; }
.gate-fields { display: flex; flex-direction: column; gap: 8px; }
.gate-fields label { font-size: 11px; color: var(--mute); }
.gate-row { display: flex; gap: 8px; }
.gate-row input { flex: 1; min-width: 0; font: 500 17px var(--display); padding: 13px 14px; border: 1px solid #d2d2cd; border-radius: 7px; background: #fff; color: var(--ink); }
.gate-row input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.gate-row .cta { margin: 0; border: 0; cursor: pointer; font-size: 16px; }
.gate-msg { margin: 4px 0 0; color: #b3261e; font-size: 14px; }
.gate-foot { margin-top: 34px; font-size: 10px; color: var(--mute); }
.gate-art { position: relative; overflow: hidden; background: #e6e6e3; }
.gate-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: gate-drift 14s ease-out both; }
.gate-band { position: absolute; left: 0; right: 0; bottom: 0; height: 9px; background: var(--accent); }
.gate-tag { position: absolute; right: 22px; bottom: 26px; margin: 0; font-size: 11px; color: var(--ink); background: rgba(255, 255, 255, .9); padding: 6px 10px; border-radius: 3px; }
@keyframes gate-drift { from { transform: scale(1.08); } }
@media (max-width: 820px) {
  .gate-wrap { grid-template-columns: minmax(0, 1fr); grid-template-rows: 34vh auto; }
  .gate-art { grid-row: 1; }
  .gate-form { grid-row: 2; align-items: flex-start; padding-block: 30px 40px; padding-right: max(24px, env(safe-area-inset-right, 0px)); }
  .gate-logo { width: min(260px, 80%); margin-bottom: 14px; }
}
@media (prefers-reduced-motion: reduce) { .splash { display: none; } .gate-art img, .gate-in { animation: none; } }
