/*
 * Olive Technologies — built on the Olive AI design system, Deep Black theme.
 * Instrument Serif for display, Instrument Sans for everything else.
 * The colors come from the olive and where it grows: brass from the toothpick, kalamata
 * plum, leaf green, the deep blue of the sea and the terracotta of the pots. The opening
 * screen stays bronze on black; below it each section takes one of them.
 */

:root {
  /* Deep Black grounds */
  --night: #0c0b0a;          /* the page */
  --night-raised: #171513;   /* cards and panels */
  --kalamata: #2a1727;       /* a band in the olive's skin */
  --plum-rich: #4a2a45;      /* the closing band: the brightest plum, white on it is 11:1 */
  --sea: #13262f;            /* a band in the deep blue of the sea */
  --terracotta: #3a1d16;     /* a band in the clay of the pots */
  /* ink and accents */
  --white: #f6f3ec;          /* text, 17.8:1 */
  --smoke: #a39c90;          /* second line, 6.7:1 */
  --brass: #c9a25a;          /* rules, labels, 7.6:1 */
  --brass-light: #e3c487;    /* highlights, hover */
  --sage: #b3bf7a;           /* leaf green on night, 10:1 */
  --plum: #d3a9c5;           /* kalamata on night, 9.6:1 */
  --sky: #a7cbd8;            /* sea, lit: on the blue grounds */
  --clay: #df9f80;           /* terracotta, lit */
  --silver: #d5d1c4;         /* the branch, where it runs over the services' band */
  --line: #2e2a25;           /* hairlines */

  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --dw: 400; /* display weight */
  --ws: 1;   /* wordmark size: wide typefaces need less */
  --radius-sm: 4px;
  --radius-md: 10px;
  --radius-pill: 9999px;
  --max: 1240px;
  --pad: 32px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; scrollbar-gutter: stable; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; overflow-x: clip;
  background: var(--night); color: var(--white);
  font: 400 17px/27px var(--sans);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--brass); }
a:hover { color: var(--brass-light); }
::selection { background: var(--brass); color: var(--night); }
h1, h2, h3 { font-family: var(--serif); font-weight: var(--dw, 400); margin: 0; letter-spacing: -.01em; }
p { margin: 0; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; background: var(--white); color: var(--night); border-radius: var(--radius-md); }
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--brass); outline-offset: 3px; border-radius: var(--radius-sm); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--pad); }

/* The label: 12px, +0.08em, brass. */
.label {
  display: flex; align-items: center; gap: 14px;
  font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--brass);
}

.sub { margin-top: 20px; max-width: 640px; font-size: 19px; line-height: 30px; color: var(--smoke); }

/* ---------------------------------------------------------------- buttons */

/* Primary: brass, the Deep Black canvas's brass CTA. Text sits in night at 7.6:1. */
.btn {
  --arrow: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 10'><path d='M0 5h14M10 1l4 4-4 4' fill='none' stroke='black' stroke-width='1.4'/></svg>");
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  min-height: 54px; padding: 0 24px 0 26px;
  border-radius: var(--radius-md); background: var(--brass); color: var(--night);
  font: 500 15px/1.2 var(--sans); letter-spacing: .01em; text-decoration: none; white-space: nowrap;
  transition: background .2s, color .2s;
}
.btn::after {
  content: ''; flex: none; width: 16px; height: 10px; background: currentColor;
  -webkit-mask: var(--arrow, none) center / contain no-repeat; mask: var(--arrow, none) center / contain no-repeat;
  transition: transform .3s var(--ease);
}
.btn:hover { background: var(--brass-light); color: var(--night); }
.btn:hover::after { transform: translateX(4px); }
.text-link { font-size: 16px; text-decoration: none; }

/* -------------------------------------------------------------------- nav */

.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: 72px; padding: 0 max(var(--pad), calc((100vw - var(--max)) / 2 + var(--pad)));
  display: flex; align-items: center; gap: 22px;
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s;
}
.nav.scrolled { background: rgba(12, 11, 10, .94); border-color: var(--line); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--white); margin-right: auto; }
.brand:hover { color: var(--white); }
.mark { display: block; width: 36px; height: 36px; flex: none; }
.wordmark { display: inline-block; font: var(--dw, 400) calc(26px * var(--ws, 1))/1 var(--serif); letter-spacing: -.005em; white-space: nowrap; }
.wordmark.sm { font-size: calc(22px * var(--ws, 1)); }
.footer .mark { width: 30px; height: 30px; }
@media (max-width: 420px) {
  .wordmark { font-size: calc(21px * var(--ws, 1)); }
  .mark { width: 32px; height: 32px; }
}

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

.hero { position: relative; height: 100vh; height: 100svh; min-height: 520px; overflow: hidden; }
.ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; margin-top: 44px; }

/* The lockup: the name and the three offerings beneath, centered under the sprays. No
   olive here: the curtain has just shown it, and it now sits in the top middle. */
