/* ============================================================
   FARO design system
   Page rules first, then components, then page layouts.
   ============================================================ */

:root {
  /* Never pure black or white */
  --navy: #0e1430;
  --navy-2: #151c3f;
  --navy-3: #1d2550;
  --paper: #e9ebef;
  --paper-2: #dfe2e8;
  --ink: #18203f;
  --ink-muted: #4c5573;
  --text: #d9dce6;
  --text-muted: #9aa1b8;
  --teal: #5cc8b8;
  --teal-dim: rgba(92, 200, 184, 0.4);
  --line: rgba(217, 220, 230, 0.1);
  --line-dark: rgba(24, 32, 63, 0.12);

  /* Case study card variants */
  --green: #1f7a63;
  --green-deep: #0f4a3c;
  --royal: #2a45b8;
  --royal-deep: #17286f;
  --purple: #4a2d7a;
  --purple-deep: #261643;
  --silver: #f1f2f5;
  --silver-deep: #c9cdd6;

  --font-title: "Sora", system-ui, sans-serif;
  --font-body: "Poppins", system-ui, sans-serif;

  /* Type scale */
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.6rem;
  --step-3: 2.1rem;
  --step-4: 2.9rem;
  --step-5: 3.8rem;

  --container: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --radius: 18px;
  --radius-sm: 10px;
  --section-gap: clamp(80px, 11vw, 140px);
  --callout-gap: 40px;
}

/* ---------- Page rules ---------- */

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--navy);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

p { margin: 0 0 1.1em; }

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

.section { padding: var(--section-gap) 0 0; }

/* ---------- Typography components ---------- */

.h1 {
  font-size: clamp(2.3rem, 5.4vw, var(--step-5));
  max-width: 24ch;
}

/* Teal callout with an arrow */
.callout {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: var(--teal);
  font-family: var(--font-title);
  font-weight: 500;
}
.callout__arrow { font-size: 1.2em; }

.tag {
  display: inline-block;
  padding: 3px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border: 1.5px solid var(--teal);
  border-radius: 999px;
  background: var(--teal);
  color: var(--navy);
  font-family: var(--font-title);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
@media (hover: hover) {
  .btn:hover { background: transparent; color: var(--teal); }
}

.btn--ghost { background: transparent; color: var(--teal); }
@media (hover: hover) {
  .btn--ghost:hover { background: var(--teal); color: var(--navy); }
}

.btn--sm { padding: 11px 21px; font-size: 0.82rem; }

/* Elongated arrow button: ghost by default, filled on hover */
.arrow-btn {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 34px;
  border: 1.5px solid var(--text-muted);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}
@media (hover: hover) {
  .arrow-btn:hover:not(:disabled) {
    background: var(--teal);
    border-color: var(--teal);
    color: var(--navy);
  }
}
.arrow-btn:disabled { opacity: 0.3; cursor: default; }
.arrow-btn svg { width: 20px; height: 20px; }

.arrow-row { display: flex; gap: 10px; }

/* ---------- Header ---------- */

.site-header { position: relative; z-index: 10; }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 26px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--teal);
}
.brand__mark { width: 104px; height: auto; }
.brand__text {
  font-family: var(--font-title);
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.15;
  color: var(--text);
}

.nav { display: flex; align-items: center; gap: 34px; }
.nav a {
  font-size: 0.92rem;
  text-decoration: none;
  color: var(--text-muted);
  transition: color 0.2s;
}
.nav a:hover { color: var(--teal); }
.nav .btn { color: var(--teal); }
.nav .btn:hover { color: var(--navy); }

