:root {
  color-scheme: dark;
  --bg: #131821;
  --bg-deep: #0b1018;
  --bg-panel: #18202b;
  --bg-panel-2: #202a37;
  --paper: #f4f6f8;
  --paper-2: #e8edf3;
  --line: rgba(160, 174, 192, 0.22);
  --line-strong: rgba(203, 213, 225, 0.36);
  --text: #eef3f8;
  --text-muted: #aeb9c8;
  --text-soft: #d5dde8;
  --ink: #172033;
  --blue: #4f8cff;
  --blue-strong: #1f5cc8;
  --blue-soft: #dbeafe;
  --amber: #d6a349;
  --green: #4ade80;
  --red: #ef6464;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
  --radius: 8px;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body.modal-open {
  overflow: hidden;
}

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

[hidden] {
  display: none !important;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid rgba(79, 140, 255, 0.72);
  outline-offset: 3px;
}

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-deep);
  border-bottom: 1px solid var(--line);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.62;
  background:
    linear-gradient(90deg, rgba(79, 140, 255, 0.16) 1px, transparent 1px),
    linear-gradient(rgba(79, 140, 255, 0.11) 1px, transparent 1px),
    radial-gradient(circle at 76% 22%, rgba(79, 140, 255, 0.18), transparent 30%),
    linear-gradient(145deg, #0b1018 0%, #141d29 58%, #101722 100%);
  background-size: 72px 72px, 72px 72px, auto, auto;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(7, 12, 19, 0.1), rgba(7, 12, 19, 0.36));
  pointer-events: none;
}

.site-header {
  position: relative;
  z-index: 5;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  min-width: 0;
}

.brand-mark {
  display: block;
  height: 40px;
  width: auto;
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 22px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 650;
}

.site-nav a:hover {
  color: var(--text);
}

.hero-inner {
  position: relative;
  z-index: 4;
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 540px;
  grid-template-areas:
    "text visual"
    "proof proof";
  column-gap: 48px;
  row-gap: 40px;
  align-items: stretch;
  align-content: center;
  padding: 44px 0 56px;
}

.hero-text {
  grid-area: text;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Borderless three-panel workflow composition: drawing -> inspection -> report.
   Sized by the text column height so its top/bottom line up with the logo and
   the CTA buttons; the SVG is absolutely placed so the row height is driven by
   the text, then it fills that box (right-aligned, aspect preserved). */
.hero-visual {
  grid-area: visual;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.4));
}

.hero-visual svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-logo {
  display: block;
  align-self: flex-start;
  width: auto;
  height: clamp(96px, 13vw, 168px);
  max-width: 100%;
  margin: 0 0 30px;
  filter: drop-shadow(0 14px 34px rgba(0, 0, 0, 0.45));
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--amber);
  font-size: 12px;
  line-height: 1.3;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 600px;
  margin: 0;
  color: white;
  font-size: 50px;
  line-height: 1.06;
  font-weight: 780;
}

.hero-copy {
  max-width: 540px;
  margin: 24px 0 0;
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 12px 18px;
  border: 1px solid transparent;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
}

.button.primary {
  color: white;
  background: #2563eb;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.4);
}

.button.primary:hover {
  background: #1d4ed8;
}

.button.secondary {
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(203, 213, 225, 0.42);
}

.button.secondary:hover {
  border-color: rgba(122, 166, 255, 0.74);
  background: rgba(31, 92, 200, 0.24);
}

.hero-proof {
  grid-area: proof;
  max-width: none;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  padding: 1px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  overflow: hidden;
}

.hero-proof div {
  min-width: 0;
  padding: 16px;
  background: rgba(14, 21, 31, 0.84);
}

.hero-proof dt {
  margin: 0;
  color: white;
  font-size: 13px;
  font-weight: 800;
}

.hero-proof dd {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.section {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 92px 0;
}

.section-heading {
  max-width: 740px;
  margin-bottom: 34px;
}

.section-heading h2,
.trust-band h2,
.company-section h2,
.final-cta h2 {
  margin: 0;
  color: white;
  font-size: 36px;
  line-height: 1.1;
  font-weight: 760;
}

.section-heading p:not(.eyebrow),
.company-section p,
.final-cta p,
.trust-band p {
  margin: 16px 0 0;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.65;
}

.motion-demo-shell {
  --demo-step-time: 5.2s;
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 1px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--line);
  box-shadow: var(--shadow);
}

.demo-narrative {
  min-width: 0;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: #151e2a;
}

.demo-narrative-header {
  display: grid;
  gap: 7px;
}

.demo-narrative-header span,
.demo-browser-bar em,
.import-status span,
.balloon-panel-head span,
.table-title span,
.status-card span,
.outcome-panel span {
  color: #8fb7ff;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.demo-narrative-header strong {
  color: white;
  font-size: 22px;
  line-height: 1.12;
}

.demo-step-list {
  display: grid;
  gap: 10px;
}

.demo-step {
  position: relative;
  min-width: 0;
  min-height: 104px;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-content: start;
  gap: 6px 12px;
  padding: 15px;
  border: 1px solid rgba(160, 174, 192, 0.18);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(11, 16, 24, 0.46);
  color: var(--text-muted);
  text-align: left;
}

.demo-step::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 3px;
  background: var(--blue);
}

.demo-step span {
  grid-row: span 2;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(160, 174, 192, 0.3);
  border-radius: 8px;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 850;
}

.demo-step strong {
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.25;
}

.demo-step small {
  min-width: 0;
  color: inherit;
  font-size: 12px;
  line-height: 1.45;
}

