/* ==========================================================================
   PolyMetric Fabrication LLC — Industrial Dark Mode stylesheet
   polymetricfab.com
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  --bg: #0D1015;            /* obsidian: page, header, hero, footer (logo blends here) */
  --bg-alt: #121417;        /* charcoal: alternating sections, topbar */
  --surface: #181C23;       /* dark slate: cards */
  --surface-2: #1E232C;     /* raised slate: inputs, hovered cards */
  --line: #2A313D;          /* steel border */
  --line-strong: #3A4352;
  --text: #E7EBF0;
  --text-soft: #C3CAD5;
  --muted: #9AA3B2;
  --dim: #6B7483;

  --cyan: #00A8E8;          /* precision cyan: primary actions, technical highlights */
  --cyan-deep: #0284C7;
  --cyan-tint: rgba(0, 168, 232, 0.12);
  --amber: #F59E0B;         /* safety amber: rush, capacity, key metrics */
  --amber-tint: rgba(245, 158, 11, 0.12);
  --green: #22C55E;
  --green-tint: rgba(34, 197, 94, 0.12);
  --red: #F87171;
  --red-tint: rgba(248, 113, 113, 0.12);

  --cat-industrial: #00A8E8;
  --cat-functional: #94A3B8;
  --cat-flexible: #34D399;
  --cat-specialty: #C4B5FD;

  --font-display: "Space Grotesk", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --radius-lg: 14px;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-xs: 4px;

  --container: 1200px;
  --gutter: 24px;
  --header-h: 112px;        /* topbar + nav, used for anchor offsets */

  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--cyan); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: #38BDF8; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--text);
  margin: 0;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

p { margin: 0; }

ul, ol { margin: 0; padding: 0; }

[hidden] { display: none !important; }

button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 4px;
}

::selection { background: rgba(0, 168, 232, 0.35); color: #fff; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--cyan);
  color: #04131c;
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.mono { font-family: var(--font-mono); font-feature-settings: "zero" 1; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.975rem;
  letter-spacing: 0.005em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease), color 0.15s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; flex: none; }

.btn-primary { background: var(--cyan); color: #03121B; }
.btn-primary:hover { background: #22B8F0; color: #03121B; }
.btn-primary:active { background: var(--cyan-deep); color: #fff; }

.btn-outline { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--cyan); color: var(--text); }

.btn-sm { min-height: 38px; padding: 0 16px; font-size: 0.9rem; }

.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ==========================================================================
   Header: live shop status topbar + sticky navigation
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
}

.topbar {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--text-soft);
}
.topbar .container {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding-top: 6px;
  padding-bottom: 6px;
}
.status-dot {
  position: relative;
  flex: none;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--green);
}
.status-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--green);
  opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .status-dot::after { animation: status-pulse 2.2s var(--ease) infinite; }
}
@keyframes status-pulse {
  0%   { transform: scale(0.6); opacity: 0.7; }
  80%  { transform: scale(1.6); opacity: 0; }
  100% { opacity: 0; }
}
.topbar[data-state="limited"] .status-dot,
.topbar[data-state="limited"] .status-dot::after { background-color: var(--amber); border-color: var(--amber); }
.topbar[data-state="limited"] .status-dot::after { background: none; }
.topbar[data-state="closed"] .status-dot,
.topbar[data-state="closed"] .status-dot::after { background-color: var(--red); border-color: var(--red); }
.topbar[data-state="closed"] .status-dot::after { background: none; animation: none; }

.status-text { line-height: 1.4; }

.announcement {
  background: var(--amber-tint);
  border-bottom: 1px solid rgba(245, 158, 11, 0.35);
  color: #FCD38A;
  font-size: 0.875rem;
}
.announcement .container { padding-top: 8px; padding-bottom: 8px; }
.announcement[hidden] { display: none; }

.navbar { border-bottom: 1px solid var(--line); background: var(--bg); }
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 76px;
}

/* Logo: the PNG sits on the same obsidian as the header so its dark box disappears.
   mix-blend-mode: lighten drops any background darker than the header. */
.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
  text-decoration: none;
  color: var(--text);
  min-height: 44px;
}
.brand-logo {
  height: auto;
  max-height: 56px;
  width: auto;
  max-width: 240px;
  object-fit: contain;
  mix-blend-mode: lighten;
}
.brand-fallback {
  display: none;
  align-items: center;
  gap: 12px;
}
.brand.logo-missing .brand-logo { display: none; }
.brand.logo-missing .brand-fallback { display: inline-flex; }
.brand-mark { width: 40px; height: 40px; flex: none; }
.brand-words { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}
.brand-sub {
  font-family: var(--font-display);
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  color: var(--text-soft);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.95rem;
  border-radius: var(--radius-sm);
}
.nav-links a:hover { color: var(--text); background: var(--surface); }
.nav-links a[aria-current="true"] { color: var(--text); }
.nav-links .nav-cta a[aria-current="true"] { color: #03121B; }
.nav-links { position: relative; }
.nav-ink {
  position: absolute; left: 0; top: 0; height: 2px; width: 0;
  background: var(--cyan); border-radius: 2px; pointer-events: none; opacity: 0;
  transition: transform .35s cubic-bezier(.4,0,.2,1), width .35s cubic-bezier(.4,0,.2,1), opacity .2s;
}
.nav-ink.is-on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .nav-ink { transition: opacity .2s; } }
.nav-links .nav-cta { margin-left: 10px; }
.nav-links .nav-cta a {
  background: var(--cyan);
  color: #03121B;
  font-weight: 600;
  padding: 0 18px;
  border-radius: var(--radius-sm);
}
.nav-links .nav-cta a:hover { background: #22B8F0; color: #03121B; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle svg { width: 22px; height: 22px; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  overflow: hidden;
  background-color: var(--bg);
  padding: 72px 0 0;
}
/* faint drafting grid, faded toward the edges */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(42, 49, 61, 0.45) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(42, 49, 61, 0.45) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 70% 40%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 75% 70% at 70% 40%, #000 20%, transparent 75%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 48px;
  align-items: center;
}
.hero-copy { max-width: 640px; }
.hero h1 {
  font-size: clamp(2.35rem, 4.4vw, 3.6rem);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.hero-sub {
  margin-top: 22px;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--text-soft);
  max-width: 58ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}
