/* ============================================================
   USA USED MACHINES LLC — Houston Steel
   Design system: temperature-of-steel · OLED black
   Cold gunmetal → forge amber → white-hot
   Type: Fraunces (display) · Archivo (UI) · JetBrains Mono (data)
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  --void:      #050505;
  --carbon:    #0b0c0e;
  --gunmetal:  #14171b;
  --gunmetal-2:#1b1f25;
  --hairline:  rgba(255,255,255,0.09);
  --hairline-2:rgba(255,255,255,0.05);

  --steel:     #8a93a0;   /* cold secondary text */
  --steel-dim: #59606b;
  --paper:     #f2eee8;   /* warm white — primary text */

  --forge:     #e8600a;   /* primary amber */
  --forge-hot: #ff8a2b;
  --white-hot: #ffe7c4;

  --glow-cold: rgba(120,150,190,0.30);
  --glow-hot:  rgba(232,96,10,0.42);

  --shell:     min(1320px, 92vw);
  --gutter:    clamp(20px, 5vw, 64px);

  --font-display: "Fraunces", Georgia, serif;
  --font-ui:      "Archivo", system-ui, -apple-system, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease:     cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: auto; /* Lenis handles smooth scroll */
}

body {
  font-family: var(--font-ui);
  background: var(--void);
  color: var(--paper);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: 0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

::selection { background: var(--forge); color: #0a0a0a; }

/* ---------- Film grain overlay ---------- */
.grain {
  position: fixed;
  inset: -50%;
  width: 200%;
  height: 200%;
  pointer-events: none;
  z-index: 9000;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainshift 0.6s steps(2) infinite;
  will-change: transform;
}
@keyframes grainshift {
  0%   { transform: translate(0,0); }
  25%  { transform: translate(-4%, 3%); }
  50%  { transform: translate(3%, -5%); }
  75%  { transform: translate(-2%, 4%); }
  100% { transform: translate(4%, -2%); }
}

/* Ambient temperature vignette behind everything */
.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(60% 50% at 50% 8%, var(--glow-cold), transparent 70%),
    radial-gradient(70% 60% at 50% 105%, var(--glow-hot), transparent 65%);
  opacity: 0.6;
  transition: background 0.6s linear;
}

/* ---------- Custom cursor ---------- */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0; left: 0;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9500;
  transform: translate(-50%, -50%);
  mix-blend-mode: difference;
}
.cursor-dot  { width: 6px; height: 6px; background: var(--white-hot); }
.cursor-ring {
  width: 34px; height: 34px;
  border: 1px solid rgba(255,255,255,0.5);
  transition: width 0.25s var(--ease-out), height 0.25s var(--ease-out),
              background 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}
.cursor-ring.is-hot {
  width: 56px; height: 56px;
  border-color: var(--forge-hot);
  background: rgba(232,96,10,0.12);
}
@media (hover: none), (pointer: coarse) {
  .cursor-dot, .cursor-ring { display: none; }
}

/* ============================================================
   Layout primitives
   ============================================================ */
.shell { width: var(--shell); margin-inline: auto; }
main { position: relative; z-index: 1; }

.block { padding-block: clamp(90px, 13vh, 170px); position: relative; }
.block--tight { padding-block: clamp(60px, 8vh, 110px); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--forge);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: var(--forge);
  opacity: 0.7;
}

h2 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.1rem, 5.2vw, 4.2rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin-top: 22px;
}
h3 {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 1.18rem;
  letter-spacing: -0.01em;
}
.lede {
  color: var(--steel);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  max-width: 56ch;
  line-height: 1.65;
}

