/* Layout: full-bleed hero (light + charcoal dark mode) — greeting + flip-calendar skills top-left, card bottom-left, cut-out portrait anchored right on the status hairline. */
:root {
  --background: #e8e4e0;
  --foreground: #1a1818;
  --ink: #1a1818;
  --muted: #857878;
  --subtle: #b5a8a8;
  --line: #d5cdca;
  --surface: #ded8d4;
  --surface-2: #d3cbc8;
  --accent: #6b5c5c;
  --accent-from: #c4b0b0;
  --accent-to: #6b5c5c;
  --hero-from: #eeeae6;
  --hero-mid: #e8e4e0;
  --hero-to: #d8cdca;
  --radius-pill: 9999px;
  --radius-card: 2rem;
  --radius-card-sm: 1.25rem;
  --radius-control: 0.875rem;
  --text-watermark: 13rem;
  --container-shell: 88rem;
  --font:
    "Onest", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --e-line: cubic-bezier(0.215, 0.61, 0.355, 1);
  --e-spring: cubic-bezier(0.22, 1, 0.36, 1);
  --e-soft: cubic-bezier(0.16, 1, 0.3, 1);
  --e-snap: cubic-bezier(0.2, 0.8, 0.2, 1);
  --bar-h: 3.5rem;
  --gut-lg: 5.5rem; /* one side margin for nav, headline, chips and portrait */
  /* mode-dependent tokens (light) */
  --fg-rgb: 26, 24, 24;
  --chip-bg: rgba(242, 238, 235, 0.5);
  --chip-bg-h: rgba(242, 238, 235, 0.85);
  --chip-line: rgba(196, 176, 176, 0.45);
  --btn-bg: #1a1818;
  --btn-fg: #e8e4e0;
  --btn-badge-bg: #e8e4e0;
  --btn-badge-fg: #1a1818;
  --outline-h: rgba(196, 176, 176, 0.18);
  --vig: rgba(240, 236, 232, 0.35);
  --panel: #f0ece9;
  --field: rgba(196, 176, 176, 0.12);
  --scrim: rgba(var(--fg-rgb), 0.3);
  --cord-shadow: 0.2;
  color-scheme: light;
}
/* dark mode: charcoal, a step above pure black */
html[data-mode="dark"] {
  --background: #1a1818;
  --foreground: #e8e4e0;
  --fg-rgb: 232, 228, 224;
  --line: rgba(196, 176, 176, 0.16);
  --surface: #252121;
  --surface-2: #302a2a;
  --chip-bg: rgba(196, 176, 176, 0.06);
  --chip-bg-h: rgba(196, 176, 176, 0.12);
  --chip-line: rgba(196, 176, 176, 0.16);
  --btn-bg: #e8e4e0;
  --btn-fg: #1a1818;
  --btn-badge-bg: #1a1818;
  --btn-badge-fg: #e8e4e0;
  --outline-h: rgba(196, 176, 176, 0.08);
  --vig: rgba(0, 0, 0, 0.22);
  --panel: #221f1f;
  --field: rgba(196, 176, 176, 0.06);
  --scrim: rgba(0, 0, 0, 0.55);
  --cord-shadow: 0.55;
  color-scheme: dark;
}
/* mode switch: one GPU crossfade of the whole page (View Transitions) instead of
   hundreds of per-element colour transitions running out of step */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.5s;
  animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}
.cord {
  view-transition-name: cord;
}
#cal {
  view-transition-name: cal;
}
::view-transition-old(cal) {
  display: none;
}
::view-transition-new(cal) {
  animation: none;
}
::view-transition-old(cord) {
  display: none;
}
::view-transition-new(cord) {
  animation: none;
}
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  overscroll-behavior-y: none;
  scrollbar-width: none;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  background: #1a1818;
  overflow-x: clip;
}
html[data-mode="dark"] {
  background: #0f0e0e;
}
html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}
body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font);
  overflow-x: clip;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}
ul {
  list-style: none;
}
img {
  display: block;
  max-width: none;
}
svg {
  display: block;
  width: 1em;
  height: 1em;
  flex: none;
}
[hidden] {
  display: none !important;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.tnum {
  font-variant-numeric: tabular-nums;
}

/* ---------- adaptive rem grid ---------- */
@media (max-width: 1920px) {
  html {
    font-size: 0.833333vw;
  }
}
@media (max-width: 1440px) {
  html {
    font-size: 1.111111vw;
  }
}
@media (max-width: 1024px) {
  html {
    font-size: 1.5625vw;
  }
}
@media (max-width: 640px) {
  html {
    font-size: 4.444444vw;
  }
}

.shell {
  max-width: var(--container-shell);
  margin-inline: auto;
  padding-inline: 1.25rem;
  width: 100%;
}
@media (min-width: 640px) {
  .shell {
    padding-inline: 2rem;
  }
}
@media (min-width: 1024px) {
  .shell {
    padding-inline: var(--gut-lg);
  }
}

/* ---------- skip link ---------- */
.skip {
  position: absolute;
  left: -9999px;
  top: auto;
}
.skip:focus {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 60;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-control);
  background: var(--ink);
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  color: #fff;
}

/* ---------- reveal system (plays once body.ready is set) ---------- */
.rv {
  opacity: 0;
  transform: var(--from, translateY(10px));
  transition:
    opacity 0.8s var(--ease, var(--e-soft)) var(--d, 0ms),
    transform 0.8s var(--ease, var(--e-soft)) var(--d, 0ms);
}
body.ready .rv {
  opacity: var(--to-o, 1);
  transform: none;
}
.line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
  margin-bottom: -0.06em;
}
.line > span {
  display: block;
  transform: translateY(100%);
  opacity: 0;
  transition:
    transform 0.9s var(--e-line) var(--d, 0ms),
    opacity 0.9s var(--e-line) var(--d, 0ms);
}
body.ready .line > span {
  transform: none;
  opacity: 1;
}

/* ---------- loader: the doors' colours stack up, one per discipline, then slides away to open the page ---------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 120;
  overflow: hidden;
  color: #e8e4e0;
  --p: 0;
  font-family:
    "Onest",
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}
.ld__bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      38% 55% at 0% 72%,
      rgba(164, 85, 44, 0.26),
      transparent 70%
    ),
    radial-gradient(
      40% 58% at 100% 70%,
      rgba(196, 176, 176, 0.16),
      transparent 72%
    ),
    radial-gradient(70% 60% at 50% 0%, rgba(107, 92, 92, 0.3), transparent 70%),
    #0d0c0c;
  transition: transform 0.85s cubic-bezier(0.76, 0, 0.24, 1);
}
.loader.out .ld__bg {
  transform: translateY(-100%);
}
.ld__stack {
  --w: min(76vw, 26rem);
  --h: calc(var(--w) * 0.27);
  --step: calc(var(--h) * 0.6);
  position: absolute;
  left: 50%;
  top: 47%;
  width: var(--w);
  height: calc(var(--h) + 5 * var(--step));
  translate: -50% -50%;
}
@media (max-width: 639.98px) {
  .ld__stack {
    --w: min(78vw, 20rem);
  }
}
.ld__pill {
  position: absolute;
  left: 0;
  top: calc(var(--k) * var(--step));
  width: 100%;
  height: var(--h);
  border-radius: 999px;
  z-index: var(--k);
  display: flex;
  align-items: flex-start;
  padding: calc(var(--h) * 0.2) 0 0 calc(var(--w) * 0.16);
  font-size: max(11px, calc(var(--w) * 0.036));
  font-weight: 500;
  letter-spacing: 0.02em;
  background: var(--c);
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--c) 88%, #fff) 0%,
    var(--c) 22%,
    var(--c) 70%,
    color-mix(in srgb, var(--c) 82%, #000) 100%
  );
  color: var(--t);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 -1px 0 rgba(0, 0, 0, 0.25),
    0 calc(var(--h) * -0.18) calc(var(--h) * 0.35) calc(var(--h) * -0.12)
      rgba(0, 0, 0, 0.55);
  opacity: 0;
  transform: translateY(-1.6rem) scale(0.96);
  transition:
    opacity 0.45s ease,
    transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
}
.ld__pill.on {
  opacity: 1;
  transform: none;
}
.ld__pill span {
  opacity: 0.82;
}
.loader.out .ld__pill {
  transition:
    transform 0.8s cubic-bezier(0.7, 0, 0.25, 1) calc(var(--k) * 45ms),
    opacity 0.5s ease calc(0.25s + var(--k) * 45ms);
  opacity: 0;
  transform: translateX(calc(var(--dir) * 115vw))
    rotate(calc(var(--dir) * 4deg));
}
.ld__hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.25rem, 4vw, 3rem);
  transition: opacity 0.35s ease;
}
.loader.out .ld__hud {
  opacity: 0;
}
.ld__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8125rem;
  font-weight: 500;
  color: rgba(232, 228, 224, 0.7);
}
.ld__top b {
  font-weight: 600;
  color: #e8e4e0;
}
.ld__bot {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1.5rem;
}
.ld__num {
  font-size: clamp(3.5rem, 9vw, 7.5rem);
  font-weight: 700;
  line-height: 0.85;
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
  color: #e8e4e0;
}
.ld__num small {
  display: block;
  margin-bottom: 0.9rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(232, 228, 224, 0.62);
}
.ld__bar {
  width: min(30vw, 14rem);
  height: 2px;
  border-radius: 2px;
  background: rgba(232, 228, 224, 0.14);
  overflow: hidden;
  margin-bottom: 0.5rem;
}
.ld__bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #6b5c5c, #c4b0b0, #d6b26e);
  transform-origin: 0 50%;
  transform: scaleX(var(--p));
}
@media (max-width: 639.98px) {
  .ld__top span:last-child {
    display: none;
  }
  .ld__bar {
    width: 34vw;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ld__pill {
    transform: none;
    transition: opacity 0.3s ease;
  }
  .loader.out .ld__pill {
    transform: none;
  }
  .ld__bg {
    transition: opacity 0.4s ease;
  }
  .loader.out .ld__bg {
    transform: none;
    opacity: 0;
  }
}

/* ---------- header ---------- */
.hdr {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 50;
  transition:
    background 0.35s ease,
    box-shadow 0.35s ease,
    opacity 0.35s ease,
    translate 0.45s var(--e-soft);
  --from: translateY(-14px);
  --d: 150ms;
  --ease: var(--e-spring);
}
.hdr.stuck {
  background: var(--background);
  box-shadow: 0 1px 0 rgba(var(--fg-rgb), 0.08);
}
.hdr.stuck .hdr__in {
  padding-block: 0.85rem;
}
.hdr.away {
  opacity: 0;
  translate: 0 -100%;
  pointer-events: none;
}
.hdr__in {
  transition: padding 0.35s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.25rem;
}
@media (min-width: 640px) {
  .hdr__in {
    padding-block: 1.5rem;
  }
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand svg {
  font-size: 1.5rem;
  color: var(--accent);
}
.hdr nav {
  flex: 1;
  min-width: 0;
}
.nav {
  display: none;
}
@media (min-width: 1200px) {
  .nav {
    display: flex;
    gap: 1.4rem;
    font-size: 1rem;
    white-space: nowrap;
  }
  .menu-btn {
    display: none;
  }
}

/* small screens: clock on the left, menu on the right, the pull cord hangs between them */
@media (max-width: 1199.98px) {
  .hdr nav {
    display: none;
  }
  .hdr__right {
    flex: 1;
    justify-content: space-between;
  }
}

.nav button {
  display: block;
}
.nav button > span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  opacity: 0.8;
}
.caret {
  font-size: 0.75rem;
  opacity: 0.6;
}
.hdr__right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.chip {
  border: 1px solid var(--chip-line);
  background: var(--chip-bg);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  border-radius: var(--radius-control);
}
.clock {
  display: flex;
  flex: none;
  white-space: nowrap;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.9rem;
  font-size: 0.875rem;
  color: rgba(var(--fg-rgb), 0.7);
}
.clock__ds {
  display: none;
  font-weight: 500;
}