.lockup { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.lockup-in {
  --name: calc(clamp(46px, 8vw, 150px) * var(--ws, 1));
  position: absolute; left: 0; right: 0; top: calc(52% - var(--name) / 2); /* the name's center just below halfway, under the sprays */
  display: flex; flex-direction: column; align-items: center;
}
@media (max-aspect-ratio: 10/11) { .lockup-in { top: calc(44% - var(--name) / 2); } }
.lk-word { font: var(--dw, 400) var(--name)/1 var(--serif); letter-spacing: -.01em; color: var(--white); white-space: nowrap; }
.lk-word > span { display: inline-block; animation: fadeIn 1.1s .3s ease both; }
.lk-off { margin-top: 30px; }
.offerings {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 44px;
  font: 600 13px/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--brass-light);
  animation: fadeIn 1.1s .6s ease both;
}
@media (max-width: 560px) { .offerings { flex-direction: column; gap: 14px; } }

/* Docking (js/main.js): the lockup is pinned to the screen, and scrolling pulls the
   name onto the nav's own copy, which stays hidden underneath. */
.docking .lockup { position: fixed; z-index: 60; }
.docking .lk-word { transform-origin: 0 0; will-change: transform; }
.docking .lk-off { will-change: transform, opacity; }
.docking .nav .brand .wordmark { visibility: hidden; }

/* A quiet cue that there is more below: a hairline with light running down it. */
.scroll-cue {
  position: absolute; left: 50%; bottom: 28px; width: 1px; height: 56px; margin-left: -.5px;
  background: rgba(201, 162, 90, .25); overflow: hidden;
}
.scroll-cue::after {
  content: ''; position: absolute; left: 0; top: 0; width: 1px; height: 40%; background: var(--brass-light);
  transform: translateY(-100%); animation: cue 2.4s cubic-bezier(.6, 0, .4, 1) 4s infinite;
}
@keyframes cue { to { transform: translateY(250%); } } /* moved, not re-laid-out, each frame */

/* ------------------------------------------------------------ the branch */
/* Monochrome: bronze on black. Leaves are outlined and faintly filled, like gilding. */

.branch { position: absolute; inset: 0; display: block; width: 100%; height: 100%; max-width: none; }
.branch .stem { fill: var(--brass); }
.branch .twig { fill: var(--brass); fill-opacity: .9; }
.branch .blade { fill: var(--brass); fill-opacity: var(--f, .18); stroke: var(--brass); stroke-width: .75; stroke-linejoin: round; }
.branch .rib { fill: none; stroke: var(--brass); stroke-width: .55; stroke-opacity: .5; stroke-linecap: round; }
.branch .glint {
  fill: none; stroke: #f3dca4; stroke-linecap: round;
  stroke-dasharray: .03 1.4; stroke-dashoffset: .03;
  animation: glint 7s cubic-bezier(.45, .05, .55, .95) infinite;
}
@keyframes glint { 0% { stroke-dashoffset: .03; } 55%, 100% { stroke-dashoffset: -1.02; } }