/* Reveal animation baseline (JS adds .in) */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}
[data-reveal].in { opacity: 1; transform: none; }
.line-mask { display: block; overflow: hidden; }
.line-mask > span {
  display: block;
  transform: translateY(105%);
  transition: transform 0.9s var(--ease-out);
}
.line-mask.in > span { transform: none; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  padding: 15px 26px;
  border: 1px solid transparent;
  border-radius: 2px;
  transition: transform 0.3s var(--ease-out), background 0.3s var(--ease),
              color 0.3s var(--ease), border-color 0.3s var(--ease);
  will-change: transform;
}
.btn svg { width: 17px; height: 17px; }
.btn--primary {
  background: var(--forge);
  color: #0a0a0a;
  box-shadow: 0 0 0 rgba(232,96,10,0);
}
.btn--primary:hover {
  background: var(--forge-hot);
  transform: translateY(-2px);
  box-shadow: 0 14px 40px -12px rgba(232,96,10,0.6);
}
.btn--ghost {
  background: transparent;
  color: var(--paper);
  border-color: var(--hairline);
}
.btn--ghost:hover {
  border-color: var(--forge);
  color: var(--white-hot);
  transform: translateY(-2px);
}
.btn--sm { padding: 10px 18px; font-size: 0.82rem; }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  padding: 20px 0;
  transition: background 0.4s var(--ease), backdrop-filter 0.4s var(--ease),
              border-color 0.4s var(--ease), padding 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.stuck {
  background: rgba(5,5,5,0.72);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--hairline-2);
  padding: 13px 0;
}
.header-inner {
  width: var(--shell);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo-block { display: flex; flex-direction: column; line-height: 1.1; }
.logo-name {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.42rem;
  letter-spacing: -0.01em;
}
.logo-name span { color: var(--forge); }
.logo-location {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--steel-dim);
  margin-top: 3px;
}
.site-nav { display: flex; align-items: center; gap: 34px; list-style: none; }
.site-nav a {
  font-size: 1rem;
  color: var(--steel);
  letter-spacing: 0.01em;
  transition: color 0.25s var(--ease);
  position: relative;
}
.site-nav a:not(.btn-nav)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -5px;
  width: 0; height: 1px;
  background: var(--forge);
  transition: width 0.3s var(--ease-out);
}
.site-nav a:not(.btn-nav):hover { color: var(--paper); }
.site-nav a:not(.btn-nav):hover::after { width: 100%; }
.btn-nav {
  padding: 9px 18px;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  color: var(--paper);
  transition: border-color 0.25s, color 0.25s, background 0.25s;
}
.btn-nav:hover { border-color: var(--forge); color: var(--white-hot); background: rgba(232,96,10,0.08); }
.nav-toggle { display: none; }

/* ============================================================
   HERO — pinned WebGL + exploded view
   ============================================================ */