@media (max-width: 767.98px) {
  .clock {
    gap: 0.5rem;
    padding: 0.55rem 0.8rem;
    font-size: 0.8125rem;
  }
  .clock__date,
  .clock__sep {
    display: none;
  }
  .clock .clock__time {
    min-width: 0;
  }
}
/* phones and tablets: menu on the left, local time on the right */
@media (max-width: 1199.98px) {
  .menu-btn {
    order: -1;
  }
}
.clock__lbl {
  color: rgba(var(--fg-rgb), 0.66);
}
.clock__time {
  min-width: 4rem;
  font-weight: 500;
  color: var(--foreground);
}
.clock__sep {
  color: rgba(var(--fg-rgb), 0.3);
}
.clock__date {
  font-weight: 500;
}
.menu-btn {
  transition: background 0.25s;
}
.menu-btn:hover {
  background: var(--chip-bg-h);
}
.menu-btn > span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.menu-btn svg {
  font-size: 1rem;
}
.menu-btn .word {
  display: none;
}
@media (min-width: 640px) {
  .menu-btn .word {
    display: inline;
  }
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: 0 0 var(--radius-card) var(--radius-card);
  background: radial-gradient(
    120% 90% at 62% 30%,
    var(--hero-from) 0%,
    var(--hero-mid) 48%,
    var(--hero-to) 100%
  );
  --fig-h: 27rem;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
.hero__content {
  flex: 1;
}
@media (min-width: 768px) and (max-width: 1023.98px) {
  .hero {
    --fig-h: 43rem;
  }
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    120% 90% at 62% 30%,
    #2a2525 0%,
    #1f1c1c 48%,
    #141212 100%
  );
}
html[data-mode="dark"] .hero::before {
  opacity: 1;
}
.hero__vig {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, var(--vig), transparent, var(--vig));
}

/* the portrait (liquid reveal stage) */
.hero__stage {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}
.fig {
  position: absolute;
  bottom: var(--bar-h);
  left: 50%;
  height: var(--fig-h);
  aspect-ratio: 1151 / 1366;
  opacity: 0;
  transition:
    opacity 1.1s var(--e-soft) 120ms,
    transform 1.3s var(--e-soft) 120ms;
  transform: translate(-50%, 2.5rem);
}
body.ready .fig {
  opacity: 1;
  transform: translate(-50%, 0);
}
@media (min-width: 1024px) {
  .fig {
    height: min(
      calc(100% - var(--bar-h) - 6rem),
      58rem,
      calc(
        (min(100vw, var(--container-shell)) - 2 * var(--gut-lg)) * 0.44 * 1366 /
          1151
      )
    );
    left: auto;
    right: calc(max(0px, (100% - var(--container-shell)) / 2) + var(--gut-lg));
    transform: translateY(2.5rem);
  }
  body.ready .fig {
    transform: none;
  }
}
.fig__wm {
  position: absolute;
  left: 50%;
  translate: -50% 0;
  bottom: 42%;
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.62);
  font-size: 4.25rem;
}
@media (min-width: 640px) and (max-width: 1023.98px) {
  .fig__wm {
    font-size: 8rem;
  }
}
@media (min-width: 1024px) {
  .fig__wm {
    left: auto;
    right: -1rem;
    translate: none;
    bottom: 24%;
    font-size: 11rem;
  }
}
.hero__paint {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  pointer-events: none;
}
.fig {
  pointer-events: auto;
  cursor: pointer;
}
.hero__content {
  pointer-events: none;
}
.hero__content a,
.hero__content button,
.hero__content .cal,
.hero__content [data-h] {
  pointer-events: auto;
}
.fig img,
.fig canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: 50% 100%;
}
.fig canvas {
  pointer-events: none;
}

