:root {
  color-scheme: dark;
  --background: 12 19 33;
  --surface: 12 19 33;
  --surface-container-lowest: 7 14 28;
  --surface-container-low: 21 27 42;
  --surface-container: 25 32 46;
  --surface-container-high: 35 42 57;
  --surface-container-highest: 46 53 68;
  --surface-bright: 50 57 73;
  --surface-dim: 12 19 33;
  --surface-variant: 46 53 68;
  --on-surface: 220 226 246;
  --on-surface-variant: 193 198 211;
  --outline: 139 145 157;
  --outline-variant: 65 71 82;
  --primary: 167 200 255;
  --primary-container: 105 167 255;
  --on-primary-container: 0 59 116;
  --on-primary: 0 48 96;
  --secondary: 185 200 222;
  --secondary-fixed: 212 228 251;
  --tertiary: 119 209 255;
  --tertiary-fixed: 194 232 255;
  --on-tertiary: 0 53 73;
  --tertiary-container: 76 176 223;
  --error: 255 180 171;
  --error-container: 147 0 10;
  --panel-shadow: 0 32px 80px #03081466;
}
:root.light {
  color-scheme: light;
  --background: 246 249 255;
  --surface: 248 251 255;
  --surface-container-lowest: 255 255 255;
  --surface-container-low: 241 246 253;
  --surface-container: 236 242 251;
  --surface-container-high: 225 234 248;
  --surface-container-highest: 215 227 246;
  --surface-bright: 221 233 250;
  --surface-dim: 233 242 254;
  --surface-variant: 220 230 244;
  --on-surface: 18 36 65;
  --on-surface-variant: 67 88 115;
  --outline: 87 108 136;
  --outline-variant: 155 174 201;
  --primary: 34 85 162;
  --primary-container: 150 193 255;
  --on-primary-container: 12 44 92;
  --on-primary: 255 255 255;
  --secondary: 64 91 130;
  --secondary-fixed: 43 74 116;
  --tertiary: 0 102 145;
  --tertiary-fixed: 17 91 134;
  --on-tertiary: 255 255 255;
  --tertiary-container: 0 108 152;
  --error: 145 39 51;
  --error-container: 118 28 38;
  --panel-shadow: 0 30px 70px #365b891a;
}
html { scroll-behavior: smooth; scroll-padding-top: 6rem; }
body { margin: 0; overflow-wrap: anywhere; }
button, a, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid rgb(var(--tertiary)); outline-offset: 4px; }
[hidden] { display: none !important; }
.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 100; padding: 12px 18px; background: rgb(var(--surface-container)); }
.skip-link:focus { top: 12px; }
.site-header-inner { max-width: 1600px; margin-inline: auto; }
.site-header-inner > * { min-width: 0; }
.site-header-inner > :first-child img { flex: 0 0 auto; }
.site-header-inner > :first-child > div > div > span:first-child { white-space: nowrap; }
.site-header-inner > :last-child { flex-shrink: 0; }
.site-header-inner > :last-child a { white-space: nowrap; }
header nav[aria-label="Main navigation"] a {
  padding: 8px 10px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
}
header nav [aria-current="page"] { color: rgb(var(--primary)); background: rgb(var(--surface-container-high)); border-radius: 8px; }
.menu-control {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgb(var(--outline-variant) / .55);
  color: rgb(var(--on-surface));
}
.menu-control .material-symbols-outlined { font-size: 23px; }
.mobile-nav {
  margin: 0 16px 12px;
  padding: 8px;
  background: rgb(var(--surface-container));
  border: 1px solid rgb(var(--outline-variant) / .5);
  border-radius: 13px;
  box-shadow: var(--panel-shadow);
}
.mobile-nav a { display: block; padding: 12px 14px; font-size: 14px; border-radius: 8px; }
.mobile-nav a:hover { background: rgb(var(--surface-container-high)); }
@media (min-width: 1280px) { .menu-control, .mobile-nav { display: none; } }