.hero {
  position: relative;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
}
.hero-stage {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
/* Giant display word behind the machine */
.hero-word {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -54%);
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(4.5rem, 21vw, 20rem);
  line-height: 0.82;
  letter-spacing: -0.04em;
  text-align: center;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.10);
  z-index: 1;
  pointer-events: none;
  white-space: nowrap;
  user-select: none;
}
.hero-word b {
  display: block;
  color: var(--paper);
  -webkit-text-stroke: 0;
  background: linear-gradient(180deg, #fff 0%, #cfd4da 55%, #6d7480 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
/* WebGL canvas layered above the word */
#cnc-canvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
}
/* Static fallback hero art */
.hero-fallback {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  place-items: center;
}
.hero-fallback svg { width: min(60vw, 520px); filter: drop-shadow(0 0 60px rgba(232,96,10,0.35)); }
body.no-webgl .hero-fallback { display: grid; }
body.no-webgl #cnc-canvas { display: none; }

/* Hotspot callouts (machinist inspection style) */
.hotspots { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.hotspot {
  position: absolute;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.hotspot.show { opacity: 1; }
.hotspot-node {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--forge-hot);
  box-shadow: 0 0 0 4px rgba(232,96,10,0.18), 0 0 14px 2px rgba(232,96,10,0.7);
}
.hotspot-label {
  position: absolute;
  left: 20px; top: -10px;
  white-space: nowrap;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white-hot);
  padding-left: 14px;
  border-left: 1px solid rgba(255,231,196,0.35);
}
/* right-third hotspots: render the label to the LEFT of the node so it can't clip off-screen */
.hotspot.flip .hotspot-label {
  left: auto; right: 20px;
  text-align: right;
  padding-left: 0; padding-right: 14px;
  border-left: none;
  border-right: 1px solid rgba(255,231,196,0.35);
}
.hotspot-label b { display: block; color: var(--paper); font-weight: 700; font-size: 0.72rem; letter-spacing: 0.04em; }
.hotspot-label span { color: var(--steel); }

/* Hero foreground copy */
.hero-ui {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 118px 0 42px;
  pointer-events: none;
}
.hero-ui .shell { width: var(--shell); margin-inline: auto; }
.hero-tag {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--forge);
  display: flex; align-items: center; gap: 12px;
}
.hero-tag::before { content:""; width: 34px; height: 1px; background: var(--forge); }
.hero-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.hero-headline {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.4rem, 4.8vw, 4.2rem);
  line-height: 1.0;
  letter-spacing: -0.025em;
  max-width: 16ch;
}
.hero-headline em { font-style: normal; color: var(--forge); }
.hero-actions { display: flex; gap: 14px; pointer-events: auto; flex-wrap: wrap; }
.hero-readout {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--steel-dim);
  pointer-events: auto;
}
.hero-readout b { color: var(--steel); font-weight: 500; }
.scroll-cue {
  position: absolute;
  bottom: 26px; left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--steel-dim);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.scroll-cue .rail { width: 1px; height: 42px; background: linear-gradient(var(--forge), transparent); animation: railpulse 2.4s var(--ease) infinite; }
@keyframes railpulse { 0%,100%{ opacity: 0.3; transform: scaleY(0.7);} 50%{opacity:1; transform: scaleY(1);} }

/* ---------- Hero video (loop / muted / light mask) ---------- */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  /* pull the cool blue render toward the OLED-steel palette */
  filter: saturate(0.9) contrast(1.05) brightness(0.9);
}
.hero-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  /* leve máscara — machine stays visible, white type stays legible */
  background:
    linear-gradient(180deg, rgba(5,5,5,0.55) 0%, rgba(5,5,5,0.18) 34%, rgba(5,5,5,0.30) 62%, rgba(5,5,5,0.82) 100%),
    radial-gradient(120% 92% at 50% -12%, rgba(5,5,5,0) 42%, rgba(5,5,5,0.5) 100%),
    linear-gradient(180deg, transparent 68%, rgba(232,96,10,0.10) 100%);
}

/* ---------- Anatomy — closing exploded-machine fold ---------- */
.anatomy {
  position: relative;
  height: 100vh;
  min-height: 640px;
  overflow: hidden;
  background: radial-gradient(80% 70% at 50% 42%, var(--carbon), var(--void) 82%);
  border-top: 1px solid var(--hairline-2);
}
.anatomy::before {
  content: "";
  position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: linear-gradient(180deg, rgba(5,5,5,0.66) 0%, rgba(5,5,5,0) 30%);
}
.anatomy-stage { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; }
.anatomy-ui {
  position: absolute;
  inset: 0;
  z-index: 4;
  padding: clamp(58px, 11vh, 128px) 0 0;
  pointer-events: none;
}
.anatomy-ui .shell { width: var(--shell); margin-inline: auto; }
.anatomy-ui .eyebrow,
.anatomy-headline,
.anatomy-lede { text-shadow: 0 2px 28px rgba(5,5,5,0.92); }
.anatomy-headline {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 4.4vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin-top: 14px;
  max-width: 18ch;
}
.anatomy-headline em { font-style: normal; color: var(--forge); }
.anatomy-lede { color: var(--steel); margin-top: 16px; font-size: 0.98rem; max-width: 42ch; }
@media (max-width: 820px) {
  .anatomy { height: auto; min-height: 0; padding: 72px 0 84px; }
  .anatomy-stage { position: relative; inset: auto; height: 58vh; margin-top: 28px; }
  .anatomy-ui { position: relative; inset: auto; padding: 0; }
}

