/* Greg Althoff — v2 pages: the works (the fork), projects, about, connect, the film player.
   Same language as the experience: Berkelium for words, Aeonik Fono for small capitals, lilac on
   near-black, glass buttons, thin rims. The world stays fixed behind; each page scrolls in front of it. */

:root {
  --page: min(1240px, calc(100vw - 2 * var(--edge)));
  --dim: rgba(200, 213, 228, 0.56);
  --rim: rgba(255, 255, 255, 0.09);
  --card: #0b0b11;
}

/* ---------- the page in front of the world ---------- */

.view-page {
  position: fixed;
  inset: 0;
  z-index: 4;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  outline: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(200, 213, 228, 0.18) transparent;
}
.view-page::-webkit-scrollbar { width: 8px; }
.view-page::-webkit-scrollbar-thumb { background: rgba(200, 213, 228, 0.16); border-radius: 8px; }
.view-page :focus-visible { outline: 1px solid rgba(200, 213, 228, 0.6); outline-offset: 4px; }
/* Headings take focus when a page arrives (for screen readers); no ring for that. */
.view-page h1[tabindex='-1']:focus { outline: none; }
.view-page a { color: inherit; }
body.is-moving .view { pointer-events: none; }

.eyebrow { margin: 0 0 18px; font-size: 11px; color: var(--dim); }
.label-caps { font-family: var(--font-label); text-transform: uppercase; letter-spacing: var(--label-tracking); }
.dim { color: var(--dim); }

/* Display words: thin Berkelium with the lilac light running across them. */
.fork-title, .case-title, .about-title, .connect-title, .next-title, .blk-heading .display, .blk-quote blockquote, .about-quote blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 100;
  letter-spacing: -0.01em;
  line-height: 1.04;
  color: transparent;
  background-image: linear-gradient(86deg, #8a87bf 0%, #b3b1dd 30%, var(--lilac-light) 58%, #eeedf9 80%, var(--lilac-light) 100%);
  background-size: 180% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  animation: drift 18s var(--ease-liquid) infinite alternate;
  padding-bottom: 0.08em;
}

/* Glass buttons in the flow of a page (the experience's buttons are placed absolutely). */
.btn.btn-inline { position: relative; text-decoration: none; color: inherit; }
.btn .ext { display: inline-flex; }
.btn .x { color: #cac9e5; font-size: 18px; line-height: 1; margin-top: -2px; }

/* The arrows at the end of links: the button arrow, turned to point where the link goes. */
.go { display: inline-block; width: 10px; height: 10px; fill: currentColor; vertical-align: -1px; margin-left: 5px; flex: none; transition: transform 0.7s var(--ease-liquid); }
.go-out { transform: rotate(45deg); }
.go-down { transform: rotate(180deg); }
.go-back { transform: rotate(-90deg); margin: 0 5px 0 0; }
a:hover > .go-out, a:focus-visible > .go-out { transform: rotate(45deg) translateY(-2px); }
a:hover > .go-down { transform: rotate(180deg) translateY(-2px); }
a:hover > .go-back { transform: rotate(-90deg) translateY(-2px); }
.btn .ext .go { fill: #cac9e5; margin: 0; }
.btn.is-on { border-color: rgba(212, 211, 236, 0.32); }

/* Images wait out of sight until the dither brings them in (fx.js), drawn on a canvas above the page
   and below the menu. */
#fx { z-index: 5; }
html.has-fx img.fx-wait { opacity: 0; }

/* ---------- the fork ---------- */

.fork {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
}
.fork .eyebrow, .fork-title { position: absolute; left: var(--col-left); }
.fork .eyebrow { top: 18vh; }
.fork-title { top: calc(18vh + 30px); font-size: clamp(42px, 5.6vw, 84px); }
.fork-paths {
  position: absolute;
  left: var(--col-left);
  right: var(--edge);
  bottom: 18vh;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.view-works.has-placed .fork-paths { position: absolute; inset: 0; display: block; pointer-events: none; }
.view-works.has-placed .fork-path {
  position: absolute;
  left: 0;
  top: 0;
  /* Centred on its spot on the path. Placed with left/top and a `translate`, not a transform: the glass swell
     scales the host, and a scale applied over a big transform shoves the label across the screen. */
  translate: -50% -50%;
  white-space: nowrap;
  pointer-events: auto;
  opacity: calc(1 - var(--sink, 0) * 2.2);
}
.fork-path .label { font-size: 15px; }
.fork-keys { position: absolute; left: 50%; bottom: calc(5vh + 30px); translate: -50% 0; margin: 0; font-size: 10px; white-space: nowrap; color: rgba(200, 213, 228, 0.42); }
.fork-all {
  position: absolute;
  left: 50%;
  bottom: 5vh;
  translate: -50% 0; /* not transform: the fade-in animates transform and would drop the centring */
  font-size: 11px;
  color: var(--dim);
  text-decoration: none;
  transition: color 0.6s;
}
.fork-all:hover { color: var(--text); }

/* ---------- every project along the paths ---------- */

.work { position: relative; padding: 0 0 12vh; }
.work-bar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 26px var(--edge) 22px;
  padding-right: 150px;
  background: linear-gradient(to bottom, rgba(7, 7, 8, 0.94) 55%, rgba(7, 7, 8, 0));
}
.pill {
  padding: 8px 14px 7px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  font-family: var(--font-label);
  font-size: 11px;
  letter-spacing: var(--label-tracking);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--dim);
  transition: color 0.5s, border-color 0.5s, background-color 0.5s;
}
.pill:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.24); }
.pill.is-on { color: #eeedf9; border-color: rgba(212, 211, 236, 0.4); background: rgba(255, 255, 255, 0.05); }

.branch { width: var(--page); margin: 9vh auto 0; }
.branch[hidden] { display: none; }
.branch-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 6px 24px; margin-bottom: 34px; padding-bottom: 18px; border-bottom: 1px solid var(--rim); }
.branch-title { grid-column: 1; margin: 0; font-weight: 100; font-size: clamp(30px, 3.4vw, 46px); line-height: 1.05; color: var(--lilac-light); }
.branch-line { grid-column: 1; margin: 0; color: var(--dim); font-size: 15px; }
.branch-count { grid-column: 2; grid-row: 1 / span 2; font-size: 11px; color: var(--dim); }

.cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 54px 30px; }
.card-link { display: block; text-decoration: none; }
.card-media {
  position: relative;
  margin: 0;
  aspect-ratio: 4 / 5;
  border-radius: 14px;
  overflow: hidden;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--rim);
}
.card-media img, .card-media picture { display: block; width: 100%; height: 100%; }
.card-media img { object-fit: cover; transition: transform 1.6s var(--ease-liquid); }
html:not(.has-fx) .card-link:hover .card-media img { transform: scale(1.03); }
.card-play {
  position: absolute;
  left: 18px;
  bottom: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(10, 10, 16, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  z-index: 6;
  pointer-events: none;
}
.card-play::after { content: ''; position: absolute; left: 17px; top: 14px; border-left: 13px solid #e6e5f6; border-top: 8px solid transparent; border-bottom: 8px solid transparent; }
.card-text { display: grid; gap: 5px; padding: 18px 2px 0; }
.card-title { font-size: 21px; letter-spacing: 0.2px; color: var(--text); transition: color 0.5s; }
.card-link:hover .card-title, .card-link:focus-visible .card-title { color: #f2f2fb; }
.card-scope { font-size: 14px; color: var(--dim); }
.card-meta { font-size: 10px; color: rgba(200, 213, 228, 0.42); }

/* Built by me: the apps, at the head of the digital path. */
.built { margin: 0 0 56px; }
.built-title { margin: 0 0 16px; font-size: 11px; font-weight: 400; color: var(--dim); }
.apps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); gap: 16px; }
.app-link {
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 18px;
  align-items: start;
  padding: 20px;
  border-radius: 16px 16px 32px 16px;
  text-decoration: none;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.01));
  box-shadow: inset 0 0 0 1px var(--rim);
  transition: box-shadow 0.6s, background-color 0.6s;
}
.app-link:hover { box-shadow: inset 0 0 0 1px rgba(212, 211, 236, 0.26); }
.app-icon img { width: 60px; height: 60px; border-radius: 14px; display: block; }
.app-text { display: grid; gap: 6px; }
.app-title { font-size: 19px; color: var(--text); }
.app-line { font-size: 14px; line-height: 1.5; color: var(--dim); }
.app-scope { font-size: 10px; color: rgba(200, 213, 228, 0.42); }