.nav-toggle {
  display: none;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
/* Three lines that turn into a cross while the menu is open */
.nav-toggle { width: 48px; height: 48px; position: relative; -webkit-tap-highlight-color: transparent; }
.nav-toggle span {
  position: absolute;
  left: 12px;
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.3s ease, opacity 0.2s ease;
}
.nav-toggle span:nth-child(1) { top: 16px; }
.nav-toggle span:nth-child(2) { top: 23px; }
.nav-toggle span:nth-child(3) { top: 30px; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Contact area + footer ---------- */

.contact-area { position: relative; padding: var(--section-gap) 0; }
/* Copy on the left, actions on the right; they stack on small screens */
.contact-area__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 32px clamp(32px, 6vw, 96px);
  padding: clamp(36px, 5vw, 64px);
  border: 1px solid rgb(255 255 255 / 0.08);
  border-radius: var(--radius);
  background: #080b1a;
  color: #fff;
}
.contact-area__inner h2 { font-size: clamp(1.7rem, 3.4vw, var(--step-3)); max-width: 20ch; text-wrap: balance; }
.contact-area__inner p { max-width: 52ch; margin: 14px 0 0; color: var(--text-muted); }
.contact-area .actions { display: flex; flex-wrap: wrap; gap: 14px; }
.contact-area .btn--ghost { color: #fff; border-color: rgb(255 255 255 / 0.55); }
@media (hover: hover) {
  .contact-area .btn--ghost:hover { background: #fff; color: var(--navy); }
}

.site-footer__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  padding-top: 40px;
  padding-bottom: 40px;
  border-top: 1px solid var(--line);
}
.sitemap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 22px;
  font-size: 0.85rem;
}
.sitemap a { color: var(--text-muted); text-decoration: none; }
.sitemap a:hover { color: var(--teal); }

/* ---------- Slider ---------- */

/* Track moves by transform; the section clips it so the page never scrolls sideways */
.slider { position: relative; }

/* ---------- Case study card ---------- */

/* Frames keep their render shape: 900 x 504 */
.spin {
  width: 100%;
  aspect-ratio: 900 / 504;
  background: var(--sprite) no-repeat;
  background-size: calc(var(--cols) * 100%) calc(var(--rows) * 100%);
}

/* ---------- Service box ---------- */

.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
.service {
  position: relative;
  padding: 30px 28px 32px;
  border: 1.5px dotted var(--line);
  border-radius: var(--radius);
  background: var(--navy-2);
  transition: border-color 0.25s;
}
.service:hover { border-color: var(--teal); }
.service h3 { font-size: var(--step-1); margin-bottom: 10px; padding-right: 36px; }
.service p { margin: 0; color: var(--text-muted); font-size: 0.93rem; }
.service__arrow {
  position: absolute;
  top: 26px;
  right: 24px;
  width: 22px;
  height: 22px;
  color: var(--text-muted);
  transition: color 0.25s;
}
.service:hover .service__arrow { color: var(--teal); }
.service__more {
  display: block;
  max-height: 0;
  margin-top: 0;
  overflow: hidden;
  color: var(--teal);
  font-size: 0.88rem;
  opacity: 0;
  transition: max-height 0.35s, margin-top 0.35s, opacity 0.35s;
}
.service:hover .service__more { max-height: 120px; margin-top: 14px; opacity: 1; }

/* ---------- Home: hero ---------- */

.hero { position: relative; padding: clamp(56px, 8vw, 104px) 0 0; }
.hero > .container { position: relative; z-index: 1; }

/* The room reaches up behind the header and down behind the top of the slider */
.hero .room { top: -140px; bottom: -240px; mask-image: linear-gradient(to bottom, #000 45%, transparent 92%); }
.callout__arrow { display: inline-block; transition: transform 0.2s; }

/* Clickable callout that anchors to the block below it.
   Idle: the arrow bobs now and then. Hover: soft teal pill, the line lifts, the arrow bounces. */
.callout--link {
  position: relative;
  margin-left: -16px;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: var(--step-1);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s, color 0.25s, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.callout--link .callout__arrow { animation: bob 2.4s ease-in-out infinite; }
/* A tap leaves :hover on a touch screen, so the hover looks only apply where a mouse can hover */
.callout--link:focus-visible {
  background: rgba(92, 200, 184, 0.1);
  color: #7fdccd;
  transform: translateY(-2px);
}
.callout--link:focus-visible .callout__arrow { animation: bounce 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) infinite; }
@media (hover: hover) {
  .callout--link:hover,
  .hero:has(.rotate:hover) .hero__next .callout--link {
    background: rgba(92, 200, 184, 0.1);
    color: #7fdccd;
    transform: translateY(-2px);
  }
  .callout--link:hover .callout__arrow,
  .hero:has(.rotate:hover) .hero__next .callout__arrow { animation: bounce 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) infinite; }
}

/* A callout with two lines in one spot: the second replaces the first on hover */
.callout__swap { display: inline-grid; }
.callout__swap > span { grid-area: 1 / 1; transition: opacity 0.3s ease, transform 0.3s ease; }
.callout__swap > span + span { opacity: 0; transform: translateY(6px); }
.callout--link:focus-visible .callout__swap > span:first-child { opacity: 0; transform: translateY(-6px); }
.callout--link:focus-visible .callout__swap > span + span { opacity: 1; transform: none; }
@media (hover: hover) {
  .callout--link:hover .callout__swap > span:first-child,
  .hero:has(.rotate:hover) .hero__next .callout__swap > span:first-child { opacity: 0; transform: translateY(-6px); }
  .callout--link:hover .callout__swap > span + span,
  .hero:has(.rotate:hover) .hero__next .callout__swap > span + span { opacity: 1; transform: none; }
}
.callout--link:active { transform: translateY(1px) scale(0.98); transition-duration: 0.08s; }
.callout--link:focus-visible { outline: none; }

@keyframes bob {
  0%, 70%, 100% { transform: translateY(0); }
  80% { transform: translateY(5px); }
  90% { transform: translateY(0); }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  40% { transform: translateY(7px); }
  60% { transform: translateY(3px); }
}

/* Hero and About read as one unit; the teal line anchors to it */
.hero + #about { position: relative; z-index: 1; }

/* Typewriter: hidden characters hold the layout until they appear */
.is-typing .ch { opacity: 0; }
.is-typing .ch.on { opacity: 1; }
.ch.caret { box-shadow: 2px 0 0 var(--teal); }

/* ---------- Home: about ---------- */

.about {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(40px, 7vw, 100px);
  align-items: center;
}
.about__name { font-size: clamp(1.7rem, 3.4vw, var(--step-3)); }
.about__origin { margin: 6px 0 32px; color: var(--text-muted); }
.about__copy p { color: var(--text); }

/* Desktop: the puzzle sits left of the copy, so the FARO mark draws beside the heading */
@media not ((max-width: 900px) or ((orientation: portrait) and (max-width: 1100px)) or (max-height: 500px)) {
  .about { grid-template-columns: 0.8fr 1.2fr; }
  .about .puzzle { order: -1; }
}

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Detail hero (articles + case studies) ---------- */

/* Case studies: the visual leads the fold */
.case-fold { scroll-snap-align: start; }

/* ---------- Article page ---------- */

@keyframes sweep { to { transform: rotate(360deg); } }

/* ---------- Case study page ---------- */

.case-fold {
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  background: linear-gradient(to top, var(--hero-bottom), var(--hero-top));
  color: var(--hero-ink);
}
/* The perspective room replaces the header rule */
[data-snap] .site-header__inner,
.case-fold .site-header__inner { border-bottom-color: transparent; }

.case-fold .nav a,
.case-fold .brand__text { color: color-mix(in srgb, var(--hero-ink) 78%, transparent); }

.case-fold { position: relative; }
.case-fold .room { --room-line: color-mix(in srgb, var(--hero-ink) 16%, transparent); }

.case-fold .tag { border-color: color-mix(in srgb, var(--hero-ink) 30%, transparent); color: inherit; }

/* The page end is always a resting point, or snapping pulls readers back above the footer */
.site-footer { scroll-snap-align: end; }

/* Hover label for the "before" image */
.before {
  position: relative;
  margin-top: 26px;
}

/* ---------- Why FARO: bento ---------- */

.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Outline icon in the corner of each cell; the page callout brightens them */
/* Inlined icons stay hidden until their card is hovered, then draw in */
.bento__icon--draw * {
  fill: none !important;
  stroke: var(--teal);
  stroke-width: var(--sw, 2);
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.4s cubic-bezier(0.45, 0, 0.2, 1);
}

.bento__icon--draw clipPath *,
.bento__icon--draw defs * { stroke: none; }

.bento__icon {
  position: absolute;
  right: -24px;
  bottom: -24px;
  width: 230px;
  height: 230px;
  object-fit: contain;
  opacity: 0.16;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

/* ---------- Why FARO: process ---------- */

.process {
  position: relative;
  display: grid;
  grid-template-columns: 3fr 4fr 3fr;
  gap: 64px;
  align-items: stretch;
}

.step {
  position: relative;
  padding: 28px;
  border: 1.5px dotted var(--line);
  border-radius: var(--radius);
  background: var(--navy-2);
  overflow: hidden;
  transition: border-color 0.25s, background 0.25s, color 0.25s;
}
.step:is(:hover, .is-lit) { border-color: var(--teal); }

.step h3 { margin: 14px 0 10px; font-size: var(--step-1); }
.step p { margin: 0; color: var(--text-muted); font-size: 0.93rem; }

.step::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../assets/img/dots.png") center / 520px auto no-repeat;
  opacity: 0;
  filter: none;
  transition: opacity 0.3s;
  pointer-events: none;
}
.step:is(:hover, .is-lit)::before { opacity: 0.18; }

/* ---------- Mobile ---------- */

/* The phone layout covers phones, foldables and tablets held upright, up to iPad Pro portrait,
   and phones turned sideways. Everything else gets the desktop layout. layout.js uses the
   same query. */

@media (max-width: 900px), (orientation: portrait) and (max-width: 1100px), (max-height: 500px) {
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    padding: 24px var(--gutter);
    background: var(--navy-2);
    border-bottom: 1px solid var(--line);
  }
  .nav.is-open { display: flex; }
  .nav-toggle { display: block; }
  .about,
.process { grid-template-columns: 1fr; }
  
  
  
  .bento { grid-template-columns: 1fr; }
  
  
  
  .process { gap: 20px; }
  .site-footer__inner { grid-template-columns: 1fr; justify-items: start; }
  .sitemap { justify-content: flex-start; }
  .service__more { -webkit-line-clamp: unset; }

  /* No hover on touch, so show the hover content */
  .service__more { opacity: 1; max-height: none; transform: none; margin-top: 14px; }
  
  
}

@media (max-width: 900px), (orientation: portrait) and (max-width: 1100px), (max-height: 500px) {
  .contact-area__inner { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Client quotes inside the contact area ---------- */

.contact-area__callout { margin-bottom: var(--callout-gap); }

@keyframes echo {
  0% { transform: scale(0.02); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: scale(1); opacity: 0; }
}

/* ---------- Tools we use ---------- */

/* Fixed height so swapping groups never moves the page */
.tools-stage {
  position: relative;
  height: 110px;
  margin-top: 28px;
}

/* Logo cloud: layout.js sets each logo's --x, --y, --s and --o for the current mode */
.cloud { height: 230px; overflow: hidden; }
.cloud__item {
  position: absolute;
  left: 50%;
  top: 50%;
  opacity: calc(var(--o, 0) + var(--no, 0));
  transform: translate(-50%, -50%) translate(calc(var(--x, 0px) + var(--nx, 0px)), calc(var(--y, 0px) + var(--ny, 0px))) scale(calc(var(--s, 1) * var(--ns, 1)));
  transition:
    transform 0.8s cubic-bezier(0.2, 0.9, 0.25, 1) calc(var(--i) * 18ms),
    opacity 0.5s ease calc(var(--i) * 18ms);
  pointer-events: none;
}

/* Pointer nudges react at once, without the staggered entrance */
.cloud.is-nudging .cloud__item {
  transition:
    transform 0.45s cubic-bezier(0.2, 0.9, 0.25, 1),
    opacity 0.3s ease;
}
.cloud__float {
  display: flex;
  align-items: center;
  gap: 10px;
  animation: drift 7s ease-in-out calc(var(--i) * -0.7s) infinite alternate;
}
.cloud__name {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  color: var(--text-muted);
  font-size: 0.82rem;
  opacity: 0;
  transition: max-width 0.5s, opacity 0.4s;
}
.cloud__item.is-picked .cloud__name { max-width: 140px; opacity: 1; }
.cloud[data-mode="group"] .cloud__float { animation-play-state: paused; }

@keyframes drift {
  from { transform: translate(-6px, 4px); }
  to { transform: translate(6px, -5px); }
}
.tools {
  position: absolute;
  inset: 0 0 auto 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 40px;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
}
.tools li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 0.88rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s, transform 0.3s;
}
.tools.is-shown li {
  opacity: 1;
  transform: none;
  transition-delay: calc(var(--i) * 45ms);
}
.tools__logo {
  flex: none;
  width: 26px;
  height: 26px;
  background: var(--text);
  mask: var(--logo) center / contain no-repeat;
  -webkit-mask: var(--logo) center / contain no-repeat;
}

.tools__logo--wordmark { width: 108px; height: 26px; }

.tools--inline,
.tools--all,
.tools--after,
.contact-area__close { display: none; }

@media (max-width: 900px), (orientation: portrait) and (max-width: 1100px), (max-height: 500px) {
  .tools-stage { display: none; }
  .tools--inline {
    position: static;
    display: flex;
    gap: 10px 18px;
    margin-top: 18px;
  }
  .tools--inline li { opacity: 1; transform: none; font-size: 0.78rem; }
  .tools--inline .tools__logo { width: 20px; height: 20px; }
}

/* ---------- How we work: color per step ---------- */

.step[data-step="1"] { --accent: #5cc8b8; }
.step[data-step="2"] { --accent: #4f6be0; }
.step[data-step="3"] { --accent: #8a5fd6; }
.step[data-step="4"] { --accent: #2fae8c; }
.step[data-step="5"] { --accent: #e9ebef; }

.step { transition: border-color 0.25s, background 0.3s, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s; }
.step:is(:hover, .is-lit) {
  border-style: solid;
  border-color: var(--accent);
  background: linear-gradient(to top, color-mix(in srgb, var(--accent) 14%, var(--navy-2)), color-mix(in srgb, var(--accent) 30%, var(--navy-2)));
  box-shadow: 0 22px 50px -26px var(--accent);
  transform: translateY(-4px);
}

.step:is(:hover, .is-lit) p { color: var(--text); }

/* ---------- Stack row on case studies ---------- */

.stack { margin-top: 48px; }

/* ---------- Long-form case study ---------- */

/* Feature list: what we built, and why each piece exists */
.features { display: grid; gap: 28px; margin-top: 8px; }

/* What we built: a row of icon tiles, then the media at full width */
.tiles {
  display: grid;
  grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr));
  gap: 28px clamp(20px, 3vw, 40px);
  margin-top: 8px;
}

.tile { padding-top: 20px; border-top: 1px solid var(--line); }

.tile h3 { font-size: var(--step-1); margin-bottom: 8px; }
.tile p { margin: 0; color: var(--text-muted); line-height: 1.7; }

@media (max-width: 960px) {
  .tiles { --cols: 2; }
}
@media (max-width: 560px) {
  .tiles { --cols: 1; }
}

/* ---------- Perspective room ---------- */

/* Grid tunnel drawn by layout.js; its vanishing point drifts toward the pointer */
.room {
  --room-line: rgba(92, 200, 184, 0.17);
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.room svg { display: block; width: 100%; height: 100%; }
.room path { fill: none; stroke: var(--room-line); stroke-width: 1; vector-effect: non-scaling-stroke; }

/* ---------- Full-height sections ---------- */

/* On pages marked data-snap, each section fills the screen with its own spacing. On desktop
   every scroll settles on a section, so the page never rests between two backgrounds. A
   section taller than the screen still scrolls through before the next snap. */
@media not ((max-width: 900px) or ((orientation: portrait) and (max-width: 1100px)) or (max-height: 500px)) {
  html:has(body[data-snap]) { scroll-snap-type: y mandatory; }
  [data-snap] .site-header,
  [data-snap] .snap,
  [data-snap] #contact { scroll-snap-align: start; }

  [data-snap] .snap,
  [data-snap] #contact {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(40px, 7vh, 88px) 0;
  }

  /* Contact and the footer fill the last screen together, so the footer is always in reach */
  [data-snap] #contact { min-height: calc(100svh - var(--footer-h, 0px)); }
  [data-snap] #contact.is-pinned { justify-content: flex-start; }

  /* Content centers in the space above the callout */
  [data-snap] .snap > :first-child,
  [data-snap] .snap > .dots:first-child + *,
  [data-snap] .snap > .space:first-child + * { margin-top: auto; }

  /* Full screens give the type room to grow */
  [data-snap] .callout--link { font-size: clamp(1.25rem, 1.5vw, 1.55rem); }
  [data-snap] .about__name { font-size: clamp(2.3rem, 3.6vw, 3.4rem); }
  [data-snap] .about__origin { font-size: 1.15rem; }
  [data-snap] .about__copy p { font-size: clamp(1.1rem, 1.3vw, 1.3rem); line-height: 1.65; }
  [data-snap] .puzzle__title { font-size: clamp(1.9rem, 2.4vw, 2.5rem); }
  [data-snap] .puzzle__line { font-size: clamp(1.05rem, 1.2vw, 1.2rem); }
  [data-snap] .service h3 { font-size: clamp(1.4rem, 1.7vw, 1.7rem); }
  [data-snap] .service p { font-size: clamp(1rem, 1.1vw, 1.12rem); }
  [data-snap] .service__more { font-size: 1rem; }
  
  
  [data-snap] .step h3 { font-size: clamp(1.35rem, 1.6vw, 1.6rem); }
  [data-snap] .step p { font-size: clamp(1rem, 1.1vw, 1.1rem); }
  [data-snap] .contact-area__inner p { font-size: clamp(1.05rem, 1.2vw, 1.2rem); }
}

/* Wide screens get a wider page */
@media (min-width: 1440px) {
  :root { --container: 1320px; }
}
@media (prefers-reduced-motion: no-preference) {
  html:has(body[data-snap]) { scroll-behavior: smooth; }
}

/* ---------- Home: section rail ---------- */

/* Sits in the free gutter on the left: a square per section, label on hover */

.rail {
  position: fixed;
  top: 50%;
  left: clamp(14px, 2vw, 30px);
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin: 0;
  padding: 0;
  list-style: none;
  transform: translateY(-50%);
}
.rail a {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  color: var(--text-muted);
  font-family: var(--font-title);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
}
.rail a::after {
  content: "";
  flex: none;
  width: 9px;
  height: 9px;
  border: 1px solid var(--text-muted);
  border-radius: 2px;
  background: var(--navy);
  transition: background 0.3s, border-color 0.3s, transform 0.3s;
}
.rail span { opacity: 0; transform: translateX(-6px); transition: opacity 0.3s, transform 0.3s; }
.rail:hover span { opacity: 1; transform: none; }
.rail { transition: opacity 0.4s ease, visibility 0.4s; }
.rail.is-hidden { opacity: 0; visibility: hidden; }
.rail a.is-active { color: var(--teal); }
.rail a.is-active::after { border-color: var(--teal); background: var(--teal); transform: scale(1.2); }
.rail a:hover { color: var(--text); }

@media (max-width: 900px), (orientation: portrait) and (max-width: 1100px), (max-height: 500px) {
  .rail { display: none; }
}

/* ---------- Home: puzzle call to action ---------- */

/* The FARO mark turns into the last piece of the puzzle; layout.js runs the sequence */
.puzzle {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 6px;
  color: var(--text);
  text-align: center;
  text-decoration: none;
}
.puzzle__art { width: min(300px, 100%); height: auto; margin-bottom: 18px; overflow: visible; }
.puzzle__piece {
  transform-box: fill-box;
  transform-origin: center;
  transition: transform 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.puzzle__piece path {
  stroke: var(--teal);
  stroke-width: 1.4;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  transition: fill 0.5s ease;
}
.puzzle__top { fill: var(--navy); }
.puzzle__side { fill: var(--navy); stroke-opacity: 0.55; }
.puzzle__piece--tl { transform: translate(-16px, -16px); }
.puzzle__piece--tr { transform: translate(16px, -16px); }
.puzzle__piece--bl { transform: translate(-16px, 16px); }
.puzzle__piece--br { transition-duration: 0.9s; }

.puzzle__piece--br .puzzle__top { fill: #1f4f55; }
.puzzle__piece--br .puzzle__side { fill: #173a44; }
.puzzle.is-in .puzzle__piece--tl,
.puzzle.is-in .puzzle__piece--tr,
.puzzle.is-in .puzzle__piece--bl { transform: none; }

/* The logo outline draws in; the title and line wait for the finished puzzle */
.puzzle__letter {
  fill: none;
  transform-origin: center;
  stroke: var(--teal);
  stroke-width: 1.4;
  stroke-dasharray: 1;
  vector-effect: non-scaling-stroke;
  transform-box: fill-box;
  transform-origin: center;
}
.puzzle__piece--br .puzzle__top { fill-opacity: 0; }
.puzzle__title,
.puzzle__line { opacity: 0; transform: translateY(8px); transition: opacity 0.6s ease, transform 0.6s ease; }
.puzzle.is-built .puzzle__title,
.puzzle.is-built .puzzle__line { opacity: 1; transform: none; }
.puzzle.is-built .puzzle__line { transition-delay: 0.12s; }
.puzzle__art { transition: opacity 0.4s ease; }
.puzzle:focus-visible { outline: none; }
.puzzle__title { font-family: var(--font-title); font-size: var(--step-2); font-weight: 600; }
.puzzle__line { color: var(--text-muted); }
.puzzle__arrow { display: inline-block; color: var(--teal); transition: transform 0.3s ease; }
.puzzle:hover .puzzle__arrow { transform: translateX(5px); }

@media (max-width: 900px), (orientation: portrait) and (max-width: 1100px), (max-height: 500px) {
  .puzzle { margin-top: 24px; }
  .puzzle__art { width: 200px; }
}

/* ---------- Client facts ---------- */

/* Inner pages open with a plain headline and their first block, no hero */
.page-top { position: relative; overflow: hidden; padding: clamp(40px, 6vw, 72px) 0 0; }
.page-top > .container { position: relative; z-index: 1; }

/* Dots: a fine dot grid; the dots under the pointer brighten and follow it */
.dots,
.dots i {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(circle, rgb(var(--dot-rgb, 92 200 184) / 0.16) 1.2px, transparent 1.6px);
  background-size: 26px 26px;
  background-position: center;
}
/* Even across the first screen, fading in slowly from the top so there is no edge under the
   header, and out into the next section */
.dots { mask-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.35) 12%, #000 40%, #000 calc(100% - 60px), transparent); }
.dots i {
  background-image: radial-gradient(circle, rgb(var(--dot-rgb, 92 200 184) / 0.75) 1.3px, transparent 1.8px);
  mask-image: radial-gradient(circle 240px at var(--mx, 50%) var(--my, 50%), #000, transparent);
  opacity: 0;
  transition: opacity 0.5s ease;
}
.dots.is-tracking i { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .dots i { display: none; }
}

@media not ((max-width: 900px) or ((orientation: portrait) and (max-width: 1100px)) or (max-height: 500px)) {
  [data-snap] .page-top {
    display: flex;
    flex-direction: column;
    min-height: calc(100svh - 96px);
    padding: clamp(32px, 5vh, 64px) 0 clamp(32px, 5vh, 64px);
  }
  /* The content floats in the middle of the screen, with the callout below it */
  [data-snap] .page-top > .container:not(.section-next) { margin-top: auto; }
  
  
}

/* Each full-height section ends with a callout to the next one */
.section-next { margin-top: 56px; }

@media not ((max-width: 900px) or ((orientation: portrait) and (max-width: 1100px)) or (max-height: 500px)) {
  .hero {
    display: flex;
    flex-direction: column;
    min-height: calc(100svh - 96px);
    padding: calc(clamp(56px, 8vw, 104px) + 125px) 0 clamp(40px, 7vh, 88px);
  }
  .section-next { margin-top: auto; padding-top: 56px; }
}

/* ---------- Contact form ---------- */

/* Folded inside the contact box; opening it grows the box downward */
.contact-form {
  grid-column: 1 / -1;
  display: grid;
  grid-template-rows: 0fr;
  margin-top: -32px;
  opacity: 0;
  transition: grid-template-rows 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), margin-top 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.35s ease;
}
.is-writing .contact-form { grid-template-rows: 1fr; margin-top: 0; opacity: 1; transition-delay: 0s, 0s, 0.15s; }
/* "Book a call" shows cal.com's scheduler in the same fold instead of the form */
.contact-cal { display: none; min-height: 0; overflow: hidden; }
.is-booking .contact-form__inner { display: none; }
.is-booking .contact-cal { display: block; min-height: 560px; overflow: auto; border-radius: 12px; }
.is-booking .actions [data-book] { background: #fff; color: var(--navy); border-color: #fff; }
.is-writing.is-booking [data-message] { background: transparent; color: #fff; border-color: rgb(255 255 255 / 0.55); }
.is-instant, .is-instant * { transition: none !important; }
.contact-form__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 24px;
  min-height: 0;
  overflow: hidden;
}
.contact-form__inner::before { content: ""; grid-column: 1 / -1; margin-bottom: 14px; border-top: 1px solid rgb(255 255 255 / 0.1); }
.contact-form label { display: grid; gap: 8px; color: var(--text-muted); font-size: 0.9rem; }
.contact-form__wide { grid-column: 1 / -1; }
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgb(255 255 255 / 0.14);
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
  font: inherit;
  line-height: 1.5;
}
.contact-form textarea { resize: vertical; }
.contact-form input:-webkit-autofill { -webkit-text-fill-color: #fff; box-shadow: inset 0 0 0 40px var(--navy); caret-color: #fff; }
.contact-form input:focus,
.contact-form textarea:focus { outline: none; border-color: var(--teal); }
.contact-form__trap { position: absolute; left: -9999px; }
.contact-form__foot { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.contact-form__status { color: var(--text-muted); font-size: 0.9rem; }
.contact-form .btn:disabled { opacity: 0.5; cursor: default; }
.is-writing [data-message] { background: #fff; color: var(--navy); border-color: #fff; }

/* The description shows first. Once the form opens, the headline takes its place. */
.contact-area__copy { display: grid; align-items: center; }
.contact-area__copy > * { grid-area: 1 / 1; transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s; }
.contact-area__inner .contact-area__copy p { margin: 0; }
.contact-area__copy h2 { opacity: 0; visibility: hidden; transform: translateY(8px); }
.is-writing .contact-area__copy h2 { opacity: 1; visibility: visible; transform: none; transition-delay: 0.2s; }
.is-writing .contact-area__copy p { opacity: 0; visibility: hidden; transform: translateY(-8px); }
[data-message] { transition: background 0.25s, color 0.25s, transform 0.2s ease; }

/* Border that draws itself around the contact box, starting top left */
.contact-trace {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 2;
}
/* The rect path runs clockwise from the top left, so a dash offset climbing from -1 to 0
   draws it backwards: down the left side first */
.contact-trace rect {
  fill: none;
  stroke: #5cc8b8;
  opacity: 0;
  stroke-dashoffset: -1;
}
.contact-trace__trail {
  stroke-width: 2;
  stroke-dasharray: 1;
  filter: drop-shadow(0 0 4px rgba(92, 200, 184, 0.7)) drop-shadow(0 0 12px rgba(92, 200, 184, 0.45));
}
.contact-trace__spark {
  stroke: #e6fffb;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 0.012 0.988;
  filter: drop-shadow(0 0 3px #fff) drop-shadow(0 0 8px #5cc8b8) drop-shadow(0 0 18px #5cc8b8);
}
.is-tracing .contact-trace rect {
  opacity: 1;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset var(--trace, 4s) linear;
}
.is-tracing .contact-trace__spark { animation: spark-out var(--trace, 4s) linear forwards; }
@keyframes spark-out { 0%, 92% { opacity: 1; } 100% { opacity: 0; } }
[data-message].is-pressing { transform: scale(0.94); background: #fff; color: var(--navy); }
button.btn { cursor: pointer; }

@media (max-width: 600px) {
  .contact-form__inner { grid-template-columns: 1fr; }
}

/* ---------- Contact: corner icon ---------- */

/* Same faint corner icon as the Why FARO cells; "Got a project in mind?" brightens it */
.contact-area__inner { position: relative; }
.contact-area__inner > :not(.growth, .contact-trace) { position: relative; z-index: 1; }
.growth {
  position: absolute;
  right: -10px;
  bottom: -24px;
  width: 190px;
  height: 190px;
  object-fit: contain;
  opacity: 0.18;
  transition: opacity 0.5s ease;
  pointer-events: none;

  /* Cropped to the box, which lets the border glow spill outside */
  clip-path: inset(0 10px 24px 0 round 0 0 var(--radius) 0);
}
:root:has(.contact-area__callout:hover, .contact-area__callout:focus-visible, .callout--link[href="#contact"]:hover, .callout--link[href="#contact"]:focus-visible) .growth { opacity: 0.45; }

@media (max-width: 900px), (orientation: portrait) and (max-width: 1100px), (max-height: 500px) {
  .growth { display: none; }
}

/* ---------- Rotating headline ---------- */

.rotate {
  color: var(--teal);
  text-decoration: underline 0.06em transparent;
  text-underline-offset: 0.14em;
  transition: text-decoration-color 0.3s ease;
}
@media (hover: hover) {
  .rotate:hover { text-decoration-color: var(--teal); }
}
/* A tap on a touch screen shows the same look for a moment */
.hero.is-hot .rotate { text-decoration-color: var(--teal); }
.hero.is-hot .hero__next .callout--link { background: rgba(92, 200, 184, 0.1); color: #7fdccd; transform: translateY(-2px); }
.hero.is-hot .hero__next .callout__arrow { animation: bounce 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) infinite; }
.hero.is-hot .hero__next .callout__swap > span:first-child { opacity: 0; transform: translateY(-6px); }
.hero.is-hot .hero__next .callout__swap > span + span { opacity: 1; transform: none; }
.rotate { -webkit-tap-highlight-color: transparent; }
.rotate.is-typing::after {
  content: "";
  display: inline-block;
  width: 0.06em;
  height: 0.9em;
  margin-left: 0.06em;
  vertical-align: -0.08em;
  background: var(--teal);
  animation: caret 0.9s steps(1) infinite;
}
@keyframes caret { 50% { opacity: 0; } }

/* About intro: the phrases stack under the heading, then fold up into the
   first line and the copy comes in. Hovering the first line opens the stack again.
   html.about-list is set in the markup so the copy is hidden from the first paint. */
.about-list .about__name { position: relative; z-index: 2; margin-bottom: 32px; }
.about__list { position: absolute; left: 0; top: 100%; display: grid; color: var(--teal); }
.about__list span { min-height: 1.15em; transition: transform 0.5s ease, opacity 0.4s ease; transition-delay: calc((4 - var(--i)) * 0.06s); }
.about.is-folded .about__list { pointer-events: none; }
.about.is-folded .about__list span { transform: translateY(calc(var(--i) * -1.15em)); opacity: 0; transition-delay: calc(var(--i) * 0.06s); }
.about__list span { transition-property: transform, opacity; }
.about-list .about__name .rotate { transition: opacity 0.25s ease; }
.about-list .about__name .rotate.is-swapping { opacity: 0; }

/* The last phrase stays visible as it rises into the first line, then hands over to it */
.about.is-folded .about__list .about__keep { opacity: 1; }
.about.is-kept .about__list .about__keep { opacity: 0; }
.about-list .about__name .rotate:hover { text-decoration-color: transparent; }
.about-list .about__name .rotate,
.about__list span { font-weight: 300; }
.about-list .about__name .is-current { font-weight: 700; }
.about-list .about:not(.is-shown) .about__copy p { pointer-events: none; }

.about-list .about__copy p { opacity: 0; transform: translateY(10px); transition: opacity 0.25s ease, transform 0.25s ease; }
.about-list .about.is-shown .about__copy p { opacity: 1; transform: none; transition-duration: 0.6s; }
.about-list .about.is-shown .about__copy p:nth-of-type(2) { transition-delay: 0.15s; }
.about-list .about.is-shown .about__copy p:nth-of-type(3) { transition-delay: 0.3s; }
.about-list .about.is-shown .about__copy p:nth-of-type(4) { transition-delay: 0.45s; }
.about-list .about.is-shown .about__copy p:nth-of-type(5) { transition-delay: 0.6s; }

/* Intro: the mark draws big in the middle with the city under it, then takes its place */
.about-list .about { position: relative; }
.about-list .about__origin { display: none; }
.about-list .about__copy { opacity: 0; transition: opacity 0.6s ease; }
.about-list .about.is-writing .about__copy { opacity: 1; }
.about-list .puzzle__art { transition: opacity 0.4s ease, scale 1.2s cubic-bezier(0.65, 0, 0.35, 1); scale: 1.5; }
.about-list .about.is-placed .puzzle__art { scale: 1; }
.about__city {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(50% + var(--mark, 110px) + 28px);
  margin: 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 1.15rem;
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.about__city.is-in { opacity: 1; transform: none; }
.about__city.is-gone { opacity: 0; transition-duration: 0.3s; }
@media (prefers-reduced-motion: reduce) {
  .about-list .about__copy p { opacity: 1; transform: none; }
  .about-list .puzzle__art { scale: 1; }
  .about-list .about__copy { opacity: 1; }
  .about__city { display: none; }
}

/* An isometric icon per phrase, in the puzzle's place */
.puzzle__icon { opacity: 0; transition: opacity 0.3s ease; pointer-events: none; }
.puzzle__plane { transition: opacity 0.3s ease; }
.puzzle__art.is-icon .puzzle__icon { opacity: 1; }
.puzzle__art.is-icon .puzzle__plane { opacity: 0; }
.solids path {
  stroke: var(--solid-line, var(--teal));
  stroke-width: 1.4;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.puzzle__face { stroke-opacity: 0.55; }
.puzzle__face--cap { stroke-opacity: 1; }

/* The box grid behind the last screen, framing the contact box and running under the footer */
.contact-area .room { bottom: calc(-1 * var(--footer-h, 0px)); mask-image: linear-gradient(to bottom, transparent, #000 22%); }
.contact-area > .container,
.site-footer { position: relative; z-index: 1; }

/* The About callout waits for the intro to finish building the puzzle */
.about-list #about .section-next { transition: opacity 0.6s ease, visibility 0.6s; }
.about-list #about:not(:has(.puzzle.is-built)) .section-next { opacity: 0; visibility: hidden; }

/* ---------- Why FARO: reasons and steps ---------- */

/* One reason at a time: the isometric object on the left, the titles stacked on the right */
.reasons { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
.reasons__lead { display: grid; place-items: center; }
.reasons__art { width: 100%; max-width: 480px; overflow: visible; }
/* Read by screen readers and search engines, not shown */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.reasons__list { display: grid; gap: 6px; min-height: 16em; align-content: center; }
.reason { display: none; }
.reason.is-current { display: block; animation: reason-in 0.45s ease both; }
@keyframes reason-in { from { opacity: 0; transform: translateX(24px); } }
/* The reason reads like the About copy: a heading the size of the About heading, then even paragraphs */
.reason h3 { margin: 0 0 32px; font-size: clamp(2.3rem, 3.6vw, 3.4rem); font-weight: 700; color: var(--teal); }
.reason__body p { margin: 0 0 18px; max-width: 56ch; color: var(--text); font-size: clamp(1.1rem, 1.3vw, 1.3rem); line-height: 1.65; }
.reasons .arrow-row { margin-top: 18px; }
@media (max-width: 900px), (orientation: portrait) and (max-width: 1100px), (max-height: 500px) {
  .reasons { grid-template-columns: 1fr; }
  .reasons__art { max-width: 300px; }
}

/* The steps as cards like the homepage services; the lit one looks hovered */
.steps-title { margin-bottom: clamp(24px, 4vh, 40px); font-size: clamp(1.7rem, 3vw, 2.6rem); }
.services--steps { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.step-card__num { display: block; margin-bottom: 14px; color: var(--teal); font-family: var(--font-title); font-weight: 600; }
.step-card.is-lit { border-color: var(--teal); }
.step-card.is-lit .service__arrow { color: var(--teal); }
.step-card.is-lit .service__more { max-height: 220px; margin-top: 14px; opacity: 1; }
.step-card:hover .service__more { max-height: 220px; }

/* Under each step, a group of three icons on that step's point, like the logos under the
   services. Only the lit or hovered step's group shows, one icon after another. */
.step-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 20px;
  margin-top: clamp(28px, 5vh, 48px);
}
.step-group { display: grid; gap: 14px; margin: 0; padding: 0 28px; list-style: none; }
.step-group li {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-size: clamp(0.92rem, 1vw, 1.02rem);
  opacity: 0;
  transition: opacity 0.4s ease, color 0.4s ease, transform 0.4s ease;
}
.step-group svg { flex: none; width: 26px; height: 26px; }
#process:has(.step-card[data-step="1"]:is(.is-lit, :hover)) .step-group[data-step="1"] li { opacity: 1; color: var(--teal); transform: translateX(4px); }
#process:has(.step-card[data-step="2"]:is(.is-lit, :hover)) .step-group[data-step="2"] li { opacity: 1; color: var(--teal); transform: translateX(4px); }
#process:has(.step-card[data-step="3"]:is(.is-lit, :hover)) .step-group[data-step="3"] li { opacity: 1; color: var(--teal); transform: translateX(4px); }
#process:has(.step-card[data-step="4"]:is(.is-lit, :hover)) .step-group[data-step="4"] li { opacity: 1; color: var(--teal); transform: translateX(4px); }
.step-group li:nth-child(2) { transition-delay: 0.15s; }
.step-group li:nth-child(3) { transition-delay: 0.3s; }
/* Stacked on phones, the groups would sit apart from their cards */
@media (max-width: 900px), (orientation: portrait) and (max-width: 1100px), (max-height: 500px) {
  .step-groups { display: none; }
}

/* Case studies on the homepage, one at a time like the Why FARO reasons: the visual on the
   left, the client's logo, title, description and a link on the right */
.cases { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: clamp(32px, 5vw, 80px); align-items: center; }
/* Every visual sits in the same box, so switching cases never moves the text */
.cases__visual { position: relative; display: grid; place-items: center; width: 100%; max-width: 535px; aspect-ratio: 535 / 525; margin: 0 auto; }
.cases__visual > * { grid-area: 1 / 1; }
.cases__art { width: 100%; overflow: visible; }

/* A case's 3D model, with the page text a scene adds over it */
.model__canvas { display: block; width: 100%; height: 100%; }
.model__ui { position: absolute; inset: 0; pointer-events: none; }
.is-loading .model__canvas { visibility: hidden; }
.is-draggable .model__canvas { cursor: grab; touch-action: pan-y; }
.is-dragging .model__canvas { cursor: grabbing; }

/* Infographic callouts: a column on each side, a leader line to the part they name */
.callouts__lines { position: absolute; inset: 0; overflow: visible; }
.callouts__lines line { stroke: rgb(255 255 255 / 0.45); stroke-width: 1; }
.callouts__lines circle { fill: var(--case); }
.callout-tag { position: absolute; left: 0; width: 26%; transform: translateY(-50%); pointer-events: auto; cursor: default; text-shadow: 0 1px 8px #111214, 0 0 2px #111214; }
.callout-tag.is-right { left: auto; right: 0; text-align: right; }
.callout-tag b { display: block; color: #fff; font-family: var(--font-title); font-size: 0.82rem; font-weight: 600; transition: color 0.2s; }
.callout-tag span { display: block; color: var(--text); font-size: 0.72rem; line-height: 1.35; }
.callout-tag.is-hot b { color: var(--case); }
.model__chip { position: absolute; top: 3%; left: 4%; padding: 4px 12px; border: 1px solid rgb(255 255 255 / 0.25); border-radius: 999px; color: #fff; font-family: var(--font-title); font-size: 0.8rem; letter-spacing: 0.04em; }
.model__total { position: absolute; left: 4%; bottom: 3%; display: flex; gap: 14px; align-items: baseline; margin: 0; padding: 8px 16px; border: 1px solid rgb(255 255 255 / 0.15); border-radius: 12px; background: rgb(17 18 20 / 0.85); color: var(--text); font-size: 0.85rem; }
.model__total b { color: #fff; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.estimate { position: absolute; left: 4%; right: 4%; bottom: 2%; padding: 10px 16px; border: 1px solid rgb(255 255 255 / 0.12); border-radius: 12px; background: rgb(17 18 20 / 0.88); }
.estimate p { display: flex; justify-content: space-between; margin: 0; padding: 2px 0; color: var(--text); font-size: 0.76rem; }
.estimate b { color: #fff; font-weight: 500; font-variant-numeric: tabular-nums; }
.estimate .estimate__total { margin-top: 6px; padding-top: 8px; border-top: 1px solid rgb(255 255 255 / 0.18); color: #fff; font-weight: 700; font-size: 0.95rem; }
.estimate .estimate__total b { font-weight: 700; }
.case { display: none; }
.case.is-current { display: block; animation: reason-in 0.45s ease both; }
.case__logo { display: block; width: auto; max-width: 240px; height: auto; max-height: 64px; margin-bottom: 28px; }
.case__who { display: block; margin-bottom: 28px; color: #fff; font-family: var(--font-title); font-size: clamp(1.6rem, 2.2vw, 2.1rem); font-weight: 700; }
.case p { margin: 0 0 18px; max-width: 56ch; color: var(--text); font-size: clamp(1.1rem, 1.3vw, 1.3rem); line-height: 1.65; }
.cases .arrow-row { margin-top: 28px; }
@media (max-width: 900px), (orientation: portrait) and (max-width: 1100px), (max-height: 500px) {
  .cases { grid-template-columns: 1fr; }
}

/* The experience slide: companies the team has worked in, floating in the visual's box. Each
   logo drifts on its own loop; the pointer tips the cloud, nearer logos more. */
.logo-cloud { position: relative; width: 100%; height: 100%; margin: 0; padding: 0; list-style: none; }
.logo-cloud li { position: absolute; left: var(--x); top: var(--y); height: var(--h); aspect-ratio: var(--a); transform: translate(-50%, -50%) translate(calc(var(--px, 0) * (8px + var(--i) * 3px)), calc(var(--py, 0) * (8px + var(--i) * 3px))); transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1); animation: logo-in 1.1s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--i) * 0.14s) both; }
.logo-cloud span { display: block; width: 100%; height: 100%; background: var(--text); opacity: 0.88; -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat; animation: logo-drift calc(7s + var(--i) * 0.9s) ease-in-out calc(var(--i) * -1.3s) infinite alternate; }
@keyframes logo-in { from { opacity: 0; translate: 0 18px; } }
@keyframes logo-drift { from { transform: translate(-4px, 5px); } to { transform: translate(4px, -5px); } }
.case--experience .case__who { max-width: 22ch; line-height: 1.25; }
@media (max-width: 600px) {
  .case--experience .case__who { margin-bottom: 14px; font-size: 1.4rem; }
}
@media (prefers-reduced-motion: reduce) {
  .logo-cloud { display: grid; grid-template-columns: repeat(2, 1fr); place-items: center; align-content: center; gap: 9% 6%; }
  .logo-cloud li { position: static; transform: none; animation: none; height: auto; width: min(100%, calc(var(--w) * 2)); }
  .logo-cloud li:last-child { grid-column: 1 / -1; width: min(100%, var(--w)); }
  .logo-cloud span { animation: none; }
}

/* Each case has its own color: the object's lines, the dots under the pointer, a wash behind
   the visual, the link and the arrows */
/* About, and the reasons that open Why FARO, sit on a deeper navy, close to black. On Why FARO
   the header above shares it, so the first screen reads as one block. */
#about, [data-page="why"] .page-top, [data-page="why"] .site-header { background: #080b1a; }

/* Services, and the steps on Why FARO, sit on a deep FARO teal, the brand teal's
   own hue, and their highlights turn FARO navy */
#services, #process { --teal: #0e1430; --line: rgb(14 20 48 / 0.75); background: #1a5c55; }
#services .service, #process .service { background: #216b63; }
/* A faint starfield behind Services and the Why FARO steps: three layers of stars at different
   sizes, each drifting at its own pace, over a soft teal glow */
#services, #process { position: relative; isolation: isolate; overflow: hidden; }
#services::before, #process::before {
  content: "";
  position: absolute;
  inset: -40px;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 12% 18%, rgb(255 255 255 / 0.55), transparent),
    radial-gradient(1px 1px at 68% 42%, rgb(255 255 255 / 0.4), transparent),
    radial-gradient(1px 1px at 34% 76%, rgb(255 255 255 / 0.5), transparent),
    radial-gradient(1px 1px at 86% 88%, rgb(255 255 255 / 0.35), transparent),
    radial-gradient(1.5px 1.5px at 22% 52%, rgb(220 255 248 / 0.6), transparent),
    radial-gradient(1.5px 1.5px at 78% 14%, rgb(220 255 248 / 0.5), transparent),
    radial-gradient(1.5px 1.5px at 52% 64%, rgb(220 255 248 / 0.45), transparent),
    radial-gradient(2px 2px at 40% 30%, rgb(255 255 255 / 0.55), transparent),
    radial-gradient(2px 2px at 90% 60%, rgb(255 255 255 / 0.45), transparent),
    radial-gradient(ellipse 60% 45% at 75% 20%, rgb(92 200 184 / 0.12), transparent 70%),
    radial-gradient(ellipse 50% 40% at 15% 85%, rgb(14 20 48 / 0.35), transparent 70%);
  background-size: 180px 180px, 180px 180px, 180px 180px, 180px 180px, 320px 320px, 320px 320px, 320px 320px, 560px 560px, 560px 560px, 100% 100%, 100% 100%;
  animation: stars-drift 160s linear infinite;
}
@keyframes stars-drift {
  to { background-position: -180px 180px, -180px 180px, -180px 180px, -180px 180px, -320px 320px, -320px 320px, -320px 320px, -560px 560px, -560px 560px, 0 0, 0 0; }
}
/* Orbits and sparkles over the stars. The orbits are concentric rings around a point just above
   the top middle, flattened into ellipses, each with a planet going round. When the section
   comes into view they open in turn, the top ring first. Sparkles twinkle at their own times. */
.space { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }
.orbit { transform: translate(var(--x), var(--y)) rotate(var(--tilt)) scaleY(0.38); }
.orbit__ring { fill: none; stroke: rgb(220 255 248 / 0.14); stroke-width: 1.2; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s cubic-bezier(0.22, 0.8, 0.3, 1) var(--d, 0s); }
.space.is-seen .orbit__ring { stroke-dashoffset: 0; }
.orbit__planet { opacity: 0; transition: opacity 0.6s ease calc(var(--d, 0s) + 1.2s); }
.space.is-seen .orbit__planet { opacity: 1; }
.orbit__spin { animation: orbit var(--t) linear infinite; }
.orbit__planet { fill: rgb(230 255 250 / 0.75); }
.orbit__ring { transform: rotate(-90deg); }
@keyframes orbit { to { transform: rotate(360deg); } }
.sparkle { fill: #f2fffc; opacity: 0; transform: translate(var(--x), var(--y)) scale(0.4); transform-box: view-box; animation: sparkle 7s ease-in-out var(--d) infinite; }
@keyframes sparkle {
  0%, 70%, 100% { opacity: 0; transform: translate(var(--x), var(--y)) scale(0.4) rotate(0deg); }
  80% { opacity: 0.85; transform: translate(var(--x), var(--y)) scale(1) rotate(25deg); }
  90% { opacity: 0.3; transform: translate(var(--x), var(--y)) scale(0.7) rotate(40deg); }
}
@media (prefers-reduced-motion: reduce) {
  #services::before, #process::before, .orbit__spin { animation: none; }
  .orbit__ring { stroke-dashoffset: 0; transition: none; }
  .orbit__planet { opacity: 1; transition: none; }
  .sparkle { animation: none; opacity: 0.5; transform: translate(var(--x), var(--y)) scale(0.8); }
}

/* Cards rest on a navy border; the selected one, hovered or lit, turns white */
#process .step-card.is-lit { border-color: #fff; }
#process .step-card.is-lit .service__arrow { opacity: 0; transition: opacity 0.2s; }
@media (hover: hover) {
  #services .service:hover, #process .service:hover { border-color: #fff; }
  #services .service:hover .service__arrow, #process .service:hover .service__arrow { opacity: 0; transition: opacity 0.2s; }
}
/* Text in the teal sections stays white, as in Services; navy is only for borders */
#services .service__more, #process .service__more, #process .step-card__num { color: #fff; }
/* The icon groups under the steps are navy; the callouts in the teal sections stay white */
#process .step-groups { --teal: var(--navy); }
#services .callout, #process .callout { color: #fff; }
/* Logos in Services are navy in the cloud and when lined up under a selected service, so
   picking one only brings them forward */
#services .cloud__item, #services .cloud__name { color: var(--navy); }
#services .cloud__item .tools__logo { background: var(--navy); transition: background 0.3s ease; }
/* The logos a hovered service fishes out of the cloud turn white while it stays hovered */
#services .cloud__item.is-picked .tools__logo { background: #fff; }
#services .cloud__item.is-picked .cloud__name { color: #fff; }
/* The selected card's title goes bold, its copy white and its detail line navy; the other
   cards recede */
#services .service h3, #services .service p, #process .service h3, #process .service p { transition: color 0.25s; }
#services .service h3, #process .service h3 { transition: color 0.25s, font-weight 0.25s; }
#process .step-card.is-lit h3 { font-weight: 700; }
#services .service, #process .service { transition: border-color 0.25s, opacity 0.3s; }
#process .services:has(.step-card.is-lit) .step-card:not(.is-lit) { opacity: 0.55; }
#process .step-card.is-lit p { color: #fff; }
#process .step-card.is-lit .service__more { color: var(--navy); font-weight: 500; }
@media (hover: hover) {
  #services .service:hover h3, #process .service:hover h3 { font-weight: 700; }
  #services .services:has(.service:hover) .service:not(:hover),
  #process .services:has(.step-card:is(:hover, .is-lit)) .step-card:not(:hover, .is-lit) { opacity: 0.55; }
  #services .service:hover p, #process .service:hover p { color: #fff; }
  #services .service:hover .service__more, #process .service:hover .service__more { color: var(--navy); font-weight: 500; }
}
#services .callout--link:hover, #services .callout--link:focus-visible,
#process .callout--link:hover, #process .callout--link:focus-visible { background: rgb(255 255 255 / 0.08); color: #c9d0dd; }

/* Its own near-black section, so client colors don't fight the FARO navy */
#work { position: relative; overflow: hidden; --case: var(--teal); --dot-rgb: 92 200 184; background: #111214; }
#work > .container { position: relative; z-index: 1; }
#work .dots { mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 75%, transparent); }
#work::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 45% 55% at 28% 50%, rgb(var(--dot-rgb) / 0.12), transparent 70%);
  pointer-events: none;
  transition: opacity 0.4s ease;
}
#work .cases__art { --solid-line: var(--case); }
@media (hover: hover) {
  #work .arrow-btn:hover:not(:disabled) { background: var(--case); border-color: var(--case); }
}
#work .callout { color: var(--case); transition: background 0.25s, color 0.4s, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); }
#work .callout--link:hover, #work .callout--link:focus-visible { background: rgb(var(--dot-rgb) / 0.12); color: color-mix(in srgb, var(--case) 80%, #fff); }

/* ---------- Phone layout: one panel per section ---------- */

/* Every section is its own panel: full width, at least one screen tall, its own background
   edge to edge, its content centered, and its callout to the next panel at the foot. A panel
   with more content than one screen just runs taller. svh keeps the panels steady while the
   browser bars come and go. */
@media (max-width: 900px), (orientation: portrait) and (max-width: 1100px), (max-height: 500px) {
  .hero,
  [data-snap] .snap,
  [data-snap] .page-top,
  [data-snap] #contact {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100svh;
    padding: 48px 0 28px;
  }

  /* The header shares the first screen with the first panel */
  .hero,
  [data-snap] .page-top { min-height: calc(100svh - var(--header-h, 88px)); padding-top: 16px; }

  /* A scroll that stops near a panel's top settles on it. Proximity, not mandatory, so a fast
     swipe runs past panels and a long panel scrolls freely through its middle. */
  html:has(body[data-snap]) { scroll-snap-type: y proximity; }
  [data-snap] .site-header,
  [data-snap] .snap,
  [data-snap] #contact { scroll-snap-align: start; }

  /* Contact and the footer share the last screen, as on desktop */
  [data-snap] #contact { min-height: calc(100svh - var(--footer-h, 0px)); padding-bottom: 48px; }

  /* Content centers in the space above the callout */
  .hero > .room + .container,
  [data-snap] .page-top > .dots + .container,
  [data-snap] .snap > :first-child,
  [data-snap] .snap > .dots:first-child + *,
  [data-snap] .snap > .space:first-child + * { margin-top: auto; }
  .section-next { margin-top: auto; padding-top: 40px; }

  /* layout.js gives the headline room for its longest phrase, so the panel holds still while it types */
}

/* Phones turned sideways: the headline runs wider, so fewer lines and a tighter first screen */
@media (max-height: 500px) and (orientation: landscape) {
  .hero .h1 { font-size: clamp(2rem, 5vw, 2.6rem); }
  .hero { padding-bottom: 16px; }
  .hero .section-next { padding-top: 24px; }
}

@media (max-width: 900px), (orientation: portrait) and (max-width: 1100px), (max-height: 500px) {
  /* The case visual leaves room for its text on the same screen */
  .cases { gap: 24px; }
  /* The case visual spans the phone's width; its height leaves room for the text */
  .cases__visual { max-width: none; aspect-ratio: auto; height: min(42svh, 92vw); }
  /* The Accelevation labels crowd a phone screen, so only the model shows */
  .cases__visual[data-case="datacenter-twin"] .model__ui { display: none; }
  /* The companies spread across the full width, at a size that reads */
  .cases__visual .logo-cloud li { left: calc((var(--x) - 50%) * 1.3 + 50%); height: calc(var(--h) * 1.45); }
  .case__logo { margin-bottom: 18px; }

  /* The contact box keeps its copy wide on a narrow screen */
  .contact-area__inner { padding: 32px 24px; }
  /* Both contact buttons share one row */
  .contact-area .actions { flex-wrap: nowrap; gap: 10px; }
  .contact-area .actions .btn { flex: 1 1 0; justify-content: center; padding: 14px 12px; white-space: nowrap; }

  /* Fingers need bigger targets than a pointer */
  .arrow-btn { width: 64px; height: 44px; }
  .nav a:not(.btn) { padding: 6px 0; }

  /* The back-to-top pill sits at the right, beside the logo and links. It is turned upright,
     so it is pulled out to the same right edge as the content above it */
  .site-footer__inner { grid-template-columns: 1fr auto; column-gap: 16px; }
  .site-footer .arrow-btn { grid-column: 2; grid-row: 1 / span 2; justify-self: end; margin: 0 -10px 0 0; }
  .nav-toggle { margin: -12px -12px -12px 0; padding: 0; }
  .sitemap a { display: inline-block; padding: 10px 0; }
}

/* The smallest phones scale the headline with the screen, so it stays within four lines */
@media (max-width: 389px) {
  .hero .h1 { font-size: max(1.85rem, 9.4vw); }
}

/* ---------- Phone cards ---------- */

/* Service and step cards show their titles; a tap opens one card's description and, for a
   service, its logos as icons. The white detail line stays a desktop hover. Every logo also
   sits once in a strip under the service cards. */
@media (max-width: 900px), (orientation: portrait) and (max-width: 1100px), (max-height: 500px) {
  .services { gap: 10px; align-items: start; }
  .service { padding: 18px 56px 18px 20px; cursor: pointer; -webkit-tap-highlight-color: transparent; }
  .service h3 { margin: 0; padding-right: 0; }
  .service__arrow { top: 50%; right: 16px; width: 24px; height: 24px; margin-top: -12px; }
  .service.is-open .service__arrow { top: 18px; margin-top: 0; }
  /* A plus opens a card; once open it turns into a navy minus that closes it */
  .service__arrow svg { display: none; }
  .service__arrow::before,
  .service__arrow::after {
    content: "";
    position: absolute;
    left: 3px;
    right: 3px;
    top: 50%;
    height: 2px;
    margin-top: -1px;
    border-radius: 2px;
    background: currentColor;
    transition: transform 0.3s ease, opacity 0.3s ease;
  }
  .service__arrow::after { transform: rotate(90deg); }
  .service.is-open .service__arrow { color: var(--teal); opacity: 1; }
  .service.is-open .service__arrow::after { transform: rotate(0deg); opacity: 0; }
  .service .service__more { display: none; }
  .service > p,
  .service .tools--inline {
    max-height: 0;
    margin-top: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.35s ease, margin-top 0.35s ease, opacity 0.3s ease;
  }
  .service.is-open > p { max-height: 12em; margin-top: 8px; opacity: 1; }
  .service.is-open .tools--inline { max-height: 120px; margin-top: 14px; opacity: 1; }
  .tools--inline { gap: 12px 16px; }
  #services .service.is-open, #process .service.is-open { border-color: #fff; }
  #services .service.is-open h3, #process .service.is-open h3 { font-weight: 700; }

  /* Steps put the number beside the title */
  .step-card { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: baseline; }
  .step-card__num { margin: 0; }
  .step-card > p { grid-column: 2; }

  .tools--all {
    position: static;
    display: flex;
    flex-wrap: wrap;
    gap: 14px 18px;
    margin-top: 22px;
  }
  .tools--all li { opacity: 1; transform: none; }
  .tools--all .tools__logo { width: 22px; height: 22px; background: var(--navy); }

  /* The open card's logos sit right under it, outside the box, in the same navy; the full
     strip under the cards gives way while a card is open */
  .service .tools--inline { display: none; }
  .tools--after { display: grid; grid-template-rows: 0fr; margin-top: -10px; opacity: 0; transition: grid-template-rows 0.35s ease, opacity 0.3s ease, margin 0.35s ease; }
  .tools--after > .tools { position: static; display: flex; flex-wrap: wrap; gap: 12px 20px; min-height: 0; overflow: hidden; padding: 0 2px; }
  .tools--after .tools li { opacity: 1; transform: none; }
  .tools--after .tools__logo { width: 26px; height: 26px; background: var(--navy); }
  .tools--after .tools__logo--wordmark { width: 104px; }
  .service.is-open + .tools--after { grid-template-rows: 1fr; margin: 4px 0 6px; opacity: 1; }
  .services:has(.service.is-open[data-tools]) + .tools--all { visibility: hidden; opacity: 0; }
  .tools--all { transition: opacity 0.3s ease; }
}

/* ---------- Phone deck: one screen per slide ---------- */

/* Held upright, the phone layout is a deck: every slide is exactly one screen, the page always
   rests on one slide and each swipe moves one slide. The header stays on top of every slide. */
@media (orientation: portrait) and (max-width: 1100px) {
  :root { --slide: 100svh; --slide-top: calc(var(--header-h, 64px) + 20px); --slide-bottom: calc(20px + env(safe-area-inset-bottom)); }
  @supports (height: 100dvh) { :root { --slide: 100dvh; } }
  /* Safari draws its bottom bar over the page, so a slide one visible screen tall lets the next
     section show through the bar. Each slide runs the full screen, under the bar, and keeps its
     content above it. */
  @supports (height: 100lvh) {
    :root {
      --bar: max(0px, calc(100lvh - 100dvh));
      --slide: 100lvh;
      --slide-bottom: calc(20px + env(safe-area-inset-bottom) + var(--bar));
    }
  }

  html:has(body[data-snap]) { scroll-snap-type: y mandatory; }
  /* Vertical swipes are the deck's (layout.js), so the browser never flings between slides */
  html:has(body[data-snap]),
  [data-snap] { touch-action: pan-x pinch-zoom; overscroll-behavior-y: none; }
  [data-snap] .contact-area__inner.is-writing,
  [data-snap] #site-nav.is-open,
  html.is-zoomed:has(body[data-snap]),
  html.is-zoomed [data-snap] { touch-action: auto; }

  [data-snap] .site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 30;
    background: rgb(8 11 26 / 0.86);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    scroll-snap-align: none;
  }
  [data-snap] .site-header__inner { padding-top: max(14px, env(safe-area-inset-top)); padding-bottom: 14px; }

  /* A slide: one screen, content centered between the header and the callout at its foot */
  [data-snap] .hero,
  [data-snap] .page-top,
  [data-snap] #services,
  [data-snap] #work,
  [data-snap] #process,
  [data-snap] .about__copy {
    height: var(--slide);
    min-height: 0;
    padding: var(--slide-top) 0 var(--slide-bottom);
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
  [data-snap] .hero > .container:not(.section-next),
  [data-snap] .page-top > .container:not(.section-next),
  [data-snap] .snap > .container:not(.section-next) { margin-top: auto; }
  [data-snap] .section-next { margin-top: auto; padding-top: 20px; }
  .callout--link { font-size: 1.15rem; }

  /* About is two slides: the heading with its phrases and copy, then the Why FARO puzzle with
     the callout to Services */
  [data-snap] #about { position: relative; display: block; min-height: 0; padding: 0; }
  [data-snap] #about > .about { display: grid; grid-template-rows: var(--slide) var(--slide); gap: 0; margin: 0; }
  [data-snap] .about__copy { display: flex; flex-direction: column; justify-content: center; }
  /* The section itself is two screens, so its slides snap instead: the copy by its top, and the
     puzzle's slide by the callout at its foot, which never moves while the puzzle animates */
  [data-snap] #about { scroll-snap-align: none; }
  [data-snap] .about .puzzle { align-self: center; margin: 0; }
  [data-snap] #about > .section-next { position: absolute; left: 0; right: 0; bottom: 0; padding-bottom: var(--slide-bottom); scroll-snap-align: end; scroll-snap-stop: always; }
  [data-snap] .about__city { top: calc(var(--slide) / 2 + var(--mark, 110px) + 28px); }

  /* One heading size, one body size across the slides */
  .about__name,
  .steps-title,
  .reason h3 { font-size: clamp(1.6rem, 7vw, 2.2rem); }
  .about-list .about__name { margin-bottom: 24px; }
  .about__copy p,
  .reason__body p,
  .case p { font-size: 1rem; line-height: 1.6; margin-bottom: 14px; }
  .steps-title { margin-bottom: 18px; }

  /* Why FARO opens on its reasons */
  .reasons { gap: 20px; }
  .reasons__art { max-width: min(260px, 26svh * 640 / 430); }
  .reasons__list { min-height: 13em; }
  .reason h3 { margin-bottom: 16px; }
  .reasons .arrow-row { margin-top: 8px; }

  /* The case visual leaves room for its text on the same slide */
  .cases__visual { max-width: none; height: 34svh; }
  .case__logo { max-height: 48px; margin-bottom: 14px; }
  .cases .arrow-row { margin-top: 14px; }
  /* Every case keeps the height of the longest, so stepping through them never moves the slide */
  .cases__items { display: grid; }
  .case { display: block; grid-area: 1 / 1; visibility: hidden; }
  .case.is-current { visibility: visible; }
  #work > .section-next .callout--link { min-height: calc(2 * 1.65em + 16px); }

  /* Contact and the footer share the last slide */
  [data-snap] #contact {
    height: calc(var(--slide) - var(--footer-h, 0px));
    min-height: 0;
    padding: var(--slide-top) 0 20px;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
  .site-footer__inner { gap: 4px; padding-top: 18px; padding-bottom: var(--slide-bottom); }
  .sitemap { gap: 0 22px; }

  /* "Contact us" opens the box over the whole screen, with a close button */
  [data-snap] .contact-area > .container { z-index: auto; }
  .contact-area__inner.is-writing {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: block;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: max(24px, env(safe-area-inset-top)) var(--gutter) calc(32px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 0;
  }
  /* The close button sits on the headline's first line */
  .contact-area__inner.is-writing .contact-area__copy { margin: 0 0 24px; padding-right: 48px; }
  .contact-area__inner.is-writing .contact-form { margin-top: 24px; }
  /* Once the form is open, the reader has chosen to write: only the headline and the form show */
  .contact-area__inner.is-writing .actions { display: none; }
  .contact-area__inner.is-writing .contact-form { margin-top: 8px; }
  .contact-area__inner.is-writing .contact-form__inner::before { display: none; }
  .contact-area__inner.is-booking .contact-cal { min-height: calc(100svh - 160px); }
  .contact-area__inner.is-writing .contact-area__close {
    position: absolute;
    top: calc(max(24px, env(safe-area-inset-top)) + 13px);
    right: calc(var(--gutter) - 16px);
    z-index: 3;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-top: -4px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    border: 0;
    background: none;
    color: var(--text);
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
  }
  html:has(.contact-area__inner.is-writing) { overflow: hidden; }
}

/* Short phones tighten the type so each slide still fits */
@media (orientation: portrait) and (max-width: 1100px) and (max-height: 700px) {
  .about__copy p,
  .reason__body p,
  .case p { font-size: 0.93rem; margin-bottom: 10px; }
  .about-list .about__name { margin-bottom: 16px; }
  .service { padding-top: 14px; padding-bottom: 14px; }
  .tools--all { gap: 12px 16px; margin-top: 16px; }
  .tools--all .tools__logo { width: 20px; height: 20px; }
  .callout--link { font-size: 1.05rem; }
}

/* Tablets held upright: the same panels with desktop-sized type in a centered column */
@media (orientation: portrait) and (min-width: 700px) and (max-width: 1100px) {
  :root { --container: 780px; --gutter: 48px; }
  .callout--link { font-size: 1.4rem; }
  .about__name { font-size: 2.8rem; }
  .about__copy p { font-size: 1.2rem; }
  .puzzle__art { width: 260px; }
  .puzzle__title { font-size: 2.1rem; }
  .puzzle__line { font-size: 1.1rem; }
  .service h3 { font-size: 1.5rem; }
  .service p { font-size: 1.06rem; }
  .service__more { font-size: 1rem; }
  .steps-title { font-size: 2.4rem; }
  .services--steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reason__body p,
  .case p { font-size: 1.2rem; }
  .contact-area__inner { padding: 48px; }
  .contact-area__inner h2 { font-size: 2.1rem; }
  .contact-area__inner p { font-size: 1.15rem; }
  .cases__visual { max-width: min(535px, 36svh); }
}

/* The About intro's progress, along the bottom of the phone screen while it plays */
.about__progress {
  position: fixed;
  left: var(--gutter);
  right: var(--gutter);
  bottom: calc(18px + env(safe-area-inset-bottom) + var(--bar, 0px));
  z-index: 20;
  height: 3px;
  border-radius: 3px;
  background: rgb(92 200 184 / 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.25s ease;
}
.about__progress span { display: block; height: 100%; width: calc(var(--p, 0) * 100%); border-radius: inherit; background: #5cc8b8; }
.about__progress.is-on { opacity: 1; }
.about__progress.is-nudged { transform: scaleY(2); }
