/* Design tokens: warm parchment canvas, whisper-weight Inter, one cobalt action colour,
   dark product islands, illustration washes for decorative surfaces only */
:root {
  --color-electric-cobalt: #244cff;
  --color-lavender-mist: #c3aeff;
  --color-parchment: #f7f7f1;
  --color-snow: #ffffff;
  --color-sky-tint: #d6f2ff;
  --color-lemon-wash: #ffffbd;
  --color-blush: #fcc2cd;
  --color-buttercream: #fced9f;
  --color-pure-black: #000000;
  --color-graphite: #2b2b2b;
  --color-obsidian: #1d1f21;
  --color-ash: #878787;
  --color-fog: #b0b0b0;
  /* Secondary text on parchment; ash fails 4.5:1 at body sizes */
  --color-muted: #5c5c57;
  --color-hairline: rgba(0, 0, 0, 0.12);

  --font-inter: "Inter", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-geist: "Geist", var(--font-inter);

  --text-body: 16px;
  --text-body-lg: 18px;
  --text-subheading: 22px;
  --text-heading-lg: clamp(30px, 3.4vw, 44px);
  --text-display: clamp(44px, 6.6vw, 88px);

  --radius-cards: 6px;
  --radius-images: 16px;
  --radius-buttons: 100px;
  --radius-largesurfaces: 12px;

  --page-max-width: 1200px;
  --page-gutter: clamp(16px, 4vw, 40px);
  --section-gap: clamp(72px, 10vw, 140px);

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --z-sticky: 10;
  --z-skip: 20;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--color-parchment);
  color: var(--color-graphite);
  font-family: var(--font-inter);
  font-size: var(--text-body);
  line-height: 1.55;
  font-feature-settings: "cv03", "cv04", "cv09", "cv11";
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

h1,
h2,
h3,
p,
figure,
dl,
dd {
  margin: 0;
}