.hero__content {
  position: relative;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-top: 7rem;
  padding-bottom: calc(var(--fig-h) + 1.25rem);
}
@media (min-width: 1024px) {
  .hero__content {
    display: grid;
    min-height: calc(100lvh - var(--bar-h));
    grid-template-columns: repeat(12, 1fr);
    align-content: center;
    gap: 2.5rem;
    padding-top: 7rem;
    padding-bottom: 4rem;
  }
}
.hero__left {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  min-width: 0;
}
.hero__right {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2rem;
  min-width: 0;
}
@media (min-width: 1024px) {
  .hero__left {
    grid-column: 1 / span 7;
  }
  .hero__right {
    grid-column: 1 / span 7;
    grid-row: 2;
    align-self: end;
    flex-direction: row;
    align-items: flex-end;
    gap: 2.25rem;
  }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(var(--fg-rgb), 0.7);
}
.eyebrow::before {
  content: "";
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  background: rgba(var(--fg-rgb), 0.5);
}
.h1 {
  font-size: 2.625rem;
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
@media (min-width: 640px) {
  .h1 {
    font-size: 3.5rem;
  }
}
@media (min-width: 768px) {
  .h1 {
    font-size: 4.25rem;
  }
}
@media (min-width: 1024px) {
  .h1 {
    font-size: 4.75rem;
  }
}
@media (min-width: 640px) and (max-width: 1023.98px) {
  .hero__left {
    padding-left: 1.5rem;
  }
}
.h1 .soft {
  color: rgba(var(--fg-rgb), 0.5);
}

/* ---------- flip calendar (skills) ---------- */
.cal-line {
  display: block;
  padding-top: 0.34em;
  margin-top: 0.1em;
  padding-bottom: 0.42em;
}
.cal {
  --cal-w: 7em;
  position: relative;
  display: inline-block;
  font-size: 0.9em;
  perspective: 14em;
  perspective-origin: 30% 0;
  vertical-align: top;
  --from: translateY(0.5em) rotateX(-18deg);
  --ease: var(--e-soft);
}
.cal.rv {
  transition-duration: 1.1s;
}
.cal__body {
  position: relative;
  display: block;
  width: var(--cal-w);
  height: 1.72em;
  transform: rotateX(10deg) rotateY(-9deg);
  transform-style: preserve-3d;
  transition: width 0.5s var(--e-soft);
}
.cal__stand {
  position: absolute;
  left: 0.2em;
  right: -0.14em;
  top: 0.28em;
  bottom: -0.4em;
  border-radius: 0.26em;
  background: linear-gradient(165deg, #3a3a3a 0%, #141414 40%, #050505 100%);
  box-shadow:
    0 0.5em 0.9em -0.35em rgba(0, 0, 0, 0.55),
    inset 0 0.02em 0 rgba(255, 255, 255, 0.12);
  transform: translateZ(-0.12em);
}
.cal__stack {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}
.cal__page,
.cal__face,
.cal__rear {
  position: absolute;
  inset: 0;
  border-radius: 0.2em;
}
.cal__page {
  background: linear-gradient(180deg, #fbfaf7 0%, #f2f0eb 100%);
  box-shadow:
    0 0.045em 0 #d8d4cb,
    0 0.08em 0 #f6f4ef,
    0 0.115em 0 #d0cbc1,
    0 0.15em 0 #f2f0ea,
    0 0.185em 0 #c8c3b8,
    0 0.22em 0 #e9e6df,
    0 0.255em 0 #aaa498,
    0 0.45em 0.6em -0.2em rgba(0, 0, 0, 0.35);
}
.cal__leaf {
  position: absolute;
  inset: 0;
  transform-origin: 50% 0;
  transform-style: preserve-3d;
  transform: translateZ(0.004em);
}
.cal__face {
  background: linear-gradient(180deg, #fdfcf9 0%, #f3f1ec 100%);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  box-shadow: inset 0 -0.015em 0 rgba(0, 0, 0, 0.06);
}
.cal__back {
  position: absolute;
  inset: 0;
  border-radius: 0.2em;
  transform-origin: 50% 0;
  transform: translateZ(-0.004em) rotateX(352deg) translateY(50%)
    rotateX(180deg) translateY(-50%);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: linear-gradient(0deg, #e9e6df 0%, #d9d5cc 100%);
  filter: brightness(0.86);
}
.cal__rear {
  background: linear-gradient(0deg, #e9e6df 0%, #d9d5cc 100%);
  transform: rotateX(180deg);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.cal__word {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  padding: 0.2em 0.4em 0;
  color: #0a0a0a;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
  white-space: nowrap;
}
.cal__no {
  position: absolute;
  right: 0.42em;
  bottom: 0.2em;
  font-size: 0.15em;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: rgba(10, 10, 10, 0.42);
  font-variant-numeric: tabular-nums;
}
.cal__holes {
  position: absolute;
  top: 0.09em;
  left: 0.32em;
  right: 0.32em;
  height: 0.07em;
  display: flex;
  justify-content: space-between;
}
.cal__holes i {
  display: block;
  width: 0.075em;
  height: 0.075em;
  border-radius: 50%;
  background: #1b1b1b;
  box-shadow: inset 0 0.01em 0.01em rgba(255, 255, 255, 0.3);
}
.cal__shade {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.5) 0%,
    rgba(0, 0, 0, 0.08) 70%,
    rgba(0, 0, 0, 0) 100%
  );
}
.cal__rings {
  position: absolute;
  top: -0.27em;
  left: 0.32em;
  right: 0.32em;
  height: 0.42em;
  display: flex;
  justify-content: space-between;
  transform: translateZ(0.05em);
  pointer-events: none;
}
.cal__rings i {
  display: block;
  width: 0.075em;
  height: 0.42em;
  position: relative;
}
.cal__rings i::before {
  content: "";
  position: absolute;
  left: -0.065em;
  right: -0.065em;
  top: 0;
  bottom: 0;
  border-radius: 0.2em;
  border: 0.04em solid #a9a9a9;
  border-left-color: #ededed;
  border-top-color: #f6f6f6;
  border-right-color: #6f6f6f;
  border-bottom-color: #8a8a8a;
  filter: drop-shadow(0.01em 0.025em 0.015em rgba(0, 0, 0, 0.35));
}
.cal__measure {
  position: absolute;
  visibility: hidden;
  white-space: nowrap;
  font-weight: 700;
  letter-spacing: -0.035em;
  pointer-events: none;
}

.rating {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.stars {
  display: flex;
  gap: 0.1rem;
  color: var(--accent);
  font-size: 1rem;
}
.rating p {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(var(--fg-rgb), 0.7);
}
.ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* pill button */
.pill {
  display: inline-block;
  border-radius: 9999px;
}
.pill__in {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.875rem 1.75rem;
  white-space: nowrap;
}
.pill--arrow .pill__in {
  padding: 0.375rem 0.375rem 0.375rem 1.5rem;
}
.pill--dark .pill__in {
  background: var(--btn-bg);
  color: var(--btn-fg);
}
.pill--light .pill__in {
  background: var(--surface);
  color: var(--foreground);
}
.pill--outline .pill__in {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--foreground);
}
.pill--outline:hover .pill__in {
  background: var(--outline-h);
}
.pill__badge {
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border-radius: 9999px;
  font-size: 1rem;
  background: var(--ink);
  color: #fff;
}
.pill--dark .pill__badge {
  background: var(--btn-badge-bg);
  color: var(--btn-badge-fg);
}

/* hero card */
.hcard {
  width: 100%;
  max-width: 24rem;
  border-radius: var(--radius-card-sm);
  background: rgba(255, 255, 255, 0.7);
  padding: 0.5rem;
  box-shadow:
    0 0 0 1px rgba(230, 229, 226, 0.7),
    0 1px 2px rgba(0, 0, 0, 0.05);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  --from: translateY(16px) scale(0.96);
  --d: 400ms;
  --ease: var(--e-soft);
}
@media (min-width: 1024px) {
  .hcard {
    width: 19rem;
  }
}
.hcard__row {
  display: flex;
  gap: 0.5rem;
  cursor: pointer;
  border-radius: var(--radius-control);
}
.hcard__tile {
  aspect-ratio: 1;
  width: 6rem;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--radius-control);
  background: var(--ink);
  font-size: 1.875rem;
  color: var(--accent-from);
}
.hcard__panel {
  flex: 1;
  min-width: 0;
  border-radius: var(--radius-control);
  background: rgba(241, 240, 238, 0.7);
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.5rem;
}
.slot {
  position: relative;
  min-height: 3.25rem;
}
.slide {
  position: absolute;
  inset: 0;
  transition:
    transform 0.5s var(--e-snap),
    opacity 0.4s var(--e-snap);
}
.slide__cap {
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(var(--fg-rgb), 0.45);
}
.slide__ttl {
  max-width: 8rem;
  margin-top: 0.15rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.35;
}
.hcard__ctrl {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dots {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.dots i {
  display: block;
  height: 0.25rem;
  width: 0.375rem;
  border-radius: 9999px;
  background: rgba(var(--fg-rgb), 0.2);
  transition: all 0.3s;
}
.dots i.on {
  width: 1rem;
  background: rgba(var(--fg-rgb), 0.7);
}
.arrows {
  display: flex;
  gap: 0.25rem;
}
.rnd {
  width: 1.75rem;
  height: 1.75rem;
  display: grid;
  place-items: center;
  border-radius: 9999px;
  background: #fff;
  color: rgba(var(--fg-rgb), 0.7);
  box-shadow: 0 0 0 1px var(--line);
  font-size: 0.8rem;
  transition: color 0.2s;
}
.rnd:hover {
  color: var(--foreground);
}
.rnd--prev svg {
  transform: rotate(180deg);
}

/* partners */
.partners {
  width: 100%;
  max-width: 24rem;
  --from: translateY(14px);
  --d: 550ms;
}
@media (min-width: 1024px) {
  .partners {
    width: auto;
    max-width: none;
  }
  .partners ul {
    grid-template-columns: repeat(4, auto);
    justify-content: start;
    column-gap: 1rem;
  }
}
.partners__lbl {
  margin-bottom: 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(var(--fg-rgb), 0.45);
  text-align: left;
}
.partners ul {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  column-gap: 1rem;
  row-gap: 0.75rem;
}
.partners li > span {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: rgba(var(--fg-rgb), 0.7);
  opacity: 0.7;
}
.partners li svg {
  font-size: 0.875rem;
  color: rgba(var(--fg-rgb), 0.4);
}

/* status bar */
.hero__bar {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  height: var(--bar-h);
  border-top: 1px solid rgba(var(--fg-rgb), 0.1);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: rgba(var(--fg-rgb), 0.72);
  --from: none;
  --d: 900ms;
}
/* ---------- my story: a timeline you scroll through naturally; the year and title stay beside it ---------- */
.story {
  position: relative;
  z-index: 1;
  background: #f4f1ee;
  border-top: 1px solid rgba(26, 24, 24, 0.1);
  box-shadow: inset 0 1.75rem 2.25rem -1.75rem rgba(26, 24, 24, 0.14);
  --warm: 0;
}
html[data-mode="dark"] .story {
  background: #171515;
  border-top-color: rgba(232, 228, 224, 0.08);
  box-shadow: inset 0 1.75rem 2.25rem -1.75rem rgba(0, 0, 0, 0.6);
}
.story::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: var(--warm);
  background:
    radial-gradient(
      60% 50% at 25% 40%,
      rgba(196, 150, 100, 0.12),
      transparent 70%
    ),
    linear-gradient(180deg, transparent, rgba(170, 125, 80, 0.06));
}
/* the story's backdrop, plus a soft light in the colour of the work each chapter was about (the doors'
   colours), which changes as you move from chapter to chapter.
   Light mode: soft washes of colour bleeding in from the edges, over a very fine diagonal weave — the
   middle stays clean paper so the writing is never fighting the background.
   Dark mode: the fine dots it has always had. */
.story {
  background-image:
    repeating-linear-gradient(
      42deg,
      rgba(26, 24, 24, 0.022) 0 1px,
      transparent 1px 12px
    ),
    linear-gradient(176deg, #fbf9f7 0%, #f7f4f1 54%, #f3efeb 100%);
  background-attachment: local, local;
}
html[data-mode="dark"] .story {
  background-image: radial-gradient(
    rgba(232, 228, 224, 0.055) 1px,
    transparent 1.4px
  );
  background-size: 1.6rem 1.6rem;
  background-position: center top;
  background-attachment: scroll;
}
.story__amb {
  position: sticky;
  top: 0;
  z-index: 0;
  display: block;
  height: 100svh;
  margin-bottom: -100svh;
  pointer-events: none;
  overflow: hidden;
  --aa: 2.3;
  --p1: 0% 14%;
  --p2: 100% 86%;
}
html[data-mode="dark"] .story__amb {
  --aa: 1.1;
  --p1: 24% 44%;
  --p2: 80% 74%;
}
/* light mode: the colour is real, but it stays out towards the edges and a soft light sits
   over the middle, so every word is read against near-white paper */
.story__amb::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(
    54% 66% at 50% 50%,
    rgba(252, 250, 248, 0.9) 0%,
    rgba(252, 250, 248, 0.66) 46%,
    transparent 80%
  );
}
html[data-mode="dark"] .story__amb::after {
  display: none;
}
.story__amb i {
  position: absolute;
  inset: -8%;
  opacity: 0;
  transition: opacity 1.2s ease;
  background:
    radial-gradient(
      46% 54% at var(--p1),
      rgba(var(--c1), calc(0.34 * var(--aa))),
      transparent 74%
    ),
    radial-gradient(
      42% 48% at var(--p2),
      rgba(var(--c2), calc(0.26 * var(--aa))),
      transparent 74%
    );
  animation: ambDrift 24s ease-in-out infinite alternate;
  animation-play-state: paused;
}
/* light mode: the colours as soft light on paper; dark mode: the doors' own deeper colours glowing in the dark */
.story__amb i:nth-child(1) {
  --c1: 226, 122, 58;
  --c2: 92, 132, 202;
} /* independent freelancer: everything, warm */
.story__amb i:nth-child(2) {
  --c1: 226, 122, 58;
  --c2: 206, 138, 150;
} /* TPC student coordinator */
.story__amb i:nth-child(3) {
  --c1: 132, 174, 104;
  --c2: 92, 132, 202;
} /* design head, ACM chapter */
.story__amb i:nth-child(4) {
  --c1: 178, 106, 148;
  --c2: 226, 122, 58;
} /* full stack developer */
.story__amb i:nth-child(5) {
  --c1: 226, 178, 70;
  --c2: 178, 142, 132;
} /* computer science degree */
.story__amb i:nth-child(6) {
  --c1: 92, 132, 202;
  --c2: 206, 138, 150;
} /* creative designer, Morphiaas */
.story__amb i:nth-child(7) {
  --c1: 132, 174, 104;
  --c2: 226, 178, 70;
} /* graphic designer, SAM Web Studio */
html[data-mode="dark"] .story__amb i:nth-child(1) {
  --c1: 164, 85, 44;
  --c2: 60, 82, 120;
}
html[data-mode="dark"] .story__amb i:nth-child(2) {
  --c1: 164, 85, 44;
  --c2: 196, 176, 176;
}
html[data-mode="dark"] .story__amb i:nth-child(3) {
  --c1: 122, 134, 112;
  --c2: 60, 82, 120;
}
html[data-mode="dark"] .story__amb i:nth-child(4) {
  --c1: 74, 53, 64;
  --c2: 164, 85, 44;
}
html[data-mode="dark"] .story__amb i:nth-child(5) {
  --c1: 214, 178, 110;
  --c2: 107, 92, 92;
}
html[data-mode="dark"] .story__amb i:nth-child(6) {
  --c1: 60, 82, 120;
  --c2: 196, 176, 176;
}
html[data-mode="dark"] .story__amb i:nth-child(7) {
  --c1: 122, 134, 112;
  --c2: 164, 85, 44;
}
.story[data-ch="0"] .story__amb i:nth-child(1),
.story[data-ch="1"] .story__amb i:nth-child(2),
.story[data-ch="2"] .story__amb i:nth-child(3),
.story[data-ch="3"] .story__amb i:nth-child(4),
.story[data-ch="4"] .story__amb i:nth-child(5),
.story[data-ch="5"] .story__amb i:nth-child(6),
.story[data-ch="6"] .story__amb i:nth-child(7) {
  opacity: 1;
  animation-play-state: running;
}
@keyframes ambDrift {
  from {
    transform: translate3d(-2%, -1.5%, 0) scale(1);
  }
  to {
    transform: translate3d(2.5%, 2%, 0) scale(1.06);
  }
}
html.lite .story__amb i {
  animation: none;
}
@media (prefers-reduced-motion: reduce) {
  .story__amb i {
    animation: none;
    transition: none;
  }
}
.story__track,
.story__pin {
  position: relative;
}
.story__pin {
  padding: 7rem 0 2.5rem;
}
.story__stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: 3.5rem;
  align-items: start;
  width: 100%;
}
.story__clock {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  margin-top: -7rem;
  padding-top: 3rem;
}
.story__bg {
  position: absolute;
  left: -40%;
  right: -40%;
  top: 0;
  height: 100%;
  width: 180%;
  z-index: -1;
  pointer-events: none;
  -webkit-mask: radial-gradient(closest-side, #000 55%, transparent);
  mask: radial-gradient(closest-side, #000 55%, transparent);
}
.story__h {
  margin-top: 0.6rem;
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.035em;
}
@media (min-width: 1024px) {
  .story__h {
    font-size: 3.4rem;
  }
}
.story__yr {
  display: flex;
  margin: 1.5rem 0 0 -0.04em;
  font-size: clamp(5.5rem, 11.5vw, 11.5rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.06em;
  font-variant-numeric: tabular-nums;
  color: var(--foreground);
}
.dg {
  display: block;
  height: 1em;
  overflow: hidden;
  padding-right: 0.02em;
}
.dg__c {
  display: flex;
  flex-direction: column;
  transform: translateY(calc(var(--d, 0) * -1em));
  transition: transform 0.9s cubic-bezier(0.65, 0, 0.2, 1);
}
.dg:nth-child(2) .dg__c {
  transition-delay: 0.04s;
}
.dg:nth-child(3) .dg__c {
  transition-delay: 0.08s;
}
.dg:nth-child(4) .dg__c {
  transition-delay: 0.12s;
}
.dg__c i {
  display: block;
  height: 1em;
  font-style: normal;
  text-align: center;
}
.story__when {
  margin-top: 0.9rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #6b4f4f;
}
html[data-mode="dark"] .story__when {
  color: #d9c6c6;
}
.story__meter {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
  font-variant-numeric: tabular-nums;
  width: 100%;
}
.story__of {
  color: rgba(var(--fg-rgb), 0.55);
}
.story__rw {
  width: 1.25rem;
  height: 1.25rem;
  color: rgba(var(--fg-rgb), 0.6);
  transform: rotate(calc(var(--p, 0) * -720deg));
}
.story__bar {
  position: relative;
  flex: 0 1 11rem;
  height: 2px;
  margin-left: 0.6rem;
  border-radius: 2px;
  background: rgba(var(--fg-rgb), 0.12);
  overflow: hidden;
}
.story__bar b {
  position: absolute;
  inset: 0;
  background: var(--foreground);
  transform-origin: 0 50%;
  transform: scaleX(var(--p, 0));
}
/* the chapters, in normal flow: the line runs beside them and the dot travels it as you scroll */
.story__line {
  position: relative;
  padding-top: 24vh;
  padding-bottom: 4vh;
}
.story__list {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0 0 0 2.75rem;
}
.story__rail {
  position: absolute;
  left: 0.45rem;
  top: var(--r0, 0);
  height: var(--rh, 0);
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(
    180deg,
    var(--foreground) 0%,
    var(--foreground) var(--dp, 0%),
    rgba(var(--fg-rgb), 0.14) var(--dp, 0%)
  );
}
.story__rail {
  background: rgba(var(--fg-rgb), 0.14) !important;
}
/* the dot rides the line on the browser's own scrolling (sticky), so it never shakes; it stops at the line's ends */
/* the track reaches a dot's radius (and its halo) past each end of the line, so at the very start and end the dot sits whole on the line's tip */
.story__dtrack {
  position: absolute;
  left: calc(0.45rem + 1px - 1.25rem);
  width: 2.5rem;
  top: calc(var(--r0, 0px) - 1rem);
  height: calc(var(--rh, 0px) + 2rem);
  padding-block: 0.45rem;
  overflow: clip;
  pointer-events: none;
}
.story.at-start .story__dot::before {
  opacity: 0;
}
.story__dot {
  position: sticky;
  display: block;
  top: calc(50svh - 0.55rem);
  margin: 0 auto;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  z-index: 2;
  background: var(--foreground);
  box-shadow: 0 0 0 0.4rem rgba(var(--fg-rgb), 0.08);
  transition:
    background 0.4s,
    box-shadow 0.4s;
}
/* the stretch of line already travelled, drawn as a tail above the dot */
.story__dot::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 50%;
  width: 2px;
  height: 300vh;
  margin-left: -1px;
  background: var(--foreground);
  z-index: -1;
}
/* the dot's track reaches a dot's width past both ends of the line, so the dot is never cut off at the start or the end */
.story__dtrack {
  top: calc(var(--r0, 0px) - 1rem) !important;
  height: calc(var(--rh, 0px) + 2rem) !important;
  padding: 0.45rem 0;
  z-index: 2;
  overflow: visible !important;
}
/* the travelled stretch of line is drawn in its own track that stops exactly at the line's ends */
.story__ttrack {
  position: absolute;
  left: calc(0.45rem + 1px - 1.25rem);
  width: 2.5rem;
  top: var(--r0, 0);
  height: var(--rh, 0);
  overflow: clip;
  pointer-events: none;
  z-index: 1;
}
.story__tail {
  position: sticky;
  display: block;
  top: 50svh;
  width: 2px;
  height: 0;
  margin: 0 auto;
}
.story__tail::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 2px;
  height: 300vh;
  background: var(--foreground);
}
.story__dot::before {
  display: none;
}
.story.is-now .story__dot {
  background: #7fb069;
  box-shadow: 0 0 0 0.45rem rgba(127, 176, 105, 0.18);
}
.ch {
  position: relative;
  padding: 3rem 0;
  opacity: 0.52;
  transition: opacity 0.45s ease;
}
html:not([data-mode="dark"]) .ch__b li {
  color: rgba(var(--fg-rgb), 0.9);
}
html:not([data-mode="dark"]) .ch__org {
  color: rgba(var(--fg-rgb), 0.82);
}
html:not([data-mode="dark"]) .ch__date {
  color: rgba(var(--fg-rgb), 0.78);
}
html:not([data-mode="dark"]) .ch.on {
  opacity: 1;
}
html:not([data-mode="dark"]) .story__when {
  color: #5c4242;
}
.ch.on {
  opacity: 1;
}
.ch__date {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(var(--fg-rgb), 0.66);
  margin-bottom: 0.7rem;
}
.ch__t {
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}
.ch__org {
  font-size: 1.0625rem;
  font-weight: 500;
  color: rgba(var(--fg-rgb), 0.7);
  margin-bottom: 1rem;
}
.ch__b {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-width: 46ch;
}
.ch__b li {
  position: relative;
  padding-left: 1.1rem;
  font-size: 1rem;
  line-height: 1.55;
  color: rgba(var(--fg-rgb), 0.78);
}
.ch__b li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 0.45rem;
  height: 1.5px;
  background: rgba(var(--fg-rgb), 0.45);
}
@media (min-width: 1280px) {
  .ch__t {
    font-size: 2.15rem;
  }
}
/* phones: title and year pin to the top, the chapters scroll under them */
@media (max-width: 767.98px) {
  .story__pin {
    padding: 0 0 1.5rem;
  }
  .story__stage {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .story__clock {
    top: 0;
    padding-top: calc(var(--hdr-h, 4.4rem) + 1rem) !important;
    height: auto;
    margin: 0 -1.25rem;
    padding: 1.25rem 1.25rem 0.9rem;
    z-index: 3;
    justify-content: flex-start;
    background: #f4f1ee;
    border-bottom: 1px solid rgba(26, 24, 24, 0.1);
    box-shadow: 0 10px 16px -12px rgba(26, 24, 24, 0.25);
  }
  html[data-mode="dark"] .story__clock {
    background: #171515;
    border-bottom-color: rgba(232, 228, 224, 0.08);
    box-shadow: 0 10px 16px -12px rgba(0, 0, 0, 0.7);
  }
  .story__bg {
    display: none;
  }
  .story__clock .eyebrow {
    display: none;
  }
  .story__h {
    margin-top: 0;
    font-size: 1.6rem;
  }
  .story__yr {
    margin-top: 0.35rem;
    font-size: clamp(3.4rem, 17vw, 4.5rem);
  }
  .story__when {
    margin-top: 0.25rem;
    font-size: 0.6875rem;
  }
  .story__meter {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
  }
  .story__line {
    padding-top: 1rem;
    padding-bottom: 6vh;
  }
  .story__list {
    padding-left: 2.1rem;
  }
  .story__rail {
    left: 0.45rem;
  }
  .story__dtrack,
  .story__ttrack {
    left: calc(0.45rem + 1px - 1.25rem);
  }
  .ch {
    padding: 1.75rem 0;
  }
  .ch__t {
    font-size: 1.45rem;
  }
  .ch__org {
    font-size: 0.9375rem;
    margin-bottom: 0.6rem;
  }
  .ch__b li {
    font-size: 0.9375rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ch {
    opacity: 1;
  }
  .dg__c {
    transition: none;
  }
  .story__bg {
    display: none;
  }
}
.hero__bar .mid {
  display: none;
}
@media (min-width: 640px) {
  .hero__bar .mid {
    display: inline;
  }
}
.hero__bar .scroll {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.hero__bar .scroll i {
  font-style: normal;
  display: inline-block;
  animation: nudge 1.8s var(--e-snap) infinite;
}
@keyframes nudge {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(3px);
  }
}

/* ---------- pull cord (mode switch) ---------- */
.cord {
  position: fixed;
  top: 0;
  right: 0;
  width: min(100%, 340px);
  height: 520px;
  z-index: 70;
  pointer-events: none;
  overflow: hidden;
}
.cord__cv {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.cord__hit {
  position: absolute;
  left: 0;
  top: 0;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  pointer-events: auto;
  touch-action: none;
  cursor: grab;
  -webkit-tap-highlight-color: transparent;
}
.cord__hit:active,
.cord.dragging .cord__hit {
  cursor: grabbing;
}
.cord__hit:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -10px;
}
.cord.dragging {
  cursor: grabbing;
}

/* ---------- section 2: the doors ---------- */
:root {
  --wall: #dad4cf;
  --wall-hi: #e4dfdb;
  --floor: #c2ae98;
  --floor-2: #a8937e;
  --casing: #f2efec;
  --base: #eae6e2;
  --paint: #1a1818;
  --lamp: rgba(255, 250, 242, 0.9);
  --spill: 255, 196, 128;
  --room-in: #ffdcae;
  --room-mid: #c98447;
  --room-out: #22160d;
}
html[data-mode="dark"] {
  --wall: #1f1c1c;
  --wall-hi: #262222;
  --floor: #2b221c;
  --floor-2: #1a1410;
  --casing: #3a3434;
  --base: #2f2a2a;
  --paint: #e8e4e0;
  --lamp: rgba(232, 214, 210, 0.06);
}
.doors {
  position: relative;
  z-index: 1;
  margin-top: -2rem;
  padding-top: calc(2rem + 5.25rem);
  overflow: hidden;
  background:
    linear-gradient(
      180deg,
      rgba(0, 0, 0, 0.05) 0%,
      transparent 22%,
      transparent 78%,
      rgba(0, 0, 0, 0.07) 100%
    ),
    linear-gradient(180deg, var(--wall-hi) 0%, var(--wall) 55%);
}
/* plaster texture on its own layer: it fades out while you walk through a door, so the zoom stays smooth */
.doors__tex {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: url("/assets/ambient-warm.svg"), url("/assets/ambient-cool.svg");
  background-size:
    auto,
    900px 900px;
  transition: opacity 0.25s ease;
}
.doors.lift .doors__tex,
.doors.through .doors__tex {
  opacity: 0;
}
.hero {
  z-index: 2;
  box-shadow:
    0 1px 0 rgba(26, 24, 24, 0.1),
    0 1.75rem 3rem -1.5rem rgba(26, 24, 24, 0.3);
}
html[data-mode="dark"] .hero {
  box-shadow:
    0 1px 0 rgba(232, 228, 224, 0.08),
    0 1.75rem 3rem -1.25rem rgba(0, 0, 0, 0.85);
}
.mbr {
  display: none;
}
@media (max-width: 639.98px) {
  .mbr {
    display: inline;
  }
}
.doors__wall {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3.6rem;
}
.paint {
  position: relative;
  z-index: 3;
  pointer-events: none;
  margin: 0;
  text-align: center;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: var(--paint);
  font-size: 2.6rem;
  max-width: 14ch;
  text-wrap: balance;
  opacity: 1;
  padding: 0.08em 0 0.14em;
  clip-path: inset(-20% -6% -30% -6%);
}

@media (min-width: 640px) {
  .paint {
    font-size: 4rem;
    max-width: none;
  }
}
@media (min-width: 1024px) {
  .paint {
    font-size: 4.75rem;
  }
}
.doors.pre .paint {
  clip-path: inset(-20% 100% -30% -6%);
}
.doors.in .paint {
  transition: clip-path 1.5s cubic-bezier(0.65, 0, 0.25, 1) 0.1s;
}

.doors__row {
  --gap: 1.5rem;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
  align-items: end;
  width: 100%;
  transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1);
}
@media (min-width: 1024px) {
  .doors__row {
    --gap: 3rem;
  }
}
/* the fifth door (Video Editing) waits just past the end of the wall; the menu slides the wall along to it */
.unit.unit--secret {
  position: absolute;
  bottom: 0;
  --slot: calc((100% - 3 * var(--gap)) / 4);
  width: min(17.5rem, calc((100svh - 19.5rem) / 2.25), var(--slot));
  left: calc(
    100% + var(--gap) +
      (
        var(--slot) - min(17.5rem, calc((100svh - 19.5rem) / 2.25), var(--slot))
      ) /
      2
  );
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 0.6s ease 0.2s,
    visibility 0s linear 0.8s;
}
.doors.reveal .doors__row {
  transform: translateX(calc(-1 * ((100% - 3 * var(--gap)) / 4 + var(--gap))));
}
.doors.reveal .unit.unit--secret {
  visibility: visible;
  opacity: 1;
  transition:
    opacity 0.6s ease 0.15s,
    visibility 0s;
}
.doors__row::after {
  content: "";
  position: absolute;
  left: -50vw;
  right: -50vw;
  bottom: 0;
  height: 1.5rem;
  z-index: -1;
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.55) 0,
      rgba(255, 255, 255, 0.55) 1px,
      rgba(0, 0, 0, 0.06) 2px,
      transparent 4px,
      transparent 7px,
      rgba(0, 0, 0, 0.05) 8px,
      rgba(255, 255, 255, 0.25) 9px,
      transparent 11px,
      rgba(0, 0, 0, 0.08) 100%
    ),
    var(--base);
  box-shadow:
    0 -1px 0 rgba(0, 0, 0, 0.07),
    0 -0.5rem 0.9rem -0.45rem rgba(0, 0, 0, 0.16);
}
html[data-mode="dark"] .doors__row::after {
  background:
    linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.06) 0,
      rgba(255, 255, 255, 0.06) 1px,
      rgba(0, 0, 0, 0.3) 2px,
      transparent 4px,
      transparent 7px,
      rgba(0, 0, 0, 0.25) 8px,
      transparent 11px,
      rgba(0, 0, 0, 0.3) 100%
    ),
    var(--base);
  box-shadow:
    0 -1px 0 rgba(0, 0, 0, 0.4),
    0 -0.5rem 0.9rem -0.45rem rgba(0, 0, 0, 0.5);
}
.doors__floor {
  position: relative;
  height: 6.5rem;
  overflow: hidden;
  perspective: 22rem;
  perspective-origin: 50% 0;
  background: var(--floor-2);
}
.doors__floor::after {
  content: "";
  position: absolute;
  left: -60%;
  right: -60%;
  top: 0;
  height: 600%;
  transform-origin: 50% 0;
  transform: rotateX(72deg);
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='600'%3E%3Cfilter id='w'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.35 .006' numOctaves='3' seed='2'/%3E%3CfeColorMatrix values='0 0 0 0 .3 0 0 0 0 .2 0 0 0 0 .12 0 0 0 .35 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23w)'/%3E%3C/svg%3E"),
    repeating-linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.22) 0 2px,
      transparent 2px 140px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(255, 255, 255, 0.07) 0 140px,
      rgba(0, 0, 0, 0.05) 140px 280px,
      rgba(255, 255, 255, 0.02) 280px 420px,
      rgba(0, 0, 0, 0.08) 420px 560px,
      transparent 560px 700px
    ),
    var(--floor);
}
.doors__floor::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.22), transparent 28%),
    linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.12));
}
.doors__floor::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1.6rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.18), transparent);
}
.doors__hint {
  display: none;
}
.doors__dots {
  display: none;
}
/* hovering a door: the others fade back and the work behind it is described on the wall beside it */
.unit .doorway {
  transition:
    opacity 0.5s var(--e-soft),
    filter 0.5s var(--e-soft);
}
.doors.focus .unit:not(.on) .doorway {
  opacity: 0.03;
  filter: saturate(0.2);
}
.doors.focus .unit:not(.on)::before {
  opacity: 0;
}
.unit::before {
  transition: opacity 0.5s ease;
}
.dinfo {
  position: absolute;
  z-index: 3;
  pointer-events: none;
  opacity: 0;
  transform: translateY(0.6rem);
  transition:
    opacity 0.35s ease,
    transform 0.5s var(--e-soft);
  max-width: 30rem;
}
.dinfo.on {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.45s ease 0.08s,
    transform 0.6s var(--e-soft) 0.08s;
}
.dinfo__h {
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--foreground);
  margin: 0 0 0.45rem;
}
.dinfo__t {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dinfo-accent, #6b4f4f);
  margin-bottom: 1.15rem;
}
.dinfo__p {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 1rem;
  font-weight: 450;
  line-height: 1.35;
  color: var(--foreground);
}
.dinfo__p li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}
.dinfo__p li::before {
  content: "";
  flex: none;
  width: 1.05rem;
  height: 1.05rem;
  border-radius: 50%;
  border: 1.5px solid var(--dinfo-accent, #6b4f4f);
  background: var(--dinfo-accent, #6b4f4f) center/.62rem no-repeat;
  -webkit-mask: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 6.2 5 8.5 9.5 3.5'/%3E%3C/svg%3E");
}
html[data-mode="dark"] .dinfo__p li::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%231A1818' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 6.2 5 8.5 9.5 3.5'/%3E%3C/svg%3E");
}
.dinfo.on li {
  animation: liIn 0.5s var(--e-soft) backwards;
}
.dinfo.on li:nth-child(2) {
  animation-delay: 0.05s;
}
.dinfo.on li:nth-child(3) {
  animation-delay: 0.1s;
}
.dinfo.on li:nth-child(4) {
  animation-delay: 0.15s;
}
.dinfo.on li:nth-child(5) {
  animation-delay: 0.2s;
}
@keyframes liIn {
  from {
    opacity: 0;
    transform: translateX(-0.5rem);
  }
}
html[data-mode="dark"] .dinfo {
  --dinfo-accent: #d9c6c6;
}
@media (min-width: 1280px) {
  .dinfo__p {
    font-size: 1.0625rem;
  }
  .dinfo__h {
    font-size: 2.25rem;
  }
}
@media (hover: hover) and (pointer: fine) {
  .dinfo {
    max-width: 22rem;
  }
}

/* one door with its casing */
.unit {
  position: relative;
  container-type: inline-size;
  width: 100%;
  max-width: min(17.5rem, calc((100svh - 19.5rem) / 2.25));
  justify-self: center;
  transition:
    opacity 0.9s var(--e-soft),
    transform 1.1s var(--e-soft);
  transition-delay: calc(var(--i) * 110ms + 0.35s);
}
.doors.pre .unit {
  opacity: 0;
  transform: translateY(1.5rem);
}
.unit::before {
  content: "";
  position: absolute;
  left: -35%;
  right: -35%;
  top: -18%;
  height: 62%;
  pointer-events: none;
  z-index: -1;
  background: radial-gradient(
    50% 50% at 50% 30%,
    var(--lamp),
    transparent 100%
  );
}
.doorway {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1/2.25;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  border-radius: 50cqi 50cqi 0 0;
}
.doorway:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}
.casing {
  position: absolute;
  inset: 0;
  border-radius: 50cqi 50cqi 0 0;
  background:
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.07),
      rgba(255, 255, 255, 0.18) 3cqi,
      transparent 6cqi,
      transparent calc(100% - 6cqi),
      rgba(0, 0, 0, 0.05) calc(100% - 3cqi),
      rgba(0, 0, 0, 0.12)
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 30%),
    var(--casing);
  box-shadow:
    inset 0 0 0 1.1cqi rgba(255, 255, 255, 0.28),
    inset 0 0 0 1.5cqi rgba(0, 0, 0, 0.07),
    inset 0 0 0 3.6cqi rgba(255, 255, 255, 0.12),
    inset 0 0 0 4.1cqi rgba(0, 0, 0, 0.08),
    0 0 0 1px rgba(0, 0, 0, 0.06),
    1.5cqi 2.5cqi 4.5cqi rgba(26, 24, 24, 0.2),
    -0.5cqi 1cqi 3cqi rgba(26, 24, 24, 0.08);
}
html[data-mode="dark"] .casing {
  background:
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.25),
      rgba(255, 255, 255, 0.04) 3cqi,
      transparent 6cqi,
      transparent calc(100% - 6cqi),
      rgba(0, 0, 0, 0.3)
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 30%),
    var(--casing);
  box-shadow:
    inset 0 0 0 1.1cqi rgba(255, 255, 255, 0.05),
    inset 0 0 0 1.5cqi rgba(0, 0, 0, 0.25),
    inset 0 0 0 3.6cqi rgba(255, 255, 255, 0.03),
    inset 0 0 0 4.1cqi rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(0, 0, 0, 0.4),
    1.5cqi 2.5cqi 5cqi rgba(0, 0, 0, 0.6);
}
/* plinth blocks at the foot of each leg */
.casing::before {
  content: "";
  position: absolute;
  left: -1cqi;
  right: -1cqi;
  bottom: 0;
  height: 11cqi;
  z-index: 1;
  background: var(--casing);
  -webkit-mask: linear-gradient(
    90deg,
    #000 0 8.5cqi,
    transparent 8.5cqi calc(100% - 8.5cqi),
    #000 calc(100% - 8.5cqi)
  );
  mask: linear-gradient(
    90deg,
    #000 0 8.5cqi,
    transparent 8.5cqi calc(100% - 8.5cqi),
    #000 calc(100% - 8.5cqi)
  );
  box-shadow:
    inset 0 0.5cqi 0 rgba(255, 255, 255, 0.4),
    inset 0 1cqi 0 rgba(0, 0, 0, 0.08),
    inset 0 -0.6cqi 1cqi rgba(0, 0, 0, 0.1);
}
html[data-mode="dark"] .casing::before {
  box-shadow:
    inset 0 0.5cqi 0 rgba(255, 255, 255, 0.05),
    inset 0 1cqi 0 rgba(0, 0, 0, 0.3);
}
/* a fine bead runs round the arch, inside the frame */
.casing::after {
  content: "";
  position: absolute;
  left: 4.6cqi;
  right: 4.6cqi;
  top: 4.6cqi;
  bottom: 0;
  border-radius: 45.4cqi 45.4cqi 0 0;
  border: 0.45cqi solid rgba(0, 0, 0, 0.07);
  border-bottom: 0;
}
html[data-mode="dark"] .casing::after {
  border-color: rgba(255, 255, 255, 0.05);
}
.opening {
  position: absolute;
  left: 7.5cqi;
  right: 7.5cqi;
  top: 7.5cqi;
  bottom: 0;
  perspective: 160cqi;
  perspective-origin: 50% 42%;
}
.room {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: 42.5cqi 42.5cqi 0 0;
  background: var(--room);
  box-shadow:
    inset 2cqi 0 4cqi var(--room-sh),
    inset 0 2cqi 4cqi var(--room-sh);
}
/* the space behind the doors: white in light mode, black in dark mode */
:root {
  --room: #fbfaf8;
  --room-sh: rgba(26, 24, 24, 0.1);
}
html[data-mode="dark"] {
  --room: #050505;
  --room-sh: rgba(0, 0, 0, 0.85);
}
/* a dark room: only the faintest edge where the frame catches the room light */
.room::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.035),
    transparent 12%
  );
  pointer-events: none;
}
/* walking through a door */
.doors.lift {
  will-change: transform;
}
/* while walking in, the wall and floor carry on past the section's edges, so nothing else shows */
.doors.through {
  overflow: visible;
  z-index: 6;
}
.doors.through::before,
.doors.through::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 55vw;
  pointer-events: none;
  background: linear-gradient(180deg, var(--wall-hi) 0%, var(--wall) 55%);
}
.doors.through::before {
  right: 100%;
}
.doors.through::after {
  left: 100%;
}
.doors.through .doors__floor {
  box-shadow:
    -55vw 0 0 0 var(--floor),
    55vw 0 0 0 var(--floor);
}
.passage {
  position: fixed;
  z-index: 99;
  background: var(--room);
  pointer-events: none;
  will-change: transform;
}
.shade {
  position: fixed;
  inset: 0;
  z-index: 98;
  pointer-events: none;
  opacity: 0;
  will-change: opacity;
  background: var(--room);
}
.veil {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  clip-path: inset(50%);
  transition: clip-path 0.95s cubic-bezier(0.6, 0, 0.35, 1);
}
.veil.on {
  opacity: 1;
}
.veil--photo {
  background: #030303;
}
.wallv {
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.25s ease,
    visibility 0s linear 0.25s;
  background: var(--room);
}
.wallv.on {
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.25s ease,
    visibility 0s;
}
.wallv.live {
  pointer-events: auto;
}
.wallv iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  visibility: hidden;
}
.wallv iframe {
  opacity: 0;
  transition: opacity 0.7s ease;
}
.wallv.on iframe.cur {
  visibility: visible;
  opacity: 1;
}
.veil--wall {
  background: #e8e4e0;
  width: 100vw;
}
html[data-mode="dark"] .veil--wall {
  background: #1a1818;
}
.vcell {
  position: absolute;
  left: 0;
  top: 0;
  border-radius: 6px;
  overflow: hidden;
  background: center/cover no-repeat;
}
.vcell img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* page-to-page hand-off without a blank frame (supporting browsers) */
@view-transition {
  navigation: auto;
}
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.25s;
}
.veil--glow {
  background: var(--room);
}
.cord {
  transition: opacity 0.4s ease;
}
.cord.away {
  opacity: 0;
  pointer-events: none;
}
.door {
  --dc: var(--door);
  position: absolute;
  inset: 0;
  transform-origin: 0 50%;
  transform: rotateY(0deg);
  will-change: transform;
  border-radius: 42.5cqi 42.5cqi 0 0;
  background:
    linear-gradient(
      100deg,
      rgba(255, 255, 255, 0.1) 0%,
      rgba(255, 255, 255, 0) 30%,
      rgba(0, 0, 0, 0.18) 100%
    ),
    var(--dc);
  box-shadow:
    inset 0 0 0 0.3cqi rgba(0, 0, 0, 0.28),
    inset 0.6cqi 0 0 rgba(255, 255, 255, 0.05);
}
html[data-mode="dark"] .door {
  --dc: var(--door-dk, var(--door));
}
/* a reeded panel, recessed into the leaf and following the arch */
.door__flute {
  position: absolute;
  left: 8cqi;
  right: 8cqi;
  top: 8cqi;
  bottom: 9cqi;
  border-radius: 34.5cqi 34.5cqi 1.2cqi 1.2cqi;
  background: repeating-linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.075) 0,
    rgba(255, 255, 255, 0.02) 1cqi,
    rgba(0, 0, 0, 0.13) 2.1cqi,
    rgba(255, 255, 255, 0.075) 2.8cqi
  );
  box-shadow:
    inset 0 0 0 0.3cqi rgba(0, 0, 0, 0.16),
    inset 1cqi 1.2cqi 2cqi rgba(0, 0, 0, 0.28),
    inset -0.6cqi -0.6cqi 1cqi rgba(255, 255, 255, 0.07);
}
/* hovering a door: it gains real depth. The slab shows its thickness as it swings, casts a shadow into the gap,
   the frame lifts off the wall and light from the room rims the opening */