/* ---------- a project ---------- */

.case { width: var(--page); margin: 0 auto; }
.case-head { padding: 20vh 0 7vh; max-width: 980px; }
.case-back { display: inline-block; margin-bottom: 7vh; font-size: 11px; color: var(--dim); text-decoration: none; transition: color 0.5s; }
.case-back:hover { color: var(--text); }
.case-title { font-size: clamp(44px, 6.4vw, 96px); }
.case-title--long { font-size: clamp(38px, 5vw, 76px); }
.case-scope { margin: 22px 0 0; max-width: 46ch; font-size: 18px; line-height: 1.5; color: var(--dim); }
.case-meta { display: flex; flex-wrap: wrap; gap: 18px 48px; margin: 40px 0 0; }
.case-meta div { min-width: 120px; max-width: 360px; }
.case-meta dt { font-size: 10px; color: rgba(200, 213, 228, 0.42); margin-bottom: 6px; }
.case-meta dd { margin: 0; font-size: 15px; line-height: 1.45; }
.case-visit { margin-top: 38px; }

.case-hero {
  position: relative;
  margin: 0 calc((var(--page) - min(1500px, 100vw - 2 * var(--edge))) / 2);
  border-radius: 12px;
  overflow: hidden;
  background: var(--card);
  box-shadow: inset 0 0 0 1px var(--rim);
}
.case-hero img, .case-hero picture { display: block; width: 100%; height: auto; }
.case-hero--film { aspect-ratio: 16 / 9; }
.case-hero--film img { height: 100%; object-fit: cover; }
.case-hero-preview {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
  opacity: 0; transition: opacity 0.9s cubic-bezier(0.45, 0, 0.2, 1);
  pointer-events: none;
}
.case-hero-preview.is-on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .case-hero-preview { display: none; } }
.case-hero--app { background: #0e0e14; }
.btn-play--big { position: absolute; left: 28px; bottom: 28px; }
.play-ico { position: relative; width: 12px; height: 12px; flex: none; }
.play-ico::after { content: ''; position: absolute; left: 2px; top: 0; border-left: 10px solid #cac9e5; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }

.blk { margin: 13vh 0; }
.blk-text { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 2.1fr); gap: 24px 56px; }
.blk-label h2 { margin: 0; font-size: 11px; font-weight: 400; color: var(--lilac-light); }
.blk-sub { margin: 10px 0 0; font-size: 14px; line-height: 1.5; color: var(--dim); }
.blk-body { max-width: 64ch; }
.blk-body p { margin: 0 0 1.1em; font-size: 17px; line-height: 1.7; color: #b9c3d1; }
.blk-body p:last-child { margin-bottom: 0; }
.insights { list-style: none; padding: 0; margin: 0; display: grid; gap: 28px; }
.insights h3 { margin: 0 0 6px; font-size: 17px; font-weight: 400; color: var(--text); }
.insights p { margin: 0; }
.blk-heading .display { font-size: clamp(34px, 4.4vw, 64px); }
.blk-quote { display: flex; justify-content: center; text-align: center; }
.blk-quote blockquote { max-width: 26ch; font-size: clamp(26px, 3.1vw, 44px); line-height: 1.22; }

.rows { display: grid; gap: 18px; }
.row { display: flex; gap: 18px; width: 100%; max-width: var(--maxw, 100%); margin: 0 auto; }
.pic { flex: var(--r) 1 0; margin: 0; aspect-ratio: var(--r); border-radius: 8px; overflow: hidden; background: var(--card); box-shadow: inset 0 0 0 1px var(--rim); }
.pic img, .pic picture { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Long pages side by side: the frames hold still while each page scrolls inside its own frame. */
.scan { height: 270vh; margin: 0 calc((var(--page) - 100vw) / 2); }
.scan-pin { position: sticky; top: 0; height: 100vh; display: flex; gap: 18px; align-items: center; justify-content: center; padding: 0 var(--edge); }
.scan-frame {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  max-width: 1000px;
  height: 78vh;
  margin: 0;
  overflow: hidden;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 40px 80px -40px rgba(0, 0, 0, 0.9);
}
.scan-frame--narrow { flex: 0 0 min(24vw, 37vh); }
.scan-frame img, .scan-frame picture { display: block; width: 100%; height: auto; max-width: none; will-change: transform; }
.scan-bar { position: absolute; right: 5px; top: 5px; width: 3px; height: 22%; border-radius: 3px; background: rgba(19, 19, 17, 0.45); transform: translateY(calc(var(--p, 0) * 340%)); z-index: 7; }
.scan-hint { position: absolute; left: 0; right: 0; bottom: 3.4vh; text-align: center; font-size: 10px; color: var(--dim); }

.phones { display: flex; gap: 20px; overflow-x: auto; padding: 6px 2px 18px; scroll-snap-type: x proximity; scrollbar-width: none; cursor: grab; }
.phones::-webkit-scrollbar { display: none; }
.phones.is-drag { cursor: grabbing; }
.phone { flex: 0 0 clamp(170px, 17vw, 260px); margin: 0; border-radius: clamp(16px, 1.6vw, 26px); overflow: hidden; background: var(--card); box-shadow: inset 0 0 0 1px var(--rim); scroll-snap-align: start; }
.phone img { display: block; width: 100%; height: auto; pointer-events: none; user-select: none; }

.clip { position: relative; margin: 0; border-radius: 10px; overflow: hidden; background: #000; box-shadow: inset 0 0 0 1px var(--rim); }
.clip video { display: block; width: 100%; height: auto; }
.clip .btn-play { position: absolute; left: 22px; bottom: 22px; }

.blk-films h2 { margin: 0 0 18px; font-size: 11px; font-weight: 400; color: var(--dim); }
.films { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rim); }
.film {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  align-items: center;
  width: 100%;
  padding: 22px 4px;
  border: 0;
  border-bottom: 1px solid var(--rim);
  background: none;
  text-align: left;
  cursor: pointer;
  transition: padding 0.6s var(--ease-liquid);
}
.film:hover, .film:focus-visible { padding-left: 14px; }
.film-no { font-size: 11px; color: var(--dim); }
.film-title { font-size: 20px; }

.case-next { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 30px; margin: 20vh 0 0; padding: 8vh 0 6vh; border-top: 1px solid var(--rim); }
.next { display: grid; gap: 12px; text-decoration: none; }
.next .label-caps { font-size: 11px; color: var(--dim); }
.next-title { font-size: clamp(36px, 5vw, 72px); }
.next-scope { color: var(--dim); font-size: 15px; }

/* ---------- about ---------- */

.about { width: min(980px, calc(100vw - 2 * var(--edge))); margin: 0 auto; padding: 20vh 0 8vh 0; }
.about-title { font-size: clamp(48px, 7vw, 104px); }
.about-role { margin: 18px 0 0; font-size: 11px; color: var(--dim); }
.about-portrait { width: 168px; margin: 7vh 0 0; border-radius: 22px; overflow: hidden; box-shadow: inset 0 0 0 1px var(--rim); }
.about-portrait img { display: block; width: 100%; height: auto; }
.about-text { margin: 6vh 0 0; max-width: calc(50ch + 140px); }
.about-text .about-statement { max-width: 50ch; text-wrap: balance; font-size: clamp(18px, calc(2.25vw - 4px), 26px); line-height: 1.3; font-weight: 300; margin-bottom: 0.8em; color: transparent; background-image: linear-gradient(86deg, #6f6bd6 0%, #9a8df0 32%, #c4b4ff 60%, #eadfff 82%, #b9a6ff 100%); background-size: 180% 100%; -webkit-background-clip: text; background-clip: text; animation: drift 18s var(--ease-liquid) infinite alternate; }
.about-text p { margin: 0 0 1em; font-size: clamp(22px, 2.25vw, 30px); line-height: 1.45; color: #c4cedb; }
.about-paths { list-style: none; margin: 10vh 0 0; padding: 0; border-top: 1px solid var(--rim); }
.about-paths a { display: grid; grid-template-columns: minmax(170px, 1fr) 2fr auto; gap: 18px; align-items: baseline; padding: 24px 0; border-bottom: 1px solid var(--rim); text-decoration: none; transition: padding 0.6s var(--ease-liquid); }
.about-paths a:hover { padding-left: 12px; }
.about-path { font-size: 22px; color: var(--lilac-light); }
.about-line { color: var(--dim); font-size: 15px; }
.about-paths .label-caps { font-size: 11px; color: var(--dim); }
.about-quote { margin: 14vh 0 0; }
.about-quote blockquote { font-size: clamp(26px, 3vw, 42px); line-height: 1.22; max-width: 30ch; }
.about-quote figcaption { margin-top: 22px; display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; font-size: 15px; }
.about-quote figcaption .label-caps { font-size: 10px; color: var(--dim); }
.about-trust { margin: 12vh 0 0; }
.about-trust h2 { margin: 0 0 26px; font-size: 11px; font-weight: 400; color: var(--dim); }
.logos { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 26px 34px; align-items: center; }
.logos img { display: block; max-width: 100%; max-height: 46px; width: auto; height: auto; margin: 0 auto; filter: brightness(0) invert(0.86); opacity: 0.55; }
.about-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 12vh 0 0; }

/* ---------- connect ---------- */

.view-connect { display: flex; flex-direction: column; }
.connect { width: min(1100px, calc(100vw - 2 * var(--edge))); margin: auto; padding: 16vh 0 14vh; }
.connect-title { max-width: 15ch; font-size: clamp(42px, 6vw, 92px); }
.connect-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 6vh 0 0; }
.connect-social { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 6vh 0 0; padding: 0; }
.connect-social a { color: var(--dim); text-decoration: none; font-size: 15px; transition: color 0.5s; }
.connect-social a:hover { color: var(--text); }
.connect-where { margin: 4vh 0 0; font-size: 11px; color: rgba(200, 213, 228, 0.42); }

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

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px 32px;
  width: var(--page);
  margin: 10vh auto 0;
  padding: 30px 0 96px;
  border-top: 1px solid var(--rim);
}
.foot-name { font-size: 17px; text-decoration: none; }
.foot-links { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0; font-size: 11px; }
.foot-links a { color: var(--dim); text-decoration: none; transition: color 0.5s; }
.foot-links a:hover { color: var(--text); }
.foot-where { margin: 0; font-size: 11px; color: rgba(200, 213, 228, 0.42); }

/* ---------- the film player ---------- */

.player { position: fixed; inset: 0; z-index: 30; }
.player[hidden] { display: none; }
.player-back { position: absolute; inset: 0; background: rgba(5, 5, 7, 0.94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.player-frame {
  position: fixed;
  overflow: hidden;
  border-radius: 6px;
  background: #000;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 60px 120px -40px rgba(0, 0, 0, 0.95);
  transform-origin: 0 0;
}
.player-media, .player-poster { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-media { background: #000; }
.player-bar {
  position: fixed;
  left: var(--edge);
  right: var(--edge);
  bottom: 4.5vh;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 24px;
}
.player-id { min-width: 0; }
.player-title { margin: 0; font-size: 18px; color: var(--text); }
.player-sub { margin: 4px 0 0; font-size: 13px; color: var(--dim); }
.player-nav { display: none; align-items: center; gap: 14px; }
.player.is-set .player-nav { display: flex; }
/* The big corner points the way the button goes: prev is the mirror of next. The label sits centred. */
.player .player-prev { border-radius: 6px 6px 6px 32px; }
.player .player-prev, .player .player-next { justify-content: center; padding: 12px 20px; }
.player-count { font-size: 11px; color: var(--dim); min-width: 62px; text-align: center; }
.player .btn-inline .label { font-size: 13px; }
body.has-player .menu, body.has-player .sound { opacity: 0 !important; pointer-events: none; }

/* ---------- small screens ---------- */

@media (max-width: 820px) {
  .fork .eyebrow { top: 14vh; }
  .fork-title { top: calc(14vh + 28px); }
  .fork-paths { bottom: 14vh; }
  .work-bar { padding-right: 96px; }
  .blk-text { grid-template-columns: 1fr; }
  .case-head { padding-top: 16vh; }
  .row { flex-direction: column; }
  .pic { flex: none; width: 100%; }
  .scan { height: auto; margin: 0; }
  .scan-pin { position: static; height: auto; flex-direction: column; padding: 0; }
  .scan-frame, .scan-frame--narrow { flex: 0 0 auto; width: 100%; height: 72vh; }
  .scan-frame--narrow { width: 62%; }
  .scan-hint { position: static; margin-top: 12px; }
  .phone { flex-basis: 56vw; }
  .about-paths a { grid-template-columns: 1fr auto; }
  .about-line { display: none; }
  .player-bar { grid-template-columns: 1fr auto; }
  .player-nav { grid-column: 1 / -1; grid-row: 2; }
}

@media (prefers-reduced-motion: reduce) {
  .fork-title, .case-title, .about-title, .connect-title, .next-title, .blk-heading .display, .blk-quote blockquote, .about-quote blockquote { animation: none; }
}

/* ---------- app cards: glass, like the buttons (the glass bundle gives them a GlassLayer and the prism) ---------- */
.app-link { position: relative; isolation: isolate; }
.app-link[data-glass-host] { background: none; box-shadow: none; }
.app-link[data-glass-host]:hover { box-shadow: none; }
.app-link .app-line { color: rgba(200, 213, 228, 0.78); }

/* ---------- app pages ---------- */
/* The Psalmist's opening: the app running on a phone, between two screens, on the app's own paper. */
.case-hero--stage {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 3vw, 48px);
  padding: clamp(36px, 6vw, 84px) clamp(16px, 4vw, 60px);
  background: var(--stage);
  box-shadow: none;
}
.stage-phone { margin: 0; width: clamp(110px, 19vw, 280px); aspect-ratio: 780 / 1690; border-radius: clamp(16px, 2.4vw, 34px); overflow: hidden; box-shadow: 0 30px 60px -28px rgba(60, 40, 20, 0.45), 0 0 0 1px rgba(60, 40, 20, 0.08); background: #fff; }
.stage-phone img, .stage-phone video { display: block; width: 100%; height: 100%; object-fit: cover; }
.stage-phone--main { width: clamp(130px, 23vw, 340px); aspect-ratio: 540 / 1170; }
.case-hero--stage > .stage-phone:first-child { transform: rotate(-4deg) translateY(4%); }
.case-hero--stage > .stage-phone:last-child { transform: rotate(4deg) translateY(4%); }

.features { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 28px 32px; }
.features--two { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.features li { padding-top: 16px; border-top: 1px solid var(--rim); }
.features h3 { margin: 0 0 8px; font-size: 17px; font-weight: 400; color: var(--text); }
.features p { margin: 0; font-size: 14.5px; line-height: 1.55; color: rgba(200, 213, 228, 0.7); }

.stats { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); border-radius: 16px 16px 32px 16px; box-shadow: inset 0 0 0 1px var(--rim); background: rgba(255, 255, 255, 0.025); overflow: hidden; }
.stats > div { padding: 26px 24px 28px; }
.stats > div + div { box-shadow: inset 1px 0 0 var(--rim); }
.stats dt { font-family: var(--font-display); font-size: clamp(40px, 5vw, 64px); line-height: 1; letter-spacing: -0.03em; color: var(--text); }
.stats dd { margin: 12px 0 0; font-size: 14px; line-height: 1.45; color: rgba(200, 213, 228, 0.7); }
.blk-features { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 2.1fr); gap: 24px 56px; }
@media (max-width: 820px) { .blk-features { grid-template-columns: 1fr; } }
/* The three app cards keep one height whatever their copy does at a given width. */
.apps > li { display: flex; }
.app-link { flex: 1; }

/* ---------- the Psalmist card (the layout from creativeisles.com) ---------- */
@font-face { font-family: 'Doto'; src: url('/site/assets/fonts/doto-vf.woff2') format('woff2'); font-weight: 600 900; font-display: swap; }
@font-face { font-family: 'Geist'; src: url('/site/assets/fonts/geist-vf.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('/site/assets/fonts/geist-mono-vf.woff2') format('woff2'); font-weight: 400 600; font-display: swap; }

.case-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 38px; }
.case-links .case-visit { margin-top: 0; }
.blk-body a { color: var(--text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: rgba(200, 213, 228, 0.45); transition: text-decoration-color 0.4s; }
.blk-body a:hover { text-decoration-color: currentColor; }

.psalm-card {
  --pc-bg: #ede6da; --pc-fg: #26262a; --pc-red: #e0474c;
  --pc-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --pc-ease: cubic-bezier(0.22, 0.8, 0.2, 1);
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: clamp(28px, 5vw, 90px); align-items: center;
  padding: clamp(28px, 5vw, 80px);
  border-radius: clamp(18px, 2.4vw, 32px);
  background: var(--pc-bg); color: var(--pc-fg);
  font-family: 'Geist', system-ui, sans-serif;
}
.psalm-card::before, .psalm-card::after {
  content: "+ +"; position: absolute; top: clamp(16px, 2.2vw, 30px); right: clamp(18px, 2.4vw, 34px);
  font: 500 15px/1 var(--pc-mono); letter-spacing: 0.2em; opacity: 0.55; z-index: 3; pointer-events: none;
}
.psalm-card::after { content: "+"; top: auto; right: auto; bottom: clamp(14px, 2vw, 26px); left: clamp(18px, 2.4vw, 34px); }
.psalm-card > * { position: relative; z-index: 1; }

.psalm-art { display: grid; place-items: center; min-height: clamp(380px, 52vw, 720px); perspective: 1400px; }
.psalm-orb { position: absolute; z-index: 0; width: min(86%, 560px); aspect-ratio: 1; left: -8%; bottom: -4%; image-rendering: pixelated; pointer-events: none; }
.psalm-device { position: relative; z-index: 1; width: min(322px, 64vw); transform: rotateX(calc(var(--rx, 0) * 1deg)) rotateY(calc(var(--ry, 0) * 1deg)); transform-style: preserve-3d; }
.psalm-bezel { position: relative; padding: 9px; background: #1b1b1e; border-radius: 46px; box-shadow: 0 36px 60px -18px rgba(60, 20, 20, 0.45), inset 0 0 0 1.5px #3a3a3f; animation: psalm-bob 7s ease-in-out infinite; }
@keyframes psalm-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
.psalm-shots { position: relative; aspect-ratio: 780 / 1690; border-radius: 37px; overflow: hidden; background: var(--pc-bg); }
.psalm-shots img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.psalm-shots img.on { opacity: 1; }
.psalm-shots canvas { position: absolute; inset: 0; width: 100%; height: 100%; image-rendering: pixelated; z-index: 2; pointer-events: none; }
.psalm-dots { position: relative; z-index: 2; display: flex; justify-content: center; gap: 2px; width: fit-content; margin: 22px auto 0; padding: 3px 8px; border-radius: 999px; background: var(--pc-bg); box-shadow: inset 0 0 0 1px rgba(38, 38, 42, 0.14), 0 6px 14px -8px rgba(60, 20, 20, 0.4); }
.psalm-dots button { width: 26px; height: 26px; display: grid; place-items: center; padding: 0; border: 0; background: none; cursor: pointer; }
.psalm-dots i { width: 9px; height: 9px; background: rgba(38, 38, 42, 0.24); transition: background 0.3s, width 0.4s var(--pc-ease); }
.psalm-dots button.on i { background: var(--pc-red); width: 20px; }
.psalm-dots button:hover i { background: rgba(38, 38, 42, 0.5); }
.psalm-dots button.on:hover i { background: var(--pc-red); }

.psalm-copy { display: grid; gap: clamp(16px, 2.2vh, 26px); justify-items: start; align-content: start; }
.psalm-copy p { margin: 0; }
.psalm-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.psalm-tag { display: inline-flex; align-items: center; gap: 7px; font: 500 10.5px/1 var(--pc-mono); letter-spacing: 0.1em; text-transform: uppercase; padding: 7px 9px 6px; border: 1px solid rgba(38, 38, 42, 0.45); border-radius: 3px; }
.psalm-tag--solid { background: var(--pc-fg); color: var(--pc-bg); border-color: var(--pc-fg); }
.psalm-tag--live i { width: 6px; height: 6px; background: var(--pc-red); display: block; animation: psalm-blink 1.8s steps(2, jump-none) infinite; }
@keyframes psalm-blink { 0% { opacity: 1; } 100% { opacity: 0.25; } }
.psalm-title { margin: clamp(6px, 1.4vh, 18px) 0 0; line-height: 0; }
.psalm-title img { display: block; height: clamp(34px, 4vw, 54px); width: auto; }
.psalm-rule { width: 100%; max-width: 30rem; border-top: 1px dashed rgba(38, 38, 42, 0.34); margin: 2px 0; }
.psalm-headline { max-width: 15ch; font-size: clamp(2rem, 4vw, 3.6rem); font-weight: 500; line-height: 1.02; letter-spacing: -0.035em; }
.psalm-body { max-width: 34rem; font-size: clamp(0.98rem, 1.15vw, 1.1rem); line-height: 1.55; opacity: 0.86; }

.rec {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 12px;
  width: 100%; max-width: 30rem; padding: 12px; border-radius: 20px;
  background: #e0d7c9; box-shadow: inset 0 0 0 1px rgba(38, 38, 42, 0.08);
}
.rec-display { background: #fbfaf6; border-radius: 11px; padding: 11px 14px 10px; display: grid; gap: 6px; min-width: 0; }
.rec-row { display: flex; justify-content: space-between; align-items: center; font: 500 10px/1 var(--pc-mono); letter-spacing: 0.18em; text-transform: uppercase; }
.rec-badge { width: 38px; height: auto; fill: var(--pc-red); animation: psalm-blink 1.2s steps(2, jump-none) infinite; }
.rec.is-paused .rec-badge { animation: none; opacity: 0.25; }
.rec-time { font: 900 clamp(30px, 3.4vw, 42px)/1 'Doto', var(--pc-mono); letter-spacing: 0.03em; font-variant-numeric: tabular-nums; display: flex; align-items: center; }
.rec-time i { font: 600 0.62em/1 var(--pc-mono); font-style: normal; margin: 0 0.12em; transform: translateY(-0.06em); }
.rec-wave { width: 100%; height: 44px; }
.rec-meters { width: 100%; height: 24px; grid-column: 1; align-self: center; }
.rec-key {
  grid-row: 1 / span 2; grid-column: 2; width: clamp(64px, 7vw, 84px);
  border: 0; border-radius: 14px; background: #f3ede4; cursor: pointer;
  box-shadow: inset 0 0 0 2.5px var(--pc-red), 0 3px 0 #c9bfae;
  display: grid; place-items: center; transition: transform 0.12s, box-shadow 0.12s;
}
.rec-key:active { transform: translateY(3px); box-shadow: inset 0 0 0 2.5px var(--pc-red), 0 0 0 #c9bfae; }
.rec-key i { width: 24px; height: 24px; border-radius: 50%; background: var(--pc-red); display: block; transition: border-radius 0.3s var(--pc-ease), background 0.3s; }
.rec.is-paused .rec-key { box-shadow: inset 0 0 0 2.5px var(--pc-fg), 0 3px 0 #c9bfae; }
.rec.is-paused .rec-key i { border-radius: 3px; background: var(--pc-fg); }
.rec-note { grid-column: 1 / -1; font: 500 10px/1.4 var(--pc-mono); letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.5; padding: 0 2px; }

.psalm-feats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 26px; width: 100%; max-width: 34rem; }
.psalm-feats li { font-size: 0.93rem; line-height: 1.38; opacity: 0.9; padding-top: 12px; border-top: 1px dashed rgba(38, 38, 42, 0.32); }
.psalm-feats b { display: block; font-weight: 600; margin-bottom: 2px; }
.psalm-price { font: 500 11px/1.4 var(--pc-mono); letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.6; }

@media (max-width: 860px) {
  .psalm-card { grid-template-columns: 1fr; }
  .psalm-art { min-height: 0; padding: 20px 0 10px; }
  .psalm-feats { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { .psalm-bezel, .rec-badge, .psalm-tag--live i { animation: none; } }

/* Feature lists with icons. */
.features--icons .feat-ico { display: block; margin-bottom: 14px; color: var(--tint, #e0474c); }
.psalm-card { margin: 0 calc((var(--page) - min(1500px, 100vw - 2 * var(--edge))) / 2); }

/* Live embeds from the Lantern site. */
.embed { display: block; width: 100%; border: 0; background: transparent; }
.case-hero--embed { background: none; }
.blk-embed { margin-left: calc((var(--page) - min(1500px, 100vw - 2 * var(--edge))) / 2); margin-right: calc((var(--page) - min(1500px, 100vw - 2 * var(--edge))) / 2); border-radius: clamp(18px, 2.4vw, 32px); overflow: hidden; }

/* Pictures in the body column, side by side (Lantern's mark). */
.blk-pics { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 1.6vw, 24px); }
.blk-pics figure { margin: 0; border-radius: 12px; overflow: hidden; }
.blk-pics img { display: block; width: 100%; height: auto; }
