/* SystemsLogiq. One family (Mona Sans, SIL OFL 1.1, see fonts/OFL.txt):
   expanded for headlines, normal for text, condensed for interface data.
   Notation used everywhere: a ring is work prepared by the assistant,
   a filled square is a decision made by a person. */

@font-face {
  font-family: "Mona Sans";
  src: url("fonts/MonaSansVF.woff2") format("woff2");
  font-weight: 200 900;
  font-stretch: 75% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --mist: #E8EDEA;
  --mist-deep: #D6E0DB;
  --porcelain: #FAFCFB;
  --ink: #14302E;
  --ink-soft: #47625E;
  --verd: #2A7873;
  --verd-tint: #CFE5E0;
  --verd-wash: #EEF5F3;
  --saffron: #E2A33A;
  --saffron-tint: #F8E7C3;
  --line: rgba(20, 48, 46, .13);
  --gut: clamp(20px, 4.4vw, 76px);
  --ease: cubic-bezier(.22, .7, .16, 1);
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(88rem 46rem at 88% -14rem, #F7FAF8 0, rgba(247, 250, 248, 0) 64%),
    radial-gradient(60rem 44rem at -12% 34rem, #DCE6E1 0, rgba(220, 230, 225, 0) 62%),
    var(--mist);
  background-repeat: no-repeat;
  font-family: "Mona Sans", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  font-weight: 400;
  font-stretch: 100%;
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1 0 auto; }

p, h1, h2, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
b { font-weight: 620; }
i { font-style: normal; }

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

.wrap { width: min(100% - 2 * var(--gut), 1500px); margin-inline: auto; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  padding: 10px 16px; border-radius: 8px;
  background: var(--ink); color: var(--porcelain); text-decoration: none;
}
.skip:focus { top: 12px; }

/* ---------- header ---------- */

.top { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-block: 26px; }

.brand {
  display: inline-flex; align-items: center; gap: .55em;
  font-size: 21px; font-weight: 640; font-stretch: 120%; letter-spacing: -.012em;
  text-decoration: none; line-height: 1;
}
.brand .mark { width: 1.5em; height: 1.5em; flex: none; }
.brand-s { font-size: 18px; }

.top-r { display: flex; align-items: center; gap: 26px; }
.top-mail { font-size: 16px; text-decoration: none; color: var(--ink-soft); }
.top-mail:hover { color: var(--ink); text-decoration: underline; text-underline-offset: .25em; }

.lang {
  display: inline-flex; padding: 3px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(250, 252, 251, .55);
}
.lang a {
  padding: 5px 14px; border-radius: 999px; font-size: 14.5px; font-weight: 520;
  text-decoration: none; color: var(--ink-soft); line-height: 1.3;
}
.lang a:hover { color: var(--ink); }
.lang a[aria-current] { background: var(--ink); color: var(--porcelain); }
.l-short { display: none; }

/* ---------- hero ---------- */

.hero-head {
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: end;
  padding-block: clamp(22px, 3.4vw, 60px) clamp(30px, 3.6vw, 60px);
}

h1 {
  grid-column: 1 / span 8;
  font-size: clamp(2.3rem, 4.75vw, 5rem);
  line-height: 1.02; font-weight: 580; font-stretch: 116%; letter-spacing: -.028em;
  text-wrap: balance;
}
h1 span { display: block; text-wrap: balance; }

.hero-lead { grid-column: 9 / span 4; padding-bottom: .5rem; }
.hero-lead p { font-size: clamp(1.06rem, .35vw + 1rem, 1.28rem); line-height: 1.5; color: var(--ink-soft); text-wrap: pretty; }

.cta {
  display: inline-block; margin-top: 1.25rem;
  padding: .72em 1.25em; border-radius: 999px;
  background: var(--ink); color: var(--porcelain);
  font-size: 16.5px; font-weight: 560; text-decoration: none; line-height: 1.3;
  transition: background-color .2s;
}
.cta:hover { background: #0C2221; }

/* ---------- the stage ---------- */

.show { container: show / inline-size; }

.stage {
  position: relative; overflow: hidden; border-radius: 22px;
  container: stage / inline-size;
  background: linear-gradient(158deg, #DDE7E2 0%, #C8D7D1 100%);
  box-shadow: inset 0 0 0 1px rgba(20, 48, 46, .06), 0 50px 90px -70px rgba(20, 48, 46, .5);
}
.stage::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(44% 62% at var(--lx, 24%) var(--ly, 8%), rgba(255, 255, 255, .6), rgba(255, 255, 255, 0) 72%);
}

/* Inside the scene every length is in the scene's em. Only leaf text sets a font-size. */
.scene { position: relative; font-size: 15px; padding: 1.3em 1.2em 0; display: grid; gap: 1.5em; line-height: 1.35; }

.floor { display: none; }
.wires { display: none; }
.fly { display: none; }

.sk { display: block; height: .5em; border-radius: .25em; background: rgba(20, 48, 46, .11); }
.sk.w3 { width: 3em; } .sk.w6 { width: 6.5em; } .sk.w9 { width: 9.5em; }

.ring { display: inline-block; flex: none; width: .78em; height: .78em; border-radius: 50%; border: .16em solid var(--verd); }
.sq { display: inline-block; flex: none; width: .78em; height: .78em; background: var(--saffron); }

/* records */
.sheet { filter: drop-shadow(0 .8em 1em rgba(20, 48, 46, .15)) drop-shadow(0 .08em .15em rgba(20, 48, 46, .14)); }
.paper {
  position: relative; background: #FDFEFD; padding: 1.3em;
  clip-path: polygon(0 0, calc(100% - 1.5em) 0, 100% 1.5em, 100% 100%, 0 100%);
}
.paper::after {
  content: ""; position: absolute; top: 0; right: 0; width: 1.5em; height: 1.5em;
  background: linear-gradient(225deg, rgba(255, 255, 255, 0) 50%, #D5E0DB 50%);
}
.stitle { height: 2.6em; display: flex; align-items: flex-start; justify-content: space-between; gap: 1em; padding-right: 1.4em; }
.stitle b { font-size: .86em; font-weight: 660; font-stretch: 108%; white-space: nowrap; }
.stitle .sk { margin-top: .4em; }
.srow { height: 2.1em; display: flex; align-items: center; justify-content: space-between; gap: 1em; }
.srow span { font-size: .84em; font-stretch: 94%; color: var(--ink-soft); white-space: nowrap; }
.srow span + span { color: var(--ink); font-weight: 540; }
.srow.hl {
  margin-inline: -.5em; padding-inline: .5em; border-radius: .25em;
  background: linear-gradient(var(--verd-tint), var(--verd-tint)) no-repeat 0 0 / 100% 100%;
}
.srow.hl span { color: var(--ink); }

/* the application window */
.win {
  background: var(--porcelain); border-radius: .9em; overflow: hidden;
  box-shadow: 0 0 0 1px rgba(20, 48, 46, .08), 0 2.4em 3.4em -1.8em rgba(20, 48, 46, .42), 0 .3em .8em rgba(20, 48, 46, .06);
  display: grid; grid-template-columns: 1fr;
}
.win-h { display: flex; align-items: center; gap: .8em; height: 4.4em; padding: 0 1.3em; border-bottom: 1px solid var(--line); }
.win-t { font-size: 1.02em; font-weight: 640; font-stretch: 110%; letter-spacing: -.01em; white-space: nowrap; }
.win-id { font-size: .84em; color: var(--ink-soft); font-stretch: 94%; white-space: nowrap; }
.chips { margin-left: auto; display: inline-grid; }
.chips > * { grid-area: 1 / 1; justify-self: end; }
.chip {
  display: inline-flex; align-items: center; gap: .5em; white-space: nowrap;
  font-size: .8em; font-weight: 600; line-height: 1; padding: .55em .9em; border-radius: 999px;
}
.chip-draft { color: var(--ink-soft); box-shadow: inset 0 0 0 1px var(--line); }
.chip-ok { background: var(--saffron-tint); color: var(--ink); }

.asst { background: var(--verd-wash); border-bottom: 1px solid var(--line); padding: .3em 1.3em 1em; }
.asst-h { height: 3.2em; display: flex; align-items: center; gap: .6em; }
.asst-h b { font-size: .86em; font-weight: 640; font-stretch: 108%; }
.steps { display: grid; grid-template-columns: 1fr; gap: .55em; }
.steps li { display: flex; align-items: center; gap: .7em; }
.steps span { font-size: .82em; line-height: 1.25; color: var(--ink); }
.tick {
  flex: none; width: 1.25em; height: 1.25em; border-radius: 50%; background: var(--verd);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.6 10.4l2.9 2.9 5.9-6.4' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 100% 100%;
}

.fields { padding: 0 1.3em; }
.frow { display: grid; grid-template-columns: 1fr; gap: .35em; padding: 1em 0; border-bottom: 1px solid var(--line); }
.frow:last-child { border-bottom: 0; padding-bottom: 3em; }
.fl { font-size: .8em; color: var(--ink-soft); line-height: 1.3; }
.fv { position: relative; min-width: 0; }
.val { font-size: .95em; line-height: 1.36; }
.src { display: flex; align-items: center; gap: .45em; margin-top: .4em; }
.src span { font-size: .76em; color: var(--verd); font-stretch: 96%; font-weight: 520; line-height: 1.2; }
.src .ring { width: .62em; height: .62em; border-width: .13em; }
.msg {
  font-size: .9em; line-height: 1.42; background: #fff; border: 1px solid var(--line);
  border-radius: .55em; padding: .85em 1em; color: var(--ink);
}

.gauge { position: relative; height: 1.9em; margin-top: .6em; max-width: 17em; --lim: 50%; }
.gauge::before { content: ""; position: absolute; left: 0; width: 80%; top: 0; height: .5em; border-radius: .25em; background: rgba(20, 48, 46, .07); }
.gauge i { position: absolute; top: 0; height: .5em; }
.g-ok { left: 0; width: var(--lim); background: rgba(20, 48, 46, .2); border-radius: .25em 0 0 .25em; }
.g-over { left: var(--lim); width: calc(80% - var(--lim)); background: var(--ink); border-radius: 0 .25em .25em 0; transform-origin: 0 50%; }
.gauge .g-lim { left: var(--lim); top: -.3em; width: .12em; height: 1.1em; background: var(--ink); }
.gauge span { position: absolute; font-size: .72em; font-stretch: 94%; line-height: 1; white-space: nowrap; }
.g-a { left: var(--lim); top: 1.35em; transform: translateX(-50%); color: var(--ink-soft); }
.g-b { left: calc(80% + .7em); top: -.18em; color: var(--ink); font-weight: 640; }

/* the reviewer */
.review {
  position: relative; background: var(--porcelain); border-radius: 1em; padding: 1.5em;
  box-shadow: 0 0 0 1px rgba(20, 48, 46, .08), 0 2.6em 3.6em -1.5em rgba(20, 48, 46, .48), 0 .3em .9em rgba(20, 48, 46, .08);
  margin: -3.2em 0 0 auto; width: min(100% - 1.2em, 23em); z-index: 2;
}
.rev-h { display: flex; align-items: center; gap: .8em; }
.ava { width: 2.8em; height: 2.8em; border-radius: 50%; background: var(--ink); color: var(--porcelain); display: grid; place-items: center; flex: none; }
.ava span { font-size: .84em; font-weight: 620; letter-spacing: .02em; }
.rev-who { display: grid; }
.rev-who b { font-size: .95em; font-weight: 640; line-height: 1.25; }
.rev-who span { font-size: .8em; color: var(--ink-soft); line-height: 1.3; }
.rev-doc { margin-top: 1.2em; padding: .85em 1em; border-radius: .6em; background: #EFF3F1; display: grid; gap: .1em; }
.rev-doc b { font-size: .88em; font-weight: 620; }
.rev-sub { display: inline-grid; }
.rev-sub > span { grid-area: 1 / 1; font-size: .78em; color: var(--ink-soft); }
.rs-wait { visibility: hidden; }
.rev-act { margin-top: 1.1em; }
.btns { display: flex; gap: .6em; }
.btn {
  font: inherit; font-size: .9em; font-weight: 620; line-height: 1.2; text-align: center;
  padding: .8em 1.2em; border-radius: .6em; border: 1px solid var(--line); background: transparent; color: var(--ink);
  -webkit-appearance: none; appearance: none;
}
.btn.go {
  flex: 1; background: var(--saffron); border-color: transparent; cursor: pointer; position: relative;
  transition: transform .15s, filter .2s, background-color .3s, color .3s;
}
.btn.go:hover:not(:disabled) { filter: brightness(1.05); }
.btn.go:active:not(:disabled) { transform: scale(.97); }
.btn.go:disabled { background: #E6ECE9; color: rgba(20, 48, 46, .4); cursor: default; }
.btn.ghost { color: var(--ink-soft); }
.hint { font-size: .78em; color: var(--ink-soft); margin-top: .7em; opacity: 0; transition: opacity .5s; }
.seal { display: flex; align-items: center; gap: .7em; padding: .82em 1em; border-radius: .6em; background: var(--saffron-tint); }
.seal .sq { width: .95em; height: .95em; }
.seal span { font-size: .9em; font-weight: 640; line-height: 1.2; }
.cursor { position: absolute; left: 62%; top: 72%; width: 1.7em; height: 1.7em; opacity: 0; pointer-events: none; z-index: 3; filter: drop-shadow(0 .15em .2em rgba(20, 48, 46, .3)); }

.outs { display: grid; gap: .55em; margin: -.3em 0 0 auto; width: min(100% - 1.2em, 23em); padding-left: 1.6em; position: relative; }
.outs::before { content: ""; position: absolute; left: .55em; top: -1.5em; bottom: 1.05em; width: .1em; background: var(--saffron); }
.outs li { position: relative; display: flex; align-items: center; gap: .6em; padding: .55em .9em; border-radius: .55em; background: rgba(250, 252, 251, .78); box-shadow: 0 0 0 1px rgba(20, 48, 46, .07); }
.outs li::before { content: ""; position: absolute; left: -1.05em; top: 50%; width: 1.05em; height: .1em; background: var(--saffron); }
.outs .sq { width: .6em; height: .6em; }
.outs span { font-size: .82em; font-weight: 560; line-height: 1.25; }

.pre { display: none !important; }
.stage.wait .scene { visibility: hidden; }

.stage-foot { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 1em; min-height: 3.4em; padding: .9em 1.3em 1em; font-size: 15px; }
.note { font-size: .82em; color: var(--ink-soft); }
.next {
  font: inherit; font-size: .84em; font-weight: 580; color: var(--ink); cursor: pointer;
  display: none; align-items: center; gap: .55em; padding: .55em 1.1em; border-radius: 999px;
  background: rgba(250, 252, 251, .8); border: 1px solid var(--line);
  transition: background-color .2s;
}
.next:hover { background: var(--porcelain); }

/* small screens: documents become slim rows */
@container stage (max-width: 619px) {
  .recs-gap { display: none; }
  .sheet .srow:not(.hl), .sheet .stitle .sk { display: none; }
  .paper { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .3em .8em; padding: .75em 1.9em .75em 1em; }
  .stitle { height: auto; padding: 0; }
  .srow.hl { margin: 0; flex: none; gap: .7em; height: 1.9em; }
  .scene { gap: .7em; }
  .win { margin-top: .8em; }
}

@container stage (min-width: 620px) and (max-width: 1119px) {
  .scene { grid-template-columns: repeat(3, 1fr); column-gap: 1em; padding: 1.6em 1.6em 0; }
  .win, .review, .outs { grid-column: 1 / -1; }
  .win { grid-template-columns: 15em 1fr; }
  .win-h { grid-column: 1 / -1; }
  .asst { border-bottom: 0; border-right: 1px solid var(--line); }
  .steps { gap: .9em; }
  .frow { grid-template-columns: 8em 1fr; column-gap: 1em; }
  .fields { padding-right: 2em; }
}

@container stage (max-width: 350px) {
  .win-id { display: none; }
}

/* wide: one composed picture, every position in scene units (100 x 47) */
@container stage (min-width: 1120px) {
  .scene { font-size: 1cqw; height: 44em; padding: 0; display: block; }
  .floor {
    display: block; position: absolute; inset: -14em -16em;
    background-image:
      linear-gradient(rgba(20, 48, 46, .055) 1px, rgba(20, 48, 46, 0) 1px),
      linear-gradient(90deg, rgba(20, 48, 46, .055) 1px, rgba(20, 48, 46, 0) 1px);
    background-size: 4em 4em; background-position: 2em 2em;
    -webkit-mask-image: radial-gradient(60% 62% at 50% 50%, #000 40%, rgba(0, 0, 0, 0) 100%);
    mask-image: radial-gradient(60% 62% at 50% 50%, #000 40%, rgba(0, 0, 0, 0) 100%);
  }
  .sheet { position: absolute; width: 19em; }
  .s1 { left: 3em; top: 4.5em; }
  .s2 { left: 6em; top: 14.8em; z-index: 2; }
  .s3 { left: 3em; top: 27.6em; }

  .wires { display: block; position: absolute; left: 0; top: 0; width: 100em; height: 47em; overflow: visible; pointer-events: none; z-index: 3; }
  .wire { fill: none; stroke: var(--verd); stroke-width: .09; stroke-dasharray: 1; stroke-dashoffset: 0; opacity: .85; }
  .port { fill: var(--porcelain); stroke: var(--verd); stroke-width: .11; transform-box: fill-box; transform-origin: center; }

  .win { position: absolute; left: 30em; top: 3.5em; width: 48em; height: 37em; grid-template-columns: 14em 1fr; grid-template-rows: 5.2em 1fr; z-index: 1; }
  .win-h { grid-column: 1 / -1; height: auto; padding: 0 1.8em; }
  .asst { border-bottom: 0; border-right: 1px solid var(--line); padding: 0 1.4em; }
  .steps { display: block; }
  .steps li { height: 4.6em; }
  .fields { padding: 0 5.5em 0 2em; }
  .frow { grid-template-columns: 8em 1fr; column-gap: 1em; padding: 1.05em 0; }
  .f1 { height: 4.9em; } .f2 { height: 8.3em; } .f3 { height: 5.5em; }
  .frow:last-child { padding-bottom: 0; }

  .review { position: absolute; left: 74.5em; top: 9.5em; width: 23em; margin: 0; z-index: 4; }
  .outs { position: absolute; left: 76.5em; top: 28.2em; width: 21em; margin: 0; z-index: 4; }

  .fly { display: block; position: absolute; left: 0; top: 0; width: 100em; height: 47em; pointer-events: none; z-index: 5; }
  .token {
    position: absolute; transform: translate(-50%, -50%); white-space: nowrap;
    padding: .32em .7em; border-radius: 999px; background: var(--verd); color: #fff;
    box-shadow: 0 .5em 1em -.3em rgba(20, 48, 46, .5);
  }
  .token span { font-size: .8em; font-weight: 620; font-stretch: 94%; }

  .stage-foot { position: absolute; left: 0; right: 0; bottom: 0; font-size: 1cqw; padding: 0 3em 1.5em; min-height: 0; align-items: flex-end; pointer-events: none; }
  .stage-foot > * { pointer-events: auto; }
  .note { font-size: .84em; }
  .next { font-size: .86em; }
}

/* ---------- live states (set by site.js; without it the finished scene shows) ---------- */

.stage[data-state]:not([data-state="approved"]) .post { display: none; }
.stage[data-state]:not([data-state="approved"]) .btns.pre { display: flex !important; }
.stage[data-state]:not([data-state="approved"]) .chip.pre { display: inline-flex !important; }
.stage[data-state]:not([data-state="approved"]) .hint.pre { display: block !important; }
.stage[data-state="approved"] .hint.pre { display: block !important; visibility: hidden; }

.stage[data-state] .srow.hl { background-size: 0 100%; transition: background-size .55s var(--ease); }
.stage[data-state] .srow.hl.in { background-size: 100% 100%; }
.stage[data-state] .wire { stroke-dashoffset: 1; }
.stage[data-state] .port { transform: scale(0); transition: transform .35s var(--ease); }
.stage[data-state] .port.in { transform: scale(1); }
.stage[data-state] .steps li { opacity: 0; transform: translateX(-.5em); transition: opacity .35s, transform .45s var(--ease); }
.stage[data-state] .steps li.in { opacity: 1; transform: none; }
.stage[data-state] .steps li.busy .tick {
  background: none; border: .16em solid var(--verd-tint); border-top-color: var(--verd);
  animation: spin .7s linear infinite;
}
.stage[data-state] .src { opacity: 0; transition: opacity .4s; }
.stage[data-state] .frow.done .src { opacity: 1; }
.stage[data-state] .gauge { opacity: 0; transition: opacity .4s; }
.stage[data-state] .frow.in .gauge { opacity: 1; }
.stage[data-state] .g-over { transform: scaleX(0); transition: transform .7s .25s var(--ease); }
.stage[data-state] .frow.in .g-over { transform: none; }
.stage[data-state] .g-b { opacity: 0; transition: opacity .3s .8s; }
.stage[data-state] .frow.in .g-b { opacity: 1; }
.stage[data-state] .msg { border-color: transparent; background: rgba(20, 48, 46, .045); transition: background-color .4s, border-color .4s; }
.stage[data-state] .frow.in .msg { border-color: var(--line); background: #fff; }

.tw-rest { visibility: hidden; }
.tw-caret[hidden], .ph[hidden] { display: none; }
.tw-caret { display: inline-block; width: 0; height: 1em; vertical-align: -.12em; border-left: .12em solid var(--verd); margin-left: .05em; margin-right: -.17em; }
.ph { position: absolute; left: 0; top: .35em; width: 62%; height: .5em; border-radius: .25em; background: rgba(20, 48, 46, .1); transition: opacity .3s; }
.ph::after { content: ""; position: absolute; left: 0; top: 1.25em; width: 64%; height: 100%; border-radius: inherit; background: inherit; }
.frow.in .ph { opacity: 0; }
.f4 .ph { display: none; }

.stage[data-state="idle"] .review, .stage[data-state="working"] .review { opacity: .62; }
.stage[data-state] .review { transition: opacity .5s, box-shadow .5s; }
.stage[data-state="idle"] .rs-wait, .stage[data-state="working"] .rs-wait { visibility: visible; }
.stage[data-state="idle"] .rs-ready, .stage[data-state="working"] .rs-ready { visibility: hidden; }
.stage[data-state="review"] .btn.go { animation: invite 2.2s ease-in-out 3; }
.stage[data-state="review"].nudge .hint { opacity: 1; }
.stage[data-state="approved"] .seal { animation: stamp .55s var(--ease) both; }
.stage[data-state="approved"] .chip-ok { animation: stamp .5s .12s var(--ease) both; }
.stage[data-state] .outs::before { transform: scaleY(0); transform-origin: 0 0; transition: transform .5s var(--ease); }
.stage[data-state] .outs li { opacity: 0; transform: translateX(-.6em); transition: opacity .4s, transform .5s var(--ease); }
.stage[data-state="approved"] .outs::before { transform: none; transition-delay: .3s; }
.stage[data-state="approved"] .outs li { opacity: 1; transform: none; transition-delay: .6s; }
.stage[data-state="approved"] .outs li + li { transition-delay: .85s; }
.stage.fin .next { display: inline-flex; animation: fadein .5s both; }
.stage.swap .scene [data-k] { opacity: 0; }
.stage[data-state] .scene [data-k] { transition: opacity .28s; }
.leg-p .sq { transition: transform .5s var(--ease); }
.legend.signed .leg-p .sq { animation: stamp .6s .1s var(--ease) both; }

.ripple {
  position: absolute; left: 50%; top: 50%; width: 3em; height: 3em; margin: -1.5em 0 0 -1.5em; border-radius: 50%;
  border: .14em solid var(--saffron); pointer-events: none; animation: ripple .9s var(--ease) both;
}

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes stamp { 0% { opacity: 0; transform: scale(1.35) rotate(-5deg); } 55% { opacity: 1; transform: scale(.97); } 100% { opacity: 1; transform: none; } }
@keyframes invite { 0%, 100% { box-shadow: 0 0 0 0 rgba(226, 163, 58, 0); } 50% { box-shadow: 0 0 0 .5em rgba(226, 163, 58, .28); } }
@keyframes ripple { from { opacity: .9; transform: scale(.4); } to { opacity: 0; transform: scale(5); } }

/* real depth on wide screens: layers sit at different heights and the scene follows the pointer */
.stage.d3 { perspective: 5200px; }
.d3 .scene { transform-style: preserve-3d; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.d3 .floor { transform: translateZ(calc(-11em * var(--lift, 0) - 4em * var(--ex, 0))); }
.d3 .s1, .d3 .s3 { transform: translateZ(calc(3em * var(--lift, 0))); }
.d3 .s2 { transform: translateZ(calc(3.3em * var(--lift, 0) + .6em * var(--ex, 0))); }
.d3 .wires { transform: translateZ(calc(4.1em * var(--lift, 0))); transition: opacity .6s; }
.d3 .win { transform: translateZ(calc(4em * var(--lift, 0) + 8em * var(--ex, 0))); }
.d3 .review, .d3 .outs { transform: translateZ(calc(9em * var(--lift, 0) + 15em * var(--ex, 0))); }
.d3 .fly { transform: translateZ(calc(5em * var(--lift, 0))); }
.d3 .scene.intro { --ex: 1; transform: translateY(3.2em) rotateX(52deg) rotateZ(-11deg) scale(.88); }
.d3 .scene.intro .wires { opacity: 0; }
.d3 .scene.assemble,
.d3 .scene.assemble > .floor, .d3 .scene.assemble > .sheet, .d3 .scene.assemble > .win, .d3 .scene.assemble > .review, .d3 .scene.assemble > .outs {
  transition: transform 2.1s cubic-bezier(.3, .55, .12, 1), opacity .5s;
}

/* ---------- legend ---------- */

.legend { display: grid; gap: .55rem; padding: 1.4rem .2rem 0; }
.legend li { display: flex; align-items: center; gap: .7em; font-size: 1rem; font-weight: 520; line-height: 1.3; }
.legend .ring { width: .8em; height: .8em; }
.legend .sq { width: .8em; height: .8em; }

/* ---------- promise ---------- */

.promise {
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; align-items: end;
  padding-block: clamp(84px, 9.5vw, 168px);
}
.promise-l { grid-column: 1 / span 8; }
.promise-t {
  font-size: clamp(1.7rem, 3.6vw, 3.9rem);
  line-height: 1.1; font-weight: 500; font-stretch: 110%; letter-spacing: -.024em;
  text-wrap: balance;
}
.promise-t .w { transition: opacity .25s linear; }
.about { margin-top: clamp(1.6rem, 2.6vw, 2.8rem); max-width: 34em; color: var(--ink-soft); text-wrap: pretty; }
.custs { grid-column: 9 / span 4; }
.cust { color: var(--ink-soft); }
.inds { margin-top: .7rem; border-top: 1px solid var(--line); }
.inds li {
  padding: .62em 0; border-bottom: 1px solid var(--line);
  font-size: 1.22rem; font-weight: 520; font-stretch: 112%; letter-spacing: -.012em; line-height: 1.25;
}

/* ---------- contact ---------- */

.band {
  position: relative; overflow: hidden; border-radius: 22px;
  background: var(--ink); color: var(--porcelain);
  padding: clamp(36px, 6.4vw, 104px) clamp(26px, 5.6vw, 92px);
}
.band h2 {
  font-size: clamp(2.1rem, 4.4vw, 4.6rem); line-height: 1.04; font-weight: 580; font-stretch: 116%; letter-spacing: -.028em;
  position: relative; z-index: 1;
}
.mail {
  position: relative; z-index: 1; display: inline-block; margin-top: 1.1em;
  font-size: clamp(1.15rem, 2.3vw, 2.2rem); font-weight: 480; font-stretch: 108%; letter-spacing: -.012em; line-height: 1.3;
  color: var(--porcelain); text-decoration: underline; text-decoration-color: #6FB5AD; text-decoration-thickness: .07em; text-underline-offset: .28em;
  transition: text-decoration-color .2s;
  overflow-wrap: anywhere;
}
.mail:hover { text-decoration-color: var(--porcelain); }
.band :focus-visible { outline-color: #9AD3CB; }
.band p { position: relative; z-index: 1; margin-top: 1.5rem; color: #B5C9C5; }
.band-mark {
  position: absolute; right: clamp(-90px, -3vw, -20px); top: 50%; width: clamp(240px, 38vw, 620px); height: auto; aspect-ratio: 1;
  transform: translateY(-44%); color: #1F4441;
}
.band.unseen .mark-sq { opacity: 0; }
.band.seen .mark-sq { animation: stamp .7s .15s var(--ease) both; transform-box: fill-box; transform-origin: center; }

/* ---------- footer ---------- */

.foot { display: flex; align-items: center; justify-content: space-between; gap: 18px 28px; flex-wrap: wrap; padding-block: 34px 44px; }
.foot nav { display: flex; gap: 28px; flex-wrap: wrap; }
.foot nav a { font-size: 15.5px; color: var(--ink-soft); text-decoration: none; }
.foot nav a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: .25em; }

/* ---------- legal pages ---------- */

.legal { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; padding-block: clamp(28px, 5vw, 84px) clamp(64px, 8vw, 128px); }
.legal h1 { grid-column: 1 / span 4; font-size: clamp(2.2rem, 4vw, 4rem); overflow-wrap: anywhere; }
.legal-body { grid-column: 6 / span 6; max-width: 40em; padding-top: .6rem; }
.legal-body section { padding-block: 1.5rem; border-top: 1px solid var(--line); }
.legal-body section:first-child { padding-top: 0; border-top: 0; }
.legal-body h2 { font-size: 1.02rem; font-weight: 660; font-stretch: 108%; letter-spacing: -.005em; line-height: 1.35; margin-bottom: .5rem; }
.legal-body p { color: var(--ink-soft); }
.legal-body p + p { margin-top: .75rem; }
.legal-body > p { margin-top: 1.5rem; font-size: .92rem; }
.legal-body a { color: var(--ink); text-underline-offset: .22em; text-decoration-color: var(--verd); }

/* ---------- widths ---------- */

@container show (min-width: 1120px) {
  .legend { grid-template-columns: 30% 44.5% 1fr; gap: 0; padding: 1.5rem 0 0; }
  .legend li:first-child { padding-left: 10%; }
}

@media (max-width: 980px) {
  .hero-head, .promise, .legal { display: block; }
  .hero-lead { margin-top: 1.4rem; max-width: 36em; }
  .custs { margin-top: 2.6rem; max-width: 36em; }
  .legal-body { margin-top: 2rem; }
  .top-mail { display: none; }
}

@media (max-width: 600px) {
  body { font-size: 17px; }
  h1 { font-size: clamp(1.8rem, 8.6vw, 2.3rem); }
  .top { padding-block: 18px; }
  .brand { font-size: 18.5px; }
  .l-long { display: none; } .l-short { display: inline; }
  .lang a { padding: 5px 11px; }
  .stage { border-radius: 16px; margin-inline: calc(var(--gut) * -.4); }
  .scene { font-size: 14px; padding-inline: .9em; }
  .band { border-radius: 16px; }
  .band-mark { top: auto; bottom: -22%; transform: none; right: -70px; opacity: .8; }
  .band { padding-bottom: 120px; }
  .cta { font-size: 15.5px; }
  .foot { padding-block: 26px 36px; }
}

@media (max-width: 400px) {
  .cta { font-size: 14.5px; padding-inline: 1.1em; white-space: nowrap; }
}

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

@media print {
  body { background: #fff; }
  .stage, .legend, .lang, .cta, .skip { display: none; }
}