.door__shade {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #000;
  opacity: calc(var(--o, 0) * 0.5);
  pointer-events: none;
}
.door {
  transform-style: preserve-3d;
  transition: box-shadow 0.5s var(--e-soft);
}
.door::after {
  content: "";
  position: absolute;
  top: 40cqi;
  bottom: 0;
  right: 0;
  width: 3.4cqi;
  transform-origin: 100% 50%;
  transform: rotateY(-90deg);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.25)),
    var(--dc);
  filter: brightness(0.62);
  pointer-events: none;
}
.casing {
  transition: box-shadow 0.5s var(--e-soft);
}
.room::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s var(--e-soft);
  box-shadow:
    inset 0 0 5cqi var(--rim),
    inset 0 0 1.2cqi var(--rim);
}
:root {
  --rim: rgba(255, 255, 255, 0.95);
  --lift: rgba(26, 24, 24, 0.3);
}
html[data-mode="dark"] {
  --rim: rgba(214, 196, 196, 0.22);
  --lift: rgba(0, 0, 0, 0.7);
}
.unit.on .casing {
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.06),
    2cqi 5cqi 9cqi var(--lift),
    -1cqi 2cqi 5cqi rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.unit.on .door {
  box-shadow:
    inset 0 0 0 0.35cqi rgba(0, 0, 0, 0.2),
    inset -2.5cqi 0 3cqi rgba(0, 0, 0, 0.18),
    4cqi 0 7cqi rgba(0, 0, 0, 0.45);
}
.unit.on .room::after {
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .door,
  .casing,
  .room::after {
    transition: none;
  }
}
/* brass name plate */
.plate {
  position: absolute;
  left: 50%;
  top: 31%;
  translate: -50% -50%;
  width: 58cqi;
  padding: 2.6cqi 4cqi;
  border-radius: 0.9cqi;
  z-index: 1;
  text-align: center;
  font-size: 5.4cqi;
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-wrap: balance;
  color: #2b2112;
  text-shadow:
    0 0.28cqi 0 rgba(255, 238, 196, 0.55),
    0 -0.15cqi 0 rgba(0, 0, 0, 0.25);
  background: linear-gradient(
    160deg,
    #efdfb2 0%,
    #c9a866 28%,
    #e3cc92 48%,
    #a98747 72%,
    #d2b67a 100%
  );
  box-shadow:
    0 0.5cqi 1cqi rgba(0, 0, 0, 0.4),
    inset 0 0.3cqi 0 rgba(255, 250, 228, 0.7),
    inset 0 -0.3cqi 0 rgba(88, 62, 22, 0.45);
}
.plate::before,
.plate::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 1.6cqi;
  height: 1.6cqi;
  margin-top: -0.8cqi;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff3cf, #8f6f33 70%);
  box-shadow: 0 0.15cqi 0.2cqi rgba(0, 0, 0, 0.4);
}
.plate::before {
  left: 1.8cqi;
}
.plate::after {
  right: 1.8cqi;
}
/* lever handle: a bevelled brass rose screwed to the door, a tapered lever standing off it, and a keyhole escutcheon */
.handle {
  position: absolute;
  right: 7cqi;
  top: 59%;
  width: 9.4cqi;
  height: 9.4cqi;
  border-radius: 50%;
  z-index: 1;
  background: radial-gradient(
    circle at 36% 30%,
    #fff6dc 0,
    #e6cb8a 14%,
    #b8934c 40%,
    #80602a 70%,
    #4d3816 100%
  );
  box-shadow:
    0 0 0 0.35cqi rgba(0, 0, 0, 0.22),
    0.9cqi 1.5cqi 2cqi rgba(0, 0, 0, 0.45),
    inset -0.7cqi -0.9cqi 1.1cqi rgba(40, 26, 6, 0.55),
    inset 0.5cqi 0.6cqi 0.8cqi rgba(255, 248, 222, 0.5);
}
/* the boss the lever turns on */
.handle::before {
  content: "";
  position: absolute;
  inset: 2.3cqi;
  border-radius: 50%;
  background: radial-gradient(
    circle at 38% 32%,
    #fff3d0,
    #c9a45c 45%,
    #6f5122 100%
  );
  box-shadow:
    0.4cqi 0.7cqi 0.9cqi rgba(0, 0, 0, 0.45),
    inset 0 0 0 0.2cqi rgba(255, 240, 200, 0.35);
}
.handle__lever {
  position: absolute;
  right: 3.6cqi;
  top: 2.75cqi;
  width: 23cqi;
  height: 3.9cqi;
  border-radius: 2.4cqi 1.6cqi 1.6cqi 2.4cqi;
  transform-origin: calc(100% - 1.9cqi) 50%;
  background: linear-gradient(
    180deg,
    #fff5d6 0%,
    #ecd395 16%,
    #c39d55 42%,
    #8e6a2d 72%,
    #5c4119 100%
  );
  box-shadow:
    0.3cqi 2.4cqi 2.2cqi rgba(0, 0, 0, 0.38),
    0 0.4cqi 0.4cqi rgba(0, 0, 0, 0.25),
    inset 0 -0.3cqi 0.4cqi rgba(50, 32, 8, 0.45);
  transition: transform 0.18s cubic-bezier(0.3, 0.7, 0.4, 1);
}
/* a slightly thicker grip at the free end, and a polished highlight running along the top */
.handle__lever::before {
  content: "";
  position: absolute;
  left: -0.4cqi;
  top: -0.45cqi;
  width: 7cqi;
  height: 4.8cqi;
  border-radius: 2.4cqi;
  background: linear-gradient(
    180deg,
    #fff5d6 0%,
    #e8cd8c 18%,
    #bf9850 45%,
    #86632a 75%,
    #5c4119 100%
  );
  box-shadow: 0 0.5cqi 0.6cqi rgba(0, 0, 0, 0.3);
}
.handle__lever::after {
  content: "";
  position: absolute;
  left: 1.4cqi;
  right: 2.6cqi;
  top: 0.55cqi;
  height: 0.55cqi;
  border-radius: 1cqi;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 240, 0.95),
    rgba(255, 250, 225, 0.35)
  );
  filter: blur(0.1cqi);
}
.unit.press .handle__lever {
  transform: rotate(-32deg);
}
.handle__lock {
  position: absolute;
  left: 50%;
  top: calc(100% + 6.5cqi);
  width: 5.4cqi;
  height: 10.5cqi;
  margin-left: -2.7cqi;
  border-radius: 2.7cqi;
  background: radial-gradient(
    ellipse at 38% 28%,
    #fff3d0 0,
    #d9b86f 22%,
    #a07b37 55%,
    #5e4419 100%
  );
  box-shadow:
    0 0 0 0.3cqi rgba(0, 0, 0, 0.2),
    0.6cqi 1cqi 1.4cqi rgba(0, 0, 0, 0.42),
    inset -0.4cqi -0.6cqi 0.8cqi rgba(40, 26, 6, 0.5),
    inset 0.3cqi 0.4cqi 0.5cqi rgba(255, 248, 222, 0.45);
}
/* the keyhole: a round top over a narrow slot */
.handle__lock::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 30%;
  width: 2cqi;
  height: 2cqi;
  margin-left: -1cqi;
  border-radius: 50%;
  background: #140d04;
  box-shadow: inset 0.2cqi 0.3cqi 0.3cqi rgba(0, 0, 0, 0.8);
}
.handle__lock::after {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(30% + 1.3cqi);
  width: 1cqi;
  height: 3cqi;
  margin-left: -0.5cqi;
  border-radius: 0 0 0.3cqi 0.3cqi;
  background: #140d04;
}
/* light from the room behind, leaking under the door */
.sill {
  position: absolute;
  left: 3cqi;
  right: 3cqi;
  bottom: 0;
  height: 1cqi;
  z-index: 2;
  pointer-events: none;
  border-radius: 1cqi;
  background: rgba(var(--glow), 0.95);
  filter: blur(0.7cqi);
  opacity: 0.4;
  transition: opacity 0.6s var(--e-soft);
}
html[data-mode="dark"] .sill {
  opacity: 0.75;
}
/* the polished floor picks up each door's colour and the light under it */
.pool {
  position: absolute;
  left: -10cqi;
  right: -10cqi;
  top: 100%;
  height: 40cqi;
  pointer-events: none;
  z-index: 3;
  opacity: 0.55;
  transition: opacity 0.6s var(--e-soft);
  background:
    radial-gradient(
      42% 60% at 50% 0%,
      color-mix(in srgb, var(--door) 55%, transparent),
      transparent 100%
    ),
    radial-gradient(
      40% 22% at 50% 0%,
      rgba(var(--glow), 0.55),
      transparent 100%
    );
  filter: blur(1.2cqi);
}
.unit.on .sill {
  opacity: 1;
}
.unit.on .pool {
  opacity: 0.9;
}
/* no floor: the doors stand straight on the next section */
.doors__floor,
.pool {
  display: none !important;
}
/* light spilling onto the floor in front of an open door */
.spill {
  display: none;
  position: absolute;
  left: -8cqi;
  right: -8cqi;
  top: 100%;
  height: 60cqi;
  pointer-events: none;
  z-index: 3;
  opacity: var(--o, 0);
  clip-path: polygon(12% 0, 88% 0, 100% 100%, 0 100%);
  background: linear-gradient(
    180deg,
    rgba(var(--spill), 0.55) 0%,
    rgba(var(--spill), 0.18) 55%,
    rgba(var(--spill), 0) 100%
  );
  filter: blur(1.2cqi);
  mix-blend-mode: screen;
}
html:not([data-mode="dark"]) .spill {
  mix-blend-mode: normal;
  background: linear-gradient(
    180deg,
    rgba(var(--spill), 0.4) 0%,
    rgba(var(--spill), 0.12) 55%,
    rgba(var(--spill), 0) 100%
  );
}
.leak {
  display: none;
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 3cqi;
  pointer-events: none;
  opacity: calc(var(--o, 0) * 9);
  background: linear-gradient(90deg, transparent, rgba(var(--spill), 0.85));
  filter: blur(0.8cqi);
  mix-blend-mode: screen;
}