.stitch-hero { padding: clamp(28px, 3.5vw, 48px) clamp(16px, 4vw, 56px) clamp(32px, 5vw, 68px); }
.hero-frame {
  max-width: 1320px;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
  align-items: center;
  gap: clamp(24px, 4vw, 68px);
  min-height: clamp(530px, 74svh, 700px);
}
.hero-intro { min-width: 0; }
.hero-tag, .hero-copy > div { justify-content: flex-start; }
.hero-copy { align-items: flex-start; }
.hero-copy { margin: 22px auto 28px; }
.hero-copy h1 {
  max-width: 1020px;
  font-size: clamp(2.85rem, 5vw, 5.2rem);
  line-height: 1.02;
  letter-spacing: -.062em;
}
.hero-copy p { max-width: 440px; text-wrap: pretty; }
.hero-copy > div { margin-top: 18px; }
.hero-journey-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 26px;
  font-size: 12px;
  font-weight: 600;
  color: rgb(var(--on-surface-variant));
}
.hero-journey-link span { color: rgb(var(--primary)); transition: translate .2s ease; }
.hero-journey-link:hover span { translate: 0 3px; }
.light .hero-copy h1 { filter: none; }
.light .hero-copy h1 > span {
  background-image: linear-gradient(100deg, #1b56ad, #007da0);
}
.light .hero-copy a:first-child, .light #contact a:first-child { background: #205aaa; color: white; }
.hero-visual, .imaging-suite {
  overflow: hidden;
  border: 1px solid rgb(var(--outline-variant) / .65);
  border-radius: clamp(16px, 2.4vw, 26px);
  background: rgb(var(--surface-container-low));
  box-shadow: var(--panel-shadow);
  text-align: left;
}
.dental-stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  color: #dcecff;
  background:
    repeating-linear-gradient(0deg, transparent 0 31px, #9bcafd0b 31px 32px),
    repeating-linear-gradient(90deg, transparent 0 31px, #9bcafd0b 31px 32px),
    radial-gradient(ellipse at 50% 51%, #224b73, #0b192b 66%, #08111e 92%);
}
.hero-stage {
  height: clamp(365px, 40vw, 540px);
  background:
    radial-gradient(ellipse at 50% 55%, #294c70 0, #142740 52%, #0a1424 83%);
}
.hero-stage::before { inset: 12% 9% 10%; border-color: #85bfff32; transform: rotate(-13deg); }
.hero-stage::after { inset: 19% 16% 18%; border-color: #85bfff2a; transform: rotate(20deg); }
.hero-stage .dental-model img {
  padding: 46px 22px 30px;
  transform: translateY(var(--anatomy-lift, 0px));
  filter: drop-shadow(0 24px 27px #030c217d) drop-shadow(0 0 25px #6cc9ff30);
  transition: opacity .28s ease, visibility .28s ease;
}
.hero-stage .dental-model canvas { transition: opacity .28s ease, visibility .28s ease; }
.hero-stage .dental-model[data-preview] canvas { opacity: 0; visibility: hidden; }
.hero-stage .dental-model[data-preview] img { opacity: 1; visibility: visible; }
.hero-stage .dental-model[data-rendered]:not([data-preview]) img { opacity: 0; }
.hero-stage .dental-model[data-preview] { cursor: auto; }
.hero-visual .viewer-footer { min-height: 69px; flex-wrap: wrap; }
.hero-model-toggle { background: rgb(var(--primary-container)) !important; color: rgb(var(--on-primary-container)) !important; }
.hero-model-toggle[aria-pressed="true"] { background: rgb(var(--surface-container-high)) !important; color: rgb(var(--on-surface)) !important; }
.anatomy-orbit { position: absolute; inset: 0; pointer-events: none; }
.anatomy-orbit i {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a8dfff;
  box-shadow: 0 0 18px #99e6ff;
}
.anatomy-orbit i:nth-child(1) { top: 27%; left: 17%; }
.anatomy-orbit i:nth-child(2) { top: 65%; right: 11%; width: 4px; height: 4px; }
.anatomy-orbit i:nth-child(3) { bottom: 13%; left: 29%; width: 3px; height: 3px; }
.anatomy-scan-light {
  position: absolute;
  inset: 16% 7%;
  pointer-events: none;
  background: linear-gradient(transparent 28%, #79d8ff1b 49%, #adefff7a 50%, #79d8ff12 51%, transparent 72%);
  opacity: 0;
  mask-image: radial-gradient(ellipse, #000, transparent 74%);
}
.stitch-hero[data-in-view] [data-presentation="preview"] .anatomy-scan-light { animation: anatomy-sweep 6.5s ease-in-out infinite; }
.stitch-hero[data-in-view] .anatomy-orbit i { animation: anatomy-glint 4.8s ease-in-out infinite alternate; }
.stitch-hero[data-in-view] .anatomy-orbit i:nth-child(2) { animation-delay: -1.4s; }
.stitch-hero[data-in-view] .anatomy-orbit i:nth-child(3) { animation-delay: -2.8s; }
@keyframes anatomy-sweep {
  0%, 12% { opacity: 0; transform: translateY(-38%); }
  25%, 47% { opacity: .8; }
  62%, 100% { opacity: 0; transform: translateY(38%); }
}
@keyframes anatomy-glint { from { opacity: .35; scale: .75; } to { opacity: 1; scale: 1.18; } }

main section[data-chapter] {
  background-image: radial-gradient(ellipse at 10% 0, rgb(var(--chapter-color) / var(--chapter-glow, .045)), transparent 58%);
}
main section[data-chapter]::after {
  content: "";
  position: absolute;
  z-index: 1;
  bottom: 0;
  inset-inline: 0;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgb(var(--chapter-color) / .49) 27%, rgb(var(--chapter-color) / .2) 66%, transparent);
  transform: scaleX(var(--chapter-progress, .18));
  transform-origin: left;
}
.anatomy-trail {
  --trail-color: 115 191 255;
  position: fixed;
  z-index: 40;
  right: clamp(12px, 2.4vw, 36px);
  bottom: max(12px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: 47px minmax(0,1fr) auto 42px;
  align-items: center;
  gap: 10px;
  width: min(330px, calc(100% - 24px));
  padding: 6px;
  border: 1px solid rgb(var(--trail-color) / .4);
  border-radius: 13px;
  background: rgb(var(--surface-container) / .93);
  box-shadow: 0 10px 38px #020b213a;
  backdrop-filter: blur(16px);
  animation: trail-enter .4s ease both;
}
.trail-model, .trail-next { height: 44px; display: grid; place-items: center; border-radius: 8px; }
.trail-model { overflow: hidden; background: radial-gradient(ellipse, rgb(var(--trail-color) / .38), #101d31 80%); }
.trail-model img { width: 41px; height: 41px; object-fit: contain; transform: rotate(var(--trail-angle, -7deg)); transition: transform .55s ease; }
.trail-next { border: 1px solid rgb(var(--trail-color) / .28); background: rgb(var(--trail-color) / .12); }
.trail-next:hover, .trail-model:hover { background-color: rgb(var(--trail-color) / .26); }
.trail-next .material-symbols-outlined { font-size: 20px; }
.trail-copy { display: grid; gap: 1px; overflow: hidden; }
.trail-copy span { color: rgb(var(--on-surface-variant)); font-size: 9px; line-height: 1.2; }
.trail-copy strong { font-size: 12px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; }
.trail-count { color: rgb(var(--on-surface-variant)); font: 600 10px/1 Inter, sans-serif; white-space: nowrap; }
.trail-progress { position: relative; height: 2px; background: rgb(var(--outline-variant) / .45); overflow: hidden; margin-top: 3px; border-radius: 5px; }
.trail-progress::after { content: ""; display: block; height: 100%; background: rgb(var(--trail-color)); transform: scaleX(var(--trail-progress, 0)); transform-origin: left; }
.trail-copy .trail-label-enter { animation: trail-label .32s ease both; }
@keyframes trail-label { from { opacity: .65; translate: 0 4px; } to { opacity: 1; translate: 0 0; } }
@keyframes trail-enter { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
.chapter-reveal { animation: chapter-rise .65s cubic-bezier(.22,.72,.24,1) backwards; }
.chapter-reveal > .chapter-card { animation: chapter-rise .58s cubic-bezier(.22,.72,.24,1) backwards; animation-delay: var(--chapter-delay, 0ms); }
@keyframes chapter-rise { from { opacity: .34; translate: 0 16px; } to { opacity: 1; translate: 0 0; } }
.stitch-hero[data-in-view] .hero-intro { animation: chapter-rise .65s ease backwards; }
.stitch-hero[data-in-view] .hero-visual { animation: chapter-rise .72s .1s ease backwards; }
body:has(.anatomy-trail:not([hidden])) .site-toast { bottom: 78px; }
body.anatomy-enabled footer { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
.anatomy-finale {
  position: absolute;
  right: clamp(-160px, -6vw, -28px);
  bottom: -56%;
  width: clamp(300px, 44vw, 660px);
  opacity: .14;
  rotate: -15deg;
  pointer-events: none;
  mask-image: linear-gradient(240deg, #000, #000 36%, transparent 85%);
}
:root.light .anatomy-finale { opacity: .18; }
.dental-stage::before, .dental-stage::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: -1;
  inset: 12% 22% 14%;
  border: 1px solid #92c7fc28;
  border-radius: 50%;
  transform: rotate(-18deg);
}
.dental-stage::after { inset: 20% 26%; border-style: dashed; transform: rotate(21deg); }
.stage-meta {
  position: absolute;
  top: 0;
  inset-inline: 0;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  padding: clamp(13px, 2.2vw, 24px);
  gap: 8px;
  font: 600 12px/1.4 Inter, sans-serif;
  pointer-events: none;
}
.stage-meta > span:first-child { display: flex; align-items: center; gap: 8px; }
.stage-meta i { width: 7px; height: 7px; background: #79cfff; border-radius: 50%; box-shadow: 0 0 13px #94deff; }
.stage-meta a { pointer-events: auto; color: #c4e2ff; }
.stage-meta a:hover { text-decoration: underline; }
.stage-axis {
  position: absolute;
  inset: auto auto 18px 20px;
  display: flex;
  gap: 10px;
  font: 600 10px Inter, sans-serif;
  color: #c1d5eb;
  pointer-events: none;
}
.dental-model { position: absolute; inset: 0; display: grid; place-items: center; touch-action: pan-y; }
.dental-model[data-rendered] { cursor: grab; touch-action: pan-y; }
.dental-model[data-rendered]:active { cursor: grabbing; }
.dental-model:focus-visible { outline-offset: -5px; }
.dental-model img { width: 100%; height: 100%; max-height: 98%; position: absolute; object-fit: contain; padding: 37px 15px 25px; filter: drop-shadow(0 20px 25px #07111f99); }
.dental-model canvas { width: 100%; height: 100%; display: block; position: absolute; inset: 0; }
.dental-model[data-rendered] img { visibility: hidden; }
.viewer-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; }
.viewer-hint { color: rgb(var(--on-surface-variant)); font-size: 12px; line-height: 1.4; }
.dental-controls { display: flex; flex-wrap: wrap; gap: 6px; }
.dental-controls button, .imaging-expand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  min-width: 44px;
  border: 1px solid rgb(var(--outline-variant) / .7);
  border-radius: 9px;
  padding: 8px 12px;
  background: rgb(var(--surface-container));
  color: rgb(var(--on-surface));
  font-size: 12px;
  font-weight: 600;
}
.dental-controls button[data-command="spin"] .material-symbols-outlined,
.dental-controls button .material-symbols-outlined, .imaging-expand .material-symbols-outlined { font-size: 18px; }
.dental-controls button:hover, .imaging-expand:hover { background: rgb(var(--surface-container-high)); }
.dental-controls button[aria-pressed="true"] { background: rgb(var(--primary-container)); color: rgb(var(--on-primary-container)); border-color: transparent; }
.dental-controls button:disabled { opacity: .42; cursor: default; }
.imaging-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: clamp(14px, 2.5vw, 24px); }
.imaging-header h3 { font: 700 clamp(16px, 2.3vw, 21px)/1.3 "Plus Jakarta Sans", Inter, sans-serif; }
.imaging-header p { color: rgb(var(--on-surface-variant)); font-size: 12px; margin-top: 4px; }
.imaging-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(250px, 1fr); }
.imaging-stage { min-height: clamp(340px, 38vw, 500px); }
.imaging-hint { position: absolute; bottom: 15px; inset-inline: 18px; color: #c0d6ef; pointer-events: none; }
.imaging-sidebar { display: flex; flex-direction: column; gap: 20px; padding: clamp(16px, 2.5vw, 26px); border-top: 1px solid rgb(var(--outline-variant) / .45); }
.dental-group h4, .layer-slider { font-size: 12px; font-weight: 650; margin-bottom: 8px; }
.layer-slider { display: grid; grid-template-columns: 1fr auto; gap: 5px; margin-top: 16px; }
.layer-slider output { color: rgb(var(--tertiary)); }
.layer-slider input { grid-column: 1 / -1; accent-color: rgb(var(--primary)); width: 100%; min-height: 32px; cursor: pointer; }
.imaging-note { color: rgb(var(--on-surface-variant)); font-size: 12px; line-height: 1.55; }
.slice-canvas { position: absolute; inset: 5% 0 7%; width: 100%; height: 88%; object-fit: contain; }
.imaging-suite.is-expanded {
  position: fixed;
  inset: 0;
  z-index: 70;
  border: 0;
  border-radius: 0;
  overflow: auto;
  overscroll-behavior: contain;
  animation: none;
}
body:has(.imaging-suite.is-expanded) { overflow: hidden; }
.imaging-suite.is-expanded .imaging-stage { height: calc(100dvh - 100px); }
@media (max-width: 900px) { .imaging-suite.is-expanded .imaging-stage { height: 54dvh; } }
.site-dialog {
  width: min(100% - 28px, 640px);
  max-height: calc(100dvh - 28px);
  margin: auto;
  padding: 0;
  border-radius: 18px;
  color: rgb(var(--on-surface));
  background: rgb(var(--surface-container));
  box-shadow: var(--panel-shadow);
  overflow: auto;
}
.site-dialog::backdrop { background: #030b19a8; backdrop-filter: blur(6px); }
.info-dialog-body { padding: 28px; position: relative; }
.info-dialog h2 { font: 700 23px/1.35 "Plus Jakarta Sans", Inter, sans-serif; padding-right: 30px; }
.info-dialog p { margin-top: 14px; font-size: 14px; color: rgb(var(--on-surface-variant)); line-height: 1.65; }
.info-close { position: absolute; right: 16px; top: 16px; width: 40px; height: 40px; border-radius: 8px; display: grid; place-items: center; background: rgb(var(--surface-container-high)); }
.site-toast { position: fixed; z-index: 100; max-width: calc(100% - 32px); bottom: 18px; left: 50%; translate: -50% 0; padding: 12px 16px; border-radius: 9px; background: rgb(var(--surface-container-high)); color: rgb(var(--on-surface)); border: 1px solid rgb(var(--outline-variant)); box-shadow: var(--panel-shadow); font-size: 13px; }
#platform [data-case-card].selected { border-color: rgb(var(--primary)); }
#platform [data-case-card] > div, #platform [data-case-card] button { min-width: 0; }
#platform [data-case-card] button { height: 40px; min-width: 40px; }
#approve-demo:disabled { opacity: .55; cursor: default; }
@media (max-width: 1390px) { header [data-path="login"] { display: none; } }
@media (max-width: 900px) { .imaging-layout { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 960px) {
  .hero-frame { grid-template-columns: minmax(0, 1fr); max-width: 700px; min-height: 0; }
  .hero-intro { text-align: center; }
  .hero-tag, .hero-copy > div { justify-content: center; }
  .hero-copy { align-items: center; margin-bottom: 0; }
  .hero-copy h1 { font-size: clamp(2.35rem, 6.7vw, 4.4rem); text-wrap: balance; }
  .hero-stage { height: clamp(290px, 58vw, 470px); }
  .hero-journey-link { margin-top: 18px; }
}
@media (max-width: 640px) {
  html { scroll-padding-top: 5rem; }
  .site-header-inner { padding-inline: 16px; gap: 8px; }
  .site-header-inner > :first-child > div > div > span + span { display: none; }
  .site-header-inner > :last-child { gap: 8px; }
  main section, footer { padding-inline: 16px !important; }
  .hero-copy { margin-block: 20px 0; }
  .hero-copy p { font-size: 14px; }
  .hero-copy > div { gap: 8px; }
  .hero-copy > div a { padding: 10px 12px; font-size: 12px; min-height: 44px; }
  .hero-stage { height: clamp(265px, 78vw, 350px); }
  .hero-stage .dental-model img { padding: 30px 14px 17px; }
  .hero-visual .viewer-footer { min-height: 85px; }
  .dental-stage::before { inset: 20% 7%; }
  .dental-stage::after { inset: 23% 15%; }
  .stage-meta { font-size: 10px; }
  .viewer-footer { flex-wrap: wrap; justify-content: center; padding: 10px; gap: 8px; }
  .viewer-footer .viewer-hint { width: 100%; text-align: center; }
  .imaging-stage { min-height: 320px; }
  #cert-modal .font-mono { overflow-wrap: anywhere; }
  #platform [data-case-card] { flex-wrap: wrap; gap: 8px; }
  #platform [data-case-card] > :last-child { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .chapter-reveal, .chapter-reveal > .chapter-card, .anatomy-trail, .trail-label-enter,
  .stitch-hero[data-in-view] .hero-intro, .stitch-hero[data-in-view] .hero-visual,
  .stitch-hero[data-in-view] .anatomy-orbit i,
  .stitch-hero[data-in-view] [data-presentation="preview"] .anatomy-scan-light { animation: none !important; }
}
