/* ==========================================================================
   nyteshift: light to dark — pass 6, the pulse brings it to life
   Layered after pass5.css. Nothing is lit until the pulse reaches it: with
   the script running (and motion allowed), html.dormant keeps each thing
   absent until main.js switches it on with .is-on, and an .is-now part was
   switched on at once (a link, a deep link, focus), without playing.
   With no script, or with reduced motion, nothing here hides anything.

   The coming-to-life language, one system:
   - the sweep (.comet): the light running out from the wire under the thing;
   - words rise into place in its wake, lit sodium (.w__heat), and cool;
   - lamps (the buttons', a step's number) strike with a flicker, like the sign;
   - a flare marks the moment of contact where it matters.
   Everything that moves is transform or opacity.
   ========================================================================== */

:root {
  --shell: 1840px;             /* one width for every section, so every left edge (and the wire's margin) agrees */
  --nav-h: 76px;               /* the strip the floating nav keeps clear */
  /* the wire on paper is the logo's own sodium now (Del: the copper didn't match) */
  --wire-day: #E2DDD1;
  --wire-day-lit: var(--sodium);
  /* the headline and the big headings */
  --hl: clamp(2.6rem, min(7.85vw, 15vh), 10rem);
  --display: clamp(3.6rem, min(12.4vw, 20vh), 12.5rem);
}

/* ==========================================================================
   COMING TO LIFE
   ========================================================================== */
.life .w { position: relative; display: inline-block; }
.w__heat {
  position: absolute; left: 0; top: 0; pointer-events: none; white-space: nowrap;
  -webkit-user-select: none; user-select: none; opacity: 0; visibility: hidden; color: var(--sodium);
}
/* (a tight glow: a wide blurred shadow is costly to re-draw in Firefox's and WebKit's software paths) */
.world--carbon .w__heat { text-shadow: 0 0 .05em rgba(255, 179, 92, .75); }
/* (a paragraph's glow stays small: it is rasterised once per word as it lights) */

.world--paper .w__heat { text-shadow: none; }

html.dormant .life .w {
  opacity: 0; transform: translateY(.32em);
  transition: opacity .2s ease, transform .3s ease;
}
html.dormant .life .w.is-on {
  opacity: 1; transform: none;
  transition: opacity .5s var(--e-out) var(--d, 0ms), transform .95s var(--e-out) var(--d, 0ms);
}
html.dormant .life .w.is-on .w__heat { animation: heat 1.3s cubic-bezier(.3, 0, .2, 1) var(--d, 0ms) backwards; }
/* a paragraph comes up whole, a beat behind its heading, in the sweep's wake */
html.dormant .life-block:not(.is-on) { opacity: 0; transform: translateY(10px); transition: opacity .2s ease, transform .3s ease; }
html.dormant .life-block.is-on { opacity: 1; transform: none; transition: opacity .75s var(--e-out) var(--d, 0ms), transform 1.05s var(--e-out) var(--d, 0ms); }
html.dormant .life-block.is-on.is-now { transition: none; }
html.dormant .life .w.is-now { transition: none; }
/* settled: plain text again (identical on the page; it simply stops being a box with a layer of its own) */
html.dormant .life .w.is-on.is-calm { display: inline; position: static; transform: none; transition: none; }
html.dormant .life .w.is-on.is-calm .w__heat { display: none; }
html.dormant .life .w.is-now .w__heat { animation: none; }
@keyframes heat { 0% { opacity: 0; } 5% { opacity: 1; } 30% { opacity: .95; } 100% { opacity: 0; } }
/* (shown only while a word is lighting: it is not painted at all once the word has settled) */
html.dormant .life .w.is-on .w__heat { visibility: visible; }


/* before the script has run, what will come to life is simply not there yet */
html.dormant:not(.awake) .hero__line, html.dormant:not(.awake) .hero__foot,
html.dormant:not(.awake) .svc__head, html.dormant:not(.awake) .svc__item,
html.dormant:not(.awake) .how__title, html.dormant:not(.awake) .steps,
html.dormant:not(.awake) .start__say, html.dormant:not(.awake) .form,
html.dormant:not(.awake) .work__browse { opacity: 0; }