.hero-area {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 28px;
  color: var(--muted);
  font-size: 0.925rem;
  max-width: 56ch;
}
.hero-area svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--cyan); }

/* Build envelope drawing */
.envelope {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 500px;
}
.envelope svg { width: 100%; height: auto; overflow: visible; }
.env-grid { stroke: rgba(58, 67, 82, 0.55); stroke-width: 1; }
.env-hidden { stroke: var(--dim); stroke-width: 1; stroke-dasharray: 5 5; fill: none; }
.env-edge { stroke: #8FA2B8; stroke-width: 1.4; fill: none; stroke-linecap: round; }
.part-face { stroke: var(--cyan); stroke-width: 1.4; stroke-linejoin: round; }
.part-face-top { fill: rgba(0, 168, 232, 0.30); }
.part-face-right { fill: rgba(0, 168, 232, 0.16); }
.part-face-front { fill: rgba(2, 132, 199, 0.22); }
.part-hole { fill: #0B1E2B; stroke: var(--cyan); stroke-width: 1.2; }
.dim-line, .dim-ext { stroke: var(--amber); stroke-width: 1; fill: none; }
.dim-ext { opacity: 0.7; }
.dim-label rect { fill: var(--bg); stroke: rgba(245, 158, 11, 0.55); stroke-width: 1; }
.dim-label text { fill: var(--amber); font-family: var(--font-mono); font-size: 13px; font-weight: 600; }
.tb-frame { fill: var(--bg); stroke: var(--line-strong); stroke-width: 1; }
.tb-rule { stroke: var(--line-strong); stroke-width: 1; }
.tb-key { fill: var(--dim); font-family: var(--font-mono); font-size: 9px; letter-spacing: 0.08em; }
.tb-val { fill: var(--text); font-family: var(--font-mono); font-size: 12px; }
.tb-val.cyan { fill: var(--cyan); }

/* The one orchestrated motion moment: the drawing plots itself on load */
@media (prefers-reduced-motion: no-preference) {
  .js .envelope [pathLength] {
    stroke-dasharray: 1;
    stroke-dashoffset: 1;
    animation: plot 1.5s var(--ease) forwards;
  }
  .js .envelope .env-hidden { stroke-dasharray: 1; }
  .js .envelope .env-plate [pathLength] { animation-duration: 1.1s; }
  .js .envelope .env-part [pathLength] { animation-delay: 0.7s; }
  .js .envelope .env-part .part-face,
  .js .envelope .env-part .part-hole { fill-opacity: 0; animation: plot 1.2s var(--ease) 0.7s forwards, fill-in 0.6s ease 1.6s forwards; }
  .js .envelope .env-dims [pathLength] { animation-delay: 1.2s; animation-duration: 0.9s; }
  .js .envelope .dim-label,
  .js .envelope .title-block { opacity: 0; animation: fade-in 0.5s ease 1.9s forwards; }
}
@keyframes plot { to { stroke-dashoffset: 0; } }
@keyframes fill-in { to { fill-opacity: 1; } }
@keyframes fade-in { to { opacity: 1; } }
/* after plotting, restore the dashed hidden lines */
.envelope.plotted .env-hidden { stroke-dasharray: 5 5 !important; stroke-dashoffset: 0 !important; animation: none !important; }

/* ==========================================================================
   Capabilities & metrics title block
   ========================================================================== */
.metrics-wrap {
  position: relative;
  margin-top: 64px;
  padding-bottom: 72px;
}
.metrics-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.metrics-head h2 { font-size: 1.25rem; font-weight: 600; }
.metrics-head p { color: var(--muted); font-size: 0.875rem; }

.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  list-style: none;
}
.metric {
  position: relative;
  background: var(--surface);
  padding: 22px 24px 24px;
  min-height: 150px;
}
.metric::before {
  content: "";
  position: absolute;
  left: 0; top: 22px;
  width: 3px; height: 22px;
  background: var(--cyan);
  border-radius: 0 2px 2px 0;
}
.metric[data-accent="amber"]::before { background: var(--amber); }
.metric-label { font-size: 0.875rem; color: var(--muted); line-height: 1.35; }
.metric-value {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: clamp(1.25rem, 1.9vw, 1.55rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.2;
}
.metric-secondary {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 0.875rem;
  color: var(--cyan);
}
.metric[data-accent="amber"] .metric-secondary { color: var(--amber); }
.metric-note { margin-top: 10px; font-size: 0.85rem; color: var(--dim); line-height: 1.45; }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head h2 {
  font-size: clamp(1.85rem, 3vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.section-head p {
  margin-top: 14px;
  color: var(--text-soft);
  font-size: 1.075rem;
  max-width: 62ch;
}

/* ---------- Capabilities detail ---------- */
.cap-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 32px;
  align-items: start;
}
.spec-sheet {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.spec-sheet-head {
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}
.spec-sheet-head h3 { font-size: 1.15rem; font-weight: 600; }
.spec-sheet-head p { margin-top: 6px; color: var(--muted); font-size: 0.925rem; }
.spec-list { margin: 0; }
.spec-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 16px;
  padding: 13px 24px;
  border-bottom: 1px solid var(--line);
}
.spec-row:last-child { border-bottom: 0; }
.spec-row:nth-child(even) { background: rgba(30, 35, 44, 0.5); }
.spec-row dt { color: var(--muted); font-size: 0.9rem; }
.spec-row dd { margin: 0; font-family: var(--font-mono); font-size: 0.875rem; color: var(--text); line-height: 1.55; }

.machinist {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.fcf { width: 100%; max-width: 280px; height: auto; margin-bottom: 22px; }
.fcf rect { fill: none; stroke: var(--cyan); stroke-width: 1.5; }
.fcf line, .fcf circle { fill: none; stroke: var(--cyan); stroke-width: 1.5; }
.fcf text { fill: var(--text); font-family: var(--font-mono); font-size: 15px; }
.machinist h3 { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.02em; }
.machinist > p { margin-top: 10px; color: var(--text-soft); }
.check-list { list-style: none; margin-top: 18px; display: grid; gap: 12px; }
.check-list li {
  position: relative;
  padding-left: 28px;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.5;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 2px; top: 6px;
  width: 12px; height: 7px;
  border-left: 2px solid var(--cyan);
  border-bottom: 2px solid var(--cyan);
  transform: rotate(-45deg);
}
.check-list strong { color: var(--text); font-weight: 600; }

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  list-style: none;
}
.service-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.service-icon {
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--cyan);
  margin-bottom: 18px;
}
.service-icon svg { width: 24px; height: 24px; }
.service-card h3 { font-size: 1.3rem; font-weight: 600; letter-spacing: -0.015em; }
.service-summary { margin-top: 10px; color: var(--text-soft); }
.service-points { list-style: none; margin-top: 18px; display: grid; gap: 9px; }
.service-points li {
  position: relative;
  padding-left: 20px;
  font-size: 0.95rem;
  color: var(--text-soft);
  line-height: 1.5;
}
.service-points li::before {
  content: "";
  position: absolute;
  left: 2px; top: 0.62em;
  width: 7px; height: 7px;
  background: var(--cyan);
  border-radius: 1px;
}
.service-foot {
  margin-top: auto;
  padding-top: 22px;
}
.service-note { color: var(--muted); font-size: 0.9rem; padding-top: 16px; border-top: 1px solid var(--line); }
.service-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 6px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--cyan);
  text-decoration: none;
}
.service-link:hover { text-decoration: underline; }

