/* FORTY4TURES — landing page
   Geometry (positions, sizes, wheel angles) is computed in site.js and
   passed in as CSS custom properties; per-project colours come from the
   nonce-protected <style> block rendered by PHP. */

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

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow: hidden;
  background: #111;
}

body {
  font-family: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
a:hover { color: inherit; text-decoration: underline; text-underline-offset: 4px; }
button, input, textarea { font-family: inherit; }
::placeholder { color: #8A867C; opacity: 1; }

.sr-only {
  position: absolute !important;
  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 currentColor; outline-offset: 3px; }

/* ------------------------------------------------------------------ */
/* Stage                                                              */
/* ------------------------------------------------------------------ */

.stage {
  --bg: #141414;
  --ink: #F3F1EC;
  --ghost-fb: #2E2E2D;
  --status: #141414;
  --pad: 20px;
  --phone-top: 36vh;
  --phone-scale: 0.62;
  --wheel-y: 140vh;
  --ring-r: 600px;
  --tile: 66px;
  --glyph-size: 33px;
  --ghost-top: 45vh;
  --info-w: 300px;
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background-color: var(--bg);
  color: var(--ink);
  transition: background-color 900ms ease, color 700ms ease;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: pan-y pinch-zoom;
}

@media (min-width: 900px) {
  .stage { --pad: 44px; --phone-top: 20vh; --phone-scale: 1; --tile: 112px; --glyph-size: 56px; --ghost-top: 36vh; }
}

/* No transitions until the first layout pass is applied, and while resizing. */
.stage:not(.is-ready) *,
.stage:not(.is-ready),
.stage.is-resizing .tile,
.stage.is-resizing .phone,
.stage.is-resizing .ghost,
.stage.is-resizing .ring { transition: none !important; }

.hero { position: absolute; inset: 0; }

/* ------------------------------------------------------------------ */
/* Header                                                             */
/* ------------------------------------------------------------------ */

.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 26px var(--pad);
}

.brand { display: flex; align-items: baseline; gap: 20px; min-width: 0; }

.wordmark {
  font-size: 18px;
  font-weight: 800;
  font-variation-settings: 'wdth' 125;
  letter-spacing: 0.01em;
  white-space: nowrap;
}
.wordmark:hover { text-decoration: none; }

.tagline { display: none; font-size: 13px; font-weight: 500; white-space: nowrap; }

.header-right { display: flex; align-items: center; gap: 24px; flex-shrink: 0; }

.header-mail { display: none; font-size: 14px; font-weight: 600; }

.btn-contact {
  display: inline-flex;
  align-items: center;
  height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  border: none;
  background-color: var(--ink);
  color: var(--bg);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 900ms ease, color 900ms ease, transform 200ms ease;
}
.btn-contact:hover { color: var(--bg); text-decoration: none; transform: translateY(-2px); }

@media (min-width: 900px) {
  .tagline { display: inline; }
}
/* The email joins the header once there is room next to the page links. */
@media (min-width: 1180px) {
  .header-mail { display: inline; }
}

/* Page links: inline on wide screens, a small menu on narrow ones. */
.site-nav { display: none; align-items: center; gap: 24px; }
.site-nav a { font-size: 14px; font-weight: 600; white-space: nowrap; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }

.nav-menu { position: relative; }
.nav-menu > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease;
}
.nav-menu > summary::-webkit-details-marker { display: none; }
.nav-menu[open] > summary { background-color: var(--ink); color: var(--bg); border-color: var(--ink); }
.nav-menu-list {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  min-width: 220px;
  padding: 8px;
  border-radius: 20px;
  background: #F3F1EC;
  color: #141414;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(20, 20, 20, 0.08);
}
.nav-menu-list a { padding: 12px 14px; border-radius: 12px; font-size: 16px; font-weight: 700; }
.nav-menu-list a:hover { background: rgba(20, 20, 20, 0.06); text-decoration: none; }
.nav-menu-list a[aria-current="page"] { background: #141414; color: #F3F1EC; }
.nav-menu-list :focus-visible { outline-color: #141414; }

@media (min-width: 900px) {
  .site-nav { display: flex; }
  .nav-menu { display: none; }
}
/* Small phones: keep wordmark, menu and Contact on one line. */
@media (max-width: 419px) {
  .site-header { gap: 10px; }
  .wordmark { font-size: 16px; }
  .header-right { gap: 8px; }
  .btn-contact { padding: 0 16px; }
}

/* ------------------------------------------------------------------ */
/* Ghost project name                                                 */
/* ------------------------------------------------------------------ */

.ghost {
  position: absolute;
  left: 0; right: 0;
  top: var(--ghost-top);
  z-index: 1;
  text-align: center;
  white-space: nowrap;
  font-weight: 900;
  font-variation-settings: 'wdth' 125;
  text-transform: uppercase;
  line-height: 0.8;
  letter-spacing: -0.03em;
  font-size: 18vw;
  color: var(--ghost-fb);
  opacity: 0;
  transform: translateY(-42%);
  transition: opacity 600ms ease, transform 900ms cubic-bezier(.2, .8, .2, 1), color 900ms ease;
  pointer-events: none;
}
.ghost.is-active { opacity: 1; transform: translateY(-50%); }

@supports (color: color-mix(in oklch, red 50%, blue)) {
  .ghost { color: color-mix(in oklch, var(--ink) 11%, var(--bg)); }
}

/* ------------------------------------------------------------------ */
/* Wheel                                                              */
/* ------------------------------------------------------------------ */

.ring {
  position: absolute;
  left: 50%;
  top: var(--wheel-y);
  z-index: 2;
  width: calc(var(--ring-r) * 2);
  height: calc(var(--ring-r) * 2);
  margin-left: calc(var(--ring-r) * -1);
  margin-top: calc(var(--ring-r) * -1);
  border-radius: 50%;
  border: 1px solid currentColor;
  opacity: 0.2;
  pointer-events: none;
}
.no-js .ring { display: none; }

.tile {
  position: absolute;
  left: 50%;
  top: var(--wheel-y);
  z-index: 3;
  width: var(--tile);
  height: var(--tile);
  margin-left: calc(var(--tile) / -2);
  margin-top: calc(var(--tile) / -2);
  border: none;
  padding: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: transform 900ms cubic-bezier(.2, .8, .2, 1), opacity 500ms ease;
}
.tile:focus-visible { outline: none; }
.tile:focus-visible .tile-icon { outline: 2px solid currentColor; outline-offset: 4px; }
.no-js .tile { display: none; }

.tile-icon {
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  width: 100%;
  height: 100%;
  padding: 13%;
  border-radius: 23%;
  overflow: hidden;
  background: var(--accent);
  color: var(--glyph);
  font-weight: 900;
  font-variation-settings: 'wdth' 125;
  font-size: var(--glyph-size);
  line-height: 0.78;
  box-shadow: 0 26px 50px -20px rgba(0, 0, 0, 0.5);
  transition: transform 250ms ease;
}
.tile:hover .tile-icon { transform: translateY(-6px); }
.tile-icon.has-img { padding: 0; }
.tile-icon img { display: block; width: 100%; height: 100%; object-fit: cover; }

.tile-label {
  position: absolute;
  left: -30px; right: -30px;
  top: 100%;
  margin-top: 12px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ------------------------------------------------------------------ */
/* Phone (design size 390 × 844, scaled)                              */
/* ------------------------------------------------------------------ */

.phone {
  position: absolute;
  left: 50%;
  top: var(--phone-top);
  z-index: 6;
  width: 390px;
  height: 844px;
  margin-left: -195px;
  transform: scale(var(--phone-scale));
  transform-origin: top center;
}

.phone-btn { position: absolute; width: 5px; background: #2A2A2C; }
.b-action { left: -4px; top: 150px; height: 34px; border-radius: 3px 0 0 3px; }
.b-vol1   { left: -4px; top: 212px; height: 64px; border-radius: 3px 0 0 3px; }
.b-vol2   { left: -4px; top: 290px; height: 64px; border-radius: 3px 0 0 3px; }
.b-power  { right: -4px; top: 240px; height: 104px; border-radius: 0 3px 3px 0; }

.phone-frame {
  position: absolute;
  inset: 0;
  border-radius: 68px;
  background: #2A2A2C;
  padding: 4px;
  box-shadow: 0 90px 140px -40px rgba(0, 0, 0, 0.6), inset 0 0 0 1px #48484B;
}
.phone-bezel { width: 100%; height: 100%; border-radius: 64px; background: #060606; padding: 12px; }
.phone-screen { position: relative; width: 100%; height: 100%; border-radius: 53px; overflow: hidden; background: #000; }

.island {
  position: absolute;
  top: 11px; left: 50%;
  z-index: 3;
  width: 124px; height: 36px;
  margin-left: -62px;
  border-radius: 20px;
  background: #000;
}

.statusbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 2;
  height: 58px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 34px 0 40px;
  font-size: 16px;
  font-weight: 700;
  color: var(--status);
  transition: color 500ms ease, opacity 300ms ease;
}
.status-icons { display: flex; gap: 3px; align-items: flex-end; }
.sig { width: 3px; border-radius: 1px; background: currentColor; }
.sig.s1 { height: 5px; } .sig.s2 { height: 7px; } .sig.s3 { height: 9px; } .sig.s4 { height: 11px; }
.battery { display: flex; width: 24px; height: 12px; margin-left: 6px; border-radius: 4px; border: 1.5px solid currentColor; padding: 1.5px; }
.battery span { flex: 1; border-radius: 1.5px; background: currentColor; }

.screen {
  position: absolute;
  inset: 0;
  background: var(--s-bg);
  color: var(--s-ink);
  opacity: 0;
  transition: opacity 500ms ease;
}
.screen.is-active { opacity: 1; }
.screen-img { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }

.screen-inner {
  padding: 66px 22px 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transform: translateY(18px);
  transition: transform 700ms cubic-bezier(.2, .8, .2, 1);
}
.screen.is-active .screen-inner { transform: translateY(0); }

.app-head { display: flex; align-items: center; justify-content: space-between; }
.app-id { display: flex; align-items: center; gap: 10px; min-width: 0; }
.app-icon {
  flex-shrink: 0;
  width: 34px; height: 34px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--accent);
  color: var(--glyph);
  display: flex;
  align-items: flex-end;
  padding: 5px 6px;
  font-weight: 900;
  font-variation-settings: 'wdth' 125;
  font-size: 17px;
  line-height: 0.8;
}
.app-icon.has-img { padding: 0; }
.app-icon img { display: block; width: 100%; height: 100%; object-fit: cover; }
.app-name { font-size: 18px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--s-card); }

/* stat */
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat-label { font-size: 14px; font-weight: 500; color: var(--s-muted); }
.stat-big { font-size: 56px; font-weight: 800; font-variation-settings: 'wdth' 112; letter-spacing: -0.03em; line-height: 1; white-space: nowrap; }
.chip {
  align-self: flex-start;
  margin-top: 8px;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--s-accent);
  color: var(--s-on);
  font-size: 12px;
  font-weight: 700;
}
.bars { display: flex; align-items: flex-end; gap: 6px; height: 120px; }
.bar { flex: 1; height: 50%; border-radius: 6px; background: var(--s-card); }
.bar:last-child { background: var(--s-accent); }

/* hero */
.hero-card {
  height: 300px;
  border-radius: 30px;
  background: var(--s-accent);
  color: var(--s-on);
  padding: 22px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.chip-inv { margin-top: 0; background: var(--s-on); color: var(--s-accent); }
.hero-card-text { display: flex; flex-direction: column; gap: 10px; }
.hero-card-title { font-size: 46px; font-weight: 800; font-variation-settings: 'wdth' 112; line-height: 0.95; letter-spacing: -0.03em; overflow-wrap: anywhere; }
.hero-card-sub { font-size: 14px; font-weight: 600; }

/* grid */
.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--s-card); }
.tab { flex: 1; text-align: center; padding: 9px 0; border-radius: 10px; font-size: 13px; font-weight: 600; color: var(--s-muted); white-space: nowrap; overflow: hidden; }
.tab:first-child { background: var(--s-bg); color: var(--s-ink); }
.cells { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cell { padding: 16px; border-radius: 20px; background: var(--s-card); color: var(--s-ink); display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.cell:first-child { background: var(--s-accent); color: var(--s-on); }
.cell-k { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cell-v { font-size: 30px; font-weight: 800; font-variation-settings: 'wdth' 112; letter-spacing: -0.02em; line-height: 1; white-space: nowrap; }

/* list */
.list { display: flex; flex-direction: column; }
.list-head { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 8px; }
.list-title { font-size: 16px; font-weight: 700; }
.list-more { font-size: 13px; font-weight: 500; color: var(--s-muted); }
.row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-top: 1px solid var(--s-line); }
.row-i { flex-shrink: 0; width: 42px; height: 42px; border-radius: 13px; background: var(--s-card); display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 800; }
.row-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.row-t { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-s { font-size: 13px; color: var(--s-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-v { flex-shrink: 0; font-size: 15px; font-weight: 700; white-space: nowrap; }

/* ------------------------------------------------------------------ */
/* Info block + controls (wide)                                       */
/* ------------------------------------------------------------------ */

.info {
  position: absolute;
  left: var(--pad);
  bottom: 40px;
  z-index: 8;
  width: var(--info-w);
  display: none;
  flex-direction: column;
  gap: 14px;
}
.info-meta { display: flex; gap: 10px; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
/* Names never break mid-word; site.js shrinks the size when a word is wider than the box. */
.info-name { margin: 0; font-size: 50px; font-weight: 800; font-variation-settings: 'wdth' 125; letter-spacing: -0.025em; line-height: 0.95; overflow-wrap: normal; }
.info-desc { margin: 0; font-size: 16px; line-height: 1.45; text-wrap: pretty; }
.info-meta > span { white-space: nowrap; flex-shrink: 0; }
.info-meta > [data-bind="category"] { flex-shrink: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.info-year { margin-left: auto; padding-left: 12px; letter-spacing: 0.08em; }
.info-foot { font-size: 13px; font-weight: 600; padding-top: 12px; border-top: 1px solid currentColor; }
.foot-left[hidden],
.compact-links[hidden] { display: none; }
.platforms { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------------------------ */
/* Squishy link buttons (Material 3 Expressive-style shape morph)     */
/* Hover / keyboard focus: corners spring from pill to rounded-square, */
/* the button widens and its neighbours squeeze.                       */
/* Press: squishes further. Touch devices (no hover) get the whole     */
/* morph on press. Leaving springs back with a little overshoot.       */
/* ------------------------------------------------------------------ */

:root {
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --press: cubic-bezier(.2, 0, 0, 1);
}
@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --spring: linear(0, 0.009, 0.035 2.1%, 0.141 4.4%, 0.281 6.7%, 0.723 12.9%, 0.938 16.7%, 1.017 19.4%, 1.077 22.2%, 1.121 25.2%, 1.139 28.4%, 1.138 30.6%, 1.122 33.6%, 1.061 41.2%, 1.019 46.6%, 0.995 52.8%, 0.987 58.6%, 0.992 69.4%, 1.001 80.6%, 1);
  }
}

.store-links { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

.store-btn {
  --h: 36px;
  --r: 18px;
  --px: 14px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: var(--h);
  padding: 0 var(--px) 0 calc(var(--px) - 2px);
  border-radius: var(--r);
  color: inherit;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition:
    border-radius 650ms var(--spring),
    padding 650ms var(--spring),
    transform 650ms var(--spring);
}
/* Tonal fill + state layer in the current text colour (works on every project palette). */
.store-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: currentColor;
  opacity: 0.13;
  transition: opacity 200ms ease;
}
.store-btn:hover { color: inherit; text-decoration: none; }
.store-btn:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

/* 1) Hover (real pointers only — touch screens would keep a "stuck" hover) */
@media (hover: hover) and (pointer: fine) {
  .store-btn:hover { --r: 10px; --px: 18px; }
  .store-btn:hover::before { opacity: 0.22; }
  .store-links:has(.store-btn:hover) .store-btn:not(:hover) { --px: 10px; }
}

/* 2) Keyboard focus looks like hover */
.store-btn:focus-visible { --r: 10px; --px: 18px; }
.store-btn:focus-visible::before { opacity: 0.22; }
.store-links:has(.store-btn:focus-visible) .store-btn:not(:focus-visible) { --px: 10px; }

/* 3) Press: squish further, quickly */
.store-btn:active {
  --r: 8px;
  --px: 18px;
  transform: scale(0.94);
  transition-duration: 160ms;
  transition-timing-function: var(--press);
}
.store-btn:active::before { opacity: 0.3; }
.store-links:has(.store-btn:active) .store-btn:not(:active) {
  --px: 10px;
  transition-duration: 160ms;
  transition-timing-function: var(--press);
}

.store-ico { flex-shrink: 0; width: 15px; height: 15px; display: block; }

/* Icon-only variant under the title on narrow screens (M3 icon buttons:
   round at rest, squircle on hover/press, neighbours squeeze). */
.compact-links { display: flex; justify-content: center; margin-top: 6px; }
.store-links-sm { justify-content: center; gap: 8px; }
.store-links-sm .store-btn {
  --h: 42px;
  --r: 21px;
  --w: 42px;
  width: var(--w);
  padding: 0;
  gap: 0;
  transition:
    border-radius 650ms var(--spring),
    width 650ms var(--spring),
    transform 650ms var(--spring);
}
@media (hover: hover) and (pointer: fine) {
  .store-links-sm .store-btn:hover { --r: 13px; --w: 52px; }
  .store-links-sm:has(.store-btn:hover) .store-btn:not(:hover) { --w: 37px; }
}
.store-links-sm .store-btn:focus-visible { --r: 13px; --w: 52px; }
.store-links-sm:has(.store-btn:focus-visible) .store-btn:not(:focus-visible) { --w: 37px; }
.store-links-sm .store-btn:active { --r: 11px; --w: 52px; transition-duration: 160ms; transition-timing-function: var(--press); }
.store-links-sm:has(.store-btn:active) .store-btn:not(:active) { --w: 37px; transition-duration: 160ms; transition-timing-function: var(--press); }
.store-links-sm .store-ico { width: 18px; height: 18px; }
.store-links-sm .store-label {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.controls {
  position: absolute;
  right: var(--pad);
  bottom: 40px;
  z-index: 8;
  display: none;
  flex-direction: column;
  align-items: flex-end;
  gap: 20px;
}
.dots { display: flex; gap: 5px; align-items: center; }
.dot {
  position: relative;
  width: 8px;
  height: 4px;
  border: none;
  padding: 0;
  border-radius: 2px;
  color: inherit; /* buttons don't inherit text colour by default */
  background: currentColor;
  opacity: 0.35;
  cursor: pointer;
  transition: width 400ms ease, opacity 400ms ease;
}
.dot::before { content: ''; position: absolute; inset: -12px -2px; }
.dot.is-active { width: 24px; opacity: 1; }
.dot:hover { opacity: 0.7; }
.dot.is-active:hover { opacity: 1; }

.nav { display: flex; align-items: center; gap: 12px; }
.counter { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; margin-right: 6px; }
.arrow {
  width: 54px; height: 54px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  background: transparent;
  color: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 250ms ease;
}
.arrow:hover { background: rgba(0, 0, 0, 0.12); }
.legal { font-size: 12px; font-weight: 500; }

@media (min-width: 900px) {
  .info, .controls { display: flex; }
}

/* ------------------------------------------------------------------ */
/* Compact bar (< 900px)                                              */
/* ------------------------------------------------------------------ */

.compact-bar {
  position: absolute;
  left: 0; right: 0;
  top: 92px;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 var(--pad);
}
.compact-bar .arrow { width: 46px; height: 46px; flex-shrink: 0; font-size: 18px; }
.arrow-spacer { width: 46px; flex-shrink: 0; }
.compact-title { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; min-width: 0; }
.compact-meta { font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.compact-name { display: block; max-width: 100%; font-size: 34px; font-weight: 800; font-variation-settings: 'wdth' 125; letter-spacing: -0.025em; line-height: 0.95; overflow-wrap: normal; }

@media (min-width: 900px) {
  .compact-bar { display: none; }
}

/* Empty state (no visible projects) */
.empty-hero {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 0 var(--pad);
  text-align: center;
}
.empty-title { margin: 0; font-size: clamp(48px, 12vw, 160px); font-weight: 900; font-variation-settings: 'wdth' 125; letter-spacing: -0.03em; line-height: 0.85; }
.empty-text { margin: 0; max-width: 520px; font-size: 17px; line-height: 1.5; }

/* ------------------------------------------------------------------ */
/* Contact sheet                                                      */
/* ------------------------------------------------------------------ */

.contact-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(8, 8, 8, 0.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 400ms ease;
}

.sheet {
  position: fixed;
  top: 12px; right: 12px; bottom: 12px;
  z-index: 51;
  width: min(580px, calc(100% - 24px));
  background: #F3F1EC;
  color: #141414;
  border-radius: 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, 0.5);
  transform: translateX(calc(100% + 24px));
  visibility: hidden;
  transition: transform 600ms cubic-bezier(.2, .8, .2, 1), visibility 0s linear 600ms;
}
.sheet:focus { outline: none; }

.contact.is-open .contact-overlay,
.no-js .contact:target .contact-overlay { opacity: 1; pointer-events: auto; }

.contact.is-open .sheet,
.no-js .contact:target .sheet {
  transform: translateX(0);
  visibility: visible;
  transition: transform 600ms cubic-bezier(.2, .8, .2, 1), visibility 0s linear 0s;
}

.sheet-inner {
  min-height: 100%;
  padding: clamp(24px, 4vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.sheet-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }

.btn-close,
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1.5px solid #141414;
  background: transparent;
  color: #141414;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease;
}
.btn-close { height: 40px; padding: 0 16px; font-size: 13px; }
.btn-outline { align-self: flex-start; margin-top: 8px; height: 48px; padding: 0 20px; font-size: 14px; }
.btn-close:hover,
.btn-outline:hover { background: #141414; color: #F3F1EC; text-decoration: none; }

.sheet-title {
  margin: 0;
  font-size: clamp(36px, 5vw, 52px);
  font-weight: 800;
  font-variation-settings: 'wdth' 125;
  letter-spacing: -0.025em;
  line-height: 0.95;
  text-wrap: balance;
}
.sheet-title:focus { outline: none; }

.sent { flex: 1; display: none; flex-direction: column; justify-content: center; gap: 18px; }
.sent-text { margin: 0; font-size: 17px; line-height: 1.5; max-width: 400px; }
.compose { display: flex; flex-direction: column; gap: 32px; }
.sheet.is-sent .sent { display: flex; }
.sheet.is-sent .compose { display: none; }

.compose-head { display: flex; flex-direction: column; gap: 14px; }
.intro { margin: 0; font-size: 16px; line-height: 1.5; max-width: 440px; text-wrap: pretty; }

.form-alert {
  padding: 14px 18px;
  border-radius: 16px;
  background: #141414;
  color: #F3F1EC;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}
.form-alert[hidden] { display: none; }

.contact-form { display: flex; flex-direction: column; gap: 26px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 26px; }

.fld,
.lbl {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.fld { display: flex; flex-direction: column; gap: 4px; }

.fld input,
.fld textarea {
  width: 100%;
  border: none;
  border-bottom: 1.5px solid #141414;
  border-radius: 0;
  background: transparent;
  padding: 0;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: #141414;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}
.fld input { height: 46px; }
.fld textarea { padding: 12px 0; line-height: 1.45; resize: none; }
.fld input:focus,
.fld textarea:focus { box-shadow: 0 1px 0 0 #141414; }
.fld input[aria-invalid="true"],
.fld textarea[aria-invalid="true"] { border-bottom-color: #B3261E; }

.field-error { font-size: 13px; font-weight: 600; letter-spacing: 0; text-transform: none; color: #B3261E; }
.field-error[hidden] { display: none; }

.chips-group { margin: 0; padding: 0; border: 0; min-width: 0; }
.chips-group legend { padding: 0; margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips-group .field-error:not([hidden]) { display: block; margin-top: 10px; }

.chip-opt { position: relative; display: inline-flex; }
.chip-opt input {
  position: absolute;
  opacity: 0;
  width: 1px; height: 1px;
  margin: 0;
  pointer-events: none;
}
.chip-opt span {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1.5px solid #141414;
  background: transparent;
  color: #141414;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}
.chip-opt input:checked + span { background: #141414; color: #F3F1EC; }
.chip-opt input:focus-visible + span { outline: 2px solid #141414; outline-offset: 3px; }

.btn-submit {
  height: 60px;
  border-radius: 999px;
  border: none;
  background: #141414;
  color: #F3F1EC;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  transition: background-color 200ms ease, opacity 200ms ease;
}
.btn-submit:hover { background: #000; }
.btn-submit:focus-visible { outline: 2px solid #141414; outline-offset: 3px; }
.btn-submit[disabled] { opacity: 0.6; cursor: progress; }

.sheet-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  padding-top: 16px;
  border-top: 1px solid #141414;
}

.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.form-note {
  margin: 0;
  padding: 14px 18px;
  border-radius: 16px;
  border: 1.5px solid #141414;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}
.form-note a { text-decoration: underline; }
.turnstile-box { display: flex; flex-direction: column; gap: 8px; min-height: 65px; }
.turnstile-box .field-error:not([hidden]) { display: block; }

.sheet :focus-visible { outline-color: #141414; }

/* ------------------------------------------------------------------ */
/* Content pages (About, What we do)                                  */
/* ------------------------------------------------------------------ */

html.is-page,
html.is-page body { height: auto; min-height: 100%; overflow: visible; background: #F3F1EC; }
html.is-page:has(.contact.is-open) { overflow: hidden; }

.page {
  --bg: #F3F1EC;
  --ink: #141414;
  --muted: #6B675E;
  --line: rgba(20, 20, 20, 0.16);
  --pad: 20px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
}
@media (min-width: 900px) { .page { --pad: 44px; } }

.page .site-header {
  position: sticky;
  background: rgba(243, 241, 236, 0.9);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
}
.page .btn-contact { transition: transform 200ms ease; }

.page-main { flex: 1; width: 100%; padding: 0 var(--pad) clamp(64px, 10vw, 120px); }

.page-hero { padding: clamp(40px, 9vw, 128px) 0 clamp(40px, 6vw, 88px); }
.page-eyebrow { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.page-title {
  margin: 20px 0 0;
  max-width: 1080px;
  font-size: clamp(42px, 7.2vw, 104px);
  font-weight: 800;
  font-variation-settings: 'wdth' 125;
  letter-spacing: -0.03em;
  line-height: 0.94;
  text-wrap: balance;
  overflow-wrap: break-word;
}
.page-lead { margin: 28px 0 0; max-width: 660px; font-size: clamp(18px, 1.9vw, 22px); line-height: 1.45; text-wrap: pretty; }
.page-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* Label column + content column. */
.page-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  padding: clamp(32px, 5vw, 64px) 0;
  border-top: 1.5px solid currentColor;
}
@media (min-width: 900px) { .page-split { grid-template-columns: minmax(200px, 1fr) minmax(0, 2.4fr); gap: 40px; } }
.split-label { margin: 0; padding-top: 6px; font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }

.prose p { margin: 0 0 1.1em; max-width: 700px; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.6; text-wrap: pretty; }
.prose p:last-child { margin-bottom: 0; }

.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px 48px; margin: 0; }
@media (min-width: 640px) { .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.contact-grid dt { margin-bottom: 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.contact-grid dd { margin: 0; font-size: clamp(18px, 1.8vw, 22px); font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.contact-grid address { font-style: normal; }
.text-link { display: inline-block; margin-top: 10px; font-size: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; }

/* What we do: services */
.service-list { display: grid; grid-template-columns: minmax(0, 1fr); margin: 0; padding: 0; list-style: none; border-top: 1.5px solid currentColor; }
@media (min-width: 760px) { .service-list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 56px; } }
.service { display: grid; grid-template-columns: 52px minmax(0, 1fr); padding: 30px 0 34px; border-bottom: 1px solid var(--line); }
.service-num { padding-top: 9px; font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.service-title { margin: 0; font-size: clamp(26px, 2.8vw, 38px); font-weight: 800; font-variation-settings: 'wdth' 125; letter-spacing: -0.02em; line-height: 1; }
.service-text { margin: 14px 0 0; max-width: 480px; font-size: 16px; line-height: 1.55; }

.section-title {
  margin: clamp(56px, 8vw, 112px) 0 24px;
  font-size: clamp(32px, 4.4vw, 58px);
  font-weight: 800;
  font-variation-settings: 'wdth' 125;
  letter-spacing: -0.025em;
  line-height: 0.95;
}

/* What we do: app cards in each app's own colours (set in the nonce <style> block). */
.app-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
@media (min-width: 760px) { .app-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1180px) { .app-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.app-card {
  --c-bg: #141414;
  --c-ink: #F3F1EC;
  --c-accent: #F3F1EC;
  --c-glyph: #141414;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 320px;
  padding: 26px;
  border-radius: 28px;
  background: var(--c-bg);
  color: var(--c-ink);
}
.app-card-top { display: flex; align-items: center; gap: 16px; min-width: 0; }
.app-tile {
  display: flex;
  flex-shrink: 0;
  align-items: flex-end;
  width: 64px;
  height: 64px;
  padding: 13%;
  overflow: hidden;
  border-radius: 23%;
  background: var(--c-accent);
  color: var(--c-glyph);
  font-size: 32px;
  font-weight: 900;
  font-variation-settings: 'wdth' 125;
  line-height: 0.78;
  box-shadow: 0 18px 36px -18px rgba(0, 0, 0, 0.55);
}
.app-tile.has-img { padding: 0; }
.app-tile img { display: block; width: 100%; height: 100%; object-fit: cover; }
.app-card-head { min-width: 0; }
.app-meta { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.85; }
.app-title { margin: 6px 0 0; font-size: 30px; font-weight: 800; font-variation-settings: 'wdth' 125; letter-spacing: -0.02em; line-height: 1; overflow-wrap: anywhere; }
.app-desc { flex: 1; margin: 0; font-size: 16px; line-height: 1.5; }
.app-foot { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding-top: 14px; border-top: 1px solid currentColor; font-size: 13px; font-weight: 600; }

/* What we do: call to action */
.cta-band {
  --ink: #F3F1EC;
  --bg: #141414;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
  margin-top: clamp(56px, 8vw, 112px);
  padding: clamp(30px, 6vw, 72px);
  border-radius: 32px;
  background: var(--bg);
  color: var(--ink);
}
.cta-title { margin: 0; max-width: 900px; font-size: clamp(34px, 5vw, 66px); font-weight: 800; font-variation-settings: 'wdth' 125; letter-spacing: -0.025em; line-height: 0.95; text-wrap: balance; }
.cta-text { margin: 0; max-width: 580px; font-size: 18px; line-height: 1.5; opacity: 0.85; }
.cta-band .btn-contact { margin-top: 8px; }
.cta-band :focus-visible { outline-color: #F3F1EC; }

.page-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 28px;
  padding: 26px var(--pad) 36px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
}
.foot-nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }

/* ------------------------------------------------------------------ */
/* Reduced motion                                                     */
/* ------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}