/* ---------- Machine detail modal ---------- */
.mm-overlay { position: fixed; inset: 0; z-index: 9600; background: rgba(3,4,6,0.82); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 24px; overflow-y: auto; }
.mm-box { position: relative; width: min(1040px, 96vw); max-height: 92vh; overflow: auto; background: var(--carbon); border: 1px solid var(--hairline); display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 0; }
.mm-close { position: absolute; top: 12px; right: 12px; z-index: 2; width: 38px; height: 38px; border: 1px solid var(--hairline); background: rgba(0,0,0,0.4); color: var(--paper); font-size: 1rem; }
.mm-close:hover { border-color: var(--forge); color: var(--forge-hot); }
.mm-gallery { background: #0a0b0d; padding: 18px; display: flex; flex-direction: column; gap: 12px; }
.mm-main-wrap { aspect-ratio: 4/3; background: #05060a; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--hairline-2); }
.mm-main-wrap img { width: 100%; height: 100%; object-fit: cover; }
.mm-glyph { color: var(--steel-dim); }
.mm-glyph svg { width: 40%; }
.mm-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.mm-thumb { width: 72px; height: 56px; object-fit: cover; border: 1px solid var(--hairline-2); cursor: pointer; opacity: 0.6; transition: opacity .2s, border-color .2s; }
.mm-thumb:hover, .mm-thumb.active { opacity: 1; border-color: var(--forge); }
.mm-info { padding: 40px 34px 34px; display: flex; flex-direction: column; gap: 14px; }
.mm-info h3 { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; line-height: 1.1; }
.mm-price { font-family: var(--font-mono); color: var(--forge); font-size: 1.2rem; }
.mm-specs { display: flex; flex-wrap: wrap; gap: 8px; }
.mm-desc { color: var(--steel); font-size: 0.95rem; line-height: 1.7; }
.mm-info .btn { margin-top: 6px; align-self: flex-start; }
@media (max-width: 760px) { .mm-box { grid-template-columns: 1fr; } }

/* ============================================================
   Value floor — minimum transaction band
   ============================================================ */
.valuefloor {
  border-top: 1px solid var(--hairline-2);
  border-bottom: 1px solid var(--hairline-2);
  background: linear-gradient(180deg, var(--carbon), var(--void));
}
.valuefloor-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(24px, 5vw, 70px);
  align-items: center;
}
.vf-figure {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--white-hot);
  white-space: nowrap;
}
.vf-figure small {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--forge);
  margin-top: 14px;
}
.vf-text p { color: var(--steel); max-width: 60ch; }
.vf-text p + p { margin-top: 14px; }

/* ============================================================
   Headhunter — 4-step sequence (numbering justified)
   ============================================================ */
.headhunter-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(40px, 7vw, 110px);
  align-items: start;
}
.steps { list-style: none; margin-top: 40px; display: grid; gap: 2px; }
.step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 26px;
  align-items: baseline;
  padding: 26px 4px;
  border-top: 1px solid var(--hairline-2);
  transition: padding-left 0.4s var(--ease-out);
}
.step:last-child { border-bottom: 1px solid var(--hairline-2); }
.step:hover { padding-left: 16px; }
.step-num {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--forge);
  letter-spacing: 0.1em;
}
.step h4 { font-family: var(--font-ui); font-weight: 600; font-size: 1.02rem; margin-bottom: 6px; }
.step p { color: var(--steel); font-size: 0.94rem; }