/* ---------- Materials catalog ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.filters {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}
.filters::-webkit-scrollbar { display: none; }
.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-soft);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.925rem;
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.filter-btn:hover { border-color: var(--line-strong); color: var(--text); }
.filter-btn[aria-pressed="true"] { background: var(--cyan); border-color: var(--cyan); color: #03121B; }
.filter-count {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}
.filter-btn[aria-pressed="true"] .filter-count { background: rgba(3, 18, 27, 0.18); }
.catalog-status { color: var(--muted); font-size: 0.9rem; }

.materials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(272px, 1fr));
  gap: 16px;
}
.material-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 20px 22px;
}
.material-card[hidden] { display: none; }
.material-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.cat-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.775rem;
  color: var(--muted);
  line-height: 1.3;
}
.cat-badge::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 2px;
  background: var(--cat-color, var(--cyan));
  flex: none;
}
.cat-industrial { --cat-color: var(--cat-industrial); }
.cat-functional { --cat-color: var(--cat-functional); }
.cat-flexible { --cat-color: var(--cat-flexible); }
.cat-specialty { --cat-color: var(--cat-specialty); }

.stock-badge {
  flex: none;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  border: 1px solid currentColor;
  white-space: nowrap;
}
.stock-in-stock { color: var(--green); background: var(--green-tint); }
.stock-limited { color: var(--amber); background: var(--amber-tint); }
.stock-special-order { color: var(--amber); background: var(--amber-tint); }
.stock-unavailable { color: var(--dim); background: rgba(107, 116, 131, 0.12); }

.material-name { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.01em; }
.material-sub { margin-top: 3px; color: var(--muted); font-size: 0.9rem; }
.material-spec {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--cyan);
}
.props {
  display: grid;
  gap: 7px;
  margin: 16px 0 0;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.prop { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.prop dt { font-size: 0.82rem; color: var(--text-soft); }
.prop dd { margin: 0; }
.meter { display: inline-flex; gap: 3px; }
.meter i {
  display: block;
  width: 16px; height: 7px;
  border-radius: 1.5px;
  background: var(--line);
}
.meter i.on { background: var(--cyan); }
.material-desc { margin-top: 14px; color: var(--text-soft); font-size: 0.9rem; line-height: 1.55; }
.apps { margin-top: 14px; }
.apps h4 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0;
}
.apps ul { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.apps li {
  font-size: 0.78rem;
  color: var(--text-soft);
  padding: 3px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xs);
  background: var(--surface-2);
}
.catalog-note { margin-top: 24px; color: var(--dim); font-size: 0.85rem; max-width: 90ch; }

/* ---------- How it works ---------- */
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  counter-reset: step;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.step {
  position: relative;
  padding: 28px 24px 30px;
  background: var(--surface);
  border-right: 1px solid var(--line);
  counter-increment: step;
}
.step:last-child { border-right: 0; }
.step::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cyan);
  margin-bottom: 18px;
}
.step::after {
  content: "";
  position: absolute;
  top: 38px; left: 64px; right: 24px;
  height: 1px;
  background: linear-gradient(to right, var(--line-strong), transparent);
}
.step h3 { font-size: 1.1rem; font-weight: 600; }
.step p { margin-top: 10px; color: var(--text-soft); font-size: 0.925rem; line-height: 1.55; }