/* phones: the wall pins in place and scrolling walks you along it, one door at a time */
@media (max-width: 639.98px) {
  .doors {
    padding-top: 0;
    overflow: clip;
    height: calc(100svh + 3 * 55svh);
  }
  .doors__pin {
    --uw: min(56vw, calc((100svh - 31rem) / 2.25));
    --ug: calc(50vw - var(--uw) / 2 + 0.75rem);
    position: sticky;
    top: 0;
    height: 100svh;
    padding-top: 4.75rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    background: inherit;
    overflow: clip;
  }
  .doors__floor {
    height: 3.25rem;
  }
  .doors__wall {
    gap: 1rem;
    align-items: stretch;
  }
  .doors__row {
    display: flex;
    gap: var(--ug);
    overflow: visible;
    padding-inline: calc(50% - var(--uw) / 2);
    margin-inline: -1.25rem;
    width: calc(100% + 2.5rem);
    padding-top: 2rem;
    margin-top: -1rem;
    transition: none;
    will-change: transform;
  }
  .doors__row::after {
    left: 0;
    right: auto;
    width: 700vw;
  }
  .unit {
    flex: 0 0 var(--uw);
    max-width: none;
  }
  .unit.unit--secret {
    position: relative;
    left: auto;
    bottom: auto;
    width: auto;
    display: none;
    visibility: visible;
    opacity: 1;
  }
  .doors.reveal .unit.unit--secret {
    display: block;
  }
  .unit::before {
    display: none;
  }
  .dinfo {
    position: relative;
    left: auto !important;
    top: auto !important;
    width: auto !important;
    max-width: 100%;
    margin: 0.9rem 0 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(var(--fg-rgb), 0.1);
    text-align: left;
    min-height: 10.5rem;
    opacity: 1;
    transform: none;
  }
  .dinfo .dinfo__h {
    font-size: 1.5rem;
    line-height: 1.1;
    margin-bottom: 0.35rem;
  }
  .dinfo .dinfo__t {
    margin-bottom: 0.85rem;
    font-size: 0.625rem;
    letter-spacing: 0.08em;
    line-height: 1.4;
  }
  .dinfo .dinfo__p {
    font-size: 0.875rem;
    line-height: 1.35;
    gap: 0.45rem;
  }
  .dinfo .dinfo__p li {
    gap: 0.6rem;
  }
  .dinfo .dinfo__p li::before {
    width: 0.95rem;
    height: 0.95rem;
    background-size: 0.55rem;
  }
  .doors__dots {
    display: flex;
    gap: 0.4rem;
    margin: 0.25rem 0 0;
  }
  .doors.compact .dinfo__p {
    display: none;
  }
  .doors.compact .dinfo {
    min-height: 0;
  }
  .doors__dots i {
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 999px;
    background: rgba(var(--fg-rgb), 0.2);
    transition:
      width 0.35s cubic-bezier(0.16, 1, 0.3, 1),
      background 0.35s;
  }
  .doors__dots i.on {
    width: 1.3rem;
    background: var(--foreground);
  }
  .doors__hint {
    display: none;
  }
  .paint {
    font-size: 2.15rem;
    max-width: none;
    white-space: nowrap;
    align-self: flex-start;
    text-align: left;
    margin: 0.25rem 0 0.5rem;
  }
}