.sourcing-panel {
  border: 1px solid var(--hairline);
  background: linear-gradient(160deg, var(--gunmetal), var(--carbon));
  padding: clamp(28px, 4vw, 44px);
  border-radius: 3px;
  position: sticky;
  top: 100px;
}
.sourcing-panel .eyebrow { color: var(--steel); }
.sourcing-panel .eyebrow::before { background: var(--steel); }
.timeframe {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  letter-spacing: -0.02em;
  margin: 18px 0 8px;
  color: var(--white-hot);
}
.sourcing-panel > p { color: var(--steel); font-size: 0.92rem; }
.capabilities { list-style: none; margin-top: 26px; display: grid; gap: 14px; }
.capabilities li {
  display: flex; align-items: center; gap: 12px;
  font-size: 0.9rem; color: var(--steel);
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}
.capabilities svg { width: 15px; height: 15px; stroke: var(--forge); flex: none; }

/* ============================================================
   Catalog
   ============================================================ */
.catalog-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
  margin-bottom: 44px;
}
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-btn {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel);
  background: transparent;
  border: 1px solid var(--hairline-2);
  border-radius: 2px;
  padding: 8px 15px;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.filter-btn:hover { color: var(--paper); border-color: var(--hairline); }
.filter-btn.active { color: #0a0a0a; background: var(--forge); border-color: var(--forge); }

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.machine-card {
  position: relative;
  border: 1px solid var(--hairline-2);
  background: linear-gradient(180deg, var(--gunmetal), var(--carbon));
  border-radius: 3px;
  overflow: hidden;
  transform-style: preserve-3d;
  transition: border-color 0.4s var(--ease), transform 0.3s var(--ease-out), box-shadow 0.4s var(--ease);
  will-change: transform;
}
.machine-card:hover {
  border-color: rgba(232,96,10,0.4);
  box-shadow: 0 30px 70px -30px rgba(232,96,10,0.35);
}
.machine-media {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  background:
    radial-gradient(120% 120% at 70% 20%, rgba(232,96,10,0.10), transparent 55%),
    repeating-linear-gradient(135deg, rgba(255,255,255,0.03) 0 2px, transparent 2px 22px),
    var(--carbon);
  border-bottom: 1px solid var(--hairline-2);
  position: relative;
  overflow: hidden;
}
.machine-media img { width: 100%; height: 100%; object-fit: cover; }
.machine-media .glyph { width: 44%; opacity: 0.28; stroke: var(--steel); transition: opacity 0.4s, stroke 0.4s; }
.machine-card:hover .machine-media .glyph { opacity: 0.55; stroke: var(--forge); }
.machine-idx {
  position: absolute;
  top: 12px; left: 14px;
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.14em;
  color: var(--steel-dim);
}
.machine-body { padding: 22px; }
.machine-cat {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--forge);
}
.machine-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.22rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 10px 0 8px;
}
.machine-desc { color: var(--steel); font-size: 0.88rem; line-height: 1.5; min-height: 2.6em; }
.machine-specs {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin: 16px 0;
}
.spec-tag {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.04em;
  color: var(--steel);
  border: 1px solid var(--hairline-2);
  padding: 4px 9px;
  border-radius: 2px;
}
.machine-foot {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 14px;
  padding-top: 16px;
  border-top: 1px solid var(--hairline-2);
}
.machine-price {
  font-family: var(--font-mono);
  font-size: 1.06rem;
  font-weight: 600;
  color: var(--white-hot);
}
.machine-price small {
  display: block;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel-dim);
  margin-top: 4px;
  font-weight: 400;
}