/* the sweep: the light running out from the wire. On paper it is the logo's sodium, crisp; on carbon it glows */
.comet {
  position: absolute; left: 0; top: 0; width: 0; height: 0; opacity: 0; visibility: hidden; pointer-events: none;
  /* (no standing will-change: its animation makes it a layer while it runs, and only then) */
}
.comet::before {
  content: ""; position: absolute; right: 0; top: -1px; width: 170px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, rgba(255, 179, 92, 0), rgba(255, 179, 92, .55) 60%, var(--sodium));
}
.comet::after {
  content: ""; position: absolute; left: -4.5px; top: -4.5px; width: 9px; height: 9px; border-radius: 50%;
  background: radial-gradient(circle, #FFF6EA 0 26%, var(--sodium) 52%, rgba(255, 179, 92, 0) 72%);
}
.wire--night .comet::before { width: 240px; background: linear-gradient(90deg, rgba(255, 179, 92, 0), rgba(255, 179, 92, .5) 55%, #FFE2BC); box-shadow: 0 0 10px rgba(255, 179, 92, .45); }
.wire--night .comet::after {
  left: -9px; top: -9px; width: 18px; height: 18px;
  background: radial-gradient(circle, #FFFCF6 0 16%, #FFDDB0 30%, rgba(255, 179, 92, .45) 50%, rgba(255, 179, 92, 0) 71%);
  box-shadow: 0 0 26px 7px rgba(255, 179, 92, .3);
}
/* the flare: the moment of contact */
.flare {
  position: absolute; left: -30px; top: -30px; width: 60px; height: 60px; border-radius: 50%; opacity: 0; visibility: hidden; pointer-events: none;
  background: radial-gradient(circle, rgba(255, 246, 232, .95) 0 6%, rgba(255, 179, 92, .7) 16%, rgba(255, 179, 92, .18) 42%, rgba(255, 179, 92, 0) 70%);
}
.wire:not(.wire--night) .flare { background: radial-gradient(circle, rgba(255, 179, 92, .95) 0 7%, rgba(255, 179, 92, .35) 20%, rgba(255, 179, 92, 0) 62%); }
.wire:not(.wire--night) .comet::after { background: radial-gradient(circle, var(--sodium) 0 46%, rgba(255, 179, 92, .45) 58%, rgba(255, 179, 92, 0) 72%); }

/* the wire on paper: the logo's sodium, a touch heavier so a pale colour still reads as a line */
.wire:not(.wire--night) .wp .core { stroke: var(--wire-day-lit); stroke-width: 1.6; }
.wire:not(.wire--night) .wh {
  background: radial-gradient(circle, var(--sodium) 0 46%, rgba(255, 179, 92, .4) 60%, rgba(255, 179, 92, 0) 72%);
}
.wh::after { background: linear-gradient(90deg, rgba(255, 179, 92, 0), var(--sodium), rgba(255, 179, 92, 0)); }

/* the pulse, struck beside the headline: a bloom, then it rests as the wire's first point with a short
   horizon through it (the streak in the mark) */
.spark { position: absolute; left: 0; top: 0; width: 0; height: 0; display: none; pointer-events: none; }
.spark.is-on { display: block; }
.spark::before {
  content: ""; position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; border-radius: 50%;
  background: radial-gradient(circle, var(--sodium) 0 44%, rgba(255, 179, 92, .4) 58%, rgba(255, 179, 92, 0) 72%);
}
.spark::after {
  content: ""; position: absolute; left: -22px; top: -.75px; width: 44px; height: 1.5px; border-radius: 2px;
  background: linear-gradient(90deg, rgba(255, 179, 92, 0), var(--sodium), rgba(255, 179, 92, 0));
}
.spark.is-on::before { animation: spark-strike 1.1s var(--e-out) backwards; }
.spark.is-on::after { animation: spark-streak 1.1s var(--e-out) backwards; }
.spark::after { opacity: 0; }
@keyframes spark-strike {
  0% { transform: scale(.2); opacity: 0; }
  8% { transform: scale(3.4); opacity: 1; }
  14% { transform: scale(1.4); opacity: .35; }
  22% { transform: scale(2.6); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes spark-streak { 0% { transform: scaleX(0); opacity: 0; } 18% { transform: scaleX(3.2); opacity: 1; } 100% { transform: scaleX(1.4); opacity: 0; } }
html.reduce .spark::before, html.reduce .spark::after { animation: none; }

/* ==========================================================================
   THE NAV: no bar, the logo on its own ground, and the Menu capsule
   ========================================================================== */
.nav {
  /* its own layer: a fixed bar that is not composited makes the browser repaint the page under it on every
     frame of scrolling (pass 5's nav got one from its backdrop blur, which is gone with the bar) */
  will-change: transform;
  height: var(--nav-h); pointer-events: none;
  background: none !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important;
  transition: transform .55s var(--e-smooth), opacity .45s var(--e-io), color .45s var(--e-io);
}
.nav::after { display: none; }
.nav > * { pointer-events: auto; }
.nav.is-away { transform: translate3d(0, -110%, 0); }
.nav__links, .nav__cta, .nav__toggle, .sheet { display: none !important; }

/* the logo: on paper ground or carbon ground, so whatever passes under it never runs into it */
.nav__mark {
  margin: 0 auto 0 -.8rem; padding: .62rem .8rem; border-radius: 999px;
  transition: background-color .45s var(--e-io), box-shadow .45s var(--e-io), opacity .45s var(--e-io);
}
.nav.is-stuck.is-paper .nav__mark { background: rgba(242, 238, 228, .94); box-shadow: 0 10px 28px -18px rgba(23, 25, 24, .45); }
/* (over the opening nothing passes under it, so it is just the logo on the paper) */
html:not(.past-open) .nav.is-stuck .nav__mark { background: transparent; box-shadow: none; }
.nav.is-stuck:not(.is-paper) .nav__mark { background: rgba(23, 25, 24, .92); box-shadow: inset 0 0 0 1px rgba(242, 238, 228, .07), 0 12px 30px -16px rgba(0, 0, 0, .8); }
.nav__mark:focus-visible { outline-offset: 2px; }

/* the capsule: one solid control. Carbon on paper, paper on carbon */
.menu { position: relative; --mbg: var(--carbon); --mfg: var(--paper); --mline: rgba(242, 238, 228, .16); --mroll: var(--sodium); }
.nav:not(.is-paper) .menu { --mbg: var(--paper); --mfg: var(--carbon); --mline: rgba(23, 25, 24, .16); --mroll: var(--burnt); }
.menu__btn {
  position: relative; z-index: 2; display: inline-flex; align-items: center; gap: .62rem;
  height: 2.9rem; padding: 0 1.05rem 0 1rem; border-radius: 999px; cursor: pointer;
  background: var(--mbg); color: var(--mfg);
  font-size: .9375rem; font-weight: 500; letter-spacing: -.01em;
  box-shadow: 0 12px 30px -18px rgba(23, 25, 24, .7);
  transition: background-color .45s var(--e-io), color .45s var(--e-io), transform .18s var(--e-out);
}
.menu__btn:active { transform: scale(.96); }
.menu__btn:focus-visible { outline: 2px solid var(--sodium); outline-offset: 3px; }
.menu__pulse {
  width: 7px; height: 7px; border-radius: 50%; flex: none; background: var(--sodium);
  box-shadow: 0 0 0 3px rgba(255, 179, 92, .2), 0 0 9px rgba(255, 179, 92, .75);
}
.menu__label { line-height: 1; padding-bottom: 1px; }
.menu__bars { position: relative; width: 15px; height: 9px; flex: none; }
.menu__bars i { position: absolute; left: 0; right: 0; height: 1.5px; border-radius: 2px; background: currentColor; transition: transform .45s var(--e-smooth); }
.menu__bars i:first-child { top: 0; }
.menu__bars i:last-child { bottom: 0; }
.menu.is-open .menu__bars i:first-child { transform: translate3d(0, 3.75px, 0) rotate(45deg); }
.menu.is-open .menu__bars i:last-child { transform: translate3d(0, -3.75px, 0) rotate(-45deg); }

/* the panel: the capsule's colour floods out of it, a circle growing from the capsule */
.menu__panel {
  position: absolute; right: 0; top: calc(100% + .7rem); width: min(25rem, calc(100vw - 2 * var(--gut)));
  border-radius: 1.6rem; overflow: hidden; isolation: isolate; color: var(--mfg);
  padding: 1.9rem 1.7rem 1.7rem 1.7rem;
}
.menu__ink {
  position: absolute; z-index: -1; right: 4.2rem; top: -2.15rem; width: 76rem; height: 76rem; margin: -38rem -38rem 0 0;
  border-radius: 50%; background: var(--mbg); transform: scale(.035); opacity: 0;
  transition: transform .42s cubic-bezier(.65, 0, .35, 1), opacity .2s linear .2s;
}
.menu.is-open .menu__ink { transform: none; opacity: 1; transition: transform .8s cubic-bezier(.22, 1, .36, 1), opacity .08s linear; }
.menu__map { position: relative; display: grid; justify-items: start; gap: .35rem; padding-left: 2.1rem; }
.menu__wire { position: absolute; left: .4rem; top: 0; width: 1px; height: 0; background: var(--mline); }
.menu__wire-lit { position: absolute; inset: 0; background: var(--sodium); transform-origin: 50% 0; transform: scaleY(0); }
.menu__here {
  position: absolute; left: -7px; top: -7px; width: 15px; height: 15px; border-radius: 50%;
  background: radial-gradient(circle, #FFFCF6 0 16%, #FFDDB0 30%, rgba(255, 179, 92, .5) 50%, rgba(255, 179, 92, 0) 71%);
  box-shadow: 0 0 18px 4px rgba(255, 179, 92, .3);
}
.menu__here::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 40px; height: 1px; margin: -.5px 0 0 -20px;
  background: linear-gradient(90deg, rgba(255, 179, 92, 0), rgba(255, 231, 200, .9), rgba(255, 179, 92, 0));
}
.menu__wire-lit, .menu__here { transition: transform .9s var(--e-smooth) .25s; }
.menu__link {
  position: relative; display: inline-flex; align-items: center;
  font-size: clamp(1.75rem, 2.3vw, 2.25rem); font-weight: 500; letter-spacing: -.04em; line-height: 1.12; padding: .2rem 0;
  color: var(--mfg); opacity: 0; transform: translate3d(0, 14px, 0);
  transition: opacity .18s linear, transform .25s var(--e-io);
}
.menu.is-open .menu__link {
  opacity: 1; transform: none;
  transition: opacity .5s var(--e-out) calc(.2s + var(--k) * 60ms), transform .8s var(--e-out) calc(.2s + var(--k) * 60ms);
}
/* the stops on the wire */
.menu__link::before {
  content: ""; position: absolute; left: calc(-2.1rem + .4rem - 3.5px); top: 50%; width: 7px; height: 7px; margin-top: -3.5px;
  border-radius: 50%; background: var(--mbg); box-shadow: inset 0 0 0 1px var(--mline);
}
.menu__link.is-past::before, .menu__link.is-here::before { background: var(--sodium); box-shadow: none; }
.menu__link:focus-visible { outline: 2px solid var(--sodium); outline-offset: 4px; }
.menu__start {
  margin-top: 1rem; padding: .7rem 1.25rem .78rem 1.1rem; border-radius: 999px;
  font-size: 1.0625rem; letter-spacing: -.01em; background: var(--sodium); color: var(--carbon);
}
.menu__start::before { left: calc(-2.1rem + .4rem - 4.5px); width: 9px; height: 9px; margin-top: -4.5px; background: var(--sodium); box-shadow: 0 0 10px rgba(255, 179, 92, .7); }
/* the letter roll (21st.dev 16369): each letter rolls up to its lit copy, one after another */
.roll { display: inline-flex; align-items: flex-start; overflow: hidden; height: 1.12em; line-height: 1.12em; vertical-align: top; }
.roll__c { display: inline-flex; flex-direction: column; transition: transform .35s var(--e-out); }
.roll__c > span { display: block; height: 1.12em; }
.roll__c > span + span { color: var(--mroll); }
.menu__start .roll__c > span + span { color: var(--carbon); }
@media (hover: hover) {
  .menu__link:hover .roll__c { transform: translate3d(0, -50%, 0); transition: transform .8s cubic-bezier(.22, 1, .36, 1) calc(var(--i) * 26ms); }
}
.menu__link:focus-visible .roll__c { transform: translate3d(0, -50%, 0); transition: transform .8s cubic-bezier(.22, 1, .36, 1) calc(var(--i) * 26ms); }
html.reduce .menu__ink, html.reduce .menu__link, html.reduce .menu__wire-lit, html.reduce .menu__here, html.reduce .roll__c { transition: none !important; }

@media (max-width: 780px) {
  :root { --nav-h: 66px; }
  .menu__panel { position: fixed; right: var(--gut); top: calc(var(--nav-h) - .2rem); width: calc(100vw - 2 * var(--gut)); }
  .menu__link { font-size: clamp(1.9rem, 8.4vw, 2.4rem); }
}

/* ==========================================================================
   THE HERO
   ========================================================================== */
.hero__stage { padding-block: max(calc(var(--nav-h) + 2vh), 11vh) 12vh; }
.hero--pin .hero__stage { align-content: center; }
.hero__line {
  font-size: var(--hl); line-height: .93; letter-spacing: -.046em; font-weight: 500; max-width: none;
  margin-left: -.05em;
}
.hero__foot {
  margin-top: clamp(1.6rem, 4.2vh, 3rem); display: grid; gap: clamp(1.4rem, 3vh, 2rem); justify-items: start;
  grid-template-columns: none;
}
.hero__body { font-size: clamp(1.125rem, min(1.55vw, 2.9vh), 1.5rem); line-height: 1.42; letter-spacing: -.012em; color: var(--p-ink-2); max-width: 31ch; }
.hero__acts { justify-content: flex-start; gap: .75rem; }
/* on narrower screens each sentence starts its own line and the type stays large (four lines on a phone) */
@media (max-width: 859px) {
  :root { --hl: clamp(2.5rem, 12.6vw, 6.4rem); }
  .hero__line { text-wrap: balance; letter-spacing: -.042em; line-height: .95; }
  .hero__line .brk { display: inline; }
}
/* the line about Addel and the buttons hang from the second word of the headline */
@media (min-width: 900px) { .hero__foot { margin-left: calc(var(--hl) * 4.02); } }
.hero__scroll { left: var(--gut); }

/* ==========================================================================
   THE BUTTONS: a lamp, a label, and the light that floods them
   ========================================================================== */
.btn--lamp {
  position: relative; isolation: isolate; overflow: hidden; display: inline-flex; align-items: center; gap: .72rem;
  min-height: 3.4rem; padding: 0 1.15rem 0 1.15rem; border: 0; border-radius: 999px; cursor: pointer;
  font-size: .9375rem; font-weight: 500; letter-spacing: -.008em; color: var(--paper); background: none;
  transition: transform .18s var(--e-out);
}
.btn--lamp::before { display: none; }
/* (the button's ground is its own layer now, so it can come to life on its own) */
.world--paper .btn--lamp, .world--carbon .btn--lamp, .btn--lamp:hover, .btn--lamp:focus-visible { background: none; border: 0; }
.btn--lamp:active { transform: scale(.96); }
.btn__body { position: absolute; inset: 0; z-index: -3; border-radius: inherit; background: var(--carbon); }
.btn--quiet.btn--lamp { color: var(--carbon); }
.btn--quiet .btn__body { background: transparent; box-shadow: inset 0 0 0 1px rgba(23, 25, 24, .26); }
.world--carbon .btn--primary.btn--lamp { color: var(--carbon); }
.world--carbon .btn--primary .btn__body { background: var(--paper); }
.btn__lamp {
  position: relative; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--sodium);
  box-shadow: 0 0 0 3px rgba(255, 179, 92, .2), 0 0 10px rgba(255, 179, 92, .65);
}
.btn--quiet .btn__lamp { box-shadow: 0 0 0 3px rgba(255, 179, 92, .22); }
/* the flood: sodium light growing out of the lamp to fill the button (21st.dev 26022's fill, from the lamp) */
.btn__flood {
  position: absolute; z-index: -2; left: calc(1.15rem + 4px); top: 50%; width: 12px; height: 12px; margin: -6px 0 0 -6px;
  border-radius: 50%; background: var(--sodium); transform: scale(0);
  transition: transform .55s cubic-bezier(.785, .135, .15, .86);
}
.btn__label { position: relative; display: inline-grid; overflow: hidden; height: 1.3em; line-height: 1.3em; }
.btn__t { grid-area: 1 / 1; white-space: nowrap; transition: transform .5s cubic-bezier(.785, .135, .15, .86); }
.btn__t--b { transform: translate3d(0, 100%, 0); color: var(--carbon); }
.btn__arrow { position: relative; width: 14px; height: 14px; overflow: hidden; flex: none; margin-left: .1rem; }
.btn__arrow svg { display: block; width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@media (hover: hover) {
  .btn--lamp:hover .btn__flood { transform: scale(56); }
  .btn--lamp:hover .btn__t { transform: translate3d(0, -100%, 0); }
  .btn--lamp:hover .btn__t--b { transform: none; }
  .btn--lamp:hover .btn__arrow { color: var(--carbon); }
  .btn--lamp:hover .btn__arrow svg { animation: arrow-through .55s cubic-bezier(.785, .135, .15, .86); }
}
.btn--lamp:focus-visible .btn__flood { transform: scale(56); }
.btn--lamp:focus-visible .btn__t { transform: translate3d(0, -100%, 0); }
.btn--lamp:focus-visible .btn__t--b { transform: none; }
.btn--lamp:focus-visible { color: var(--carbon); }
@keyframes arrow-through { 0% { transform: none; } 45% { transform: translate3d(0, 110%, 0); } 46% { transform: translate3d(0, -110%, 0); } 100% { transform: none; } }

/* the trace: a light travelling once around the outline as the button powers on (21st.dev 1135's border trail) */
.btn__trace {
  position: absolute; inset: 0; z-index: 1; border-radius: inherit; padding: 1.5px; pointer-events: none; opacity: 0; visibility: hidden; overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 0 0), linear-gradient(#000 0 0); -webkit-mask-clip: content-box, border-box; -webkit-mask-composite: xor;
  mask-image: linear-gradient(#000 0 0), linear-gradient(#000 0 0); mask-clip: content-box, border-box; mask-composite: exclude;
}
.btn__trace::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 250%; aspect-ratio: 1; margin: 0; transform: translate(-50%, -50%) rotate(-90deg);
  background: conic-gradient(from 0deg, rgba(255, 179, 92, 0) 0deg, rgba(255, 179, 92, 0) 236deg, rgba(255, 179, 92, .75) 320deg, #FFF3E2 352deg, rgba(255, 179, 92, 0) 360deg);
}

/* dormant: absent until the sweep reaches it; then it powers on */
html.dormant .hero__acts.life .btn--lamp:not(.is-on) { pointer-events: none; }
html.dormant .life .btn--lamp .btn__body,
html.dormant .life .btn--lamp .btn__label,
html.dormant .life .btn--lamp .btn__arrow { opacity: 0; transition: opacity .2s ease, transform .3s ease; }
html.dormant .life .btn--lamp .btn__label { transform: translate3d(0, .5em, 0); }
html.dormant .life .btn--lamp .btn__lamp { opacity: 0; transform: scale(.4); transition: opacity .2s ease, transform .2s ease; }
html.dormant .life .btn--lamp.is-on .btn__body { opacity: 1; transition: opacity .55s var(--e-io) calc(var(--d) + 160ms); }
html.dormant .life .btn--lamp.is-on .btn__label { opacity: 1; transform: none; transition: opacity .5s var(--e-out) calc(var(--d) + 240ms), transform .9s var(--e-out) calc(var(--d) + 240ms); }
html.dormant .life .btn--lamp.is-on .btn__arrow { opacity: 1; transition: opacity .5s var(--e-out) calc(var(--d) + 420ms); }
html.dormant .life .btn--lamp.is-on .btn__lamp { opacity: 1; transform: none; animation: lamp-strike .62s linear var(--d) backwards; transition: none; }
html.dormant .life .btn--lamp.is-on .btn__trace { animation: trace-show 1.05s linear var(--d) backwards; }
html.dormant .life .btn--lamp.is-on .btn__trace::before { animation: trace-spin 1.05s cubic-bezier(.45, 0, .25, 1) var(--d) backwards; }
html.dormant .life .btn--lamp.is-now .btn__body, html.dormant .life .btn--lamp.is-now .btn__label,
html.dormant .life .btn--lamp.is-now .btn__arrow, html.dormant .life .btn--lamp.is-now .btn__lamp { transition: none; animation: none; }
html.dormant .life .btn--lamp.is-now .btn__trace, html.dormant .life .btn--lamp.is-now .btn__trace::before { animation: none; }
@keyframes lamp-strike {
  0% { opacity: 0; transform: scale(.4); } 14% { opacity: 1; transform: scale(1.5); } 26% { opacity: .15; transform: scale(1); }
  40% { opacity: 1; transform: scale(1.3); } 100% { opacity: 1; transform: none; }
}
@keyframes trace-show { 0% { opacity: 0; } 10% { opacity: 1; } 78% { opacity: 1; } 100% { opacity: 0; } }
html.dormant .life .btn--lamp.is-on .btn__trace { visibility: visible; }
@keyframes trace-spin { from { transform: translate(-50%, -50%) rotate(-90deg); } to { transform: translate(-50%, -50%) rotate(270deg); } }

/* ==========================================================================
   WHAT I DO
   ========================================================================== */
.svc__head { font-size: var(--display); line-height: .9; letter-spacing: -.055em; }
@media (min-width: 1000px) {
  .svc__head { font-size: var(--display); }
  .svc__item h3 { font-size: clamp(1.7rem, min(2.75vw, 4.8vh), 3.1rem); line-height: 1.02; letter-spacing: -.042em; max-width: 13ch; }
  .svc__desc { font-size: clamp(.975rem, min(1.12vw, 2vh), 1.15rem); max-width: 33ch; }
}
.svc--live .svc__desc, .svc--live .svc__talk { opacity: 1; will-change: auto; }
html.dormant .svc--live .svc__talk { opacity: 0; transform: translate3d(0, 8px, 0); transition: opacity .2s ease, transform .3s ease; }
html.dormant .svc--live .svc__talk.is-on { opacity: 1; transform: none; transition: opacity .5s var(--e-out) var(--d), transform .8s var(--e-out) var(--d); }
.svc--live .svc__rule { transform: scaleX(0); transition: transform .2s ease; }
.svc--live .svc__talk.is-on .svc__rule { transform: none; transition: transform .7s var(--e-io) calc(var(--d) + 220ms); }
html.dormant .svc--live .svc__talk.is-now, html.dormant .svc--live .svc__talk.is-now .svc__rule { transition: none; }
html.reduce .svc__rule { transform: none; }

/* ==========================================================================
   THE NIGHT AND PROJECTS
   ========================================================================== */
.work__shell { max-width: var(--shell); padding-inline: var(--gut); }
/* the room: nothing below the sign before it lights; once it has, the categories, then the cards,
   each card's image rising from its own horizon as the light runs along it */
.work--room .work__bar, .work--room .case { transition: none; }
.work--room:not(.is-open) .work__bar, .work--room:not(.is-open) .case { transform: none; }
.work--room .work__bar { opacity: 0; transform: translate3d(0, 10px, 0); transition: opacity .2s ease, transform .3s ease; }
.work--room.is-open .work__bar { opacity: 1; transform: none; transition: opacity .6s var(--e-out) var(--d, 0ms), transform .9s var(--e-out) var(--d, 0ms); }
.work--room .case__media { opacity: 0; transition: opacity .2s ease; }
.work--room .case__rise { transform: translate3d(0, 101%, 0); transition: transform .3s ease; }
.work--room .case__horizon::before { transform: scaleX(0); transform-origin: 0 50%; transition: transform .25s ease, opacity .5s var(--e-io); }
.work--room .case__say { opacity: 0; transform: translate3d(0, 14px, 0); transition: opacity .2s ease, transform .3s ease; }
.work--room.is-open .case__horizon::before { transform: none; transition: transform .9s var(--e-io) var(--d, 0ms), opacity .5s var(--e-io); }
.work--room.is-open .case__media { opacity: 1; transition: opacity .35s linear calc(var(--d, 0ms) + 120ms); }
.work--room.is-open .case__rise { transform: none; transition: transform 1.15s cubic-bezier(.22, 1, .36, 1) calc(var(--d, 0ms) + 160ms); }
.work--room.is-open .case__say { opacity: 1; transform: none; transition: opacity .6s var(--e-out) calc(var(--d, 0ms) + 380ms), transform .9s var(--e-out) calc(var(--d, 0ms) + 380ms); }
.work--room.is-open .case__run { animation: case-run 1.1s var(--e-io) var(--d, 0ms) backwards; }
.work--room.is-now .work__bar, .work--room.is-now .case__media, .work--room.is-now .case__rise,
.work--room.is-now .case__horizon::before, .work--room.is-now .case__say { transition: none; }
.work--room.is-now .case__run { animation: none; }
/* (the card's own hover still eases its image) */
.work--room.is-open .case__rise > img, .work--room.is-open .case__rise > video { transition: transform 1.1s var(--e-out); }

/* the cards lay out by their place among the projects shown, so a category lays out like the whole list */
.work--cards .case:nth-child(n) { grid-column: auto; }
.work--cards .case__card::before { display: none; }
@media (min-width: 1000px) {
  .work--cards .case[data-place="1"] { grid-column: 1 / span 7; }
  .work--cards .case[data-place="2"] { grid-column: 9 / span 4; }
  .work--cards .case[data-place="3"] { grid-column: 1 / span 4; }
  .work--cards .case[data-place="4"] { grid-column: 6 / span 7; }
  .work--cards .case[data-place="alone"] { grid-column: 1 / span 7; }
}
@media (min-width: 600px) and (max-width: 999px) {
  .work--cards .case:first-child, .work--cards .case:nth-child(2n+3), .work--cards .case:nth-child(2n):last-child { grid-column: auto; padding-top: 0; }
  .work--cards .case[data-place="1"]:not([hidden]) { grid-column: 1 / -1; }
  .work--cards .case[data-place="3"], .work--cards .case[data-place="alone"] { padding-top: clamp(2.5rem, 8vw, 4.5rem); }
  .work--cards .case[data-place="alone"] { grid-column: 1 / -1; padding-top: 0; }
}
/* the sign keeps its size; the dark before it is shorter, and the lanes meet it high on the screen */
.sign { margin-bottom: clamp(1.6rem, 4.5vh, 2.75rem); }

/* ==========================================================================
   HOW I WORK
   ========================================================================== */
.how__title {
  font-size: var(--display); line-height: .9; letter-spacing: -.055em; font-weight: 500; color: var(--c-ink-1);
  margin: 0 0 clamp(1.4rem, 4vh, 2.75rem) -.045em;
}
.how--pin .how__stage { padding-top: calc(var(--nav-h) * .8); }
.how .step { padding-block: clamp(1.15rem, 2.7vh, 1.9rem) clamp(1.25rem, 3.2vh, 2.4rem); }
.how .step h3 { font-size: clamp(1.5rem, min(2.5vw, 4.3vh), 2.6rem); }
.how .step p { font-size: clamp(.9688rem, min(1.15vw, 2.05vh), 1.2rem); }
.how--pin .step { padding-block: clamp(.9rem, 2.3vh, 1.7rem) clamp(1rem, 2.8vh, 2.2rem); }
@media (max-width: 999px) { .how__title { font-size: clamp(3.1rem, 15vw, 7rem); } }

/* each step is absent until the light reaches its rule: then the sweep runs along the rule, the number
   strikes, and the words come up */
.how--live .step h3, .how--live .step p { opacity: 1; color: inherit; transition: none; }
.how--live .step h3 { color: var(--c-ink-1); }
.how--live .step p { color: var(--c-ink-2); }
.how--live .step-number { opacity: 1; }
html.dormant .how--live .step .step-number { opacity: 0; transition: opacity .2s ease; }
html.dormant .how--live .step .step-number.is-on { opacity: 1; transition: opacity .3s ease var(--d, 0ms); }
.how--live .step__lit-n { opacity: 0; }
.how--live .step.is-on .step__lit-n { opacity: 1; animation: number-strike 1s linear var(--d, 0ms) backwards; }
@keyframes number-strike { 0% { opacity: 0; } 8% { opacity: 1; } 16% { opacity: .1; } 26% { opacity: 1; } 100% { opacity: 1; } }
.how--live .step__rule { opacity: 0; transition: opacity .2s ease; }
.how--live .step.is-on .step__rule { opacity: 1; transition: opacity .3s ease; }
.how--live .step__rule-lit { transform: scaleX(0); transition: transform .25s ease; }
.how--live .step.is-on .step__rule-lit { transform: none; transition: transform .9s var(--e-io) var(--d, 0ms); }
.how--live .step.is-now .step__rule, .how--live .step.is-now .step__rule-lit, html.dormant .how--live .step .step-number.is-now { transition: none; }
.how--live .step.is-now .step__lit-n { animation: none; opacity: 1; }
.how--live .step__spark { display: none; }

/* ==========================================================================
   LET'S WORK TOGETHER
   ========================================================================== */
.start__shell { max-width: var(--shell); }
@media (min-width: 940px) {
  .start__shell { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: clamp(3rem, 6vw, 7rem); }
  .start__side { max-width: 44rem; }
}
.start__say { justify-content: space-between; }
.start__say h2 {
  font-size: clamp(3rem, min(7.3vw, 13.5vh), 9.5rem); line-height: .92; letter-spacing: -.05em; max-width: 9ch;
  margin-left: -.045em; text-box: none;
}
.start__say p { margin-top: clamp(1.5rem, 4vh, 2.5rem); font-size: clamp(1.0625rem, min(1.3vw, 2.4vh), 1.3rem); max-width: 34ch; }
@media (min-width: 940px) { .start__say p { margin-top: auto; padding-top: 2rem; } }
/* the form lays itself out row by row once the light has reached it */
html.dormant .life--rows > * { opacity: 0; transform: translate3d(0, 14px, 0); transition: opacity .2s ease, transform .3s ease; }
html.dormant .life--rows > .is-on { opacity: 1; transform: none; transition: opacity .55s var(--e-out) var(--d, 0ms), transform .9s var(--e-out) var(--d, 0ms); }
html.dormant .life--rows > .is-now { transition: none; }

/* ==========================================================================
   THE FINALE
   ========================================================================== */
.foot {
  min-height: 100svh; display: grid; align-content: center;
  padding-block: clamp(5rem, 14vh, 9rem) clamp(4rem, 12vh, 8rem);
}
.foot__shell { position: relative; }
.foot__mark { position: relative; padding-bottom: clamp(2.4rem, 5.5vw, 4.5rem); }
.foot__word { position: relative; z-index: 1; width: 100%; opacity: .95; }
.foot__row { display: none; }
/* nyteshift lit: the supplied sodium wordmark, seen through a window that opens behind the light */
.foot__lit { display: none; position: absolute; left: 0; top: 0; width: 100%; z-index: 2; overflow: hidden; pointer-events: none; }
.foot__lit-in img { display: block; width: 100%; height: auto; }
/* the glow is pre-rendered (media/wordmark-glow.webp: 1400 x 640, the wordmark 1000 wide at its centre), so nothing
   is blurred live; placed by margins, which are shares of the width */
.foot__glow { display: none; position: absolute; z-index: 0; left: -20%; top: 0; margin-top: -20.64%; width: 140%; max-width: none; height: auto; pointer-events: none; opacity: 0; }
/* the wash: shapeless light warming the dark around the word (a static gradient under the page's grain,
   so it never bands; only its opacity and scale move) */
.foot__wash {
  display: none; position: absolute; z-index: 0; left: -45%; width: 190%; top: 0; margin-top: -40%; aspect-ratio: 2.2;
  pointer-events: none; opacity: 0;
  background: var(--noise, none), radial-gradient(closest-side, rgba(255, 179, 92, .2), rgba(255, 179, 92, .085) 46%, rgba(255, 179, 92, .02) 78%, rgba(255, 179, 92, 0));
}
.foot--live .foot__wash { display: block; }
.foot--live.is-lit .foot__wash { opacity: .42; }
.foot--live:not(.is-lit) .foot__wash { transition: opacity .5s var(--e-io); }
html.reduce .foot__wash { display: block; opacity: .4; }
.foot--live .foot__lit, .foot--live .foot__glow { display: block; }
.foot--live .foot__word { opacity: .08; }
.foot--live .foot__lit { transform: translate3d(-100%, 0, 0); }
.foot--live .foot__lit-in { transform: translate3d(100%, 0, 0); }
.foot--live.is-lit .foot__word { opacity: 0; }
.foot--live.is-lit .foot__lit, .foot--live.is-lit .foot__lit-in { transform: none; }
.foot--live.is-lit .foot__glow { opacity: 1; }
.foot--live:not(.is-lit) .foot__word { transition: opacity .4s var(--e-io); }
.foot--live:not(.is-lit) .foot__lit, .foot--live:not(.is-lit) .foot__lit-in { transition: transform .45s var(--e-io); }
.foot--live:not(.is-lit) .foot__glow { transition: opacity .5s var(--e-io); }
.foot--live .foot__horizon { transform: scaleX(.02); opacity: 0; transition: transform .4s var(--e-io), opacity .3s var(--e-io); }
.foot--live.is-lit .foot__horizon { transform: none; opacity: 1; transition: none; }
.foot--pending .foot__horizon { transform: none; opacity: 1; }
html.reduce .foot__word { opacity: .95; }

/* ==========================================================================
   THE EASTER EGG: the pulse at rest, at the end of the bar
   ========================================================================== */
/* (at the right end of the bar, where it fades: the end of the line; it is there once the pulse has come to rest) */
.foot--live:not(.is-lit) .egg { opacity: 0; pointer-events: none; }
.foot--live:not(.is-lit) .egg:focus-within { opacity: 1; pointer-events: auto; }
.egg { position: absolute; right: 0; bottom: 1px; width: 0; height: 0; z-index: 3; }
.egg__pulse {
  position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center;
}
.egg__pulse::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: radial-gradient(circle, #FFFCF6 0 22%, var(--sodium) 52%, rgba(255, 179, 92, .3) 70%, rgba(255, 179, 92, 0) 76%);
  box-shadow: 0 0 14px 3px rgba(255, 179, 92, .45);
  transition: transform .3s var(--e-out), box-shadow .3s var(--e-out);
}
.egg__pulse::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(255, 179, 92, .55); opacity: 0;
}
@media (hover: hover) { .egg__pulse:hover::before { transform: scale(1.45); box-shadow: 0 0 20px 5px rgba(255, 179, 92, .6); } }
.egg__pulse:focus-visible { outline: 2px solid var(--sodium); outline-offset: 2px; }
.egg--live.is-near .egg__pulse::before { animation: egg-beat var(--beat, 5.2s) ease-out 2.4s infinite; }
.egg--live.is-near .egg__pulse::after { animation: egg-ring var(--beat, 5.2s) ease-out 2.4s infinite; }
.egg.is-beat .egg__pulse::before { animation: egg-beat-now .9s ease-out, egg-beat var(--beat, 5.2s) ease-out 3.2s infinite; }
@keyframes egg-beat { 0%, 100% { transform: none; } 3% { transform: scale(1.5); } 7% { transform: none; } 10% { transform: scale(1.3); } 15% { transform: none; } }
@keyframes egg-beat-now { 0% { transform: none; } 18% { transform: scale(1.9); } 36% { transform: none; } 52% { transform: scale(1.6); } 100% { transform: none; } }
@keyframes egg-ring { 0% { opacity: 0; transform: scale(.4); } 4% { opacity: .9; } 22% { opacity: 0; transform: scale(2.4); } 100% { opacity: 0; transform: scale(2.4); } }
/* (the beat rests while the finale is off screen) */
.is-far .egg__pulse::before, .is-far .egg__pulse::after { animation-play-state: paused; }
/* "Built by Addel" comes up under the line, ending at the pulse */
.egg__say {
  position: absolute; right: -4px; top: 1.15rem; margin: 0; white-space: nowrap;
  font-size: clamp(1rem, 1.35vw, 1.25rem); font-weight: 500; letter-spacing: -.02em; color: var(--paper);
  visibility: hidden;
}
.egg.is-open .egg__say { visibility: visible; }
html.dormant .egg__say.life .w { transform: translateY(.4em); }
html.reduce .egg__pulse::before, html.reduce .egg__pulse::after { animation: none; }

/* ==========================================================================
   THE TOOLS OF THE TRADE
   ========================================================================== */
.trail { position: fixed; left: 0; top: 0; width: 0; height: 0; z-index: 25; pointer-events: none; will-change: transform; }
.trail img { display: none; }
.trail__t { position: absolute; left: 0; top: 0; width: 0; height: 0; }
.trail__tile {
  position: absolute; left: -27px; top: -27px; width: 54px; height: 54px; border-radius: 15px;
  display: grid; place-items: center; background: var(--paper); opacity: 0; visibility: hidden;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 14px 28px -14px rgba(0, 0, 0, .7);
}
.trail__tile img { display: block; width: 28px; height: 28px; object-fit: contain; }
.trail__tile--slice { background: var(--paper); }
.trail__tile--slice img { width: 34px; height: 34px; }

/* ==========================================================================
   REDUCED MOTION: everything present and still
   ========================================================================== */
html.reduce .btn--lamp .btn__trace { display: none; }
html.reduce .foot__glow { opacity: .85; }