.demo-step:hover,
.demo-step.is-active {
  border-color: rgba(79, 140, 255, 0.58);
  background: rgba(31, 92, 200, 0.22);
  color: white;
}

.demo-step.is-active::after {
  animation: demo-progress var(--demo-step-time) linear forwards;
}

.demo-step.is-active span {
  border-color: rgba(79, 140, 255, 0.72);
  color: white;
  background: rgba(31, 92, 200, 0.62);
}

.demo-actions-row {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.demo-replay {
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid rgba(160, 174, 192, 0.28);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: white;
  font-size: 13px;
  font-weight: 800;
}

.demo-replay:hover {
  border-color: rgba(255, 255, 255, 0.48);
  background: rgba(255, 255, 255, 0.08);
}

@keyframes demo-progress {
  from { width: 0; }
  to { width: 100%; }
}

.demo-canvas-wrap {
  min-width: 0;
  background: #0f1620;
  scroll-margin-top: 16px;
}

.demo-browser-bar {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 15px;
  border-bottom: 1px solid rgba(160, 174, 192, 0.22);
  background: #182231;
}

.demo-browser-bar > span {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #ef6464;
}

.demo-browser-bar > span:nth-child(2) {
  background: #d6a349;
}

.demo-browser-bar > span:nth-child(3) {
  background: #4ade80;
}

.demo-browser-bar strong {
  min-width: 0;
  flex: 1 1 auto;
  margin-left: 5px;
  overflow: hidden;
  color: #dce7f7;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.demo-browser-bar em {
  flex: 0 0 auto;
  font-style: normal;
}

.demo-canvas {
  position: relative;
  height: clamp(640px, 62vw, 760px);
  overflow: hidden;
  background: linear-gradient(135deg, #eef3f8 0%, #dce5ef 100%);
  color: var(--ink);
}

.demo-canvas::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.46;
  background-image: linear-gradient(#cbd5e1 1px, transparent 1px), linear-gradient(90deg, #cbd5e1 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

.demo-scene {
  position: absolute;
  inset: 0;
  padding: 30px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity 220ms ease, transform 220ms ease;
}

.demo-scene.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.demo-scene[aria-hidden=true] {
  pointer-events: none;
}

.import-drop-zone,
.analysis-drawing,
.measure-table-card,
.status-card,
.report-paper,
.outcome-panel,
.balloon-panel {
  border: 1px solid rgba(23, 32, 51, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 42px rgba(23, 32, 51, 0.14);
}

.import-drop-zone {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.drop-target {
  position: absolute;
  left: 50%;
  top: 42%;
  width: min(360px, 62%);
  min-height: 156px;
  display: grid;
  place-items: center;
  gap: 6px;
  padding: 22px;
  border: 2px dashed rgba(31, 92, 200, 0.36);
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  text-align: center;
  transform: translate(-50%, -50%);
}

.drop-target span {
  color: var(--blue-strong);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.drop-target strong {
  color: #172033;
  font-size: 18px;
}

.pdf-token {
  position: absolute;
  left: 8%;
  top: 68%;
  z-index: 3;
  width: 174px;
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 4px 10px;
  padding: 12px;
  border: 1px solid rgba(239, 100, 100, 0.32);
  border-radius: 8px;
  background: white;
  box-shadow: 0 20px 36px rgba(23, 32, 51, 0.18);
  opacity: 0;
}

.pdf-token span {
  grid-row: span 2;
  width: 42px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: white;
  background: #ef6464;
  font-size: 12px;
  font-weight: 900;
}

.pdf-token strong,
.pdf-token small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdf-token strong {
  align-self: end;
  color: #172033;
  font-size: 13px;
}

.pdf-token small {
  color: #64748b;
  font-size: 11px;
}

.loaded-drawing {
  position: absolute;
  left: 50%;
  top: 12%;
  width: min(760px, 86%);
  padding: 13px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: white;
  box-shadow: 0 24px 52px rgba(23, 32, 51, 0.2);
  opacity: 0;
  transform: translate(-50%, 24px) scale(0.96);
}

.loaded-drawing img,
.analysis-drawing img,
.report-drawing-strip img {
  width: 100%;
  border-radius: 5px;
}

.import-status {
  position: absolute;
  left: 50%;
  bottom: 8%;
  width: min(270px, 38%);
  padding: 16px;
  border: 1px solid rgba(74, 222, 128, 0.42);
  border-radius: 8px;
  background: #10281d;
  color: white;
  opacity: 0;
  transform: translate(-50%, 14px);
}

.import-status span {
  color: #86efac;
}

.import-status strong {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.35;
}

.demo-canvas.is-playing .scene-import.is-active .drop-target {
  animation: drop-target-pulse var(--demo-step-time) ease both;
}

.demo-canvas.is-playing .scene-import.is-active .pdf-token {
  animation: pdf-token-drag var(--demo-step-time) cubic-bezier(0.2, 0.82, 0.24, 1) both;
}

.demo-canvas.is-playing .scene-import.is-active .loaded-drawing {
  animation: drawing-load var(--demo-step-time) ease both;
}

.demo-canvas.is-playing .scene-import.is-active .import-status {
  animation: import-status-in var(--demo-step-time) ease both;
}

@keyframes drop-target-pulse {
  0%, 32% { border-color: rgba(31, 92, 200, 0.28); background: #f8fafc; }
  46%, 58% { border-color: rgba(31, 92, 200, 0.78); background: #eff6ff; }
  100% { border-color: rgba(74, 222, 128, 0.56); background: #f0fdf4; }
}

/* Token slides to the drop target, then fades away as the drawing loads */
@keyframes pdf-token-drag {
  0%, 8% { opacity: 0; transform: translate(-28px, 74px) rotate(-7deg) scale(0.94); }
  18% { opacity: 1; }
  50% { opacity: 1; transform: translate(var(--pdf-token-final-x, 150%), -122%) rotate(0deg) scale(1); }
  60%, 100% { opacity: 0; transform: translate(var(--pdf-token-final-x, 150%), -122%) rotate(0deg) scale(1); }
}

@keyframes drawing-load {
  0%, 48% { opacity: 0; transform: translate(-50%, 24px) scale(0.96); }
  76%, 100% { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

@keyframes import-status-in {
  0%, 68% { opacity: 0; transform: translate(-50%, 14px); }
  84%, 100% { opacity: 1; transform: translate(-50%, 0); }
}

.analysis-layout {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.24fr) minmax(260px, 0.76fr);
  gap: 18px;
}

.analysis-drawing {
  position: relative;
  min-width: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 10px;
  background: #f8fafc;
}

/* Fixed-aspect stage matching the drawing image (2448 × 1584): balloon, ring,
   and cursor percentages are exact drawing coordinates at any viewport. The
   camera transform moves the whole stage, markers included. */
.analysis-stage {
  position: relative;
  width: 100%;
  flex: 0 0 auto;
  aspect-ratio: 2448 / 1584;
  transform: translateX(-20.3%) scale(1.45);
  transform-origin: 0 50%;
}

.analysis-stage img {
  width: 100%;
  height: 100%;
  border-radius: 6px;
}

.demo-balloon {
  position: absolute;
  z-index: 4;
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--blue-strong);
  border-radius: 999px;
  color: var(--blue-strong);
  background: white;
  box-shadow: 0 4px 10px rgba(31, 92, 200, 0.24);
  font-size: 7.5px;
  font-style: normal;
  font-weight: 800;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.62);
}

/* Click points sit on the dimension text; balloons land just beside it,
   matching DEMO-001-sample-session.json balloon placements. */
.balloon-a { left: 41.2%; top: 11.5%; }
.balloon-b { left: 22.6%; top: 20.5%; }
.balloon-c { left: 39.6%; top: 37.7%; }
.balloon-d { left: 60%;   top: 60.4%; }

.extract-cursor {
  position: absolute;
  z-index: 6;
  width: 12px;
  height: 12px;
  clip-path: polygon(0 0, 0 100%, 28% 72%, 47% 100%, 66% 91%, 48% 63%, 86% 63%);
  background: #172033;
  filter: drop-shadow(0 4px 6px rgba(15, 23, 42, 0.4)) drop-shadow(0 0 1px rgba(255, 255, 255, 0.9));
  opacity: 0;
  transform-origin: 0 0;
  pointer-events: none;
}

.balloon-panel {
  min-width: 0;
  padding: 16px;
  display: grid;
  align-content: start;
  gap: 10px;
  background: #111b28;
}

.balloon-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 4px;
}

.balloon-panel-head strong {
  color: white;
  font-size: 12px;
}

.balloon-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 11px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(160, 174, 192, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  opacity: 0;
  transform: translateX(18px);
}

.balloon-row b {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 2px solid #60a5fa;
  border-radius: 999px;
  color: #1f5cc8;
  background: white;
  font-size: 11px;
  font-weight: 900;
}

.balloon-row div {
  min-width: 0;
}

.balloon-row strong,
.balloon-row em {
  display: block;
  min-width: 0;
  overflow: hidden;
  font-style: normal;
  color: white;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.balloon-row strong {
  font-size: 12px;
  font-weight: 800;
}

.balloon-row em {
  margin-top: 3px;
  color: #aeb9c8;
  font-size: 11px;
  font-weight: 650;
}

.demo-canvas.is-playing .scene-extract.is-active .balloon-row {
  animation: extract-pop 520ms ease both;
}

.demo-canvas.is-playing .scene-extract.is-active .demo-balloon {
  animation: balloon-pop 420ms cubic-bezier(0.34, 1.4, 0.5, 1) both;
}

.demo-canvas.is-playing .scene-extract.is-active .extract-cursor {
  animation: extract-cursor-path var(--demo-step-time) ease-in-out both;
}

/* Camera: open on the full sheet, push in for the first two clicks, pan
   right-to-down following the cursor, then pull back to the ballooned sheet. */
.demo-canvas.is-playing .scene-extract.is-active .analysis-stage {
  animation: extract-stage-camera var(--demo-step-time) cubic-bezier(0.45, 0, 0.25, 1) both;
}

@keyframes extract-stage-camera {
  0%, 6% { transform: translateX(-20.3%) scale(1.45); }
  12%, 36% { transform: translateX(-17.8%) scale(2); }
  42%, 53% { transform: translateX(-31.8%) scale(2); }
  60%, 78% { transform: translateX(-74.4%) scale(2); }
  88%, 100% { transform: translateX(-20.3%) scale(1.45); }
}

/* Cursor clicks at 4 points across the 6.2s step; each balloon pops at the
   click, then the panel row lands. Delays are 1.2× the original 5.2s timing. */
.scene-extract { --demo-step-time: 6.2s; }
.demo-canvas.is-playing .scene-extract.is-active .balloon-a { animation-delay: 1020ms; }
.demo-canvas.is-playing .scene-extract.is-active .feed-a { animation-delay: 1220ms; }
.demo-canvas.is-playing .scene-extract.is-active .balloon-b { animation-delay: 2060ms; }
.demo-canvas.is-playing .scene-extract.is-active .feed-b { animation-delay: 2270ms; }
.demo-canvas.is-playing .scene-extract.is-active .balloon-c { animation-delay: 3110ms; }
.demo-canvas.is-playing .scene-extract.is-active .feed-c { animation-delay: 3310ms; }
.demo-canvas.is-playing .scene-extract.is-active .balloon-d { animation-delay: 4150ms; }
.demo-canvas.is-playing .scene-extract.is-active .feed-d { animation-delay: 4360ms; }

@keyframes extract-pop {
  from { opacity: 0; transform: translateY(10px) scale(0.94); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes balloon-pop {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes extract-cursor-path {
  0% { opacity: 0; left: 52%; top: 40%; transform: scale(1); }
  7% { opacity: 1; }
  13%, 17.5% { left: 44.9%; top: 11.5%; }
  14%, 16% { transform: scale(1); }
  15% { transform: scale(0.8); }
  29.5%, 34% { left: 24.8%; top: 20.5%; }
  30.7%, 32.7% { transform: scale(1); }
  31.7% { transform: scale(0.8); }
  46.5%, 51% { left: 42.2%; top: 37.7%; }
  47.5%, 49.5% { transform: scale(1); }
  48.5% { transform: scale(0.8); }
  63%, 78% { left: 63.3%; top: 60.4%; }
  64.2%, 66.2% { transform: scale(1); }
  65.2% { transform: scale(0.8); }
  72% { opacity: 1; }
  80%, 100% { opacity: 0; left: 63.3%; top: 60.4%; }
}

.measure-layout {
  position: relative;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

.measure-table-card {
  min-width: 0;
  padding: 22px;
  overflow: hidden;
}

.table-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.table-title strong {
  color: #172033;
  font-size: 13px;
}

.sample-grid {
  display: grid;
  grid-template-columns: minmax(58px, 0.48fr) repeat(4, minmax(104px, 1fr)) minmax(74px, 0.58fr);
  gap: 8px;
  align-items: stretch;
}

.sample-grid > * {
  min-width: 0;
  min-height: 48px;
  display: grid;
  place-items: center;
  padding: 8px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-style: normal;
  font-weight: 760;
  white-space: nowrap;
}

.sample-grid > span {
  align-content: center;
  color: #64748b;
  background: #e2e8f0;
  font-size: 10px;
  line-height: 1.25;
  text-transform: uppercase;
}

.sample-grid > span small {
  display: block;
  margin-top: 4px;
  color: #334155;
  font-size: 10px;
  font-weight: 800;
  text-transform: none;
}

.sample-grid > b {
  color: #1f5cc8;
  background: #dbeafe;
  font-size: 13px;
}

.sample-grid .badge {
  opacity: 0;
  transform: translateY(10px);
}

/* Measurement cells stay visible as empty grid boxes; the value types in one
   cell at a time. The inner <i> holds the value, revealed character-by-character
   with a steps() clip-path while the cell carries an Excel-style active outline. */
.sample-grid .m i {
  display: block;
  width: var(--w, 6ch);
  overflow: hidden;
  clip-path: inset(0 100% 0 0);
  font-style: normal;
  font-variant-numeric: tabular-nums;
  text-align: left;
  white-space: nowrap;
}

.sample-grid .fail {
  color: #991b1b;
  background: #fee2e2;
}

.badge.pass {
  color: #166534;
  background: #dcfce7;
}

.badge.fail {
  color: #991b1b;
  background: #fee2e2;
}

.status-card {
  position: absolute;
  right: 22px;
  bottom: 22px;
  width: min(290px, 34%);
  padding: 18px;
  color: white;
  background: #331515;
  opacity: 0;
  transform: translateY(16px);
}

.status-card span {
  color: #fecaca;
}

.status-card strong {
  display: block;
  margin-top: 8px;
  font-size: 24px;
  line-height: 1.06;
}

.status-card small {
  display: block;
  margin-top: 12px;
  color: #fecaca;
  font-size: 12px;
  line-height: 1.45;
}

.demo-canvas.is-playing .scene-measure.is-active .sample-grid .badge,
.demo-canvas.is-playing .scene-measure.is-active .status-card {
  animation: measure-entry 430ms ease both;
}

/* Strictly sequential entry: one cell types at a time on a 210ms cadence.
   --d drives the cell highlight window and the value typing in lockstep. */
.m1 { --d: 300ms; }
.m2 { --d: 600ms; --w: 5ch; }
.m3 { --d: 900ms; }
.m4 { --d: 1200ms; }
.m5 { --d: 1500ms; }
.m6 { --d: 1800ms; --w: 5ch; }
.m7 { --d: 2100ms; }
.m8 { --d: 2400ms; --w: 5ch; }
.m9 { --d: 2700ms; }
.m10 { --d: 3000ms; --w: 5ch; }
.m11 { --d: 3300ms; }
.m12 { --d: 3600ms; }
.m13 { --d: 3900ms; }
.m14 { --d: 4200ms; --w: 5ch; }
.m15 { --d: 4500ms; }
.m16 { --d: 4800ms; --w: 5ch; }
.m17 { --d: 5100ms; }
.m18 { --d: 5400ms; --w: 5ch; }
.m19 { --d: 5700ms; }
.m20 { --d: 6000ms; }

.demo-canvas.is-playing .scene-measure.is-active .m {
  animation: cell-window 210ms linear var(--d) forwards;
}

.demo-canvas.is-playing .scene-measure.is-active .sample-grid .m.fail {
  color: #334155;
  background: #f1f5f9;
  animation-name: cell-window-fail;
}

.demo-canvas.is-playing .scene-measure.is-active .m i {
  animation: cell-type 170ms steps(6, end) var(--d) forwards;
}

@keyframes cell-window {
  0%, 82% { background: #ffffff; }
  100% { background: #f1f5f9; }
}

@keyframes cell-window-fail {
  0%, 82% { background: #ffffff; box-shadow: inset 0 0 0 2px #1f5cc8; color: #334155; }
  100% { background: #fee2e2; box-shadow: none; color: #991b1b; }
}

@keyframes cell-type {
  to { clip-path: inset(0 -2px 0 0); }
}

/* Each row's status lands right after its last cell finishes typing */
.demo-canvas.is-playing .scene-measure.is-active .sample-grid .badge:nth-of-type(1) { animation-delay: 1500ms; }
.demo-canvas.is-playing .scene-measure.is-active .sample-grid .badge:nth-of-type(2) { animation-delay: 2700ms; }
.demo-canvas.is-playing .scene-measure.is-active .sample-grid .badge:nth-of-type(3) { animation-delay: 3900ms; }
.demo-canvas.is-playing .scene-measure.is-active .sample-grid .badge:nth-of-type(4) { animation-delay: 5100ms; }
.demo-canvas.is-playing .scene-measure.is-active .sample-grid .badge:nth-of-type(5) { animation-delay: 6300ms; }
.demo-canvas.is-playing .scene-measure.is-active .status-card { animation-delay: 6500ms; }

@keyframes measure-entry {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.report-layout {
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 0.34fr);
  gap: 20px;
  align-items: center;
}

.report-paper {
  min-width: 0;
  align-self: stretch;
  padding: 20px;
  color: #172033;
  background: white;
  opacity: 0;
  transform: translateY(26px) scale(0.98);
}

.report-paper-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 2px solid #1f5cc8;
}

.report-paper-head span {
  display: block;
  color: var(--blue-strong);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.report-paper-head strong {
  display: block;
  margin-top: 5px;
  color: #111827;
  font-size: 22px;
  line-height: 1.12;
}

.report-paper-head em {
  padding: 7px 9px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #475569;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.report-meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid #dbe3ee;
  border-radius: 7px;
  background: #dbe3ee;
}

.report-meta-grid span {
  min-width: 0;
  padding: 9px 10px;
  background: #f8fafc;
}

.report-meta-grid b,
.report-meta-grid em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-meta-grid b {
  color: #64748b;
  font-size: 9px;
  text-transform: uppercase;
}

.report-meta-grid em {
  margin-top: 3px;
  color: #172033;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.report-body-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  gap: 14px;
  margin-top: 14px;
}

.report-drawing-strip {
  padding: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #f8fafc;
}

.report-summary-box {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
  border: 1px solid #dbe3ee;
  border-radius: 7px;
  background: #f8fafc;
}

.report-summary-box b {
  color: #172033;
  font-size: 12px;
}

.report-summary-box span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 7px;
  border-top: 1px solid #e2e8f0;
}

.report-summary-box em {
  color: #64748b;
  font-size: 10px;
  font-style: normal;
  font-weight: 750;
}

.report-summary-box strong {
  color: #172033;
  font-size: 12px;
}

.report-table {
  display: grid;
  grid-template-columns: 46px 0.9fr 1fr 1fr 62px;
  gap: 1px;
  margin-top: 14px;
  overflow: hidden;
  border: 1px solid #dbe3ee;
  border-radius: 7px;
  background: #dbe3ee;
}

.report-table > * {
  min-width: 0;
  min-height: 31px;
  display: grid;
  align-items: center;
  padding: 7px 8px;
  background: white;
  color: #334155;
  font-size: 10px;
  font-style: normal;
  font-weight: 760;
}

.report-table > span {
  color: #475569;
  background: #e9eef5;
  font-size: 9px;
  text-transform: uppercase;
}

.report-table > b {
  color: #1f5cc8;
  background: #eff6ff;
}

.report-table strong {
  color: #166534;
  background: #dcfce7;
}

.report-table strong.fail {
  color: #991b1b;
  background: #fee2e2;
}

.outcome-panel {
  padding: 20px;
  color: white;
  background: #10281d;
  opacity: 0;
  transform: translateY(18px);
}

.outcome-panel span {
  color: #86efac;
}

.outcome-panel strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
  line-height: 1.12;
}

.outcome-panel div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}

.outcome-panel em {
  padding: 7px 9px;
  border: 1px solid rgba(134, 239, 172, 0.34);
  border-radius: 999px;
  color: #dcfce7;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

/* Report scene choreography: cursor clicks Generate report (~1.1s), the load
   bar fills, the button group fades, then the report pops with the outcome
   panel landing last. */
.report-gen {
  position: absolute;
  left: 50%;
  top: 38%;
  z-index: 5;
  display: grid;
  justify-items: center;
  gap: 18px;
  transform: translate(-50%, -50%);
}

.report-genbtn {
  padding: 13px 24px;
  border-radius: 8px;
  background: var(--blue-strong);
  color: white;
  box-shadow: 0 14px 30px rgba(31, 92, 200, 0.35);
  font-size: 15px;
  font-weight: 800;
}

.report-loadbar {
  width: 184px;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #d3dce8;
  opacity: 0;
}

.report-loadbar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: var(--blue-strong);
}

.demo-canvas.is-playing .scene-report.is-active .report-genbtn {
  animation: gen-press 260ms ease 1100ms 1;
}

.demo-canvas.is-playing .scene-report.is-active .report-loadbar {
  animation: gen-bar-in 200ms ease 1250ms both;
}

.demo-canvas.is-playing .scene-report.is-active .report-loadbar i {
  animation: wf-load 950ms ease-out 1350ms forwards;
}

.demo-canvas.is-playing .scene-report.is-active .report-gen {
  animation: gen-out 240ms ease 2400ms forwards;
}

@keyframes gen-press {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(0.93); background: #1a4ea8; }
}

@keyframes gen-bar-in {
  to { opacity: 1; }
}

@keyframes gen-out {
  to { opacity: 0; transform: translate(-50%, -52%) scale(0.97); }
}

@keyframes wf-load {
  to { width: 100%; }
}

.demo-canvas.is-playing .scene-report.is-active .report-paper,
.demo-canvas.is-playing .scene-report.is-active .outcome-panel {
  animation: report-finish 620ms ease both;
}

.demo-canvas.is-playing .scene-report.is-active .report-paper { animation-delay: 2650ms; }
.demo-canvas.is-playing .scene-report.is-active .outcome-panel { animation-delay: 3800ms; }

@keyframes report-finish {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.demo-cursor {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 10;
  width: 21px;
  height: 21px;
  clip-path: polygon(0 0, 0 100%, 28% 72%, 47% 100%, 66% 91%, 48% 63%, 86% 63%);
  background: #172033;
  filter: drop-shadow(0 8px 10px rgba(15, 23, 42, 0.34));
  opacity: 0;
  pointer-events: none;
}

/* The pointer cursor appears in the import scene (drag) and the report scene
   (clicking Generate report); measure plays hands-off so the typing carries
   the story. */
.demo-canvas.is-playing .scene-import.is-active ~ .demo-cursor {
  animation: cursor-import var(--demo-step-time) ease both;
}

.demo-canvas.is-playing .scene-report.is-active ~ .demo-cursor {
  animation: cursor-report var(--demo-step-time) ease both;
}

@keyframes cursor-import {
  0%, 6% { opacity: 0; left: 11%; top: 78%; }
  18%, 70% { opacity: 1; }
  50% { opacity: 1; left: 48%; top: 38%; }
  62%, 100% { opacity: 0; left: 48%; top: 38%; }
}

/* Arrives at the Generate report button just before the 1.1s press, dips for
   the click, then slips away while the load bar runs. */
@keyframes cursor-report {
  0%, 5% { opacity: 0; left: 28%; top: 74%; transform: scale(1); }
  13% { opacity: 1; }
  19%, 27% { left: 50.6%; top: 36.5%; }
  20.5%, 22.5% { transform: scale(1); }
  21.5% { transform: scale(0.82); }
  33%, 100% { opacity: 0; left: 50.6%; top: 36.5%; }
}

.demo-canvas:not(.is-playing) .scene-import.is-active .loaded-drawing,
.demo-canvas:not(.is-playing) .scene-import.is-active .import-status,
.demo-canvas:not(.is-playing) .scene-extract.is-active .demo-balloon,
.demo-canvas:not(.is-playing) .scene-extract.is-active .balloon-row,
.demo-canvas:not(.is-playing) .scene-measure.is-active .sample-grid .badge,
.demo-canvas:not(.is-playing) .scene-measure.is-active .status-card,
.demo-canvas:not(.is-playing) .scene-report.is-active .report-paper,
.demo-canvas:not(.is-playing) .scene-report.is-active .outcome-panel {
  opacity: 1;
  transform: none;
}

.demo-canvas:not(.is-playing) .scene-measure.is-active .m i {
  clip-path: none;
}

.demo-canvas:not(.is-playing) .scene-report.is-active .report-gen {
  display: none;
}

.demo-canvas:not(.is-playing) .scene-extract.is-active .demo-balloon {
  transform: translate(-50%, -50%);
}

.demo-canvas:not(.is-playing) .scene-import.is-active .loaded-drawing {
  transform: translate(-50%, 0);
}

.demo-canvas:not(.is-playing) .scene-import.is-active .import-status {
  transform: translate(-50%, 0);
}

.demo-caption-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px 16px 16px;
  border-top: 1px solid rgba(160, 174, 192, 0.22);
  background: #182231;
}

.demo-caption-bar p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.comparison-grid,
.output-grid,
.pricing-grid,
.trust-grid {
  display: grid;
  gap: 18px;
}

.comparison-grid,
.pricing-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.comparison-card,
.price-card,
.output-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--bg-panel);
}

.comparison-card h3,
.workflow-card h3,
.price-card h3 {
  margin: 0;
  color: white;
  font-size: 19px;
}

.comparison-card ul {
  margin: 18px 0 0;
  padding-left: 18px;
  color: var(--text-muted);
  line-height: 1.7;
}

.emphasis-card {
  border-color: rgba(79, 140, 255, 0.45);
  background: #172235;
  box-shadow: inset 0 0 0 1px rgba(79, 140, 255, 0.14);
}

.output-card span,
.price-card span {
  display: inline-block;
  margin-bottom: 11px;
  color: var(--amber);
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

.workflow-card p,
.price-card p,
.output-card p {
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
}

.outputs-section {
  padding-top: 88px;
  padding-bottom: 88px;
}

.output-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.output-card {
  display: block;
  min-height: 230px;
  background: #edf2f7;
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.42);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.output-card span {
  color: var(--blue-strong);
}

.output-card strong {
  display: block;
  color: #111827;
  font-size: 24px;
  line-height: 1.15;
}

.output-card p {
  color: #4b5563;
}

.output-card em {
  display: inline-flex;
  margin-top: 24px;
  color: var(--blue-strong);
  font-style: normal;
  font-weight: 850;
}

.output-card:hover {
  border-color: rgba(79, 140, 255, 0.78);
  transform: translateY(-2px);
}

.fine-print {
  max-width: 720px;
  margin: 18px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
}

.trust-band {
  width: 100%;
  margin: 0;
  padding: 82px max(20px, calc((100vw - var(--max)) / 2));
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 48px;
  background: #1a222e;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.trust-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.trust-grid div {
  padding-left: 16px;
  border-left: 2px solid rgba(79, 140, 255, 0.62);
}

.trust-grid strong {
  color: white;
  font-size: 14px;
}

.trust-grid p {
  font-size: 13px;
  line-height: 1.6;
}

.price-card {
  display: flex;
  flex-direction: column;
  border-color: rgba(160, 174, 192, 0.35);
  background: #1a2236;
}

.price-card h3 {
  margin-top: 6px;
  font-size: 42px;
  letter-spacing: 0;
}

.price-card h3 small {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 700;
}

.price-card p {
  flex: 1;
}

.price-card .button {
  width: 100%;
  margin-top: 24px;
}

.price-card.highlighted {
  border-color: rgba(79, 140, 255, 0.7);
  background: #1b2a45;
  box-shadow: 0 0 0 1px rgba(79, 140, 255, 0.2), 0 8px 32px rgba(37, 99, 235, 0.18);
}

.pricing-trial {
  margin: 32px auto 0;
  max-width: 560px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.pricing-trial p {
  margin: 0;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.5;
}

.faq-list {
  display: grid;
  gap: 10px;
}

details {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-panel);
}

summary {
  padding: 18px 20px;
  color: white;
  cursor: pointer;
  font-weight: 760;
}

details p {
  margin: 0;
  padding: 0 20px 20px;
  color: var(--text-muted);
  line-height: 1.65;
}

.company-section {
  max-width: 900px;
  text-align: center;
}

.company-section .eyebrow {
  margin-left: auto;
  margin-right: auto;
}

.final-cta {
  width: min(920px, calc(100% - 40px));
  margin: 0 auto 84px;
  padding: 56px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #182235;
  box-shadow: var(--shadow);
}

.contact-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr);
}

.contact-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  background: var(--bg-panel);
}

.contact-card h3 {
  margin: 0;
  color: white;
  font-size: 19px;
}

.contact-card p {
  margin: 12px 0 16px;
  color: var(--text-muted);
  line-height: 1.7;
}

.contact-card a {
  color: var(--blue);
  font-weight: 640;
  text-decoration: none;
}

.contact-card a:hover {
  text-decoration: underline;
}

.contact-note {
  margin: 18px 0 0;
  color: var(--text-muted);
  font-size: 14px;
}

.site-footer {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 44px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid var(--line);
  color: var(--text-muted);
  font-size: 13px;
}

.site-footer a {
  color: var(--text-soft);
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
}

.modal.is-open {
  display: block;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 8, 13, 0.76);
}

.modal-panel {
  position: relative;
  width: min(720px, calc(100% - 32px));
  max-height: calc(100svh - 32px);
  margin: 16px auto;
  overflow: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: #101722;
  box-shadow: var(--shadow);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
}

.modal-content {
  padding: 44px;
}

.modal-content h2 {
  margin: 0;
  color: white;
  font-size: 34px;
}

.modal-intro {
  margin: 14px 0 24px;
  color: var(--text-muted);
  line-height: 1.6;
}

.trial-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

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

.trial-form label {
  display: grid;
  gap: 7px;
}

.trial-form span {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 800;
}

.trial-form input,
.trial-form select,
.trial-form textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #0c121b;
  color: var(--text);
  padding: 12px 13px;
}

.trial-form textarea {
  resize: vertical;
}

.trial-form button[disabled] {
  opacity: 0.68;
  cursor: progress;
}

.full-span {
  grid-column: 1 / -1;
}

.success-message {
  padding: 22px;
  border: 1px solid rgba(74, 222, 128, 0.34);
  border-radius: var(--radius);
  background: rgba(74, 222, 128, 0.08);
}

.form-error {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid rgba(239, 100, 100, 0.42);
  border-radius: var(--radius);
  background: rgba(239, 100, 100, 0.09);
}

.form-error p {
  margin: 0;
  color: var(--text);
  line-height: 1.55;
}

.form-error a {
  display: inline-flex;
  margin-top: 12px;
  color: var(--blue);
  font-weight: 850;
}

.success-message strong {
  display: block;
  color: white;
  font-size: 20px;
  line-height: 1.35;
}

.success-message p {
  color: var(--text-muted);
  line-height: 1.6;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 980px) {
  .site-header {
    min-height: 68px;
  }

  .site-nav {
    display: none;
  }

  .hero {
    min-height: 100svh;
  }

  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "text"
      "visual"
      "proof";
    row-gap: 30px;
    padding-top: 76px;
  }

  .hero-visual {
    aspect-ratio: 620 / 640;
    width: min(420px, 78%);
    margin: 4px auto 0;
  }

  .hero-proof {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero h1 {
    font-size: 42px;
    max-width: 660px;
  }

  .hero-copy {
    font-size: 17px;
  }

  .hero-proof,
  .comparison-grid,
  .pricing-grid,
  .output-grid,
  .contact-grid,
  .trust-grid {
    grid-template-columns: 1fr;
  }

  .motion-demo-shell {
    grid-template-columns: 1fr;
  }

  .demo-canvas {
    height: 760px;
  }

  .demo-narrative {
    padding: 20px;
  }

  .demo-step-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .demo-actions-row {
    margin-top: 0;
  }

  .analysis-layout,
  .measure-layout,
  .report-layout {
    grid-template-columns: 1fr;
  }

  .analysis-layout {
    grid-template-rows: minmax(300px, 1fr) auto;
  }

  .measure-layout,
  .report-layout {
    align-content: start;
  }

  .status-card,
  .outcome-panel {
    position: static;
    width: auto;
    align-self: stretch;
  }

  .report-paper {
    min-height: 430px;
  }

  .trust-band {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .site-header,
  .hero-inner,
  .section,
  .site-footer,
  .final-cta {
    width: min(100% - 28px, var(--max));
  }

  .brand-mark {
    height: 36px;
  }

  .hero {
    min-height: 100svh;
  }

  .hero-inner {
    grid-template-areas:
      "text"
      "proof";
    padding: 54px 0 46px;
  }

  .hero-visual {
    display: none;
  }

  .hero-proof {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero h1 {
    font-size: 32px;
  }

  .hero-copy {
    max-width: 520px;
    font-size: 15px;
  }

  .hero-actions,
  .success-message .hero-actions {
    flex-direction: column;
    margin-top: 22px;
  }

  .button {
    width: 100%;
  }

  .hero-proof {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 22px;
  }

  .hero-proof div {
    padding: 10px 8px;
  }

  .hero-proof dt {
    font-size: 11px;
  }

  .hero-proof dd {
    display: none;
  }

  .section {
    padding: 64px 0;
  }

  .section-heading h2,
  .trust-band h2,
  .company-section h2,
  .final-cta h2 {
    font-size: 28px;
  }

  .demo-step-list {
    grid-template-columns: 1fr;
    display: none;
  }

  .demo-step {
    min-height: auto;
  }

  .demo-actions-row,
  .demo-caption-bar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .demo-narrative {
    gap: 14px;
    padding: 18px;
  }

  .demo-actions-row {
    margin-top: 2px;
  }

  .demo-canvas {
    height: 690px;
  }

  .demo-scene {
    padding: 16px;
  }

  .demo-browser-bar {
    padding: 11px 12px;
  }

  .demo-browser-bar strong {
    display: none;
  }

  .demo-browser-bar em {
    margin-left: auto;
  }

  .drop-target {
    width: 76%;
    min-height: 138px;
  }

  .pdf-token {
    --pdf-token-final-x: 52%;
    left: 6%;
    width: 156px;
  }

  .loaded-drawing {
    left: 50%;
    top: 13%;
    width: 86%;
  }

  .import-status {
    left: 50%;
    width: min(230px, 56%);
  }

  .analysis-layout {
    grid-template-rows: 330px auto;
    gap: 12px;
  }

  .analysis-drawing {
    align-items: flex-start;
  }

  .analysis-stage {
    transform: translate(-5%, 0) scale(1.08);
    transform-origin: 0 0;
  }

  .demo-canvas.is-playing .scene-extract.is-active .analysis-stage {
    animation-name: extract-stage-camera-mobile;
  }

  @keyframes extract-stage-camera-mobile {
    0%, 6% { transform: translate(-5%, 0) scale(1.08); }
    12%, 36% { transform: translate(-10%, 0) scale(1.3); }
    42%, 53% { transform: translate(-26%, 0) scale(1.3); }
    60%, 78% { transform: translate(-48%, 0) scale(1.3); }
    88%, 100% { transform: translate(-5%, 0) scale(1.08); }
  }

  .analysis-drawing,
  .balloon-panel,
  .measure-table-card,
  .status-card,
  .report-paper,
  .outcome-panel {
    padding: 12px;
  }

  .demo-balloon {
    width: 23px;
    height: 23px;
  }

  .balloon-panel {
    gap: 7px;
  }

  .balloon-row {
    grid-template-columns: 28px 1fr;
    padding: 9px;
  }

  .table-title {
    display: grid;
    gap: 4px;
  }

  .measure-table-card {
    overflow: hidden;
  }

  .sample-grid {
    min-width: 0;
    grid-template-columns: 34px repeat(4, minmax(44px, 1fr)) 44px;
    gap: 3px;
  }

  .sample-grid > * {
    min-height: 30px;
    padding: 4px 2px;
    font-size: 8.5px;
    white-space: normal;
  }

  .sample-grid > span {
    font-size: 8px;
  }

  .sample-grid > span small {
    display: none;
  }

  .sample-grid .m i {
    width: auto;
    max-width: 100%;
    text-align: center;
  }

  .status-card strong,
  .outcome-panel strong {
    font-size: 19px;
  }

  .report-meta-grid,
  .report-body-grid {
    grid-template-columns: 1fr 1fr;
  }

  .report-body-grid {
    gap: 10px;
  }

  .report-table {
    grid-template-columns: 34px 0.8fr 0.95fr 0.9fr 52px;
  }

  .report-table > * {
    padding: 5px;
    font-size: 8px;
  }

  .trust-band {
    padding: 64px 14px;
  }

  .final-cta {
    padding: 32px 20px;
  }

  .trial-form {
    grid-template-columns: 1fr;
  }

  .modal-content {
    padding: 36px 20px 24px;
  }
}