/* ---------- Quote ---------- */
.quote-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 0.9fr);
  gap: 28px;
  align-items: start;
}
.quote-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 32px;
}
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field-full { grid-column: 1 / -1; }
.field label, .field legend, .fieldset-label {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}
.req { color: var(--cyan); margin-left: 2px; }
.optional { color: var(--dim); font-weight: 400; font-size: 0.82rem; margin-left: 4px; }
.hint { color: var(--dim); font-size: 0.82rem; line-height: 1.45; }

.input, .select, .textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 0.975rem;
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--dim); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--line-strong); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px var(--cyan-tint);
}
.textarea { min-height: 140px; resize: vertical; line-height: 1.55; }
.select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%239AA3B2' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  cursor: pointer;
}
.select option, .select optgroup { background: var(--surface-2); color: var(--text); }
.field.has-error .input,
.field.has-error .select,
.field.has-error .textarea { border-color: var(--red); }
.field-error { color: var(--red); font-size: 0.82rem; min-height: 0; }
.field-error:empty { display: none; }

fieldset.field { border: 0; padding: 0; margin: 0; }
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-check { position: relative; }
.chip-check input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip-check span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: 0.9rem;
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease), color 0.15s var(--ease);
}
.chip-check span::before {
  content: "";
  width: 14px; height: 14px;
  border: 1.5px solid var(--line-strong);
  border-radius: 3px;
  flex: none;
}
.chip-check input:hover + span { border-color: var(--line-strong); }
.chip-check input:checked + span { border-color: var(--cyan); color: var(--text); background: var(--cyan-tint); }
.chip-check input:checked + span::before {
  background: var(--cyan) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='8' viewBox='0 0 10 8'%3E%3Cpath d='M1 4l2.6 2.6L9 1.2' fill='none' stroke='%2303121B' stroke-width='1.8'/%3E%3C/svg%3E") center / 10px 8px no-repeat;
  border-color: var(--cyan);
}
.chip-check input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }

.turnaround-rush { color: var(--amber); }

/* Dropzone */
.dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 30px 20px;
  border: 1.5px dashed var(--line-strong);
  border-radius: var(--radius);
  background: rgba(30, 35, 44, 0.55);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s var(--ease), background-color 0.15s var(--ease);
}
.dropzone:hover { border-color: var(--cyan); }
.dropzone.is-dragover { border-color: var(--cyan); background: var(--cyan-tint); }
.dropzone-input:focus-visible + .dropzone { outline: 2px solid var(--cyan); outline-offset: 3px; }
.dropzone svg { width: 34px; height: 34px; color: var(--cyan); }
.dropzone-title { font-family: var(--font-display); font-weight: 600; font-size: 1rem; color: var(--text); }
.dropzone-title u { color: var(--cyan); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.dropzone-types { font-family: var(--font-mono); font-size: 0.74rem; color: var(--dim); line-height: 1.6; max-width: 46ch; }

.upload-meter { display: flex; align-items: center; gap: 12px; margin-top: 4px; font-size: 0.8rem; color: var(--muted); }
.upload-meter-bar { flex: 1; height: 4px; background: var(--line); border-radius: 999px; overflow: hidden; }
.upload-meter-fill { height: 100%; width: 0; background: var(--cyan); transition: width 0.2s var(--ease); }
.upload-meter.is-near .upload-meter-fill { background: var(--amber); }
.upload-meter .mono { white-space: nowrap; }

.file-list { list-style: none; display: grid; gap: 8px; margin-top: 4px; }
.file-list:empty { display: none; }
.file-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.file-ext {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--cyan);
  border: 1px solid rgba(0, 168, 232, 0.45);
  border-radius: 3px;
  padding: 2px 5px;
  min-width: 44px;
  text-align: center;
}
.file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9rem; }
.file-size { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); white-space: nowrap; }
.file-remove {
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: var(--muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}
.file-remove:hover { color: var(--red); background: var(--red-tint); }
.dropzone-errors { color: var(--red); font-size: 0.85rem; display: grid; gap: 4px; }
.dropzone-errors:empty { display: none; }

.ack {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.ack input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--cyan); flex: none; cursor: pointer; }
.ack label { font-size: 0.9rem; color: var(--text-soft); line-height: 1.5; cursor: pointer; }
.field.has-error .ack { border-color: var(--red); }