/* growth, once, as the curtain parts */
.branch .g-draw { stroke-dasharray: 1 1; animation: draw linear both; }
@keyframes draw { from { stroke-dashoffset: 1; opacity: 0; } 1% { opacity: 1; } to { stroke-dashoffset: 0; opacity: 1; } }
.branch .g-leaf { transform-box: fill-box; transform-origin: 0 50%; animation: unfurl .9s cubic-bezier(.2, .75, .25, 1) both; }
@keyframes unfurl { from { transform: scale(.05, .2) rotate(-10deg); opacity: 0; } 40% { opacity: 1; } to { transform: none; opacity: 1; } }
.branch .g-fill { animation: fadeIn ease-out both; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.branch.grown .g-draw, .branch.grown .g-leaf, .branch.grown .g-fill { animation: none; }

/* afterwards, it breathes */
.branch .sway { animation: sway var(--dur, 6s) ease-in-out var(--del, 0s) infinite alternate; }
@keyframes sway { from { transform: rotate(calc(-1 * var(--a, 1deg))); } to { transform: rotate(var(--a, 1deg)); } }

/* The branch over the services: it forks off the opening screen's right spray as you
   scroll and grows down the side and across the top of the services, in the same bronze.
   It follows the scroll (js/branch.js): each leaf and twig unfurls as the stem reaches
   it, and folds away again if you scroll back up. */
.grove { position: relative; }
.vine { pointer-events: none; }
.vine .g-leaf, .vine .g-fill { animation: none; opacity: 0; transition: opacity .6s ease; }
.vine .g-leaf { transform: scale(.05, .2) rotate(-10deg); transition: transform .9s cubic-bezier(.2, .75, .25, 1), opacity .5s ease; }
.vine .on { opacity: 1; transform: none; }
.vine .v-stem { fill: none; stroke: url(#vine-ink) var(--brass); stroke-linecap: round; }
.grove > .vine { z-index: 1; } /* over the services' band, under its words */
/* Bronze over the dark, silver over the services' band, blending across its edge: the
   stem by a gradient, each leaf by the color js/branch.js gives it for where it sits. */
.vine .ink-above { stop-color: var(--brass); }
.vine .ink-below { stop-color: var(--silver); }
.vine .blade { fill: var(--ink, var(--brass)); stroke: var(--ink, var(--brass)); }
.vine .rib { stroke: var(--ink, var(--brass)); }
@media (max-width: 900px) { .vine { display: none; } }

/* off screen, the endless motion rests (js/branch.js) */
.branch.idle * { animation-play-state: paused !important; }

@media (prefers-reduced-motion: reduce) {
  .branch *, .scroll-cue::after { animation: none !important; }
}

/* --------------------------------------------------------------- sections */
/* Everything below the opening screen is a stage: one centered idea with room around
   it. Bands of color separate them; there are no rules or cards. */

.section { position: relative; padding: clamp(128px, 18vh, 200px) 0; }
.stage { text-align: center; }
.stage .label { justify-content: center; }
.stage-head h2 {
  margin: 22px auto 0; max-width: 16ch; text-wrap: balance;
  font-size: calc(clamp(40px, 5.8vw, 88px) * var(--ws, 1)); line-height: 1.02; letter-spacing: -.02em;
}
.stage-head .sub { margin: 24px auto 0; max-width: 34em; text-wrap: balance; }
.phrase { display: inline-block; } /* a headline's sentences break between, not within */

/* bands: each redefines the muted ink and hairlines to suit its ground */
.band-kalamata { background: var(--kalamata); --smoke: #c3adbc; --line: rgba(246, 243, 236, .12); }
.band-terracotta { background: var(--terracotta); --smoke: #d9bfb3; }
.band-terracotta .label { color: var(--clay); }
.band-sea { background: var(--sea); --smoke: #b5c8cf; }
.band-sea .label { color: var(--sky); }

/* What was built for a client, as a list: each a line at display size with a small check
   in the band's blue, arriving one after another, a hairline between. */
.built { list-style: none; max-width: 760px; margin: 18px auto 0; padding: 0; }
.built li {
  padding: clamp(8px, 1.4vh, 14px) 0; border-top: 1px solid rgba(246, 243, 236, .1);
  font: var(--dw, 400) calc(clamp(30px, 3.4vw, 50px) * var(--ws, 1))/1.12 var(--serif); letter-spacing: -.02em; text-wrap: balance;
}
.built li:first-child { border-top: 0; }
.built li::before {
  content: ''; display: inline-block; width: .42em; height: .42em; margin-right: .38em; vertical-align: .06em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M3.5 10.5l4.2 4.2L16.5 5.5' fill='none' stroke='%23a7cbd8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.js .built li { opacity: 0; transform: translateY(12px); transition: opacity .8s var(--ease), transform .9s var(--ease); }
.js .reveal.in .built li { opacity: 1; transform: none; }
.reveal.in .built li:nth-child(2) { transition-delay: .15s; }
.reveal.in .built li:nth-child(3) { transition-delay: .3s; }
.reveal.in .built li:nth-child(4) { transition-delay: .45s; }
.reveal.in .built li:nth-child(5) { transition-delay: .6s; }

/* A shooting star, once across the results band a moment after it comes into view: a
   faint streak in the band's own blue, high in the empty space above the words, crossing
   almost level from right to left, lengthening as it goes, then gone. js/main.js sets
   it off. */
#results { overflow: hidden; }
#results .wrap { position: relative; z-index: 1; }
.sky { position: absolute; z-index: 0; top: clamp(40px, 6%, 80px); left: 92%; width: 0; height: 0; transform: rotate(173deg); pointer-events: none; }
.star {
  position: absolute; right: 0; top: -.75px; width: 190px; height: 1.5px; border-radius: 1px; opacity: 0;
  background: linear-gradient(90deg, rgba(198, 222, 231, 0), rgba(198, 222, 231, .55) 70%, rgba(234, 243, 246, .95));
  transform-origin: right center;
}
.star::after { /* its head */
  content: ''; position: absolute; right: -1.5px; top: 50%; width: 3px; height: 3px; margin-top: -1.5px; border-radius: 50%;
  background: #fff; box-shadow: 0 0 6px 1px rgba(219, 234, 240, .8), 0 0 14px 3px rgba(167, 203, 216, .35);
}
.sky.shoot .star { animation: shoot 2.2s cubic-bezier(.35, .1, .35, 1) forwards; }
@keyframes shoot {
  0% { transform: translateX(0) scaleX(.15); opacity: 0; }
  10% { opacity: .95; }
  72% { opacity: .85; }
  100% { transform: translateX(80vw) scaleX(1); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .sky { display: none; } }
.band-plum { background: var(--plum-rich); --smoke: #d6c3d0; }

.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform 1s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* ------------------------------------------------------------ what we do */
/* A band of its own, from where the opening screen ends: the branch comes down into it
   and runs across its top, and the three services sit in rows well clear beneath. */
.services {
  padding: clamp(190px, 22vh, 240px) 0 clamp(150px, 18vh, 200px); overflow: hidden;
}
.services .wrap { position: relative; z-index: 1; }

/* A label, the line at display size, and one short sentence under it. They arrive
   one after another. */
.tenets { list-style: none; margin: 0; padding: 0; }
.tenet + .tenet { margin-top: clamp(44px, 7vh, 80px); }
.tenet .label { justify-content: center; }
.tenet .line {
  max-width: 22ch; margin: 16px auto 0; text-wrap: balance;
  font: var(--dw, 400) calc(clamp(34px, 4.6vw, 68px) * var(--ws, 1))/1.04 var(--serif); letter-spacing: -.02em;
}
.tenet .more { max-width: 34em; margin: 14px auto 0; text-wrap: balance; font-size: clamp(16px, 1.4vw, 19px); line-height: 1.5; color: var(--smoke); }
.tenet:nth-child(2) { transition-delay: .25s; }
.tenet:nth-child(3) { transition-delay: .5s; }

/* Under the branch, a heading of its own like the other bands, then the three services
   with their solid brass marks together in the middle as a triangle, Software at the top
   and the other two at its foot, and each one's words on the outside of its mark: above
   it, to its left, to its right. No numbers, rules or boxes. One accent on the band,
   brass, against the silver branch. */
.services .stage-head h2 { max-width: 22ch; font-size: calc(clamp(36px, 4.4vw, 64px) * var(--ws, 1)); }
/* The heading as one line along a gentle arch, across the width of the band. Its words
   stay readable to screen readers (and on phones, where the arch would be too small to
   read, they're shown plainly instead). */
.services .stage-head .arc-head { max-width: none; }
.arc-head svg { display: block; width: min(100%, 1120px); height: auto; margin: 4px auto 0; overflow: visible; }
.arc-head text { font-family: var(--serif); font-weight: var(--dw, 400); font-size: calc(80px * var(--ws, 1)); letter-spacing: -.015em; fill: var(--white); }
.arc-head .flat { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.services .tenets {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start;
  column-gap: clamp(56px, 5vw, 76px); row-gap: clamp(26px, 3.4vh, 40px);
  max-width: 1120px; margin: clamp(32px, 5vh, 64px) auto 0;
}
.services .tenet + .tenet { margin-top: 0; }
.services .tenet .label { justify-content: inherit; margin: 0; }
.services .tenet .line { max-width: 14ch; margin: 10px 0 0; font-size: calc(clamp(30px, 2.6vw, 40px) * var(--ws, 1)); line-height: 1.08; }
.services .tenet .more { max-width: 21em; margin: 14px 0 0; font-size: 17px; line-height: 1.6; }
.services .icon { width: clamp(88px, 8.6vw, 124px); color: var(--brass); filter: drop-shadow(0 10px 28px rgba(201, 162, 90, .26)); }
.services .icon .glyph { margin: 0; }
/* the top point: its words above it, centered */
.services .tenet:nth-child(1) { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.services .tenet:nth-child(1) .line, .services .tenet:nth-child(1) .more { margin-left: auto; margin-right: auto; }
.services .tenet:nth-child(1) .icon { order: 1; margin-top: clamp(26px, 4vh, 40px); }
/* the foot: each mark at the inner side of its half, its words outside it */
.services .tenet:nth-child(2), .services .tenet:nth-child(3) { display: grid; column-gap: clamp(22px, 2.4vw, 32px); }
.services .tenet:nth-child(2) { justify-self: end; grid-template-columns: minmax(0, 1fr) auto; justify-content: end; text-align: right; }
.services .tenet:nth-child(2) > :not(.icon) { grid-column: 1; justify-self: end; }
.services .tenet:nth-child(3) { justify-self: start; grid-template-columns: auto minmax(0, 1fr); text-align: left; }
.services .tenet:nth-child(3) > :not(.icon) { grid-column: 2; justify-self: start; }
.services .tenet:nth-child(2) .icon { grid-column: 2; grid-row: 1 / span 3; }
.services .tenet:nth-child(3) .icon { grid-column: 1; grid-row: 1 / span 3; }
.services .tenet:nth-child(2) .label { justify-content: flex-end; }
.services .tenet:nth-child(3) .label { justify-content: flex-start; }

.icon { width: 64px; }
.icon .glyph { width: 100%; margin: -15% 0 -14%; } /* the drawings leave a margin in their box */

/* Without the branch (narrow screens), they simply stack, each mark beside its words. */
@media (max-width: 900px) {
  .services { padding: 112px 0 120px; }
  .arc-head svg { display: none; }
  .arc-head .flat { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
  .services .tenets { display: block; }
  .services .tenet:nth-child(n) {
    display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 20px; text-align: left;
  }
  .services .tenet:nth-child(n) + .tenet { margin-top: 56px; }
  .services .tenet:nth-child(n) > :not(.icon) { grid-column: 2; justify-self: start; margin-left: 0; margin-right: 0; }
  .services .tenet:nth-child(n) .icon { grid-column: 1; grid-row: 1 / span 3; order: 0; margin-top: 0; width: 56px; }
  .services .tenet:nth-child(n) .label { justify-content: flex-start; }
}

/* The drawings: fine line work in their service's color, held still. */
.glyph {
  display: block; height: auto; overflow: visible;
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.glyph .dot { fill: currentColor; stroke: none; }
.glyph .fill { fill: currentColor; fill-opacity: .22; } /* an olive's body, lightly filled */
.glyph .thin, .glyph .g-ray { stroke-width: 1.1; }

/* ------------------------------------------------------------- the math */
/* Two calculators, each a soft, quiet panel made like a good desk calculator: a recessed
   display showing the working, the answer and two figures from it, then three values,
   each with its own keys and a slider. Brass for the cost, sky for what's gained.
   Everything moves smoothly and nothing glows: crafted, rather than a machine. */
#cost {
  padding: clamp(120px, 16vh, 180px) 0 clamp(110px, 15vh, 170px);
  background: radial-gradient(ellipse 75% 65% at 50% 42%, #1e1a17, #12100e 72%);
}

/* The two share rows, so their rings, figures and sliders line up across the page even
   when one title runs to two lines. */
.calcs {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: repeat(4, auto);
  gap: 0 clamp(24px, 3.4vw, 48px); max-width: 1080px; margin: 0 auto; perspective: 2400px;
}
.calc {
  position: relative; transform-style: preserve-3d;
  display: grid; grid-row: span 4; grid-template-rows: subgrid; justify-items: center;
  padding: clamp(24px, 3.4vh, 40px) clamp(24px, 3vw, 48px) clamp(20px, 2.8vh, 32px);
  border-radius: 28px; border: 1px solid rgba(246, 243, 236, .06);
  background: linear-gradient(180deg, #231e1b, #1a1614);
  box-shadow: inset 0 1px 0 rgba(246, 243, 236, .05), 0 40px 80px -30px rgba(0, 0, 0, .7);
  --hue: var(--brass); --halo: rgba(201, 162, 90, .2); --fade: rgba(201, 162, 90, .35);
}
.calc + .calc { transition-delay: .15s; --hue: var(--sky); --halo: rgba(167, 203, 216, .2); --fade: rgba(167, 203, 216, .35); }
.calc h3 {
  align-self: center; max-width: 16ch; text-align: center; text-wrap: balance;
  font-size: calc(clamp(26px, min(2.6vw, 4.4vh), 38px) * var(--ws, 1)); line-height: 1.08; letter-spacing: -.015em;
}

/* The display: set into the panel, with the working on top, the answer right-aligned
   in large figures as on a calculator, and two figures from it along the bottom. */
.display {
  width: 100%; max-width: 400px; margin-top: clamp(16px, 2.6vh, 26px); padding: 14px 20px 12px;
  border-radius: 16px; background: linear-gradient(180deg, #13100e, #181412); text-align: right;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, .65), inset 0 0 0 1px rgba(246, 243, 236, .05), 0 1px 0 rgba(246, 243, 236, .05);
}
.d-eq { min-height: 18px; font-size: 13px; line-height: 18px; letter-spacing: .02em; color: var(--smoke); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-res { display: flex; align-items: baseline; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.d-op { font: 400 24px/1 var(--sans); color: var(--hue); }
.d-big {
  font: var(--dw, 400) calc(clamp(42px, 6.4vh, 60px) * min(1, 8 / var(--len, 8)) * var(--ws, 1))/1 var(--serif); letter-spacing: -.02em;
  color: var(--white); font-variant-numeric: tabular-nums; white-space: nowrap; transition: color .3s ease;
}
.d-unit { font-size: 13px; color: var(--smoke); white-space: nowrap; }
.d-sub {
  display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; padding-top: 10px;
  border-top: 1px solid rgba(246, 243, 236, .07); font-size: 12.5px; line-height: 16px; color: var(--smoke);
}
.d-sub b { font-weight: 500; color: var(--white); font-variant-numeric: tabular-nums; }
.d-sub { flex-wrap: wrap; row-gap: 4px; }
.d-sub span { white-space: nowrap; } /* each figure kept whole; the second drops a line when there's no room */

/* Each slider: its name and value, then a thin track filling in color right up to its
   knob, a pearl with a fine ring and a dot in the middle of its color. The sliders glide
   (the values round as they go), and the fill keeps exact pace with the knob. While one
   is held, its value and the answer in the ring take its color, and the value swells a
   little, so it's plain what's changing. */
.sliders { width: 100%; max-width: 400px; margin-top: clamp(16px, 2.8vh, 32px); }
/* the name on its own line; beneath it the slider, with the value between its keys */
.ctl { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 16px; row-gap: 4px; text-align: left; }
.ctl .ctl-top { display: contents; }
.ctl-top label { grid-column: 1 / -1; }
.ctl .stepper { grid-column: 2; grid-row: 2; }
.ctl .ctl-bar { grid-column: 1; grid-row: 2; margin-top: 0; }
.ctl + .ctl { margin-top: clamp(12px, 2vh, 20px); }
.ctl-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 14px; line-height: 18px; color: var(--smoke); }
.ctl-top label { cursor: pointer; }
/* each value between its keys: round, slightly raised, pressing down when pressed */
.stepper { flex: none; display: inline-flex; align-items: center; gap: 10px; }
.key {
  display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border-radius: 50%;
  border: 1px solid rgba(246, 243, 236, .12); background: linear-gradient(180deg, #2c2622, #201b18);
  box-shadow: inset 0 1px 0 rgba(246, 243, 236, .07), 0 2px 4px rgba(0, 0, 0, .4);
  font: 400 17px/1 var(--sans); color: var(--white); cursor: pointer; user-select: none; -webkit-user-select: none;
  transition: border-color .2s ease, transform .08s ease, box-shadow .08s ease;
}
.key:hover, .key:focus-visible { border-color: var(--fade); outline: none; }
.key:active { transform: translateY(1px); box-shadow: inset 0 2px 4px rgba(0, 0, 0, .5); }
.stepper output { min-width: 3.4ch; text-align: center; }
.ctl-top output {
  flex: none; transform-origin: 50% 70%; transition: color .25s ease, transform .25s var(--ease);
  font: var(--dw, 400) calc(clamp(20px, 2.8vh, 24px) * var(--ws, 1))/1 var(--serif); color: var(--white); white-space: nowrap; font-variant-numeric: tabular-nums;
}
.ctl:has(input:active) output, .ctl:has(input:focus-visible) output, .ctl:has(.key:active) output { color: var(--hue); transform: scale(1.14); }
.calc:has(.ctl input:active) .d-big, .calc:has(.key:active) .d-big { color: var(--hue); }
.ctl-bar { position: relative; display: block; height: 28px; margin-top: 6px; --f: .5; }
.ctl-bar::before, .ctl-bar::after {
  content: ''; position: absolute; left: 0; top: 50%; height: 4px; margin-top: -2px; border-radius: 2px; pointer-events: none;
}
.ctl-bar::before { right: 0; background: rgba(246, 243, 236, .1); }
.ctl-bar::after { width: calc(12px + (100% - 24px) * var(--f)); background: linear-gradient(90deg, var(--fade), var(--hue)); }
.ctl input[type="range"] {
  position: relative; z-index: 1; display: block; width: 100%; height: 28px; margin: 0;
  -webkit-appearance: none; appearance: none; background: transparent; cursor: grab;
}
.ctl input[type="range"]:active { cursor: grabbing; }
.ctl input[type="range"]::-webkit-slider-runnable-track { height: 28px; background: transparent; }
.ctl input[type="range"]::-moz-range-track { height: 28px; background: transparent; }
.ctl input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 24px; height: 24px; margin-top: 2px; border-radius: 50%;
  background: radial-gradient(circle, var(--hue) 0 3px, transparent 3.6px), radial-gradient(circle at 36% 28%, #fffdf8, #ede7db 55%, #cfc8ba);
  box-shadow: 0 0 0 1.5px var(--fade), 0 3px 8px rgba(0, 0, 0, .45), 0 0 0 0 var(--halo);
  transition: box-shadow .25s ease, transform .2s var(--ease);
}
.ctl input[type="range"]::-moz-range-thumb {
  width: 24px; height: 24px; border: 0; border-radius: 50%;
  background: radial-gradient(circle, var(--hue) 0 3px, transparent 3.6px), radial-gradient(circle at 36% 28%, #fffdf8, #ede7db 55%, #cfc8ba);
  box-shadow: 0 0 0 1.5px var(--fade), 0 3px 8px rgba(0, 0, 0, .45), 0 0 0 0 var(--halo);
  transition: box-shadow .25s ease, transform .2s var(--ease);
}
.ctl input[type="range"]:hover::-webkit-slider-thumb, .ctl input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 1.5px var(--hue), 0 3px 8px rgba(0, 0, 0, .45), 0 0 0 7px var(--halo); }
.ctl input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.12); box-shadow: 0 0 0 1.5px var(--hue), 0 4px 10px rgba(0, 0, 0, .5), 0 0 0 9px var(--halo); }
.ctl input[type="range"]:hover::-moz-range-thumb, .ctl input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 1.5px var(--hue), 0 3px 8px rgba(0, 0, 0, .45), 0 0 0 7px var(--halo); }
.ctl input[type="range"]:active::-moz-range-thumb { transform: scale(1.12); box-shadow: 0 0 0 1.5px var(--hue), 0 4px 10px rgba(0, 0, 0, .5), 0 0 0 9px var(--halo); }
.ctl input[type="range"]:focus { outline: none; }

.calc-foot { display: flex; flex-direction: column; align-items: center; }
.fine { margin-top: clamp(12px, 2vh, 22px); max-width: 30em; font-size: 12.5px; line-height: 17px; color: var(--smoke); text-wrap: balance; text-align: center; }
.fine b { font-weight: 500; color: var(--white); }

/* Turning a card over: it turns about its upright, its face hidden as it goes, to its
   back, which says what its number looks like in practice; the same button there turns
   it back. js/main.js keeps the hidden side out of reach of the keyboard. */
.flip {
  display: inline-flex; align-items: center; gap: 8px; margin-top: clamp(10px, 1.6vh, 16px); padding: 9px 16px 9px 13px;
  border: 1px solid rgba(246, 243, 236, .14); border-radius: var(--radius-pill); background: rgba(246, 243, 236, .03);
  font: 500 13px/1 var(--sans); color: var(--white); cursor: pointer; transition: border-color .25s ease, background .25s ease;
}
.flip:hover, .flip:focus-visible { border-color: var(--hue); background: rgba(246, 243, 236, .06); outline: none; }
.flip svg { width: 14px; height: 14px; fill: none; stroke: var(--hue); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.js .calc.reveal.in.flipped { transform: rotateY(180deg); }
.calc > :not(.calc-back) { -webkit-backface-visibility: hidden; backface-visibility: hidden; }
/* Hiding the backface isn't enough on its own: Safari draws a slider's knob on a layer of
   its own and shows it through the back. So each side is also hidden outright as the card
   passes edge-on, which, with the card's easing, is about an eighth of a second in. */
.calc > :not(.calc-back), .calc-back { transition: visibility 0s linear .13s; }
.calc.flipped > :not(.calc-back) { visibility: hidden; }
.calc:not(.flipped) .calc-back { visibility: hidden; }
.calc-back {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: clamp(24px, 3.4vh, 40px) clamp(24px, 3vw, 48px) clamp(20px, 2.8vh, 32px);
  border-radius: 28px; background: linear-gradient(180deg, #231e1b, #1a1614);
  transform: rotateY(180deg); -webkit-backface-visibility: hidden; backface-visibility: hidden;
}
.calc-back .label { margin-top: auto; color: var(--hue); } /* with the button's auto margin, centers what's between */
.calc-back h3 { margin-top: 14px; }
.eg { list-style: none; width: 100%; max-width: 400px; margin: clamp(18px, 3vh, 32px) 0 0; padding: 0; text-align: left; }
.eg li { display: grid; gap: 4px; padding: clamp(12px, 2vh, 18px) 0; border-top: 1px solid rgba(246, 243, 236, .08); }
.eg li:last-child { border-bottom: 1px solid rgba(246, 243, 236, .08); }
.eg b { font: var(--dw, 400) calc(clamp(19px, 2.6vh, 22px) * var(--ws, 1))/1.2 var(--serif); color: var(--white); }
.eg span { font-size: 14px; line-height: 1.5; color: var(--smoke); }
.eg-note { margin-top: clamp(14px, 2.4vh, 22px); max-width: 26em; font-size: 13px; line-height: 1.5; color: var(--smoke); text-wrap: balance; }
.calc-back .flip { margin-top: auto; }

@media (max-width: 900px) {
  .calcs { grid-template-columns: 1fr; grid-template-rows: none; row-gap: 32px; max-width: 520px; }
  .calc { display: flex; flex-direction: column; align-items: center; }
  .calc + .calc { transition-delay: 0s; }
  /* the back has the front's height to fill, and narrow lines run longer: set it closer */
  .calc-back { padding: 22px 22px 18px; }
  .calc-back h3 { margin-top: 8px; font-size: calc(26px * var(--ws, 1)); }
  .eg { margin-top: 12px; }
  .eg li { gap: 2px; padding: 9px 0; }
  .eg b { font-size: calc(17px * var(--ws, 1)); }
  .eg span { font-size: 13px; line-height: 1.4; }
  .eg-note { margin-top: 10px; font-size: 12.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .d-big, .ctl-top output { transition: none; }
}

/* ----------------------------------------------------------- how it runs */
/* Three stops on one brass line, drawn across as it arrives. */

.steps {
  position: relative; list-style: none; margin: clamp(56px, 9vh, 96px) auto 0; padding: 0; max-width: 1080px;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
}
.steps::before { /* the line, from the first stop to the last */
  content: ''; position: absolute; left: 16.667%; right: 16.667%; top: 0; height: 1px; background: var(--brass);
  transform-origin: left; transition: transform 1.4s var(--ease) .2s;
}
.js .steps::before { transform: scaleX(0); }
.js .steps.in::before { transform: none; }
.steps li { position: relative; padding: 40px 24px 0; }
.steps li::before {
  content: ''; position: absolute; top: -6px; left: 50%; width: 11px; height: 11px; margin-left: -5.5px;
  border-radius: var(--radius-pill); background: var(--brass);
  transition: transform .5s cubic-bezier(.34, 1.56, .64, 1);
}
.js .steps li::before { transform: scale(0); }
.js .steps.in li::before { transform: none; }
.steps.in li:nth-child(1)::before { transition-delay: .3s; }
.steps.in li:nth-child(2)::before { transition-delay: .8s; }
.steps.in li:nth-child(3)::before { transition-delay: 1.3s; }
.steps .label { justify-content: center; }
.steps h3 { margin-top: 14px; font-size: calc(36px * var(--ws, 1)); line-height: 1.1; }
.steps li > p:not(.label) { margin: 12px auto 0; max-width: 17em; font-size: 16px; line-height: 26px; color: var(--smoke); text-wrap: balance; }
@media (prefers-reduced-motion: reduce) { .steps::before, .steps li::before { transform: none !important; transition: none !important; } }
@media (max-width: 800px) {
  .steps { grid-template-columns: 1fr; gap: 48px; }
  .steps::before { display: none; }
  .steps li { padding: 28px 0 0; }
}

/* --------------------------------------------------------------- results */

.worked-with { margin-top: clamp(96px, 14vh, 160px); }
.logos {
  display: flex; justify-content: center; align-items: center; gap: clamp(32px, 6vw, 80px);
  list-style: none; margin: 32px 0 0; padding: 0;
}
@media (max-width: 560px) { .logos img { height: calc(var(--h, 32px) * .7); } .logo-name { font-size: 22px; } }
/* All in one cream tone so the row reads as a set; each shows its own colors on hover. */
.logos img {
  display: block; height: var(--h, 32px); width: auto; max-width: 200px;
  filter: brightness(0) invert(.95) sepia(.14); opacity: .78; transition: filter .35s, opacity .35s;
}
.logos li:hover img { filter: none; opacity: 1; }
/* Shown in a slot whose logo file is not in assets/logos/ yet. */
.logo-name { font: var(--dw, 400) 30px/1 var(--serif); color: var(--smoke); white-space: nowrap; }

/* --------------------------------------------------------------- contact */
/* The last band is the richest plum, with the brass button as the brightest thing on it. */

.contact { padding: clamp(150px, 22vh, 240px) 0; }
.contact h2 { max-width: 14ch; font-size: calc(clamp(46px, 7vw, 108px) * var(--ws, 1)); line-height: .98; }
.contact .ctas { justify-content: center; }
.band-plum .text-link { color: var(--white); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.band-plum .text-link:hover { color: var(--brass-light); }

/* Calendly's booking window (js/main.js), over the page dimmed in the site's own black. */
body > .calendly-overlay { background: rgba(12, 11, 10, .84); }
body .calendly-overlay .calendly-popup { border-radius: 20px; overflow: hidden; }

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

.foot { display: flex; flex-direction: column; align-items: center; gap: 22px; padding-top: 56px; padding-bottom: 48px; text-align: center; }
.foot .brand { margin-right: 0; }
.foot nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 32px; }
.foot nav a, .foot p { font-size: 14px; color: var(--smoke); text-decoration: none; }
.foot nav a:hover { color: var(--white); }

/* ---------------------------------------------------------------- curtain */
/* A figurative curtain: one flat panel, cut open along the olive's toothpick.
   A brass line grows out of the mark at 20°, then the two halves glide apart,
   each carrying a brass edge. Only transform and opacity animate, so the whole
   thing runs on the compositor and stays smooth. */

.curtain { display: none; }
.js .curtain {
  display: block; position: fixed; inset: 0; z-index: 200; overflow: hidden;
  --k: 18.2vh; /* tan(20°) × half the viewport height: where the cut meets the top and bottom */
}
.curtain-gone .curtain { display: none; }
.curtain-open .curtain { pointer-events: none; }
html.intro { overflow: hidden; }
.intro .hero * { animation-play-state: paused; }

.panel {
  position: absolute; inset: 0; background: var(--night-raised);
  will-change: transform; transform: translate3d(0, 0, 0);
}
.panel.left { clip-path: polygon(0 0, calc(50% + var(--k) + 1px) 0, calc(50% - var(--k) + 1px) 100%, 0 100%); }
.panel.right { clip-path: polygon(calc(50% + var(--k) - 1px) 0, 100% 0, 100% 100%, calc(50% - var(--k) - 1px) 100%); }

/* The cut. Each panel holds a copy, clipped to its own side, so the line splits in two as they part. */
.edge {
  position: absolute; left: 50%; top: 50%;
  width: 2px; height: 108vh; margin: -54vh 0 0 -1px;
  background: var(--brass);
  transform: rotate(20deg) scaleY(0);
  animation: cut .85s .45s cubic-bezier(.65, 0, .35, 1) forwards;
}
@keyframes cut { to { transform: rotate(20deg) scaleY(1); } }

/* Opening: the two halves glide apart along the cut, each carrying its brass edge. */
.curtain-open .edge { animation: none; transform: rotate(20deg); }
.curtain-open .panel.left { transform: translate3d(calc(-50vw - var(--k) - 8px), 0, 0); transition: transform 1.45s cubic-bezier(.76, 0, .24, 1) .1s; }
.curtain-open .panel.right { transform: translate3d(calc(50vw + var(--k) + 8px), 0, 0); transition: transform 1.45s cubic-bezier(.76, 0, .24, 1) .1s; }

/* The olive. At rest it sits in the top middle, its center on the nav's center line.
   During the intro it is scaled up and dropped to the middle of the screen, where the
   cut runs straight through its toothpick; when the curtain opens it rises into place. */
.emblem {
  position: fixed; z-index: 210; left: 50%; top: 36px;
  width: 40px; height: 40px; margin: -22px 0 0 -20px; /* the olive's center is at (20, 22) */
  transform-origin: 20px 22px;
  transition: transform 1.35s cubic-bezier(.65, 0, .25, 1) .15s;
}
.emblem img { display: block; width: 100%; height: 100%; }
html.intro .emblem {
  transform: translate3d(0, calc(var(--half, 50vh) - 36px), 0) scale(2.4);
  transition: none; animation: fadeIn .8s .05s ease both;
}

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