/* Headlines stay at weight 400: authority from scale, not weight */
h1,
h2,
h3 {
  color: var(--color-pure-black);
  font-weight: 400;
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

.container {
  width: 100%;
  max-width: calc(var(--page-max-width) + var(--page-gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--page-gutter);
}

.skip-link {
  position: absolute;
  left: -9999px;
}

.skip-link:focus {
  left: var(--page-gutter);
  top: 12px;
  z-index: var(--z-skip);
  padding: 8px 16px;
  background: var(--color-snow);
  border-radius: var(--radius-buttons);
}

:focus-visible {
  outline: 2px solid var(--color-electric-cobalt);
  outline-offset: 3px;
}

/* Buttons and links */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: var(--radius-buttons);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.4s var(--ease-out);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  padding: 14px 26px;
  background: var(--color-electric-cobalt);
  color: var(--color-snow);
}

.btn-dark {
  padding: 9px 18px;
  background: var(--color-obsidian);
  color: var(--color-snow);
}

.btn .arrow {
  transition: transform 0.4s var(--ease-out);
}

.btn:hover .arrow {
  transform: translateX(3px);
}

.link-ghost {
  color: var(--color-graphite);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.link-ghost:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

/* Navigation: transparent over the canvas, no border */
.site-header {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: rgba(247, 247, 241, 0.86);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
}

.nav {
  display: flex;
  align-items: center;
  gap: 48px;
  height: 72px;
}

.brand img {
  width: 78px;
  height: 32px;
}

.nav-links {
  display: flex;
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  color: var(--color-pure-black);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.nav-links a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-left: auto;
}

/* Hero: statement left, lede + actions bottom-right, product stage below */
.hero {
  padding-top: clamp(40px, 7vw, 96px);
}

.hero-copy {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  align-items: end;
  gap: 32px 64px;
}

.kicker {
  grid-column: 1 / -1;
  font-family: var(--font-geist);
  font-size: 14px;
  font-weight: 600;
  color: var(--color-muted);
}

.hero h1 {
  font-size: var(--text-display);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.hero-lede {
  max-width: 42ch;
  font-size: var(--text-body-lg);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-top: 28px;
}

.hero-stage {
  margin-top: clamp(40px, 6vw, 72px);
  padding: clamp(20px, 5vw, 64px) clamp(12px, 4vw, 56px) 0;
  overflow: hidden;
  background: var(--color-lavender-mist);
  border-radius: var(--radius-images);
}

.hero-stage img {
  width: 100%;
  margin-bottom: -2%;
}

/* Section intro */
.section {
  padding-block: var(--section-gap) 0;
}

.section-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  align-items: end;
  gap: 24px 64px;
  margin-bottom: clamp(40px, 5vw, 64px);
}

.section-intro h2 {
  font-size: var(--text-heading-lg);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.section-intro p {
  max-width: 46ch;
  font-size: var(--text-body-lg);
}

/* Services: stacked by default; a list + stage showcase on wide screens with JS */
.showcase {
  display: grid;
  gap: 56px;
}

.svc-head h3 {
  font-size: clamp(26px, 2.6vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

.svc-tab {
  all: unset;
  display: block;
  cursor: default;
}

.svc-tab:focus-visible {
  outline: 2px solid var(--color-electric-cobalt);
  outline-offset: 6px;
  border-radius: 4px;
}

.svc-head p {
  max-width: 44ch;
  margin-top: 10px;
}

.svc-figure {
  margin-top: 24px;
  padding: clamp(16px, 4vw, 40px);
  border-radius: var(--radius-images);
  background: var(--tone);
}

.svc-figure img {
  width: 100%;
  border-radius: var(--radius-cards);
  background: var(--color-obsidian);
}

.svc[data-tone="sky"] { --tone: var(--color-sky-tint); }
.svc[data-tone="lemon"] { --tone: var(--color-lemon-wash); }
.svc[data-tone="blush"] { --tone: var(--color-blush); }
.svc[data-tone="butter"] { --tone: var(--color-buttercream); }

@media (min-width: 961px) {
  .js .showcase {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    grid-auto-rows: min-content;
    align-content: start;
    gap: 0 64px;
  }

  .js .svc {
    display: contents;
  }

  .js .svc-head {
    grid-column: 1;
    position: relative;
    padding: 24px 0 26px;
    border-top: 1px solid var(--color-hairline);
  }

  .js .svc-tab {
    cursor: pointer;
  }

  .js .svc-head h3 {
    color: var(--color-ash);
    transition: color 0.4s var(--ease-out);
  }

  .js .svc-head p {
    display: grid;
    grid-template-rows: 0fr;
    margin-top: 0;
    opacity: 0;
    transition: grid-template-rows 0.5s var(--ease-out), opacity 0.4s, margin-top 0.5s var(--ease-out);
  }

  .js .svc-head p > span {
    overflow: hidden;
  }

  .js .svc-head:hover h3,
  .js .svc.is-active h3 {
    color: var(--color-pure-black);
  }

  .js .svc.is-active .svc-head p {
    grid-template-rows: 1fr;
    margin-top: 10px;
    opacity: 1;
  }

  /* Progress line drives auto-advance (site.js listens for animationend) */
  .js .svc-head::after {
    content: "";
    position: absolute;
    top: -1px;
    left: 0;
    width: 100%;
    height: 1px;
    background: var(--color-pure-black);
    transform: scaleX(0);
    transform-origin: left;
  }

  @media (prefers-reduced-motion: no-preference) {
    .js .svc.is-active .svc-head::after {
      animation: progress 7s linear forwards;
    }
  }

  .js .showcase:hover .svc-head::after,
  .js .showcase:focus-within .svc-head::after {
    animation-play-state: paused;
  }

  .js .svc-figure {
    grid-column: 2;
    grid-row: 1 / span 4;
    align-self: start;
    margin-top: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(0.985);
    transition: opacity 0.5s var(--ease-out), transform 0.7s var(--ease-out), visibility 0s 0.5s;
  }

  .js .svc.is-active .svc-figure {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition: opacity 0.5s var(--ease-out), transform 0.7s var(--ease-out), visibility 0s;
  }
}

@keyframes progress {
  to { transform: scaleX(1); }
}

/* Delivery process: the isometric bench figure (iso.css) on a white card, five stages below */
/* Matches iso.css's own `.iso[data-theme="light"]` token rule with higher specificity, since iso.css loads later */
.process-figure.iso[data-theme="light"] {
  --anatomy-card: var(--color-snow);
  --anatomy-paper: var(--color-snow);
  /* Corner labels: the kit's muted grey is 3.2:1 on white, below AA at 10.5px */
  --anatomy-muted: var(--color-muted);
}

.process-figure .iso-figure {
  margin: 0;
}

/* Station colours: each stage's wash from the illustration palette, as a full tone ramp
   (paper, face, top, four side shades) so the parts keep their volume. */
.process-figure [data-tint="sky"] {
  --anatomy-paper: #e6f7ff; --anatomy-face: #e6f7ff; --anatomy-top: #edf9ff;
  --anatomy-shade-0: #c1dae6; --anatomy-shade-1: #cbe6f2; --anatomy-shade-2: #d6f2ff; --anatomy-shade-3: #def5ff;
}

.process-figure [data-tint="lemon"] {
  --anatomy-paper: #ffffd7; --anatomy-face: #ffffd7; --anatomy-top: #ffffe1;
  --anatomy-shade-0: #e6e6aa; --anatomy-shade-1: #f2f2b4; --anatomy-shade-2: #ffffbd; --anatomy-shade-3: #ffffca;
}

.process-figure [data-tint="lavender"] {
  --anatomy-paper: #dbceff; --anatomy-face: #dbceff; --anatomy-top: #e4dbff;
  --anatomy-shade-0: #b09de6; --anatomy-shade-1: #b9a5f2; --anatomy-shade-2: #c3aeff; --anatomy-shade-3: #cfbeff;
}

.process-figure [data-tint="blush"] {
  --anatomy-paper: #fddae1; --anatomy-face: #fddae1; --anatomy-top: #fee4e8;
  --anatomy-shade-0: #e3afb8; --anatomy-shade-1: #efb8c3; --anatomy-shade-2: #fcc2cd; --anatomy-shade-3: #fdced7;
}

.process-figure [data-tint="butter"] {
  --anatomy-paper: #fdf4c5; --anatomy-face: #fdf4c5; --anatomy-top: #fef7d4;
  --anatomy-shade-0: #e3d58f; --anatomy-shade-1: #efe197; --anatomy-shade-2: #fced9f; --anatomy-shade-3: #fdf1b2;
}

/* Instrument faces inside a tinted station read best on white */
.process-figure [data-tint="neutral"] {
  --anatomy-paper: #ffffff; --anatomy-face: #ffffff; --anatomy-top: #ffffff;
  --anatomy-shade-0: #dcdcd9; --anatomy-shade-1: #e5e5e2; --anatomy-shade-2: #ededea; --anatomy-shade-3: #f4f4f1;
}

.process-figure .iso-plate {
  padding: 52px clamp(12px, 3vw, 32px) 48px;
  border-radius: var(--radius-images);
  box-shadow: none;
}

.process-figure .iso-stage {
  border-radius: var(--radius-cards);
}

.process-figure .iso-legend {
  max-width: 96ch;
  margin-top: 16px;
  color: var(--color-muted);
  font-size: 14px;
}

/* Pass lamp, light curtain and heartbeat: colour here is the signal itself */
.process-figure [data-part="lamp"] .iso-top,
.process-figure [data-part="lamp"] .iso-shade {
  transition: fill 0.35s ease-out;
}

.process-figure [data-part="lamp"][data-on] .iso-top,
.process-figure [data-part="lamp"][data-on] .iso-shade {
  fill: var(--anatomy-green);
}

.process-figure [data-part="curtain"] circle {
  transition: fill 0.3s ease-out;
}

.process-figure [data-part="curtain"][data-on] circle {
  fill: var(--anatomy-green);
}

.process-figure [data-part="heartbeat"]:not([data-live]) circle {
  animation: none;
  opacity: 0.35;
}

.process-figure [data-part="heartbeat"][data-live] circle {
  fill: var(--anatomy-green);
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 32px 24px;
  margin: clamp(32px, 4vw, 48px) 0 0;
  padding: 0;
  list-style: none;
}

.process-step {
  position: relative;
  padding-top: 18px;
  border-top: 1px solid var(--color-hairline);
  transition: border-color 0.4s var(--ease-out);
}

.process-step[aria-current] {
  border-top-color: var(--color-pure-black);
}

.process-num {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--radius-buttons);
  background: var(--stage, var(--color-ice-wash));
  color: var(--color-graphite);
  font-family: var(--font-geist);
  font-size: 14px;
  font-weight: 600;
}

/* Each stage's number carries its station's colour from the figure */
.process-step[data-tint="sky"] { --stage: var(--color-sky-tint); }
.process-step[data-tint="lemon"] { --stage: var(--color-lemon-wash); }
.process-step[data-tint="lavender"] { --stage: var(--color-lavender-mist); }
.process-step[data-tint="blush"] { --stage: var(--color-blush); }
.process-step[data-tint="butter"] { --stage: var(--color-buttercream); }

.process-step h3 {
  margin-top: 8px;
  font-size: var(--text-subheading);
  line-height: 1.25;
}

.process-pick {
  all: unset;
  cursor: pointer;
  color: var(--color-muted);
  transition: color 0.3s var(--ease-out);
}

.process-pick:hover,
.process-step[aria-current] .process-pick {
  color: var(--color-pure-black);
}

.process-pick:focus-visible {
  outline: 2px solid var(--color-electric-cobalt);
  outline-offset: 4px;
  border-radius: 4px;
}

.process-step p {
  margin-top: 10px;
  color: var(--color-muted);
  font-size: 15px;
}

@media (max-width: 960px) {
  .process-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* On phones the bench keeps a legible scale and scrolls sideways inside its card */
@media (max-width: 680px) {
  .process-figure .iso-stage {
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .process-figure .iso-svg {
    min-width: 640px;
  }

  /* No hover on touch screens: drop the hint and let the live readout wrap across the card */
  .process-figure .iso-plate {
    padding-bottom: 64px;
  }

  .process-figure .iso-plate-corner[data-corner="hint"] {
    display: none;
  }

  .process-figure .iso-plate-corner[data-corner="readout"] {
    left: 0;
    line-height: 1.5;
    white-space: normal;
  }

  .process-steps {
    grid-template-columns: 1fr;
  }
}

/* Way of working: one statement, four principles on hairlines (no cards) */
.statement {
  max-width: 24ch;
  font-size: clamp(30px, 4vw, 54px);
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.principles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px 32px;
  margin-top: clamp(48px, 6vw, 80px);
}

.principles > div {
  padding-top: 20px;
  border-top: 1px solid var(--color-hairline);
}

.principles dt {
  color: var(--color-pure-black);
  font-size: var(--text-subheading);
  line-height: 1.25;
}

.principles dd {
  margin-top: 10px;
  color: var(--color-muted);
}

/* Closing call to action: the dark island of the page */
.cta {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 7vw, 96px) clamp(24px, 6vw, 88px);
  background: var(--color-obsidian);
  border-radius: var(--radius-images);
  color: #c9c9c4;
}

.cta-mark {
  position: absolute;
  right: -6%;
  bottom: -22%;
  width: clamp(240px, 38vw, 520px);
  pointer-events: none;
}

.cta > *:not(.cta-mark) {
  position: relative;
}

.cta h2 {
  max-width: 16ch;
  color: var(--color-snow);
  font-size: var(--text-heading-lg);
  line-height: 1.12;
  letter-spacing: -0.02em;
}

.cta > p {
  max-width: 46ch;
  margin-top: 16px;
  font-size: var(--text-body-lg);
  line-height: 1.6;
}

.cta-email {
  display: inline-block;
  margin-top: clamp(32px, 5vw, 56px);
  color: var(--color-snow);
  font-size: clamp(30px, 5.6vw, 76px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.14em;
  text-decoration-color: rgba(255, 255, 255, 0.3);
  transition: text-decoration-color 0.3s;
}

.cta-email:hover {
  text-decoration-color: currentColor;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 32px;
  margin-top: 40px;
}

.cta address {
  font-style: normal;
  font-size: 15px;
}

/* Footer */
.site-footer {
  margin-top: var(--section-gap);
  padding: 48px 0 32px;
  border-top: 1px solid var(--color-hairline);
  font-size: 14px;
  color: var(--color-muted);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 40px;
}

.footer-grid p + p {
  margin-top: 6px;
}

.footer-title {
  margin-bottom: 12px;
  color: var(--color-pure-black);
  font-family: var(--font-geist);
  font-weight: 600;
}

.footer-tagline {
  max-width: 300px;
  margin-top: 16px;
}

.footer-bottom {
  margin-top: 48px;
  font-size: 12px;
}

/* Motion: one orchestrated hero entrance, scroll-linked reveals where supported */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
}

/* Transform-only, so the hero is never blank where time-based animation is frozen
   (background tabs, headless renderers) */
@keyframes lift {
  from {
    transform: translateY(28px);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .hero .kicker,
  .hero h1,
  .hero-side,
  .hero-stage {
    animation: lift 1.1s var(--ease-out) both;
  }

  .hero h1 { animation-delay: 0.08s; }
  .hero-side { animation-delay: 0.2s; }
  .hero-stage { animation-delay: 0.32s; animation-duration: 1.2s; }

  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 45%;
    }
  }
}

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

  .btn,
  .btn .arrow {
    transition: none;
  }
}

/* Tablet */
@media (max-width: 960px) {
  .hero-copy,
  .section-intro {
    grid-template-columns: 1fr;
  }

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

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* Phone */
@media (max-width: 680px) {
  .nav {
    gap: 16px;
    height: 64px;
  }

  .nav-links {
    display: none;
  }

  .nav-actions {
    gap: 16px;
  }

  .brand img {
    width: 68px;
    height: 28px;
  }

  .principles,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-stage {
    margin-inline: calc(var(--page-gutter) * -0.5);
  }

  .cta-email {
    word-break: break-all;
  }

  /* Leave room so the brand mark sits below the content, not over it */
  .cta {
    padding-bottom: 170px;
  }

  .cta-mark {
    width: 200px;
    right: -24px;
    bottom: -56px;
  }
}