.link-btn {
  display: inline;
  padding: 0;
  border: 0;
  background: none;
  color: var(--cyan);
  font: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-top: 26px;
}
.form-actions .btn { min-width: 220px; }
.form-legal { font-size: 0.85rem; color: var(--muted); }

.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(3, 18, 27, 0.3);
  border-top-color: #03121B;
  border-radius: 50%;
  display: none;
}
.is-sending .spinner { display: block; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.upload-progress { margin-top: 18px; display: none; }
.upload-progress.is-active { display: block; }
.upload-progress-top { display: flex; justify-content: space-between; gap: 12px; font-size: 0.875rem; color: var(--text-soft); margin-bottom: 8px; }
.upload-progress-bar { height: 6px; background: var(--line); border-radius: 999px; overflow: hidden; }
.upload-progress-fill { height: 100%; width: 0; background: var(--cyan); border-radius: 999px; transition: width 0.15s linear; }
.upload-progress.is-processing .upload-progress-fill {
  width: 100% !important;
  background: linear-gradient(90deg, var(--cyan-deep) 0%, var(--cyan) 40%, var(--cyan-deep) 80%);
  background-size: 200% 100%;
}
@media (prefers-reduced-motion: no-preference) {
  .upload-progress.is-processing .upload-progress-fill { animation: shimmer 1.2s linear infinite; }
}
@keyframes shimmer { to { background-position: -200% 0; } }

.form-banner {
  display: none;
  gap: 14px;
  align-items: flex-start;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid;
  margin-bottom: 24px;
}
.form-banner.is-visible { display: flex; }
.form-banner svg { width: 24px; height: 24px; flex: none; margin-top: 1px; }
.form-banner h3 { font-size: 1.05rem; font-weight: 600; }
.form-banner p { margin-top: 4px; font-size: 0.925rem; color: var(--text-soft); }
.form-banner.success { background: var(--green-tint); border-color: rgba(34, 197, 94, 0.5); }
.form-banner.success svg, .form-banner.success h3 { color: #4ADE80; }
.form-banner.error { background: var(--red-tint); border-color: rgba(248, 113, 113, 0.5); }
.form-banner.error svg, .form-banner.error h3 { color: var(--red); }
.form-banner .mono { color: var(--text); }

.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.turnstile-wrap:empty { display: none; }

/* Quote aside */
.quote-aside { display: grid; gap: 16px; }
.aside-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.aside-card h3 { font-size: 1.05rem; font-weight: 600; }
.aside-card p { margin-top: 8px; color: var(--text-soft); font-size: 0.925rem; }
.aside-card .check-list { margin-top: 14px; gap: 10px; }
.aside-card .check-list li { font-size: 0.9rem; }
.aside-rush { border-color: rgba(245, 158, 11, 0.45); background: linear-gradient(180deg, var(--amber-tint), transparent 70%), var(--surface); }
.aside-rush h3 { color: var(--amber); }
.contact-line { display: flex; align-items: center; gap: 10px; margin-top: 12px; font-size: 0.95rem; }
.contact-line svg { width: 18px; height: 18px; color: var(--cyan); flex: none; }
.contact-line a { color: var(--text); text-decoration: none; word-break: break-all; }
.contact-line a:hover { color: var(--cyan); }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 10px; max-width: 880px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
  padding: 14px 20px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  width: 10px; height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg) translateY(-3px);
  transition: transform 0.2s var(--ease);
  flex: none;
}
.faq-item[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq-item[open] summary { border-bottom: 1px solid var(--line); }
.faq-item .faq-body { padding: 16px 20px 20px; color: var(--text-soft); max-width: 74ch; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg); border-top: 1px solid var(--line); padding: 64px 0 32px; }
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
}
.footer-brand p { margin-top: 16px; color: var(--muted); font-size: 0.925rem; max-width: 40ch; }
.footer-col h2 { font-size: 0.95rem; font-weight: 600; margin-bottom: 14px; }
.footer-col ul { list-style: none; display: grid; gap: 8px; }
.footer-col a { color: var(--text-soft); text-decoration: none; font-size: 0.925rem; }
.footer-col a:hover { color: var(--cyan); }
.footer-col li { color: var(--text-soft); font-size: 0.925rem; }
.legal-notice {
  margin-top: 48px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
  border-radius: var(--radius-sm);
  background: var(--bg-alt);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.65;
}
.legal-notice strong { color: var(--text-soft); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--dim);
  font-size: 0.825rem;
}
.footer-legal-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0; }
.footer-legal-links a { color: var(--text-soft); text-decoration: none; }
.footer-legal-links a:hover { color: var(--cyan); }
.draft-banner {
  margin: 0 0 22px;
  padding: 12px 14px;
  border: 1px solid rgba(245, 158, 11, 0.55);
  border-radius: var(--radius-sm);
  background: var(--amber-tint);
  color: var(--text);
  font-weight: 700;
}
.legal-page { padding: 40px 0 72px; }
.legal-page .legal-copy { max-width: 72ch; }
.legal-page h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
.legal-page h2 { margin-top: 28px; font-size: 1.15rem; }
.legal-page p, .legal-page li { margin-top: 12px; color: var(--text-soft); }
.legal-page ul { margin-top: 8px; padding-left: 1.2rem; }
.legal-page address { margin-top: 12px; color: var(--text-soft); font-style: normal; }
.legal-nav { display: flex; flex-wrap: wrap; gap: 4px 16px; list-style: none; margin: 0; padding: 0; }
.legal-nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--text-soft); text-decoration: none; font-family: var(--font-display); font-weight: 500; }
.legal-nav a:hover { color: var(--cyan); }