/* Catalog states */
.catalog-loading, .catalog-empty, .catalog-error {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--steel);
}
.spinner {
  width: 30px; height: 30px;
  margin: 0 auto 18px;
  border: 2px solid var(--hairline);
  border-top-color: var(--forge);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.catalog-error p:nth-child(2) { font-size: 0.78rem; color: var(--steel-dim); font-family: var(--font-mono); margin-top: 6px; }

/* ============================================================
   Why us
   ============================================================ */
.why-grid {
  margin-top: 50px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1px;
  background: var(--hairline-2);
  border: 1px solid var(--hairline-2);
}
.why-card {
  background: var(--carbon);
  padding: 34px 30px;
  transition: background 0.4s var(--ease);
}
.why-card:hover { background: var(--gunmetal); }
.why-icon {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border: 1px solid var(--hairline);
  border-radius: 2px;
  margin-bottom: 22px;
  color: var(--forge);
}
.why-icon svg { width: 20px; height: 20px; }
.why-card h3 { margin-bottom: 10px; }
.why-card p { color: var(--steel); font-size: 0.92rem; line-height: 1.6; }

/* ============================================================
   Contact
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(36px, 6vw, 90px);
  align-items: start;
}
.contact-details { list-style: none; margin-top: 36px; display: grid; gap: 22px; }
.contact-details li { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; }
.contact-icon { color: var(--forge); margin-top: 3px; width: 18px; height: 18px; }
.contact-details strong { display: block; font-weight: 600; font-size: 0.82rem; letter-spacing: 0.02em; margin-bottom: 4px; }
.contact-details li > div { color: var(--steel); font-size: 0.9rem; line-height: 1.5; }
.lang-note {
  margin-top: 30px;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--steel);
  letter-spacing: 0.02em;
}
.lang-note strong { color: var(--paper); }

.form-card {
  border: 1px solid var(--hairline);
  background: linear-gradient(160deg, var(--gunmetal), var(--carbon));
  border-radius: 3px;
  padding: clamp(28px, 4vw, 44px);
}
.form-card > h3 { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; }
.form-card > h3 svg { stroke: var(--forge); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-group { display: flex; flex-direction: column; }
.form-group.full { grid-column: 1 / -1; }
label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 8px;
}
input, select, textarea {
  font-family: var(--font-ui);
  font-size: 0.94rem;
  color: var(--paper);
  background: rgba(0,0,0,0.35);
  border: 1px solid var(--hairline);
  border-radius: 2px;
  padding: 13px 14px;
  transition: border-color 0.25s, background 0.25s, box-shadow 0.25s;
  width: 100%;
}
input::placeholder, textarea::placeholder { color: var(--steel-dim); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--forge);
  background: rgba(0,0,0,0.55);
  box-shadow: 0 0 0 3px rgba(232,96,10,0.14);
}
textarea { resize: vertical; min-height: 120px; }
select { appearance: none; cursor: pointer; }
.form-submit { margin-top: 22px; }
#form-feedback, #chat-feedback { display: none; margin-top: 16px; font-size: 0.88rem; padding: 12px 14px; border-radius: 2px; }
#form-feedback.success, #chat-feedback.success { display: block; background: rgba(232,96,10,0.10); border: 1px solid rgba(232,96,10,0.35); color: var(--white-hot); }
#form-feedback.error, #chat-feedback.error { display: block; background: rgba(220,60,60,0.10); border: 1px solid rgba(220,60,60,0.35); color: #ffb4b4; }
#form-feedback.partner-note, #chat-feedback.partner-note { display: block; background: rgba(120,150,190,0.10); border: 1px solid rgba(120,150,190,0.3); color: var(--steel); }

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--hairline-2);
  background: var(--carbon);
  padding-top: clamp(60px, 8vh, 90px);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 50px;
}
.footer-brand p { color: var(--steel); font-size: 0.9rem; margin-top: 18px; max-width: 34ch; line-height: 1.6; }
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--forge);
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; display: grid; gap: 11px; }
.footer-col a { color: var(--steel); font-size: 0.9rem; transition: color 0.25s; }
.footer-col a:hover { color: var(--paper); }
.footer-address { font-style: normal; color: var(--steel); font-size: 0.86rem; line-height: 1.7; }
.footer-address strong { color: var(--paper); }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
  padding: 24px 0;
  border-top: 1px solid var(--hairline-2);
}
.footer-bottom p { color: var(--steel-dim); font-size: 0.8rem; font-family: var(--font-mono); letter-spacing: 0.02em; }
.footer-legal { display: flex; gap: 22px; }
.footer-legal a { color: var(--steel-dim); font-size: 0.8rem; transition: color 0.25s; }
.footer-legal a:hover { color: var(--forge); }

/* ============================================================
   Chat widget
   ============================================================ */
.chat-widget { position: fixed; bottom: 26px; right: 26px; z-index: 600; }
.chat-panel {
  position: absolute;
  bottom: 74px; right: 0;
  width: min(360px, 88vw);
  background: var(--gunmetal);
  border: 1px solid var(--hairline);
  border-radius: 4px;
  overflow: hidden;
  opacity: 0; visibility: hidden;
  transform: translateY(12px) scale(0.98);
  transform-origin: bottom right;
  transition: opacity 0.3s var(--ease-out), transform 0.3s var(--ease-out), visibility 0.3s;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.7);
}
.chat-panel.open { opacity: 1; visibility: visible; transform: none; }
.chat-panel-header {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--hairline-2);
  background: linear-gradient(180deg, rgba(232,96,10,0.12), transparent);
}
.chat-avatar {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  background: var(--forge); color: #0a0a0a;
  border-radius: 3px; font-size: 1.1rem;
}
.chat-panel-header h4 { font-family: var(--font-ui); font-weight: 600; font-size: 0.95rem; }
.chat-panel-header span { font-family: var(--font-mono); font-size: 0.62rem; color: var(--steel); letter-spacing: 0.02em; }
.chat-panel-body { padding: 20px; }
.chat-intro { color: var(--steel); font-size: 0.88rem; margin-bottom: 18px; line-height: 1.55; }
.chat-form { display: grid; gap: 12px; }
.chat-trigger {
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--forge);
  color: #0a0a0a;
  border: none;
  display: grid; place-items: center;
  box-shadow: 0 14px 40px -10px rgba(232,96,10,0.6);
  transition: transform 0.3s var(--ease-out), background 0.3s;
}
.chat-trigger:hover { transform: scale(1.06); background: var(--forge-hot); }
.chat-trigger .icon-close { display: none; }
.chat-trigger.open .icon-chat { display: none; }
.chat-trigger.open .icon-close { display: block; }