/* "Click to enter" badge that replaces the cursor over a door */
@media (hover: hover) and (pointer: fine) {
  .doorway {
    cursor: none;
  }
}
.door-cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 90;
  pointer-events: none;
  padding: 0.6rem 1rem;
  border-radius: 9999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 0.5rem 1.5rem -0.5rem rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.18s ease;
}
.door-cursor.on {
  opacity: 1;
  scale: 1;
}

/* ---------- skill work page (opens through a door) ---------- */
.roomv {
  position: fixed;
  inset: 0;
  z-index: 105;
  overflow: auto;
  overscroll-behavior: contain;
  background: var(--background);
  color: var(--foreground);
  clip-path: inset(0 0 0 0);
  will-change: clip-path;
}
.roomv.anim {
  transition: clip-path 0.8s cubic-bezier(0.7, 0, 0.2, 1);
}
.roomv__glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  opacity: 1;
  transition: opacity 0.7s ease 0.15s;
  background: radial-gradient(
    70% 45% at 55% 22%,
    var(--room-in) 0%,
    var(--room-mid) 38%,
    var(--room-out) 100%
  );
}
.roomv.lit .roomv__glow {
  opacity: 0;
}
.roomv__in {
  position: relative;
  z-index: 1;
  padding-block: 1.5rem 5rem;
  opacity: 0;
  transform: translateY(1.25rem);
  transition:
    opacity 0.6s var(--e-soft),
    transform 0.8s var(--e-soft);
}
.roomv.lit .roomv__in {
  opacity: 1;
  transform: none;
  transition-delay: 0.25s;
}
.roomv__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 3rem;
}
.roomv__door {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(var(--fg-rgb), 0.5);
}
.roomv__head {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  max-width: 44rem;
  padding-bottom: 3.5rem;
}
.roomv__title {
  font-size: 2.75rem;
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.02em;
}
@media (min-width: 640px) {
  .roomv__title {
    font-size: 4rem;
  }
}
@media (min-width: 1024px) {
  .roomv__title {
    font-size: 4.75rem;
  }
}
.roomv__desc {
  font-size: 1.0625rem;
  line-height: 1.55;
  color: rgba(var(--fg-rgb), 0.65);
  max-width: 52ch;
}
.roomv__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 640px) {
  .roomv__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1024px) {
  .roomv__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
  }
}
.slot-card {
  aspect-ratio: 4/3;
  border-radius: var(--radius-card-sm);
  border: 1.5px dashed rgba(var(--fg-rgb), 0.18);
  background: rgba(var(--fg-rgb), 0.025);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.25rem;
  padding: 1.25rem;
}
.slot-card b {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(var(--fg-rgb), 0.4);
}
.slot-card span {
  font-size: 1rem;
  font-weight: 500;
  color: rgba(var(--fg-rgb), 0.7);
}