/* ---------- Legal dialog ---------- */
.legal-dialog {
  width: min(640px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
}
.legal-dialog::backdrop { background: rgba(5, 7, 10, 0.75); }
.legal-dialog-inner { padding: 28px; }
.legal-dialog h2 { font-size: 1.25rem; font-weight: 600; }
.legal-dialog p { margin-top: 14px; color: var(--text-soft); font-size: 0.95rem; line-height: 1.7; }
.legal-dialog .dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .nav-links a { padding: 0 9px; font-size: 0.9rem; }
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr); gap: 32px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step:nth-child(2) { border-right: 0; }
  .step:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 960px) {
  :root { --header-h: 124px; }
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px var(--gutter) 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .navbar { position: relative; }
  .nav-links.is-open { display: flex; }
  .nav-links a { min-height: 48px; padding: 0 12px; font-size: 1rem; }
  .nav-links .nav-cta { margin: 8px 0 0; }
  .nav-links .nav-cta a { justify-content: center; }
  .nav-links a[aria-current="true"] { box-shadow: inset 3px 0 0 var(--cyan); }
  .nav-links .nav-cta a[aria-current="true"] { box-shadow: none; }
  .nav-ink { display: none; }

  .hero { padding-top: 48px; }
  .hero-grid { grid-template-columns: 1fr; }
  .envelope { justify-self: center; max-width: 440px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cap-grid, .quote-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  :root { --gutter: 16px; }
  .section { padding: 72px 0; }
  .services-grid { grid-template-columns: 1fr; }
  .service-card, .machinist { padding: 22px; }
  .spec-row { grid-template-columns: 1fr; gap: 2px; padding: 12px 18px; }
  .spec-sheet-head { padding: 18px; }
  .quote-form { padding: 22px 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-actions .btn { width: 100%; }
  .metrics-head { flex-direction: column; gap: 4px; }
  .file-item { grid-template-columns: auto minmax(0, 1fr) auto; }
  .file-size { grid-column: 2; grid-row: 2; }
  .file-remove { grid-column: 3; grid-row: 1 / span 2; }
}

@media (max-width: 560px) {
  .brand-logo { max-height: 44px; max-width: 180px; }
  .topbar { font-size: 0.75rem; }
  .metrics { grid-template-columns: 1fr; }
  .metric { min-height: 0; }
  .steps { grid-template-columns: 1fr; }
  .step { border-right: 0; border-bottom: 1px solid var(--line); }
  .step:last-child { border-bottom: 0; }
  .step::after { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1 1 100%; }
}

/* ==========================================================================
   PolyMetric Software: coming soon (links to software.polymetricfab.com)
   ========================================================================== */
/* suite-live / suite-soon follow data-suite, set by POLYMETRIC_SUITE_LAUNCHED in index.html. */
html[data-suite="live"] .suite-soon { display: none !important; }
html[data-suite="soon"] .suite-live { display: none !important; }
.software-soon { padding: 72px 0; }
.soon-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 40px;
  align-items: center;
  padding: 40px;
  background: linear-gradient(120deg, var(--cyan-tint), transparent 60%), var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.soon-brand { display: flex; align-items: center; gap: 16px; }
.suite-mark, .app-mark {
  flex: none;
  background: none;
  box-shadow: none;
  border-radius: 0;
  object-fit: contain;
}
.suite-mark { width: 72px; height: 72px; }
.app-mark { width: 84px; height: 84px; }
.soon-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
}
.soon-copy h2 {
  margin-top: 10px;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.soon-blurb { margin-top: 14px; color: var(--text-soft); font-size: 1.075rem; max-width: 52ch; }
.soon-offer { margin-top: 12px; color: var(--text); font-size: 1rem; font-weight: 600; max-width: 52ch; }
.soon-actions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; }
.soon-media { margin: 0; min-width: 0; container-type: inline-size; }

/* Screenshot coverflow (app.js). Without JavaScript: a sideways-scrolling strip with snap points.
   With JavaScript (.is-ready): the active card in front, the other two smaller, dimmed and tucked behind. */
.scf { --card-w: 72cqw; position: relative; }
.scf-track {
  display: flex; gap: 16px; margin: 0; padding: 0 0 8px; list-style: none;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.scf-track:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }
.scf-slide { flex: 0 0 var(--card-w); min-width: 0; scroll-snap-align: center; }
.scf-slide figure { margin: 0; }
.scf-title { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; margin: 0 0 10px; text-align: center; color: var(--cyan); font: 600 1.05rem/1.2 var(--font-display); letter-spacing: 0.01em; }
.scf-window { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35); }
.scf-bar { display: flex; align-items: center; gap: 6px; min-height: 24px; padding: 0 10px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.scf-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-strong); flex: none; }
.scf-bar i:first-child { background: rgba(0, 168, 232, 0.65); }
.scf-bar span { margin-left: 6px; min-width: 0; font: 0.68rem var(--font-mono); color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scf-link { display: block; }
.scf-link:focus-visible { outline: 2px solid var(--cyan); outline-offset: -3px; }
.scf-window img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; background: var(--surface-2); }