/* ============================================================
   Toast
   ============================================================ */
.toast-container { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 9600; display: grid; gap: 10px; }
.toast {
  background: var(--gunmetal);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--forge);
  color: var(--paper);
  padding: 14px 20px;
  border-radius: 2px;
  font-size: 0.88rem;
  animation: toastin 0.4s var(--ease-out);
  box-shadow: 0 20px 50px -20px rgba(0,0,0,0.7);
}
@keyframes toastin { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 1000px) {
  .headhunter-grid, .contact-grid { grid-template-columns: 1fr; }
  .sourcing-panel { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .site-nav { display: none; }
  .site-nav.open {
    display: flex; flex-direction: column; align-items: flex-start; gap: 20px;
    position: fixed; inset: 0; top: 0;
    background: rgba(5,5,5,0.97);
    backdrop-filter: blur(10px);
    padding: 100px var(--gutter);
    z-index: 490;
  }
  .nav-toggle {
    display: grid; place-items: center;
    width: 42px; height: 42px;
    background: transparent; border: 1px solid var(--hairline);
    border-radius: 2px; color: var(--paper);
    z-index: 510;
  }
  .valuefloor-inner { grid-template-columns: 1fr; gap: 26px; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero-bottom { flex-direction: column; align-items: flex-start; gap: 24px; }
  .hero-word { font-size: clamp(4rem, 26vw, 9rem); }
  /* scroll cue overlaps the stacked hero stats on small screens — it's decorative (aria-hidden) */
  .scroll-cue { display: none; }
  /* keep the "Trusted Since 1998" tag off the screen edge */
  .hero-ui .shell { width: 100%; padding-inline: var(--gutter); }
  .hero-ui { padding-bottom: 30px; }
}

/* ============================================================
   Reduced motion
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
  .line-mask > span { transform: none; }
  .grain { animation: none; }
}