/* ---------- nav overlay ---------- */
.navm {
  position: fixed;
  inset: 0;
  z-index: 115;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: #fff;
  opacity: 0;
  transition: opacity 0.45s var(--e-spring);
}
.navm.open {
  opacity: 1;
}
.navm__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.25rem;
}
@media (min-width: 640px) {
  .navm__top {
    padding-block: 1.5rem;
  }
}
.navm__top .brand svg {
  color: var(--accent-from);
}
.close-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-control);
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.7);
  transition:
    border-color 0.25s,
    color 0.25s;
}
.close-btn:hover {
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}
.close-btn svg {
  font-size: 0.875rem;
}
.navm__nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.navm__nav ul {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.navm__item {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  width: 100%;
  padding-block: 0.5rem;
  text-align: left;
  font-size: 2.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  transform: translateY(1rem);
  opacity: 0;
  transition: all 0.5s ease-out;
  transition-delay: var(--d, 0ms);
}
.navm.open .navm__item {
  transform: none;
  opacity: 1;
}
.navm__item small {
  font-size: 1rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.3);
  transition: color 0.3s;
}
.navm__item span {
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s;
}
.navm__item:hover small {
  color: var(--accent-from);
}
.navm__item:hover span {
  color: #fff;
}
@media (min-width: 640px) {
  .navm__item {
    font-size: 3.75rem;
  }
}
.navm__bot {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-block: 1.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: rgba(255, 255, 255, 0.45);
}
@media (min-width: 640px) {
  .navm__bot {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}
.navm__bot button {
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: rgba(255, 255, 255, 0.7);
}
.navm__bot button:hover {
  color: #fff;
  text-decoration: underline;
}

/* ---------- request modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 110;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  background: var(--scrim);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  opacity: 0;
  transition: opacity 0.4s var(--e-spring);
}
@media (min-width: 640px) {
  .modal {
    align-items: center;
  }
}
.modal.open {
  opacity: 1;
}
.modal__panel {
  position: relative;
  width: 100%;
  max-width: 32rem;
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  border-radius: var(--radius-card);
  background: var(--panel);
  padding: 1.5rem;
  box-shadow:
    0 0 0 1px var(--line),
    0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: translateY(28px);
  opacity: 0;
  transition:
    transform 0.55s var(--e-spring),
    opacity 0.45s var(--e-spring);
}
.modal.open .modal__panel {
  transform: none;
  opacity: 1;
}
.modal.closing .modal__panel {
  transform: translateY(18px);
  opacity: 0;
}
@media (min-width: 640px) {
  .modal__panel {
    padding: 2rem;
  }
}
.x-btn {
  position: absolute;
  right: 1rem;
  top: 1rem;
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border-radius: 9999px;
  background: var(--surface);
  color: rgba(var(--fg-rgb), 0.6);
  font-size: 0.9rem;
  transition:
    background 0.2s,
    color 0.2s;
}
.x-btn:hover {
  background: var(--surface-2);
  color: var(--foreground);
}
.mhead {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.mhead p {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(var(--fg-rgb), 0.6);
}
.mhead p::before {
  content: "";
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  background: var(--accent);
}
.mhead h2,
.msuccess h2 {
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
@media (min-width: 640px) {
  .mhead h2 {
    font-size: 1.875rem;
  }
}
.mform {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.mform label {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.mform label > span {
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.025em;
  color: rgba(var(--fg-rgb), 0.5);
}
.mform input,
.mform textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--field);
  border-radius: var(--radius-control);
  padding: 0.75rem 1rem;
  font: inherit;
  font-size: 0.875rem;
  color: var(--foreground);
  outline: none;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.mform textarea {
  resize: none;
}
.mform input:focus,
.mform textarea:focus {
  border-color: rgba(var(--fg-rgb), 0.3);
  background: var(--panel);
}
.mform__bot {
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.mform__bot small {
  font-size: 0.75rem;
  color: rgba(var(--fg-rgb), 0.45);
}
.msuccess {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  padding-block: 2rem;
}
.msuccess__badge {
  width: 3.5rem;
  height: 3.5rem;
  display: grid;
  place-items: center;
  border-radius: 9999px;
  background: var(--ink);
  color: var(--accent-from);
  font-size: 1.5rem;
}
.msuccess p {
  max-width: 34ch;
  font-size: 0.875rem;
  color: rgba(var(--fg-rgb), 0.72);
}
.msuccess__alt {
  font-size: 0.8125rem !important;
}
.msuccess__alt a {
  color: var(--foreground);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}
.mform__hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
/* enquiry questionnaire */
.qz__min {
  font-size: 0.8125rem;
  color: rgba(var(--fg-rgb), 0.62);
}
.qz__min b {
  color: var(--foreground);
  font-weight: 600;
}
.qz__top {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: rgba(var(--fg-rgb), 0.55);
  font-variant-numeric: tabular-nums;
}
.qz__bar {
  flex: 1;
  height: 0.25rem;
  border-radius: 99px;
  background: var(--line);
  overflow: hidden;
}
.qz__bar i {
  display: block;
  height: 100%;
  width: 20%;
  background: var(--foreground);
  border-radius: inherit;
  transition: width 0.45s var(--e-spring);
}
.qz {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.qz[hidden] {
  display: none;
}
.qz legend {
  padding: 0;
  margin-bottom: 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  outline: none;
}
.mform label.qc {
  position: relative;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
  min-height: 3rem;
  padding: 0.7rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--field);
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s,
    box-shadow 0.2s;
}
.mform label.qc:hover {
  border-color: rgba(var(--fg-rgb), 0.3);
}
.mform label.qc > span {
  font-size: 0.9375rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--foreground);
}
.mform label.qc::before {
  content: "";
  flex: none;
  width: 1.125rem;
  height: 1.125rem;
  border-radius: 50%;
  border: 1.5px solid rgba(var(--fg-rgb), 0.45);
  box-sizing: border-box;
  transition: border 0.2s;
}
.mform label.qc input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.mform label.qc:has(input:checked) {
  border-color: var(--foreground);
  background: var(--panel);
  box-shadow: 0 0 0 1px var(--foreground);
}
.mform label.qc:has(input:checked)::before {
  border: 5px solid var(--foreground);
}
.mform label.qc:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.mform label.qc--q > span {
  color: rgba(var(--fg-rgb), 0.7);
  font-weight: 400;
}
.cur {
  display: flex;
  gap: 0.25rem;
  align-self: flex-start;
  padding: 0.25rem;
  margin-bottom: 0.25rem;
  border-radius: 99px;
  background: var(--surface);
}
.mform .cur label {
  position: relative;
  flex-direction: row;
  gap: 0;
}
.mform .cur input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.mform .cur span {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0 0.9rem;
  border-radius: 99px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: rgba(var(--fg-rgb), 0.62);
  cursor: pointer;
  transition:
    background 0.2s,
    color 0.2s;
}
.mform .cur span,
.mform .qc span {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Noto Sans",
    sans-serif !important;
}
.mform .cur input:checked + span {
  background: var(--panel);
  color: var(--foreground);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
.mform .cur input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.mform label > span em {
  font-style: normal;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.75;
}
.qz__err {
  margin: 0;
  min-height: 1.25rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #b3412f;
}
html[data-mode="dark"] .qz__err {
  color: #f08a78;
}
.qz__err:empty {
  min-height: 0;
}
.qz__back {
  min-height: 2.75rem;
  padding: 0 1.1rem;
  border-radius: 99px;
  border: 1px solid var(--line);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--foreground);
  transition: background 0.2s;
}
.qz__back:hover {
  background: var(--surface);
}
.qz__back[hidden] {
  display: none;
}
#mBack:not([hidden]) + small {
  display: none;
}
.qz__stopbtns {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ---------- footer ---------- */
/* the footer slides up over the last 32px of the section above, so its rounded corners show that
   section's real background (gradients and glows included) instead of a flat patch of colour */
.sfw {
  position: relative;
  z-index: 2;
  background: transparent;
  margin-top: -32px;
}
.sfw--dark .sf {
  box-shadow: inset 0 1px 0 rgba(232, 228, 224, 0.12);
}
.sf {
  --sf-bg: #1a1818;
  --sf-fg: #e8e4e0;
  --sf-rgb: 232, 228, 224;
  --sf-acc: #c4b0b0;
  position: relative;
  z-index: 2;
  background: var(--sf-bg);
  color: var(--sf-fg);
  border-radius: 2rem 2rem 0 0;
  overflow: hidden;
  font-family:
    "Onest",
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}
html[data-mode="dark"] .sf {
  --sf-bg: #0f0e0e;
  box-shadow: inset 0 1px 0 rgba(232, 228, 224, 0.1);
}
.sf__in {
  max-width: 88rem;
  margin: 0 auto;
  padding: 5.5rem 1.25rem 1.5rem;
}
@media (min-width: 1024px) {
  .sf__in {
    padding: 7rem 5.5rem 1.75rem;
  }
}
html,
body {
  overscroll-behavior-y: none;
}
html {
  background: #1a1818;
}
html[data-mode="dark"] {
  background: #0f0e0e;
}
body {
  margin: 0;
}
.sf {
  margin-bottom: 0;
}
.sf__eye {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(var(--sf-rgb), 0.6);
}
.sf__eye i {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #8fbf7a;
  box-shadow: 0 0 0 0 rgba(143, 191, 122, 0.6);
  animation: sfPulse 2.2s ease-out infinite;
}
@keyframes sfPulse {
  70% {
    box-shadow: 0 0 0 0.55rem rgba(143, 191, 122, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(143, 191, 122, 0);
  }
}
.sf__h {
  margin: 1.4rem 0 1.25rem;
  font-size: clamp(2.75rem, 7.5vw, 6.5rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.035em;
}
.sf__h span {
  display: block;
  color: rgba(var(--sf-rgb), 0.42);
}
.sf__p {
  max-width: 46ch;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: rgba(var(--sf-rgb), 0.7);
}
.sf__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
}
.sf__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  height: 3.5rem;
  padding: 0 0.55rem 0 1.6rem;
  border: 0;
  border-radius: 999px;
  background: var(--sf-fg);
  color: var(--sf-bg);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.sf__btn b {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--sf-bg);
  color: var(--sf-fg);
}
.sf__btn svg {
  width: 1.05rem;
  height: 1.05rem;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.sf__btn:hover {
  transform: translateY(-2px);
}
.sf__btn:hover svg {
  transform: translateX(3px);
}
.sf__ghost {
  display: inline-flex;
  align-items: center;
  height: 3.5rem;
  padding: 0 1.5rem;
  border-radius: 999px;
  border: 1px solid rgba(var(--sf-rgb), 0.2);
  background: none;
  color: var(--sf-fg);
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.25s;
}
.sf__ghost:hover {
  background: rgba(var(--sf-rgb), 0.07);
}
.sf__cols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2.25rem 1.5rem;
  margin-top: 5rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(var(--sf-rgb), 0.12);
}
@media (min-width: 768px) {
  .sf__cols {
    grid-template-columns: 2fr 1fr 1fr;
  }
}
.sf__cols h3 {
  margin-bottom: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(var(--sf-rgb), 0.66);
}
.sf__cols ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
@media (pointer: coarse), (max-width: 767.98px) {
  .sf__cols ul {
    gap: 0;
  }
  .sf__cols button,
  .sf__cols a,
  .sf__bot button {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
  }
  .sf__cols li.st {
    min-height: 32px;
    display: flex;
    align-items: center;
  }
}
.sf__cols button,
.sf__cols a {
  padding: 0;
  border: 0;
  background: none;
  color: rgba(var(--sf-rgb), 0.85);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  transition: color 0.2s;
}
.sf__cols button:hover,
.sf__cols a:hover {
  color: #fff;
}
.sf__cols li.st {
  font-size: 0.9375rem;
  color: rgba(var(--sf-rgb), 0.85);
}
.sf__cols .work {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  gap: 0.6rem 1.5rem;
}
.sf__in {
  position: relative;
  z-index: 1;
}
/* the name runs the full width of the footer, edge to edge, behind the links and the bottom line */
.sf__word {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 0;
  margin: 0;
  padding: 0 1.2vw;
  font-size: var(--wf, 15vw);
  font-weight: 700;
  line-height: 0.74;
  letter-spacing: -0.055em;
  color: rgba(var(--sf-rgb), 0.17);
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
  text-align: center;
  transform: translateY(0.05em);
}
.sf__word span {
  display: inline-block;
}
.sf__word .short {
  display: none;
}
@media (max-width: 767.98px) {
  .sf__word .full {
    display: none;
  }
  .sf__word .short {
    display: inline-block;
  }
}

.sf__bot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.75rem;
  font-size: 0.8125rem;
  color: rgba(var(--sf-rgb), 0.68);
}
.sf__bot button {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.sf__bot button:hover {
  color: var(--sf-fg);
}
.sf__legal a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-color: rgba(var(--sf-rgb), 0.35);
}
.sf__legal a:hover {
  color: var(--sf-fg);
}
@media (pointer: coarse), (max-width: 767.98px) {
  .sf__legal a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sf__eye i {
    animation: none;
  }
}
/* ---------- floating back-to-top ---------- */
.totop {
  --tt-bg: #1a1818;
  --tt-fg: #e8e4e0;
  --tt-ring: 232, 228, 224;
  position: fixed;
  right: max(1.25rem, env(safe-area-inset-right));
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  z-index: 60;
  display: grid;
  place-items: center;
  width: 3.25rem;
  height: 3.25rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--tt-bg);
  color: var(--tt-fg);
  cursor: pointer;
  box-shadow:
    0 10px 30px -10px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(var(--tt-ring), 0.14);
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.75rem) scale(0.9);
  transition:
    opacity 0.35s ease,
    visibility 0s linear 0.35s,
    transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.3s ease,
    color 0.3s ease,
    box-shadow 0.3s ease;
}
.totop.show {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}
.totop[data-on="dark"] {
  --tt-bg: #e8e4e0;
  --tt-fg: #1a1818;
  --tt-ring: 26, 24, 24;
}
.totop svg.ar {
  width: 1.15rem;
  height: 1.15rem;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.totop svg.ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
  pointer-events: none;
}
.totop .ring circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  opacity: 0.85;
  stroke-dasharray: var(--len);
  stroke-dashoffset: calc(var(--len) * (1 - var(--p, 0)));
  transition: stroke-dashoffset 0.12s linear;
}
.totop .lbl {
  position: absolute;
  right: calc(100% + 0.6rem);
  top: 50%;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  background: var(--tt-bg);
  color: var(--tt-fg);
  font:
    500 0.8125rem/1 "Onest",
    ui-sans-serif,
    system-ui,
    sans-serif;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translate(0.4rem, -50%);
  transition:
    opacity 0.25s ease,
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 0 0 1px rgba(var(--tt-ring), 0.14);
}
@media (hover: hover) {
  .totop:hover {
    transform: translateY(-3px);
  }
  .totop:hover svg.ar {
    transform: translateY(-3px);
  }
  .totop:hover .lbl {
    opacity: 1;
    transform: translate(0, -50%);
  }
}
.totop:focus-visible {
  outline: 2px solid #c4b0b0;
  outline-offset: 3px;
}
@media (max-width: 767.98px) {
  .totop {
    width: 3rem;
    height: 3rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  .totop,
  .totop svg.ar {
    transition:
      opacity 0.2s ease,
      visibility 0s linear 0.2s;
  }
}

/* ---------- contact modal list ---------- */
.contact-list {
  list-style: none;
  margin: 1rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.contact-list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  background: var(--bg-2, rgba(0, 0, 0, 0.04));
  color: var(--fg);
  text-decoration: none;
  transition: transform 0.25s var(--e-spring, ease), background 0.25s ease;
}
.contact-list li a:hover {
  transform: translateY(-2px);
  background: var(--fg);
  color: var(--bg);
}
.contact-list__label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.7;
}
.contact-list li a:hover .contact-list__label { opacity: 1; }
.contact-list__value {
  font-size: 0.95rem;
  font-weight: 500;
  word-break: break-all;
  text-align: right;
}
.contact-note {
  display: block;
  margin-top: 0.9rem;
  font-size: 0.78rem;
  line-height: 1.4;
  opacity: 0.65;
}