.scf.is-ready { overflow-x: clip; overflow-y: visible; padding-top: 2px; }
.scf.is-ready .scf-track { display: grid; justify-content: center; gap: 0; padding: 0; overflow: visible; scroll-snap-type: none; touch-action: pan-y; }
.scf.is-ready .scf-slide {
  grid-area: 1 / 1; width: var(--card-w);
  transform: translateX(var(--x, 0)) scale(var(--s, 1)); transform-origin: 50% 40%; z-index: var(--z, 1);
  transition: transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1), filter 0.8s ease;
  will-change: transform;
}
.scf.is-ready .scf-slide[data-pos="0"] { --x: 0; --s: 1; --z: 3; }
.scf.is-ready .scf-slide[data-pos="-1"] { --x: -24%; --s: 0.76; --z: 2; filter: brightness(0.45) saturate(0.7); cursor: pointer; }
.scf.is-ready .scf-slide[data-pos="1"] { --x: 24%; --s: 0.76; --z: 2; filter: brightness(0.45) saturate(0.7); cursor: pointer; }
.scf.is-ready .scf-slide[data-pos="2"],
.scf.is-ready .scf-slide[data-pos="-2"] { --x: 0; --s: 0.62; --z: 1; opacity: 0; pointer-events: none; }
.scf.is-ready .scf-slide[data-pos="0"] .scf-window { box-shadow: 0 22px 48px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--line-strong); }
.scf.is-ready .scf-slide:not([data-pos="0"]) .scf-title { opacity: 0; }
.scf.is-ready .scf-slide:not([data-pos="0"]):hover { filter: brightness(0.65) saturate(0.85); }
.scf-title { transition: opacity 0.5s ease; }

.scf-arrow {
  position: absolute; top: calc(50% - 30px); z-index: 5;
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0 0 3px;
  background: rgba(13, 16, 21, 0.8); color: var(--text);
  border: 1px solid var(--line-strong); border-radius: 50%;
  font: 400 1.5rem/1 var(--font-body); cursor: pointer;
  opacity: 0; pointer-events: none;
  transition: opacity 0.25s ease, border-color 0.2s ease, color 0.2s ease;
}
.scf-arrow[hidden] { display: none; }
.scf-prev { left: calc(50% - var(--card-w) / 2 - 18px); }
.scf-next { right: calc(50% - var(--card-w) / 2 - 18px); }
.scf:hover .scf-arrow, .scf:focus-within .scf-arrow { opacity: 1; pointer-events: auto; }
.scf-arrow:hover { border-color: var(--cyan); color: var(--cyan); }
.scf-arrow:focus-visible { opacity: 1; outline: 2px solid var(--cyan); outline-offset: 2px; }
@media (hover: none) and (pointer: coarse) { .scf-arrow { opacity: 0.55; pointer-events: auto; } }
.scf-controls { display: flex; justify-content: center; gap: 8px; margin-top: 12px; }
.scf-controls[hidden] { display: none; }
.scf-dot {
  min-height: 30px; padding: 0 12px; background: transparent; color: var(--muted);
  border: 1px solid var(--line-strong); border-radius: 999px;
  font: 600 0.75rem/1 var(--font-mono); letter-spacing: 0.02em; cursor: pointer;
}
.scf-dot:hover { color: var(--text); border-color: var(--muted); }
.scf-dot[aria-current="true"] { color: var(--cyan); border-color: var(--cyan); background: var(--cyan-tint); }
@media (prefers-reduced-motion: no-preference) { .scf-track { scroll-behavior: smooth; } }
@media (prefers-reduced-motion: reduce) { .scf.is-ready .scf-slide, .scf-title { transition: none; } }
@media (max-width: 560px) {
  .scf { --card-w: 76cqw; }
  .scf-prev { left: 2px; } .scf-next { right: 2px; }
  .scf-arrow { width: 44px; height: 44px; }
  .scf-dot { min-height: 44px; }
}
@media (max-width: 960px) {
  .soon-panel { grid-template-columns: 1fr; padding: 28px; gap: 28px; }
}
@media (max-width: 560px) {
  .software-soon { padding: 56px 0; }
  .soon-panel { padding: 20px; }
  .soon-actions .btn { flex: 1 1 100%; justify-content: center; }
}

@media print {
  .site-header, .hero::before, .envelope, .quote-form, .nav-toggle { display: none !important; }
  body { background: #fff; color: #000; }
}

/* ---------- Quote form v2: service-driven sections ---------- */
.service-pick .select { font-size: 1.02rem; padding-top: 13px; padding-bottom: 13px; border-color: var(--line-strong); }
.service-pick .select:invalid, .service-pick .select option[value=""] { color: var(--muted); }
.service-pick .select option { color: var(--text); }

/* Smooth open/close: grid rows animate from 0fr to 1fr. Closed sections are inert and their
   fieldsets disabled, so nothing inside is focusable, required or submitted. */
.reveal {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition: grid-template-rows 0.32s var(--ease), opacity 0.24s var(--ease), margin 0.32s var(--ease);
}
.reveal > .reveal-inner { overflow: hidden; min-height: 0; }
.reveal.is-open { grid-template-rows: 1fr; opacity: 1; }
.form-grid > .reveal:not(.is-open) { margin-bottom: -18px; } /* cancel the grid gap while closed */
.form-grid > .reveal.field:not(.is-open) { display: none; }   /* half-width conditionals: no empty column */
@media (prefers-reduced-motion: reduce) { .reveal { transition: none; } }

.svc-fieldset, .cond-fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.svc-fieldset {
  padding: 20px 20px 22px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--cyan);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(0, 168, 232, 0.05), rgba(0, 168, 232, 0) 60%), var(--surface-2);
}
.svc-fieldset .input, .svc-fieldset .select, .svc-fieldset .textarea { background-color: var(--surface); }
.svc-title {
  float: left; width: 100%; padding: 0; margin: 0 0 10px;
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; color: var(--text);
}
.svc-title + * { clear: both; }
.svc-note { color: var(--text-soft); font-size: 0.88rem; line-height: 1.5; margin: 0 0 12px; }
.svc-note strong { color: var(--text); font-weight: 600; }
.svc-note-accent {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 11px; border-radius: 999px;
  background: var(--cyan-tint); color: var(--cyan); font-weight: 600; font-size: 0.82rem;
}
.svc-note-accent::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); }
.svc-fieldset .form-grid { margin-top: 4px; }
.cond-fieldset { padding: 14px 16px 16px; border: 1px dashed var(--line-strong); border-radius: var(--radius-sm); }
.cond-fieldset > .field { gap: 7px; }
.cond-title { float: left; width: 100%; padding: 0; margin: 0 0 10px; font-size: 0.9rem; font-weight: 600; color: var(--text-soft); }
.cond-title + * { clear: both; }
.reveal-note { margin: 8px 0 0; display: none; }
.reveal-note.is-open { display: block; }
.textarea-sm { min-height: 84px; }
.chip-group.has-error span { border-color: var(--red); }

/* Rush toggle */
.toggle { display: flex; align-items: flex-start; gap: 14px; cursor: pointer; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle-track { flex: none; position: relative; width: 44px; height: 24px; margin-top: 1px; border-radius: 999px;
  background: var(--line-strong); transition: background-color 0.2s var(--ease); }
.toggle-thumb { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--text); transition: transform 0.2s var(--ease); }
.toggle input:checked + .toggle-track { background: var(--amber); }
.toggle input:checked + .toggle-track .toggle-thumb { transform: translateX(20px); background: #1A1206; }
.toggle input:focus-visible + .toggle-track { outline: 2px solid var(--cyan); outline-offset: 2px; }
.toggle:has(input:checked) { border-color: rgba(245, 158, 11, 0.6); background: var(--amber-tint); }
.toggle-text { display: grid; gap: 3px; font-size: 0.92rem; color: var(--text); }
.toggle-text strong { font-weight: 600; }

input[type="date"].input { color-scheme: dark; min-height: 46px; }

.form-confidential { display: flex; align-items: center; gap: 9px; margin: 22px 0 0; color: var(--text-soft); font-size: 0.88rem; }
.form-confidential svg { width: 17px; height: 17px; color: var(--cyan); flex: none; }

/* Preview-only dry run result */
.dryrun-mail { margin-top: 10px; max-height: 360px; overflow: auto; padding: 12px 14px; border-radius: var(--radius-sm);
  background: var(--bg); border: 1px solid var(--line); color: var(--text-soft); font: 0.78rem/1.55 var(--font-mono); white-space: pre-wrap; }

@media (max-width: 720px) {
  .svc-fieldset { padding: 16px 14px 18px; }
  .form-grid > .reveal:not(.is-open) { margin-bottom: -18px; }
}

/* ---------- Jaw size (L x W x H) ---------- */
.dims-group { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.dims-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dims-unit { display: inline-flex; align-items: center; gap: 8px; }
.dims-unit label { font-size: 0.82rem; color: var(--text-soft); font-family: var(--font-display); }
.select.select-sm { width: auto; min-height: 38px; padding: 6px 34px 6px 12px; }
.dims-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.dims-grid .field { gap: 5px; }
.dims-grid .dim-hint { font-size: 0.76rem; line-height: 1.3; }
.dims-note { margin: 0; }
@media (max-width: 560px) {
  .dims-grid { gap: 8px; }
  .dims-grid .input { padding-left: 10px; padding-right: 8px; }
}

/* Instant estimate (3D printing) */
[data-estimate][hidden] { display: none !important; }
.svc-note-estimate { margin-top: -4px; }
.estimate-box { display: block; margin: 12px 0; max-width: 100%; box-sizing: border-box; padding: 14px 16px; border-radius: var(--radius-sm); border: 1px solid rgba(0, 168, 232, 0.55);
  border-left: 4px solid #00A8E8; background: rgba(0, 168, 232, 0.08); color: var(--text); }
.estimate-box .estimate-kicker { display: block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #00A8E8; }
.estimate-box .estimate-range { display: block; margin-top: 4px; font-size: 1.6rem; font-weight: 700; line-height: 1.2; color: var(--text); font-variant-numeric: tabular-nums; }
.estimate-box .estimate-meta { display: block; margin-top: 4px; font-size: 0.9rem; color: var(--text-soft); }
.estimate-box .estimate-fine { display: block; margin-top: 8px; font-size: 0.85rem; color: #C3CAD5; }
.estimate-box.is-firm .estimate-range { font-size: 1.1rem; }
.form-banner > div { min-width: 0; }
.dryrun-mail { overflow-wrap: anywhere; }
