@font-face { font-family: "Satoshi"; src: url("../fonts/Satoshi/Satoshi-Variable.ttf") format("truetype"); font-weight: 300 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Proxima Nova"; src: url("../fonts/ProximaNova/ProximaNova-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Proxima Nova"; src: url("../fonts/ProximaNova/ProximaNova-Semibold.ttf") format("truetype"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Proxima Nova"; src: url("../fonts/ProximaNova/ProximaNova-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Clash Grotesk"; src: url("../fonts/ClashGrotesk/ClashGrotesk-Variable.ttf") format("truetype"); font-weight: 200 700; font-style: normal; font-display: swap; }
/* Sailec, the Plunk design system's typeface; one file serves every weight */
@font-face { font-family: "Sailec"; src: url("../fonts/Sailec/Sailec-Medium.otf") format("opentype"); font-weight: 100 900; font-style: normal; font-display: swap; }

/* Pally (Indian Type Foundry, variable): Drawl */
@font-face { font-family: "Pally"; src: url("../fonts/Pally/Pally-Variable.woff2") format("woff2"), url("../fonts/Pally/Pally-Variable.ttf") format("truetype"); font-weight: 400 700; font-style: normal; font-display: swap; }
/* Nunito, the Drawble app's font (variable: every weight in one file) */
@font-face { font-family: "Nunito"; src: url("../fonts/Nunito/Nunito-Variable.ttf") format("truetype"); font-weight: 200 1000; font-style: normal; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("../fonts/Nunito/Nunito-VariableItalic.ttf") format("truetype"); font-weight: 200 1000; font-style: italic; font-display: swap; }

@import url(hostgrotesk.css);

:root {
  /* black and white for layout. Palette to bring back later (from the reference image):
     blue #ADCDDA, red #DD8881, orange #EDB47D, yellow #F5DC9C, purple #AEA5C4, pink #ECD7E6 */
  --bg: #FFFFFF;
  --ink: #2F2725;
  --ink-soft: rgba(47, 39, 37, 0.6);
}

* {
  box-sizing: border-box;
}

html {
  cursor: url("cursor_home.png") 8 8, pointer;
}

html,
html {
  /* keep the scroll bar's space reserved: opening a view locks scrolling, and without this the page
     would jump sideways by the width of the bar every time one opens or closes */
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  padding: 0;
}

/* everything sits in one centred column in the middle of the page */
body {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* a too-wide child can't stretch the page sideways */
  place-items: center;
  padding: 48px 24px;
  background-color: var(--bg);
  color: var(--ink);
  font-family: "Host Grotesk", sans-serif;
  font-weight: 300;
  font-size: 14px;
  line-height: 1.4;
  text-align: center;
}

.page {
  position: relative;
  z-index: 1; /* above the cursor dot, so link text stays on top of it */
  width: min(100%, 1280px); /* wide enough for the centre list; the other sections are narrowed below */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 56px;
}

/* The first screen: intro at the top, gallery in the exact middle of the device screen.
   Only the intro and the gallery are in here, so history and contact don't affect the centring.
   The two outer rows are equal (1fr) and the hero is exactly one screen tall (minus the body padding). */
.hero {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 1fr auto 1fr;
  justify-items: center;
  min-height: calc(100vh - 96px);
}

.hero > header {
  align-self: start; /* name, tagline and filters stay at the top */
}

.below {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 56px;
}

/* the intro, history and contact stay a comfortable reading width; only the centre list runs wide */
.hero > header,
.below {
  width: 100%;
  max-width: 720px;
}

.hero > nav {
  width: 100%;
  min-width: 0;
}

a {
  display: inline-block; /* lets the hover shrink transform apply without reflowing the text */
  white-space: nowrap;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-decoration: none;
}

a:hover {
  cursor: url("cursor_linkHover.png") 6 6, pointer;
}

a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* name + tagline */
.intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.name {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0;
  font-size: 26px;
  font-weight: 300;
  line-height: 1.4;
}

.tagline {
  margin: 0;
  font-size: 20px;
  line-height: 2.4;                 /* the two lines sit further apart */
  color: rgba(47, 39, 37, 0.7);        /* a softer shade of the ink */
}

/* links inside the about-me line stay full ink against the lighter text */
.tagline a {
  color: var(--ink);
}

.tagline .num {
  font-weight: 600;
}

.contactBlock {
  width: max-content; /* as wide as the row needs, centred on the page */
  max-width: none;
}

.contactCol {
  flex: none;
  text-align: center; /* title and links share one left edge; the block itself sits centred */
}

/* name + about-me on the left, contact info in a column on the right */
.hero > header {
  max-width: 1100px;
}

.introTop {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: 0 1.7em;
  width: 100%;
}

/* the same slash that runs through the rest of the site, between the about-me column and the contact column */
.sep {
  font-size: 32px;
  line-height: 1;
  letter-spacing: -0.02em;
  color: rgba(47, 39, 37, 0.12);
}

.who {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.who .name {
  justify-content: center;
}

.inline.small.reach {
  display: flex;
  flex-wrap: nowrap; /* always one row */
  gap: 0 48px; /* three labelled columns */
  font-size: 20px; /* same as the about-me text (beats .inline.small's 14px, which is defined later) */
  line-height: 1.6;
  text-align: left;
}

.introTop + .filters {
  margin-top: 40px;
}


/* big statement under the name + tagline; the "3" is set larger than the words around it */
.stat {
  margin: 28px 0 0;
  font-size: 26px;
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.stat .num {
  font-weight: 600;
}

/* inline lists: items run on like a centred paragraph and wrap, with "/" between them */
.inline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.inline li {
  display: inline-block; /* so items can move with transforms when the list is filtered */
}

/* The air between the rows lives on the items, not in the links' line height: a link is only as tall
   as what you see (text + logo), so the hover bubble hugs it instead of being a tall, empty box. */
#projectList li {
  padding: 0.4em 0;
}
#projectList li.row-break {
  padding: 0;
}

.inline li::after {
  content: "/";
  content: "/" / "";
  margin: 0 1.1em; /* air between the items on a row */
  color: rgba(47, 39, 37, 0.12); /* 12% black */
  text-shadow: none; /* the list's text shadow doesn't apply to the slashes */
}

/* no slash after the last visible item (filter.js marks it) */
.inline li:last-child::after,
.inline li.no-slash::after {
  content: none;
}

/* !important so it beats the inline-block set on list items */
.is-hidden {
  display: none !important;
}

.inline.big {
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

/* at most three items per row: each row is its own centred line (filter.js puts a break after every third item) */
.inline.big {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.inline li.row-break {
  flex: 0 0 100%;
  height: 0;
  padding: 0;
  margin: 0;
}

.inline li.row-break::after {
  content: none;
}

#projectList.compact .row-break {
  display: none;
}

.inline.small {
  font-size: 14px;
}

/* project logos sit just before the link text (no bubble); the logo and the text share a subtle drop shadow */
.bubble {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 64px;
  margin-right: 14px;
  vertical-align: middle;
}

/* logo-only item (Habbot): no text, so no gap after the logo */
/* a link with the app icon and a wordmark in one horizontal row (TouchTunes) */
.rowLogo {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
}

.rowLogo .bubble { margin-right: 0; height: auto; }

.rowLogo .logo {
  height: 38px;
  max-width: none;
}

.rowLogo .wordmark { height: 18px; }

/* a link with the app icon on top and a wordmark underneath (Nanni) */
.stackLogo {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.stackLogo .bubble { margin-right: 0; height: auto; }

/* Habbot: the orange bar sits under the wordmark like an underline, exactly as wide as the wordmark.
   width 0 + min-width 100% makes it follow the wordmark's width instead of stretching the item. */
.markIcon {
  display: block;
  width: 0;
  min-width: 100%;
  height: auto;
  aspect-ratio: 532 / 46;
  margin-top: -2px;
}

.stackLogo.small .logo { height: 20px; }

.stackLogo .logo {
  height: 38px;
  max-width: none;
}

.wordmark {
  display: block;
  height: 22px;
  width: auto;
  filter: drop-shadow(0 2px 4px rgba(47, 39, 37, 0.22));
}

.logo.wide {
  max-width: 112px; /* wide wordmark logos (Plunk) */
}

.bubble.solo {
  margin-right: 0;
}

.logo {
  display: block;
  filter: drop-shadow(0 2px 4px rgba(47, 39, 37, 0.22));
  width: auto;
  height: 45px;
  max-width: 112px;
}

.caption {
  font-size: 14px;
  letter-spacing: normal;
  line-height: 1.2;
  color: var(--ink-soft);
}

/* subtle drop shadow on the centre list's text */
#projectList {
  text-shadow: 0 2px 5px rgba(47, 39, 37, 0.18);
}

/* Seeds: a smaller logo on the left; the title with "design system" underneath it forms a column
   that is vertically centred on the logo */
.withCaption {
  display: inline-grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  align-items: center;
  justify-items: start;
  text-align: left;
}

.withCaption .bubble { grid-area: 1 / 1 / 3 / 2; height: auto; }
.withCaption .logo { height: 26px; max-width: none; }
.withCaption .label { grid-area: 1 / 2; align-self: end; }
.withCaption .caption { grid-area: 2 / 2; align-self: start; margin-top: -0.3em; }

/* the centre list keeps the unfiltered list's height; the live list sits in the middle of it */
.stack {
  display: grid;
  grid-template-columns: minmax(0, 1fr); /* the one-row gallery can overflow its box without widening it */
}

.stack > ul {
  grid-area: 1 / 1;
  min-width: 0;
}

.stack > #projectList {
  align-self: center;
}

.stack > .ghost {
  visibility: hidden;
  pointer-events: none;
}

/* filter pills */
.filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.pill {
  font: inherit;
  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  padding: 8px 16px;
  color: var(--ink);
  background: transparent;
  border: 1px solid transparent; /* no stroke; kept so the chips stay the same size */
  border-radius: 999px;
  cursor: url("cursor_linkHover.png") 6 6, pointer;
  transition: background-color 0.25s ease, color 0.25s ease;
}

.pill[aria-pressed="true"] {
  position: relative;
  color: var(--bg);
  background: var(--ink);
  box-shadow: 0 6px 14px -4px rgba(47, 39, 37, 0.28), 0 2px 4px rgba(47, 39, 37, 0.12);
}

/* 1px stroke on the active chip: 80% white at the top fading to 0% at the bottom */
.pill[aria-pressed="true"]::before {
  content: "";
  position: absolute;
  inset: -1px; /* out to the chip's very edge (over its transparent 1px border) */
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}

.pill:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* professional history */
.sectionTitle {
  margin: 0 0 20px;
  font-size: 16pt;
  font-weight: 400;
  line-height: 1.2;
  color: var(--ink-soft);
}

.jobs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.jobs li {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.company {
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.01em;
}

.dates {
  font-variant-numeric: tabular-nums;
}

/* contact + social */
.contact {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

/* the social links stack in a column, no slashes */
.contact li {
  display: block;
}

.contact li::after {
  content: none;
}

/* the cursor dot: trails the pointer, and morphs into a soft box around hovered links (see js/mouse.js).
   It sits under the page (z-index 0 vs .page's 1) so link text always stays on top of it. */
#mouse-circle {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 0;
  width: 32px;
  height: 32px;
  background: rgba(47, 39, 37, 0.10);
  border: 1px solid rgba(47, 39, 37, 0);
  border-radius: 16px;
  pointer-events: none;
  will-change: transform, width, height;
}

@media (max-width: 500px) {
  .stat {
    font-size: 20px;
  }

  .inline.big {
    font-size: 30px;
  }
}

/* ---- in-page project view (js/project.js) ---- */
.view {
  position: fixed;
  z-index: 11;
  top: 50%;
  left: 50%;
  margin: 0;
  /* centred by GSAP (xPercent / yPercent -50 in js/project.js) so it can also animate x / y / scale */
  /* width is fixed here; the height is set in js/project.js so the card clears the whole intro */
  width: min(86vw, 1100px);
  height: 440px;
  box-sizing: border-box;
  border-radius: 32px;
  background: var(--view-bg, #F4F4F4); /* the same colour as the hover bubble, which grows into this card (a project can set its own) */
  box-shadow: 0 24px 60px -24px rgba(47, 39, 37, 0.14), 0 4px 14px rgba(47, 39, 37, 0.05);
}

.view[hidden] {
  display: none;
}

/* the project's logo + name, top left of the card (the same lockup as its gallery link) */
.viewHead {
  position: absolute;
  top: 48px;
  left: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.viewLogo {
  display: block;
  width: auto;
  height: 36px;
  max-width: 140px;
}

/* head with a wordmark (Nanni): icon and wordmark in one row, centred on each other */
.viewHead.stacked {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.viewHead.stacked .viewLogo { height: 40px; }

.viewWordmark {
  display: block;
  height: 16px;
  width: auto;
}

.viewStack {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.viewStack .viewLogo { height: 32px; }

.viewIcon {
  display: block;
  width: 0;
  min-width: 100%;
  height: auto;
  aspect-ratio: 532 / 46;
}

.viewTitle {
  margin: 0;
  font-size: 28px;
  font-weight: 300;
  letter-spacing: -0.02em;
}

.viewClose {
  position: absolute;
  top: 44px;
  right: 52px;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  background: none; /* just the icon: the cursor dot magnetises onto it like it does for links */
  color: var(--ink);
  font: inherit;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

/* while a view is open the cursor dot rides above the card; multiply keeps the icon and text readable through it */
html.view-open #mouse-circle {
  z-index: 12;
  mix-blend-mode: multiply;
}

/* while a project view is open the gallery runs in one row beneath it (the open project is left out) */
#projectList.compact {
  display: flex;
  flex-wrap: wrap; /* wider than the screen once shrunk: it wraps, each row centred */
  row-gap: 8px;
  justify-content: center;
  align-items: flex-end;
}

/* each item keeps its full width (title + slash on one line) instead of being squeezed by the row */
#projectList.compact li {
  flex: none;
  white-space: nowrap;
}

.is-current {
  display: none !important;
}
/* ---- pages inside a view: paginated, never scrolling the card ---- */
.viewBody {
  position: absolute;
  inset: 124px 88px 72px;
  text-align: left;
}

.pg {
  display: none;
  position: absolute;
  inset: 0;
  grid-template-rows: minmax(0, 1fr);
  gap: 72px;
  align-items: center;
}

.pg.is-on { display: grid; }
.pg.two { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.3fr); }
.pg.flip { grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.85fr); }
.pg.one,
.pg.media { grid-template-columns: minmax(0, 1fr); }
.pg.one { justify-items: center; text-align: center; }

.pgText {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 460px;
  min-height: 0;
  max-height: 100%;
  overflow: auto; /* only if a window is too short for the copy */
}

/* no scroll bars anywhere in a view (the copy can still scroll if a window is very short) */
.view,
.view * {
  scrollbar-width: none;
}

.view::-webkit-scrollbar,
.view *::-webkit-scrollbar {
  display: none;
}

.pg.one .pgText { align-items: center; max-width: 720px; }

.pgMedia {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 0;
}

.pgMedia figure {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  height: 100%;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.pgMedia img,
.pgMedia video {
  flex: 0 1 auto;
  display: block;
  max-width: 100%;
  max-height: 100%;
  min-height: 0;
  object-fit: contain;
  border-radius: 28px;
  box-shadow: 0 22px 44px -22px rgba(47, 39, 37, 0.28), 0 2px 8px rgba(47, 39, 37, 0.06);
}

.pgMedia figcaption {
  flex: none;
  font-size: 13px;
  color: var(--ink-soft);
  text-align: center;
}

.pgMedia iframe {
  width: 100%;
  max-height: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  border-radius: 12px;
}

/* type inside pages */
.pg p { margin: 0; }
.pg .eyebrow { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-soft); font-weight: 500; }
/* a small dot in the project's accent colour (--accent, set per project in js/projects.js) leads each eyebrow */
.pg .eyebrow::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 8px; border-radius: 50%; background: var(--accent, var(--ink)); vertical-align: 0.08em; }
.pg .lead { font-size: 40px; line-height: 1.08; letter-spacing: -0.03em; font-weight: 500; }
.pg .sub { font-size: 18px; line-height: 1.3; font-weight: 400; letter-spacing: -0.01em; }
.pg .body { font-size: 18px; line-height: 1.5; font-weight: 300; color: rgba(47, 39, 37, 0.82); }
.pg .soft { color: var(--ink-soft); }
.pg .big { font-size: 56px; line-height: 1; letter-spacing: -0.03em; font-weight: 300; }
.pg .quote { font-size: 15px; line-height: 1.5; padding-left: 14px; border-left: 2px solid rgba(32, 69, 111, 0.35); }
.pg .facts,
.pg .stats { display: flex; flex-wrap: wrap; gap: 14px 40px; }
.pg .stats { gap: 24px 64px; justify-content: center; }
.pg .fact,
.pg .stat { display: flex; flex-direction: column; gap: 4px; }
.pg .fact { flex: 1 1 200px; padding-top: 14px; border-top: 1px solid rgba(47, 39, 37, 0.12); }
.pg.one .stat { align-items: center; max-width: 240px; }
.pg .list { margin: 0; padding-left: 18px; font-size: 15px; line-height: 1.55; }
.pg a { text-decoration: underline; text-underline-offset: 3px; }

/* chevrons either side of the card, and the page dots */
.viewNav {
  position: absolute;
  top: calc(50% - 22px);
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(47, 39, 37, 0.08);
  border-radius: 50%;
  background: #fff; /* floating buttons inside the card's left and right edges */
  box-shadow: 0 6px 14px -4px rgba(47, 39, 37, 0.22), 0 2px 4px rgba(47, 39, 37, 0.1);
  color: var(--ink);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 3;
}

.viewNav.prev { left: 24px; }
.viewNav.next { right: 24px; }
.viewNav { transition: opacity 0.2s ease; }
.viewNav:disabled { opacity: 0; pointer-events: none; } /* no chevron where there is no page to go to */

.viewDots {
  position: absolute;
  bottom: 28px;
  left: 50%;
  translate: -50% 0;
  display: flex;
  gap: 8px;
}

.viewDot {
  width: 6px;
  height: 6px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(47, 39, 37, 0.2);
  cursor: pointer;
}

.viewDot[aria-current="true"] { background: var(--accent, var(--ink)); }

/* narrow screens: no room outside the card, so the chevrons sit inside its edges */
@media (max-width: 960px) {
  .viewNav.prev { left: 8px; }
  .viewNav.next { right: 8px; }
  .viewBody { inset: 100px 56px 56px; }
  .pg.two,
  .pg.flip { grid-template-columns: minmax(0, 1fr); }
  .pg.flip .pgText { order: -1; }
}

/* very narrow screens: the contact column goes under the about-me text */
@media (max-width: 640px) {
  .introTop { flex-wrap: wrap; }
  .sep { display: none; }
}

/* ---- password-protected view ---- */
.viewNav[hidden],
.viewDots[hidden] {
  display: none !important;
}

.lockBox {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.lockForm {
  display: flex;
  gap: 8px;
}

.lockInput {
  font: inherit;
  font-size: 16px;
  padding: 10px 18px;
  color: var(--ink);
  background: rgba(47, 39, 37, 0.06);
  border: 1px solid transparent;
  border-radius: 999px;
  outline: none;
}

.lockInput:focus {
  border-color: rgba(47, 39, 37, 0.3);
}

.lockBtn {
  position: relative;
  font: inherit;
  font-size: 14px;
  padding: 10px 20px;
  color: var(--bg);
  background: var(--ink);
  border: 1px solid transparent; /* same box as the filter chips, so the stroke below lines up */
  border-radius: 999px;
  box-shadow: 0 6px 14px -4px rgba(47, 39, 37, 0.28), 0 2px 4px rgba(47, 39, 37, 0.12);
  cursor: url("cursor_linkHover.png") 6 6, pointer;
  transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

/* the same 1px stroke as the active filter chip: 80% white at the top fading to 0% at the bottom */
.lockBtn::before {
  content: "";
  position: absolute;
  inset: -1px;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}

/* disabled until something has been typed: flat, pale, no shadow or stroke */
.lockBtn:disabled {
  color: rgba(47, 39, 37, 0.35);
  background: rgba(47, 39, 37, 0.08);
  box-shadow: none;
  cursor: default;
}

.lockBtn:disabled::before {
  content: none;
}

.lockForm.has-error {
  animation: lockShake 0.32s ease;
}

.lockForm.has-error .lockInput {
  border-color: #C9524A;
  background: rgba(201, 82, 74, 0.08);
}

@keyframes lockShake {
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(2px); }
}

.lockForm.has-error ~ .lockMsg {
  color: #C9524A;
}

.lockAsk {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.lockAsk a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lockMsg {
  min-height: 1.4em;
  margin: 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.lockApp {
  margin: 4px 0 0;
  font-size: 14px;
  color: var(--ink-soft);
}

.lockApp a {
  color: var(--ink);
}

.lockBox .body a {
  color: var(--ink);
}

/* small label above each contact link, in the style of the section titles */
.reachLabel {
  display: block;
  margin: 0 0 4px;
  font-size: 12px;
  line-height: 1.2;
  color: var(--ink-soft);
}

.inline.reach li::after {
  content: none;
}

.inline.reach li {
  flex: none;
  white-space: nowrap;
}

/* an interpunct between the gallery items (not after the last one on a row; filter.js marks those no-slash) */
.inline.big li:not(.no-slash):not(:last-child)::after {
  content: "\00B7";
  content: "\00B7" / "";
  margin: 0 clamp(10px, 1.8vw, 32px);
  color: rgba(47, 39, 37, 0.4); /* the same soft grey the slashes had */
}

#projectList li.row-break,
.inline.big li.row-break {
  padding: 0;
}

/* Micro + Motion: each letter hops in turn (js/micro.js) */
.hop {
  display: inline-block;
}

.hopLetter {
  display: inline-block;
}

/* footer: the labelled links centred, each label centred over its link */
.contactBlock .inline.small.reach {
  justify-content: center;
  text-align: center;
}

/* the contact footer stays on screen, centred along the bottom edge (no scrolling to find it) */
.contactBlock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 44px;
  margin: 0 auto;
  z-index: 2;
  transition: opacity 0.2s ease;
}

/* leave room under the page content so the footer never covers the history list */
.below {
  padding-bottom: 120px;
}

/* tucked away while a project view is open */
html.view-open .contactBlock {
  opacity: 0;
  pointer-events: none;
}

/* ---- cover page (Habbot): wordmark top left, a short text, then the download button ---- */
.pg.cover {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 72px;
  align-items: start;
  justify-items: start;
}

.coverShot {
  justify-self: center;
  align-self: center;
  height: 100%;
}

.stickyDots { display: block; width: 100%; color: var(--accent, var(--ink)); }

/* an iPhone frame around a screenshot: brushed titanium rim, thin black bezel, glass, dynamic island, side buttons */
.phone {
  position: relative;
  box-sizing: border-box;
  height: 100%;
  max-width: 100%;
  aspect-ratio: 0.475;
  /* everything below is sized in units of the phone's own width (cqw), so the proportions hold at any size.
     Apple's device corner is ~14.5% of the device width; the % radius below is that, as a circle (the x radius
     is 14.5% of the width, the y radius the same length as a % of the height: 14.5 * 0.475) */
  container-type: inline-size;
  padding: 0;
  border-radius: 14.5% / 6.89%;
  background: linear-gradient(135deg, #6a6d74 0%, #18191c 11%, #54575d 26%, #0f1013 42%, #7a7d84 56%, #17181b 72%, #5b5e64 88%, #232428 100%); /* midnight black, polished metal */
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.38),
    inset 0 0 1px 2px rgba(255, 255, 255, 0.07),
    0 30px 50px -22px rgba(47, 39, 37, 0.45),
    0 6px 14px rgba(47, 39, 37, 0.14);
}

/* the black bezel between the titanium rim and the glass */
.phone::before {
  content: "";
  position: absolute;
  inset: 0.7cqw;
  border-radius: 13.8cqw; /* concentric with the outer edge */
  background: #050506;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.pgMedia .phone img,
.phone img,
.phone video {
  position: absolute;
  top: 3cqw;
  left: 3cqw;
  display: block;
  width: calc(100% - 6cqw);
  height: calc(100% - 6cqw);
  max-width: none;
  max-height: none;
  object-fit: cover;
  border-radius: 11.5cqw; /* outer radius minus the bezel, so the corners stay concentric */
  box-shadow: none;
}

/* a faint reflection across the glass */
.phoneGlare {
  position: absolute;
  inset: 3cqw;
  border-radius: 11.5cqw;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.16) 0%, rgba(255, 255, 255, 0.04) 22%, rgba(255, 255, 255, 0) 38%);
  pointer-events: none;
}

.phoneIsland {
  position: absolute;
  top: 6.2cqw;
  left: 50%;
  translate: -50% 0;
  width: 29%;
  height: 3.3%;
  background: #000;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* action + volume buttons on the left, power on the right */
.phoneBtn {
  position: absolute;
  width: 1.5cqw;
  min-width: 2px;
  background: linear-gradient(to right, #1a1b1e, #3b3d42 60%, #26282b);
}

.phoneBtn.l {
  left: -1.1cqw;
  top: 13%;
  height: 22%;
  border-radius: 2px 0 0 2px;
  -webkit-mask: linear-gradient(to bottom, #000 0 22%, transparent 22% 38%, #000 38% 69%, transparent 69% 77%, #000 77% 100%);
  mask: linear-gradient(to bottom, #000 0 22%, transparent 22% 38%, #000 38% 69%, transparent 69% 77%, #000 77% 100%);
}

.phoneBtn.r {
  right: -1.1cqw;
  top: 21%;
  height: 8%;
  border-radius: 0 2px 2px 0;
  background: linear-gradient(to left, #1a1b1e, #3b3d42 60%, #26282b);
}

.coverWrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  max-width: 560px;
}

.coverHead { display: flex; flex-direction: column; gap: 6px; width: fit-content; }

.coverMark { height: 72px; width: auto; display: block; }

.pg .coverText {
  margin: 0;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.35;
}

/* sticky "Download the app" button centred at the bottom of the card; the page dots sit above it */
.viewDownload {
  position: absolute;
  bottom: 24px;
  left: 0;
  right: 0;
  margin: 0 auto; /* centred without translate, which the cursor's hover transform would clobber */
  width: fit-content;
  z-index: 3;
}

.view.hasDownload .viewDots { bottom: 82px; }
.view.hasDownload .viewBody { bottom: 120px; }

/* a project's first page can sit on a full-card image (Habbot: grass), blurred on the left and fading into crisp on the
   right: a sharp layer (::before) under a blurred copy (::after) that is masked away from left to right.
   Both fade out on the other pages. */
.view.hasBgImage::before,
.view.hasBgImage::after {
  content: "";
  position: absolute;
  inset: 16px; /* a peach border around the photo */
  z-index: -1; /* behind the card's content (the .view is its own stacking context) */
  border-radius: 16px; /* concentric with the card's 32px corners */
  background: var(--view-img) center / cover no-repeat;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.view.hasBgImage::after {
  background-image: var(--view-img-blur);
  -webkit-mask-image: linear-gradient(to right, #000 0%, rgba(0,0,0,0.85) 15%, rgba(0,0,0,0.55) 35%, rgba(0,0,0,0.25) 55%, transparent 78%);
  mask-image: linear-gradient(to right, #000 0%, rgba(0,0,0,0.85) 15%, rgba(0,0,0,0.55) 35%, rgba(0,0,0,0.25) 55%, transparent 78%);
}

.view.hasBgImage.imgIn::before,
.view.hasBgImage.imgIn::after { opacity: 1; transition-duration: 0.6s; }

/* light type on the photo; the phone gets a deep drop shadow */
.view.hasBgImage.onFirst .coverWrap { color: #fff; }
.view.hasBgImage.onFirst .coverMark { filter: brightness(0) invert(1); }
.view.hasBgImage.onFirst .viewClose { color: #fff; }
.view.hasBgImage.onFirst .viewDot { background: rgba(255, 255, 255, 0.4); }
.view.hasBgImage.onFirst .viewDot[aria-current="true"] { background: var(--accent, #fff); }
.view.hasBgImage.onFirst .coverShot {
  /* laid down on the lawn, seen from above: slight angle, shadows falling short and to the lower right
     (light from the upper left), with a tight dark ring where the glass meets the grass */
  transform: rotate(1.5deg);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.38),
    inset 0 0 1px 2px rgba(255, 255, 255, 0.07),
    0 0 5px 1px rgba(0, 10, 4, 0.75),
    3px 5px 7px rgba(0, 10, 4, 0.6),
    9px 14px 18px -2px rgba(0, 10, 4, 0.45),
    18px 26px 34px -8px rgba(0, 10, 4, 0.35);
}

/* the cover's left-hand content is a centred column, centred in its half of the card */
.pg.cover .coverWrap {
  align-items: center;
  align-self: center;
  justify-self: center;
  text-align: center;
}

.pg.cover .coverHead { align-items: center; }

/* the Download button has no cursor bubble (js/mouse.js skips .dlBtn): it turns the project's orange on hover */
.dlBtn {
  transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease, transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* the light stroke around it only appears on hover, along with a small scale up */
.dlBtn::before { opacity: 0; transition: opacity 0.25s ease; }
.dlBtn:hover { background: var(--accent, var(--ink)); transform: scale(0.95); }
.dlBtn:hover::before { opacity: 1; }

/* the phone sits nearer the middle of the card: its column is wider and starts further left */
.pg.cover { grid-template-columns: minmax(0, 1fr) 62%; gap: 0; }

.dlBtn { font-size: 17px; padding: 14px 30px; }

/* the card's content area sits 26px below the card's centre (more room is left above for the header); lift the
   cover's two halves so they are centred in the card itself */
.pg.cover .coverShot,
.pg.cover .coverWrap { position: relative; top: -26px; }

/* the left column moves in toward the middle of the card, mirroring the phone */
.pg.cover .coverWrap { left: 50px; }

/* the grass is one sharp photo (no blurred layer) */
/* a dark fade over the photo, strongest on the left (where the text sits) and gone by the right, for legibility */
.view.hasBgImage::after {
  content: "";
  background: linear-gradient(to right, rgba(0, 14, 6, 0.6) 0%, rgba(0, 14, 6, 0.42) 40%, rgba(0, 14, 6, 0.18) 72%, rgba(0, 14, 6, 0) 98%);
  -webkit-mask-image: none;
  mask-image: none;
}

/* the grass photo is mirrored (it reads better that way round) */
.view.hasBgImage::before { transform: scaleX(-1); background-position: 50% calc(var(--gy, 0) * 1%); } /* --gy: how far down the field we are (js/project.js) */

/* the down chevron: a round button on the bottom edge of the card, under the left column (outside the column, so
   the logo + CTA stay centred); 12% white with the same light stroke as the filter chips */
.scrollCue {
  position: relative;
  margin-top: 4px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink); /* dark arrow on the lighter fill */
  box-shadow: 0 8px 18px -4px rgba(0, 10, 4, 0.4), 0 2px 5px rgba(0, 10, 4, 0.25);
  display: grid;
  place-items: center;
  cursor: url("cursor_linkHover.png") 6 6, pointer;
  animation: cueBob 1.8s ease-in-out infinite;
}

.scrollCue::before {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}

@keyframes cueBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

@media (prefers-reduced-motion: reduce) { .scrollCue { animation: none; } }

/* the cover scene's second step: the text waits collapsed below the CTA (js/project.js sceneTo grows it) */



/* a second screenshot over the phone's first, faded in with the second step */
.phone .phoneAlt {
  position: absolute;
  top: 3cqw;
  left: 3cqw;
  width: calc(100% - 6cqw); /* a replaced element doesn't stretch between insets, so it is sized outright */
  height: calc(100% - 6cqw);
  max-width: none;
  max-height: none;
  object-fit: cover;
  border-radius: 11.5cqw;
  opacity: 0;
}

.pg .coverTag {
  margin: 10px 0 0;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
  text-align: center;
}


/* the logo, tagline and buttons sit straight on the grass (no panel behind them), in white */
.pg.cover .coverWrap { width: 410px; box-sizing: border-box; padding: 0 0 8px; }

.view.hasBgImage.onFirst .coverWrap { color: #fff; }
.view.hasBgImage.onFirst .coverMark { filter: brightness(0) invert(1); }

.coverActions { display: flex; gap: 12px; align-items: center; justify-content: center; }

.pg.cover .dlBtn { background: var(--accent, #FA983A); color: #FFFAF6; font-weight: 600; }
.pg.cover .dlBtn:hover { background: #fff; color: var(--ink); }

/* "About": a glass pill beside the download button; it brings in the text and the second phone screen */
.pg.cover .aboutBtn { background: #fff; color: var(--ink); display: inline-flex; align-items: center; gap: 6px; padding-right: 24px; }
.pg.cover .aboutBtn:hover { background: #051324; color: #FFFAF6; } /* Midnight, the app's black */

/* the phone sits nearer the right edge */
.pg.cover .coverShot { left: 110px; }

/* vertical views clip their pages to the card as they scroll past */
.view.vertical { overflow: hidden; }

/* the "More" page: three phones lying on the grass, each with a title pill above it */
.pg.trio { grid-template-columns: minmax(0, 1fr); }

.trioRow {
  display: flex;
  gap: 56px;
  justify-content: center;
  align-items: stretch;
  height: 100%;
  min-height: 0;
}

.trioItem {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  min-width: 0;
  min-height: 0;
}

.trioItem .phone { flex: 1 1 0; height: auto; min-height: 0; }

.trioPill {
  flex: none;
  padding: 8px 20px;
  font-size: 15px;
  font-weight: 500;
  color: var(--ink);
  background: rgba(255, 250, 246, 0.9);
  border-radius: 999px;
  box-shadow: 0 6px 14px -4px rgba(0, 10, 4, 0.4), 0 2px 4px rgba(0, 10, 4, 0.2);
}

.view.hasBgImage .trioItem .phone {
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.38),
    inset 0 0 1px 2px rgba(255, 255, 255, 0.07),
    0 0 5px 1px rgba(0, 10, 4, 0.75),
    3px 5px 7px rgba(0, 10, 4, 0.6),
    9px 14px 18px -2px rgba(0, 10, 4, 0.45),
    18px 26px 34px -8px rgba(0, 10, 4, 0.35);
}

/* each phone is set down at its own slight angle, with a small shift up or down, so the row feels casual */
.trioItem:nth-child(1) .phone { transform: rotate(-2.5deg) translateY(4px); }
.trioItem:nth-child(2) .phone { transform: rotate(1.5deg) translateY(-6px); }
.trioItem:nth-child(3) .phone { transform: rotate(-1.5deg) translateY(6px); }

/* drop shadows on the two buttons */
.pg.cover .dlBtn { box-shadow: 0 10px 20px -6px rgba(0, 10, 4, 0.5), 0 2px 6px rgba(0, 10, 4, 0.3); }

/* the pages scroll under the edge of the grass frame: the body is clipped to the photo's rounded rectangle (16px in
   from the card; the body itself is inset 124px / 88px / 72px / 88px, so the clip reaches out past it) */
.view.vertical .viewBody { clip-path: inset(-108px -72px -56px -72px round 48px); }

/* a larger phone: it is taller than the content area (which is inset more than the card's grass frame), centred on the card */
/* never wider than 34vw, so the phone stays clear of the wordmark and buttons beside it (width = 0.475 x height) */
.pg.cover .coverShot { height: min(calc(100% + 50px), 71.5vw); }

/* each page sets its phone down at a slightly different angle */
.view.hasBgImage.onFirst .pg:nth-child(1) .coverShot { transform: rotate(1.5deg); }
.view.hasBgImage.onFirst .pg:nth-child(2) .coverShot { transform: rotate(-1.8deg); }
.view.hasBgImage.onFirst .pg:nth-child(3) .coverShot { transform: rotate(2.2deg); }
.view.hasBgImage.onFirst .pg:nth-child(4) .coverShot { transform: rotate(-1deg); }
.view.hasBgImage.onFirst .pg:nth-child(5) .coverShot { transform: rotate(1.4deg); }

.pg .coverLead {
  margin: 0;
  font-size: 26px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

/* rock solid while a project is open: the page behind can't scroll or bounce */
html.view-open { overflow: hidden !important; overscroll-behavior: none; }
html.view-open body { overscroll-behavior: none; }

/* no elastic "rubber-band" overscroll on the page at any time (it would drag the whole window, fixed card included) */
html, body { overscroll-behavior: none; }
html.view-open { touch-action: none; }

/* while a project is open the chips stay above the growing bubble (it overshoots a little as it lands) */
html.view-open .filters { position: relative; z-index: 20; }

/* each tagline line is its own block (so they can move one at a time) */
.tagline .tl { display: block; }

/* Micro + Motion: blue and bold */
.hop, .hopLetter { color: #2563EB; font-weight: 600; }
.hop { font-size: 0.8em; } /* the same smaller size as Thoughtify */

/* Spotify dreams: Spotify's own typeface is Circular (proprietary), so this uses Circular if it is installed and Figtree, a close lookalike, otherwise */
.spot { font-family: "Circular Std", "Circular", "CircularSp", "Figtree", "Host Grotesk", sans-serif; font-weight: 700; letter-spacing: -0.01em; }
.dreams { font-size: 0.62em; font-weight: 300; vertical-align: 0.12em; }

/* About view: the history list, compact */
.aboutJobs { gap: 10px; margin-top: 8px; align-items: center; }
.aboutJobs li { flex-direction: row; gap: 14px; align-items: baseline; }
.aboutJobs .company { font-size: 16px; }
.aboutJobs .role, .aboutJobs .dates { font-size: 14px; color: var(--ink-soft); }
/* Contact view: the links keep their one-line, big-link look */
.view .inline.big.reach { justify-content: center; }

/* About / Contact text sits where the gallery is, centred, with no box around it */
nav.stack { position: relative; }
.panelText { position: absolute; inset: 0 0 auto 0; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 14px; }
.panelText[hidden] { display: none; }
.panelText .lead { font-size: 26px; font-weight: 500; line-height: 1.2; margin: 0; max-width: 640px; }
.panelText .body { font-size: 18px; font-weight: 300; margin: 0; }
.panelText .eyebrow { font-size: 14px; margin: 10px 0 0; color: var(--ink-soft); }

/* the page itself never scrolls */
html, body { height: 100%; overflow: hidden !important; overscroll-behavior: none; }
body { position: relative; }

/* panel content: no inner scroller or width cap, just centred text */
.panelText .pgText { overflow: visible; max-width: none; width: 100%; max-height: none; padding: 0; align-items: center; }
.panelText .contactLinks { flex-wrap: nowrap; white-space: nowrap; }
.panelText .contactLinks li { padding: 0.4em 0; flex: none; }
.panelText .contactLinks li:not(.no-slash)::after { content: "\00B7"; margin: 0 clamp(10px, 1.8vw, 32px); color: rgba(47, 39, 37, 0.4); }

/* Contact panel: a centred column, a small label over each link */
.contactCol2 { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; align-items: center; gap: 22px; }
.contactCol2 li { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.contactCol2 .tinyLabel { font-size: 12px; letter-spacing: 0.08em; font-weight: 500; color: var(--ink-soft); }
.contactCol2 a { font-size: 32px; line-height: 1.2; letter-spacing: -0.02em; }

/* Contact: the whole column sits left, labels left-aligned over their links (the label is inside the link, so the hover bubble wraps both) */
.panelText:has(.contactCol2) { align-items: flex-start; text-align: left; }
.panelText:has(.contactCol2) .pgText { align-items: flex-start; }
.contactCol2 { align-items: flex-start; }
.contactCol2 li { align-items: flex-start; }
.contactCol2 a.withLabel { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; font-size: 32px; line-height: 1.2; letter-spacing: -0.02em; }

/* Contact: the column is centred on the page; labels stay left-aligned with their links inside it */
.panelText:has(.contactCol2), .panelText:has(.contactCol2) .pgText { align-items: center; }
.contactCol2 { width: fit-content; }

/* About: larger type throughout; the history is left-aligned (as a block, centred on the page) */
.panelText:has(.aboutJobs) .lead { font-size: 34px; max-width: 760px; }
.panelText:has(.aboutJobs) .body { font-size: 26px; }
.panelText:has(.aboutJobs) .eyebrow { font-size: 15px; margin-top: 18px; }
.panelText .aboutJobs { width: fit-content; align-items: flex-start; text-align: left; gap: 14px; }
.panelText .aboutJobs li { align-items: baseline; text-align: left; gap: 18px; }
.panelText .aboutJobs .company { font-size: 22px; }
.panelText .aboutJobs .role, .panelText .aboutJobs .dates { font-size: 18px; }

/* Contact: each label and link centred within the column */
.contactCol2, .contactCol2 li, .contactCol2 a.withLabel { align-items: center; text-align: center; }

/* Contact: dead centre of the screen, with more air between the three */
.panelText:has(.contactCol2) { position: fixed; inset: auto; top: 50%; left: 50%; transform: translate(-50%, -50%); width: max-content; }
.contactCol2 { gap: 44px; }

/* About: dead centre of the screen too (the history stays a left-aligned block inside it) */
.panelText:has(.aboutJobs) { position: fixed; inset: auto; top: 50%; left: 50%; transform: translate(-50%, -50%); width: max-content; max-width: 92vw; }

/* About: the history is centre-aligned too */
.panelText .aboutJobs { align-items: center; text-align: center; }
.panelText .aboutJobs li { justify-content: center; text-align: center; }

/* About: the "Professional history" label matches the Contact labels */
.panelText:has(.aboutJobs) .eyebrow { font-size: 12px; letter-spacing: 0.08em; font-weight: 500; text-transform: uppercase; }


/* Sketchbook / Micro + Motion: just the pictures, in a masonry grid that scrolls inside the card */
.pg.gallery { grid-template-columns: minmax(0, 1fr); align-items: stretch; }
.pgGallery { column-count: 3; column-gap: 16px; overflow-y: auto; max-height: 100%; min-height: 0; padding: 4px; scrollbar-width: none; }
.pgGallery::-webkit-scrollbar { display: none; }
.pgGallery img { display: block; width: 100%; height: auto; margin: 0 0 16px; border-radius: 12px; break-inside: avoid; }
@media (max-width: 700px) { .pgGallery { column-count: 2; } }

/* AltQ sits in the list but links nowhere */
.noLink { cursor: default; }

/* the invisible row breaks never get an interpunct (they were showing one between the rows) */
.inline.big li.row-break::after { content: none !important; }

/* Overhand: yellow card, pill chips with a thin dark stroke, early-access form */
/* the bubbles are positioned by js/overhand.js (gravity to the middle, pushed away by the mouse) */
.ohPit { position: relative; width: min(100%, 1120px); height: 640px; margin: 20px auto 0; overflow: visible; touch-action: pan-y; }
.ohBub { position: absolute; left: 0; top: 0; display: flex; align-items: center; justify-content: center; box-sizing: border-box; border: 1.5px solid #0B1620; border-radius: 999px; box-shadow: 0 2px 0 rgba(11, 22, 32, 0.12); white-space: nowrap; line-height: 1; will-change: transform; pointer-events: none; user-select: none; }
.earlyForm { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 18px; }
.earlyInput { font: inherit; font-size: 16px; width: 260px; padding: 12px 18px; color: #1B2430; background: #fff; border: 1px solid #1B2430; border-radius: 999px; outline: none; }
.earlyInput:focus { box-shadow: 0 0 0 3px rgba(27, 36, 48, 0.18); }
.earlyBtn.lockBtn { font: inherit; font-size: 16px; font-weight: 600; padding: 12px 22px; color: #FFDD55; background: #1B2430; border: 1px solid #1B2430; border-radius: 999px; cursor: pointer; }
.earlyBtn.lockBtn:disabled { opacity: 1; }

/* AltQ's logo is a small wordmark */
.logo.altq { height: 18px; width: auto; max-width: none; }

/* Thoughtify: the icon and the word are both Spotify green */
.spotIcon { display: block; width: 20px; height: 22px; background: #1DB954; -webkit-mask: url("../assets/homeAssets/spotifyDreams_projectImage.svg") center / contain no-repeat; mask: url("../assets/homeAssets/spotifyDreams_projectImage.svg") center / contain no-repeat; }
.spot { color: #1DB954; font-size: 0.8em; }
a:has(.spot) .bubble { margin-right: 8px; }

/* Poll.in's logo is a small wordmark */
.logo.pollin { height: 32px; width: auto; max-width: none; }



/* the TouchTunes pin beside the name in the About sentence */
.ttPin { display: inline-block; height: 0.8em; width: auto; vertical-align: -0.04em; margin-right: 0.12em; }

/* "Sheep": Crimson Pro, with the blue gradient of the logo */
.sheepText { font-family: "Crimson Pro", Georgia, serif; font-weight: 600; background: linear-gradient(135deg, #16234D 0%, #3351B3 100%); -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent; }
a:has(.sheepText) .bubble { margin-right: 10px; }

.logo.sheep { height: 22px; width: auto; max-width: none; }
.sheepText { font-size: 1.15em; line-height: 1; }
a:has(.sheepText) .bubble { margin-right: 4px; }
a:has(.sheepText) .bubble { margin-right: 4px; }

/* ======== phones and small screens ======== */
@media (hover: none) {
  .dlBtn:hover { transform: none; }
  .dlBtn:hover::before { opacity: 0; }
  .pg.cover .dlBtn:hover { background: var(--accent, #FA983A); color: #FFFAF6; }
  .pg.cover .aboutBtn:hover { background: #fff; color: var(--ink); }
  a:hover { cursor: auto; }
}
#mouse-circle { }
@media (hover: none), (pointer: coarse) { #mouse-circle { display: none !important; } }

@media (max-width: 900px) {
  .name { font-size: 22px; }
  .tagline { font-size: 17px; line-height: 2; }
  .inline.big { font-size: 26px; }
  .pg .lead { font-size: 32px; }
  .panelText:has(.aboutJobs) .lead { font-size: 28px; }
  .panelText:has(.aboutJobs) .body { font-size: 22px; }
}

@media (max-width: 700px) {
  body { padding: 28px 16px; font-size: 13px; }
  .page { gap: 32px; }
  .hero { min-height: calc(100vh - 56px); min-height: calc(100dvh - 56px); }
  .name { font-size: 20px; }
  .tagline { font-size: 15px; line-height: 1.6; padding: 0 8px; }
  .pill { font-size: 13px; padding: 7px 14px; }

  /* the page scrolls on phones: the wrapped list can run past the bottom of the screen */
  html, body { height: auto; overflow: auto !important; overflow-x: hidden !important; overscroll-behavior: auto; }
  html.view-open, html.view-open body { overflow: hidden !important; }

  /* About / Contact text */
  .panelText .lead, .panelText:has(.aboutJobs) .lead { font-size: 22px; }
  .panelText .body, .panelText:has(.aboutJobs) .body { font-size: 17px; }
  .panelText .aboutJobs .company { font-size: 17px; }
  .panelText .aboutJobs .role, .panelText .aboutJobs .dates { font-size: 14px; }
  .panelText .aboutJobs li { flex-direction: column; gap: 2px; }
  .contactCol2 { gap: 28px; }
  .contactCol2 a.withLabel { font-size: 22px; }

  /* project views */
  .viewBody { inset: 84px 18px 28px; }
  .pg .lead { font-size: 24px; }
  .pg .body, .pg .sub { font-size: 15px; }
  .pg .big { font-size: 36px; }
  .pg .eyebrow { font-size: 11px; }
  .pg.cover { grid-template-columns: minmax(0, 1fr); }
  .pg.cover .coverWrap { width: auto; left: 0; top: 0; }
  .pg.cover .coverShot { display: none; }
  .pgGallery { column-count: 2; column-gap: 10px; }
  .pgGallery img { margin-bottom: 10px; border-radius: 10px; }

  /* Overhand */
  .ohTrade { gap: 12px; }
  .ohChip { font-size: 13px; padding: 6px 12px; }
  .earlyForm { flex-direction: column; width: 100%; }
  .earlyInput { width: 100%; box-sizing: border-box; }
}

/* narrow or short windows: About / Contact sit in the page right under the tabs (centring them on the screen
   made tall content run up under the header) */
@media (max-width: 700px), (max-height: 760px) {
  .panelText:has(.contactCol2), .panelText:has(.aboutJobs) {
    position: absolute; inset: 0 0 auto 0; top: 0; left: 0; transform: none;
    width: auto; max-width: none; box-sizing: border-box; padding: 8px 12px 40px;
  }
}

/* small screens: tabs closer to the tagline, more air between the tabs and what is under them; Contact is centred
   in the middle of the device again; every line of the history is centred */
@media (max-width: 700px), (max-height: 760px) {
  .introTop + .filters { margin-top: 14px; }
  .hero > nav { margin-top: 36px; }
  .panelText:has(.contactCol2) {
    position: fixed; inset: auto; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: max-content; max-width: 92vw; padding: 0;
  }
  .panelText .aboutJobs, .panelText .aboutJobs li { align-items: center; text-align: center; }
  .panelText .aboutJobs li { flex-direction: column; justify-content: center; gap: 2px; }
  .panelText .aboutJobs span { display: block; text-align: center; }
}

/* ---- project views on phones: as wide and tall as there is room, content stacked in one column ---- */
@media (max-width: 700px) {
  .view { border-radius: 28px; }
  .viewHead { top: 18px; left: 18px; }
  .viewLogo { height: 28px; max-width: 110px; }
  .viewHead.stacked .viewLogo { height: 30px; }
  .viewWordmark { height: 13px; }
  .viewClose { top: 12px; right: 12px; width: 36px; height: 36px; font-size: 26px; }
  .viewBody { inset: 68px 16px 52px; clip-path: none; }
  .viewNav.prev { left: 4px; }
  .viewNav.next { right: 4px; }

  .pg { gap: 16px; overflow-y: auto; overflow-x: hidden; align-items: start; grid-template-rows: none; grid-auto-rows: min-content; align-content: start; -webkit-overflow-scrolling: touch; }
  .pg.two, .pg.flip, .pg.one, .pg.media { grid-template-columns: minmax(0, 1fr); }
  .pg.one { align-content: center; }
  .view.vertical .pg { overflow: visible; }
  .pgText { max-width: none; overflow: visible; max-height: none; gap: 12px; }
  .pg.one .pgText { max-width: none; }
  .pgMedia { height: auto; flex-direction: column; gap: 12px; }
  .pgMedia figure { flex: none; width: 100%; height: auto; }
  .pgMedia img, .pgMedia video { width: 100%; height: auto; max-height: none; border-radius: 18px; }
  .viewDots { bottom: 16px; }
}

/* the project card: a softer shadow, and the previous / next project chevrons outside it */
.view { box-shadow: 0 16px 44px -26px rgba(47, 39, 37, 0.1), 0 2px 8px rgba(47, 39, 37, 0.03); }
.projNav { position: fixed; z-index: 12; transform: translateY(-50%); width: 40px; height: 40px; padding: 0; display: flex; align-items: center; justify-content: center; border: 0; background: none; color: var(--ink); cursor: pointer; }
.projNav[hidden] { display: none; }
@media (max-width: 700px) { .projNav { display: none !important; } }

/* wide screens: the links and logos in the list are larger */
@media (min-width: 901px) {
  .inline.big { font-size: 40px; }
  .logo { height: 56px; max-width: 140px; }
  .logo.wide { max-width: 140px; }
  .rowLogo .logo { height: 48px; }
  .rowLogo .wordmark { height: 22px; }
  .stackLogo.small .logo { height: 24px; }
  .withCaption .logo { height: 32px; }
  .logo.altq { height: 24px; }
  .logo.pollin { height: 40px; }
  .logo.sheep { height: 28px; }
  .spotIcon { width: 25px; height: 27px; }
}

/* ---- projects scroll vertically: every page sits under the one before, the card scrolls ---- */
.view.scrollView .viewBody {
  inset: 112px 0 20px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 88px;
  -webkit-overflow-scrolling: touch;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
  mask-image: linear-gradient(to bottom, transparent 0, #000 28px, #000 calc(100% - 28px), transparent 100%);
}
.view.scrollView .pg { display: grid; position: relative; inset: auto; min-height: 100%; box-sizing: border-box; padding: 28px 0; overflow: visible; }
.view.scrollView .pg + .pg { margin-top: 24px; }
.view.scrollView .viewNav, .view.scrollView .viewDots { display: none !important; }
@media (max-width: 700px) {
  .view.scrollView .viewBody { inset: 68px 0 12px; padding: 0 16px; }
  .view.scrollView .pg { min-height: 0; }
}

/* images in the project views sit plain on the card: no backdrop, no drop shadow */
.pgMedia img, .pgMedia video, .pgGallery img { box-shadow: none; background: none; }

/* the row under an open project: every logo and label is centred on the same line */
#projectList.compact { align-items: center; }
#projectList.compact li, #projectList.compact li > a { display: inline-flex; align-items: center; }

/* dark cards (Nanni's blue): light text, light logo and wordmark */
.view.dark { color: #FAFAFA; --ink: #FAFAFA; --ink-soft: rgba(250, 250, 250, 0.7); }
.view.dark .pg .body, .view.dark .pg .quote, .view.dark .pg .list { color: rgba(250, 250, 250, 0.85); }
.view.dark .pg .sub, .view.dark .pg .lead, .view.dark .pg .big, .view.dark .pg p { color: #FAFAFA; }
.view.dark .viewWordmark, .view.dark .viewLogo { filter: brightness(0) invert(1); }
.view.dark .pg .eyebrow { color: rgba(250, 250, 250, 0.7); }

/* ---- scrolling projects: the card's own frame clips the content (no fade); the logo and close button float above it ---- */
.view.scrollView { overflow: hidden; }
.view.scrollView .viewBody {
  inset: 0;
  padding: 120px 88px 40px;
  -webkit-mask-image: none;
  mask-image: none;
}
.view.scrollView .viewHead,
.view.scrollView .viewClose { z-index: 3; background: var(--tint, #fff); }
.view.scrollView .viewHead { top: 28px; left: 32px; padding: 12px 20px; border-radius: 999px; }
.view.scrollView .viewClose { top: 28px; right: 32px; width: 48px; height: 48px; border-radius: 50%; color: #2F2725; }
.view.dark.scrollView .viewLogo, .view.dark.scrollView .viewWordmark { filter: none; }
@media (max-width: 700px) {
  .view.scrollView .viewBody { inset: 0; padding: 76px 16px 12px; }
  .view.scrollView .viewHead { top: 12px; left: 12px; padding: 8px 14px; }
  .view.scrollView .viewClose { top: 12px; right: 12px; width: 40px; height: 40px; }
}

/* the floating logo and close button: a soft drop shadow, set further in from the edges */
.view.scrollView .viewHead,
.view.scrollView .viewClose { box-shadow: 0 8px 22px -8px rgba(47, 39, 37, 0.28), 0 2px 6px rgba(47, 39, 37, 0.1); }
.view.scrollView .viewHead { top: 44px; left: 52px; }
.view.scrollView .viewClose { top: 44px; right: 52px; }
.view.scrollView .viewBody { padding-top: 140px; }
@media (max-width: 700px) {
  .view.scrollView .viewHead { top: 20px; left: 20px; }
  .view.scrollView .viewClose { top: 20px; right: 20px; }
  .view.scrollView .viewBody { padding-top: 92px; }
}

/* close button: just the icon, white or black for the project's colour; on hover a round bubble in the page colour,
   with the same 1px stroke as the other bubbles, grows in behind it and leans toward the cursor */
.view.scrollView .viewClose { background: none; box-shadow: none; color: var(--closeInk, #1A1A1A); transition: color 0.2s ease; }
.view.scrollView .viewClose::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 50%; box-sizing: border-box;
  background: var(--tint, #fff);
  border: 1px solid rgba(47, 39, 37, 0.12);
  box-shadow: 0px 8px 20px -8px rgba(47, 39, 37, 0.14), 0px 2px 6px 0px rgba(47, 39, 37, 0.05);
  opacity: 0; transform: translate(var(--mx, 0px), var(--my, 0px)) scale(0.5);
  transition: opacity 0.2s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.view.scrollView .viewClose:hover, .view.scrollView .viewClose:focus-visible { color: #2F2725; }
.view.scrollView .viewClose:hover::before, .view.scrollView .viewClose:focus-visible::before { opacity: 1; transform: translate(var(--mx, 0px), var(--my, 0px)) scale(1.1); }

/* over the scrolling projects' close button the button draws its own bubble, so the cursor dot steps aside */

/* the project logo: no backdrop at rest; the page-coloured bubble (with the stroke) grows in behind it on hover, and a click scrolls back to the top */
.view.scrollView .viewHead { background: none; box-shadow: none; cursor: pointer; }
.view.scrollView .viewHead::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 999px; box-sizing: border-box;
  background: var(--tint, #fff);
  border: 1px solid rgba(47, 39, 37, 0.12);
  box-shadow: 0px 8px 20px -8px rgba(47, 39, 37, 0.14), 0px 2px 6px 0px rgba(47, 39, 37, 0.05);
  opacity: 0; transform: translate(var(--mx, 0px), var(--my, 0px)) scale(0.85);
  transition: opacity 0.2s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.view.scrollView .viewHead:hover::before, .view.scrollView .viewHead:focus-visible::before { opacity: 1; transform: translate(var(--mx, 0px), var(--my, 0px)) scale(1.04); }
.view.dark.scrollView .viewLogo, .view.dark.scrollView .viewWordmark { filter: brightness(0) invert(1); transition: filter 0.2s ease; }
.view.dark.scrollView .viewHead:hover .viewLogo, .view.dark.scrollView .viewHead:hover .viewWordmark,
.view.dark.scrollView .viewHead:focus-visible .viewLogo, .view.dark.scrollView .viewHead:focus-visible .viewWordmark { filter: none; }

/* the previous / next project chevrons: the same hover bubble (page colour, stroke, soft shadow) as the close button */
.projNav { color: #1A1A1A; }
.projNav::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 50%; box-sizing: border-box;
  background: var(--tint, #fff);
  border: 1px solid rgba(47, 39, 37, 0.12);
  box-shadow: 0px 8px 20px -8px rgba(47, 39, 37, 0.14), 0px 2px 6px 0px rgba(47, 39, 37, 0.05);
  opacity: 0; transform: translate(var(--mx, 0px), var(--my, 0px)) scale(0.5);
  transition: opacity 0.2s ease, transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.projNav:hover::before, .projNav:focus-visible::before { opacity: 1; transform: translate(var(--mx, 0px), var(--my, 0px)) scale(1.1); }

/* the logo, close button and project chevrons sit above the cursor bubble (z-index 13 vs its 12), so the same
   bubble that follows the cursor everywhere is what shows behind them: only its colour and shape change */
.viewHead.floating, .viewClose.floating { position: fixed; z-index: 13; background: none; box-shadow: none; }
.viewHead.floating[hidden], .viewClose.floating[hidden] { display: none; }
.viewHead.floating::before, .viewClose.floating::before, .projNav::before { display: none; }
.viewHead.floating { padding: 12px 20px; border-radius: 999px; cursor: pointer; }
.viewClose.floating { width: 48px; height: 48px; border-radius: 50%; }
.viewClose.floating:hover, .viewClose.floating:focus-visible { color: #2F2725 !important; }
.viewHead.floating.dark .viewLogo, .viewHead.floating.dark .viewWordmark { filter: brightness(0) invert(1); transition: filter 0.2s ease; }
.viewHead.floating.dark:hover .viewLogo, .viewHead.floating.dark:hover .viewWordmark { filter: none; }
.projNav { z-index: 13; }
/* normal blending only while the bubble is behind one of these (the tabs and everything else keep the multiply blend) */
html:has(.viewHead.floating:hover, .viewClose.floating:hover, .projNav:hover) #mouse-circle { mix-blend-mode: normal; }
@media (max-width: 700px) { .viewHead.floating { padding: 8px 14px; } .viewClose.floating { width: 40px; height: 40px; } }

/* the sliding highlight behind the active tab (js/panels.js): it carries the fill, stroke and shadow the active tab used to have */
.filters { position: relative; }
.tabBg {
  position: absolute; left: 0; top: 0; z-index: 0; border-radius: 999px; pointer-events: none; opacity: 0;
  background: var(--ink);
  box-shadow: 0 6px 14px -4px rgba(47, 39, 37, 0.28), 0 2px 4px rgba(47, 39, 37, 0.12);
}
.tabBg::before {
  content: ""; position: absolute; inset: -1px; padding: 1px; border-radius: inherit; pointer-events: none;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.filters .pill { position: relative; z-index: 1; transition: color 0.3s ease; }
.filters .pill[aria-pressed="true"] { background: transparent; box-shadow: none; color: var(--bg); }
.filters .pill[aria-pressed="true"]::before { display: none; }

/* Thoughtify's corner lockup: the same green icon and name as its gallery link */
.viewSpot { display: inline-flex; align-items: center; gap: 6px; }
.viewSpot .spotIcon { width: 18px; height: 20px; }
.viewSpot .spot { font-size: 17px; line-height: 1; }

/* every gallery item (logo, lockup or plain text) is centred on its row's midline, and so is its slash */
#projectList li:not(.row-break) { display: inline-flex; align-items: center; }
#projectList li > a:not(.withCaption):not(.rowLogo):not(.stackLogo) { display: inline-flex; align-items: center; justify-content: center; }
#projectList li > a .bubble { vertical-align: middle; }

/* Habbot's one shared phone: it sits over the pages in the same place each page's own phone used to */
.sharedStage {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 62%;
  grid-template-rows: minmax(0, 1fr);
  align-items: center;
  pointer-events: none;
}
.sharedStage .coverShot { grid-column: 2; position: relative; top: -26px; left: 110px; justify-self: center; align-self: center; height: min(calc(100% + 50px), 71.5vw); }
@media (max-width: 700px) { .sharedStage { display: none; } }

/* Drawl: set in Pally, next to its app icon */
.drawlText { font-family: "Pally", "Nunito", "Host Grotesk", sans-serif; font-weight: 700; letter-spacing: -0.02em; }
.logo.drawl { height: 40px; width: auto; max-width: none; margin-right: 0; border-radius: 22%; }
#projectList a:has(.logo.drawl) .bubble { margin-right: 2px; } /* the gap between the icon and the word */
#projectList .drawlText { margin-left: 0; font-size: 0.8em; }
.drawlText { color: #0C1E44; } /* the navy of the scribble in its icon */

/* gradient text is only painted inside its own box: give the box room for descenders ("p") and the italic overhang */
.sheepText, .drawlText { display: inline-block; line-height: 1.25; padding: 0.08em 0.14em 0.22em; margin: -0.08em -0.14em -0.22em; }

/* =====================================================================================================
   Project views (all but Habbot): one centred column per page, like the main page. The words sit centred on top
   and the pictures centred under them, sized to fit the card: a single picture is as big as the card allows, a
   row of pictures shares the width.
   ===================================================================================================== */
.view.scrollView .pg.two,
.view.scrollView .pg.flip,
.view.scrollView .pg.media,
.view.scrollView .pg.one {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto;
  justify-items: center;
  align-content: center;
  align-items: center;
  text-align: center;
  gap: 40px;
  padding: 56px 0;
}
.view.scrollView .pg.flip .pgText { order: -1; } /* the words come first, whichever side the picture used to be on */

.view.scrollView .pgText { align-items: center; max-width: 680px; width: 100%; gap: 18px; overflow: visible; max-height: none; text-align: center; }
.view.scrollView .pg .lead { font-size: clamp(30px, 3.2vw, 44px); }
.view.scrollView .pg .eyebrow { display: inline-block; }
.view.scrollView .pg .facts { justify-content: center; text-align: center; width: 100%; }
.view.scrollView .pg .fact { align-items: center; }
.view.scrollView .pg .stats { justify-content: center; }
.view.scrollView .pg .list { list-style-position: inside; padding-left: 0; text-align: center; }
.view.scrollView .pg .list li + li { margin-top: 4px; }
.view.scrollView .pg .quote { padding: 0; border: 0; font-style: italic; max-width: 540px; }
.view.scrollView .pg .body { max-width: 620px; }

/* pictures: centred, as big as fits */
.view.scrollView .pgMedia {
  width: 100%;
  height: auto;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 28px;
}
.view.scrollView .pgMedia figure { flex: 0 1 auto; height: auto; min-width: 0; }
.view.scrollView .pgMedia img,
.view.scrollView .pgMedia video {
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: min(58vh, 620px);
  object-fit: contain;
}
/* two or three pictures side by side: each takes an even share, a little shorter so they sit as a row */
.view.scrollView .pgMedia:has(figure:nth-child(2)) figure { flex: 1 1 0; }
.view.scrollView .pgMedia:has(figure:nth-child(2)) img,
.view.scrollView .pgMedia:has(figure:nth-child(2)) video { max-height: min(46vh, 480px); }
.view.scrollView .pgMedia:has(figure:nth-child(4)) figure { flex: 1 1 22%; }
.view.scrollView .pgMedia iframe { width: 100%; max-width: 880px; max-height: none; }
.view.scrollView .pg.media .pgMedia img,
.view.scrollView .pg.media .pgMedia video { max-height: min(66vh, 720px); }
.view.scrollView .pg.media .pgMedia { max-width: 1000px; }

/* the galleries (Sketchbook, Micro + Motion): the same centred width */
.view.scrollView .pg.gallery { grid-template-columns: minmax(0, 1fr); justify-items: center; }
.view.scrollView .pgGallery { width: 100%; max-width: 1040px; max-height: none; overflow: visible; margin: 0 auto; }

@media (max-width: 700px) {
  .view.scrollView .pg.two, .view.scrollView .pg.flip, .view.scrollView .pg.media, .view.scrollView .pg.one { gap: 24px; padding: 28px 0; }
  .view.scrollView .pgMedia img, .view.scrollView .pgMedia video { max-height: 52vh; }
  .view.scrollView .pgMedia:has(figure:nth-child(2)) figure { flex: 1 1 100%; }
}

/* a project's first page opens with its hero picture, above the title */
.view.scrollView .pg:first-child .pgMedia { order: -2; }
.view.scrollView .pg:first-child .pgText { order: -1; }

/* Seeds: the design system pictures run the full width of the page, with some padding, one under the other */
#view-seeds .pg.media { padding-left: 0; padding-right: 0; }
#view-seeds .pgMedia { flex-direction: column; flex-wrap: nowrap; align-items: stretch; width: 100%; max-width: none; padding: 0 28px; box-sizing: border-box; }
#view-seeds .pgMedia figure { flex: none; width: 100%; }
#view-seeds .pgMedia img, #view-seeds .pg.media .pgMedia img { width: 100%; max-width: 100%; max-height: none; height: auto; }
@media (max-width: 700px) { #view-seeds .pgMedia { padding: 0 8px; } }

/* the text blocks stay centred in the view, but the words inside them read from the left */
.view.scrollView .pg.two,
.view.scrollView .pg.flip,
.view.scrollView .pg.media,
.view.scrollView .pg.one { text-align: left; }
.view.scrollView .pgText,
.view.scrollView .pg.one .pgText { align-items: flex-start; text-align: left; }
.view.scrollView .pg .facts { justify-content: flex-start; text-align: left; }
.view.scrollView .pg .fact { align-items: flex-start; }
.view.scrollView .pg .stats { justify-content: flex-start; }
.view.scrollView .pg.one .stat { align-items: flex-start; }
.view.scrollView .pg .list { list-style-position: outside; padding-left: 18px; text-align: left; }
.view.scrollView .pg .quote { padding-left: 14px; border-left: 2px solid rgba(32, 69, 111, 0.35); font-style: normal; max-width: none; }
.view.dark.scrollView .pg .quote { border-left-color: rgba(250, 250, 250, 0.4); }

/* the titles are centred over their text (the paragraphs below stay left aligned) */
.view.scrollView .pg .lead { align-self: stretch; text-align: center; }

/* a project's title (the lead on its first page) stays on one line, centred even if it is wider than the text column */
.view.scrollView .pg:first-child .lead { white-space: nowrap; width: max-content; max-width: none; align-self: center; font-size: clamp(24px, 3vw, 44px); }
@media (max-width: 700px) { .view.scrollView .pg:first-child .lead { white-space: normal; width: auto; align-self: stretch; } }

/* Seeds: the pictures have had their white backdrop cut out (seeds_image0N_cut.png), so the card's colour shows behind them */

/* the Seeds link on the main screen is set in Sailec */
.withCaption .label, .withCaption .caption { font-family: "Sailec", "Host Grotesk", sans-serif; }
.withCaption .label { color: #003960; font-size: 26px; letter-spacing: -0.01em; } /* Bank Blue, from the design system */
.withCaption .caption { color: #003960; opacity: 0.7; }

/* the Seeds icon, painted in Bank Blue through its own shape */
.seedsIcon { display: block; height: 26px; aspect-ratio: 49 / 48; background: #003960; -webkit-mask: url("../assets/homeAssets/seeds_projectImage.svg") center / contain no-repeat; mask: url("../assets/homeAssets/seeds_projectImage.svg") center / contain no-repeat; filter: drop-shadow(0 2px 4px rgba(47, 39, 37, 0.22)); }
@media (max-width: 700px) { .seedsIcon { height: 32px; } }

/* with a project open, the logos in the list below are grey until you hover them */
#projectList.compact li > a { filter: grayscale(1); opacity: .85; transition: filter .25s ease, opacity .25s ease; }
#projectList.compact li > a:hover { filter: none; opacity: 1; }

/* Overhand's form is square-cornered, like its logo, and doesn't share the site's rounded pills */
.earlyInput { border-radius: 4px; border: 2px solid #1B2430; padding: 11px 16px; background: #FFFBEA; }
.earlyInput:focus { box-shadow: 4px 4px 0 #1B2430; }
.earlyBtn.lockBtn { border-radius: 4px; border: 2px solid #1B2430; padding: 11px 22px; box-shadow: 4px 4px 0 rgba(27, 36, 48, 0.35); transition: transform .12s ease, box-shadow .12s ease; }
.earlyBtn.lockBtn:hover:not(:disabled) { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 #1B2430; }
.earlyBtn.lockBtn:active:not(:disabled) { transform: translate(3px, 3px); box-shadow: 1px 1px 0 #1B2430; }

/* Overhand: a very large "Trade", the two piles titled "anything", and a plain "for" between them */
.pg .lead.ohTitle { font-size: clamp(120px, 22vw, 260px); line-height: .95; font-weight: 700; letter-spacing: -0.04em; color: #1B2430; }
.ohLabel { position: absolute; top: -40px; transform: translateX(-50%); font-size: 26px; font-weight: 600; letter-spacing: -0.02em; color: #1B2430; white-space: nowrap; }
.ohBub.ohFor { font-size: 30px; font-weight: 600; border: 0; background: none !important; box-shadow: none; color: #1B2430; font-weight: 500; }
.earlyBtn.lockBtn, .earlyBtn.lockBtn:hover:not(:disabled), .earlyBtn.lockBtn:active:not(:disabled) { box-shadow: none; transform: none; }
.earlyBtn.lockBtn:hover:not(:disabled) { background: #2B3644; }
.ohBub { text-transform: capitalize; } .ohBub.ohFor { text-transform: none; }
.ohBub.ohFor.ohAny { font-size: 34px; font-weight: 700; }
/* Overhand's pit uses the full width of the card */
.view.scrollView .pg.one .pgText:has(.ohPit), .pg.one .pgText:has(.ohPit) { max-width: none; width: 100%; }

.view.scrollView .pg:first-child .lead.ohTitle { font-size: clamp(120px, 22vw, 260px); white-space: normal; }
.earlyBtn.lockBtn { border: 0; padding: 13px 24px; }
.earlyForm { align-self: center; justify-content: center; margin: 0 auto 8px; width: 100%; }

/* Overhand: the logo moves out of the corner into a left-aligned column: logo, "Let's you", "Trade" */
.ohHero { align-self: flex-start; display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 6px; margin: 8px 0 0; }
.ohLogo { height: 56px; width: auto; display: block; margin-bottom: 14px; }
.pg .lead.ohLets, .view.scrollView .pg:first-child .lead.ohLets { font-size: clamp(26px, 3vw, 40px); font-weight: 500; line-height: 1; text-align: left; align-self: flex-start; margin: 0; width: auto; white-space: normal; color: #1B2430; }
.pg .lead.ohTitle, .view.scrollView .pg:first-child .lead.ohTitle { font-size: clamp(64px, 9vw, 120px); text-align: left; align-self: flex-start; margin: 0; width: auto; }

/* the column is centred in the view, and its contents are centred in it */
.ohHero { align-self: center; align-items: center; text-align: center; }
.pg .lead.ohLets, .view.scrollView .pg:first-child .lead.ohLets,
.pg .lead.ohTitle, .view.scrollView .pg:first-child .lead.ohTitle { text-align: center; align-self: center; }
.ohBub.ohFor.ohAny { padding: 0 26px; }

/* Overhand: the early-access form is a floating yellow footer, stuck to the bottom left, fields stacked */
.earlyForm { position: sticky; bottom: 24px; z-index: 6; align-self: flex-start; flex-direction: column; align-items: stretch; justify-content: flex-start; width: 270px; max-width: 100%; margin: 24px 0 0; padding: 18px; gap: 10px; background: #FFDD55; border: 1px solid #1E272E; border-radius: 4px; box-shadow: 0 12px 32px rgba(27, 36, 48, 0.28), 0 2px 6px rgba(27, 36, 48, 0.18); }
.earlyForm .earlyInput { width: 100%; box-sizing: border-box; }
.earlyForm .earlyBtn.lockBtn { width: 100%; }

/* Overhand: the two piles sit at the exact centre of the card; "Trade" is above them and the form below */
.view.scrollView .pg.one:has(.ohPit) { min-height: 100%; padding: 0; align-content: stretch; gap: 0; }
.view.scrollView .pg.one:has(.ohPit) .pgText { display: grid; grid-template-rows: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-columns: minmax(0, 1fr); align-items: center; justify-items: center; height: 100%; min-height: 100%; gap: 0; padding: 20px 0; box-sizing: border-box; }
.view.scrollView .pg.one:has(.ohPit) .ohHero { grid-row: 1; align-self: start; }
.view.scrollView .pg.one:has(.ohPit) .ohPit { grid-row: 2; margin: 0 auto; }
.view.scrollView .pg.one:has(.ohPit) .earlyForm { grid-row: 3; align-self: end; justify-self: start; margin: 0 0 0 20px; }

/* the early-access button has no hover or press animation */
.earlyBtn.lockBtn, .earlyBtn.lockBtn:hover, .earlyBtn.lockBtn:hover:not(:disabled), .earlyBtn.lockBtn:active:not(:disabled) { transition: none; transform: none; box-shadow: none; background: #1B2430; }
.earlyBtn.lockBtn::before, .earlyBtn.lockBtn::after { content: none; }

/* Overhand's project view is set in Clash Grotesk */
#view-overhand, #view-overhand .pg, #view-overhand .lead, #view-overhand .ohBub, #view-overhand .earlyInput, #view-overhand .earlyBtn, #view-overhand .viewTitle { font-family: "Clash Grotesk", "Host Grotesk", sans-serif; }

/* Clash Grotesk, lighter */
#view-overhand .lead.ohTitle { font-weight: 500; letter-spacing: -0.03em; }
#view-overhand .ohBub { font-weight: 420; }
#view-overhand .ohBub.ohFor { font-weight: 400; }
#view-overhand .ohBub.ohFor.ohAny { font-weight: 500; }
#view-overhand .earlyBtn.lockBtn { font-weight: 500; }
#view-overhand .earlyInput { font-weight: 400; }

/* Overhand: the two circles are a Venn diagram in the logo's colours; the words sit on top */
.ohCircle { position: absolute; left: 0; top: 0; border-radius: 50%; pointer-events: none; }
.ohCircle.ohL { background: rgba(60, 64, 198, 0.06); border: 2px solid rgba(60, 64, 198, 0.12); box-sizing: border-box; }
.ohCircle.ohR { background: rgba(255, 63, 52, 0.06); border: 2px solid rgba(255, 63, 52, 0.12); box-sizing: border-box; }
.ohCircle.ohLens { background: rgba(206, 111, 139, 0.06); }
#view-overhand .ohBub.ohFor.ohAny { color: #000; }
#view-overhand { width: min(96vw, 1500px); }

/* Overhand never scrolls: the page fills the card. "Trade" sits top centre, the circles are centred on the card, the form is bottom left */
#view-overhand .viewBody { overflow: hidden; padding: 0; }
.view.scrollView .pg.one:has(.ohPit) { position: absolute; inset: 0; min-height: 0; height: 100%; padding: 0; display: block; }
.view.scrollView .pg.one:has(.ohPit) .pgText { display: block; position: static; height: 100%; min-height: 0; max-width: none; width: 100%; padding: 0; }
.view.scrollView .pg.one:has(.ohPit) .ohHero { position: absolute; top: 24px; left: 50%; transform: translateX(-50%); margin: 0; align-self: auto; }
.view.scrollView .pg.one:has(.ohPit) .ohPit { position: absolute; left: 24px; right: 24px; top: 96px; bottom: 96px; width: auto; height: auto; margin: 0; }
.view.scrollView .pg.one:has(.ohPit) .earlyForm { position: absolute; left: 24px; bottom: 24px; margin: 0; align-self: auto; }
#view-overhand .pg .lead.ohTitle, #view-overhand.view.scrollView .pg:first-child .lead.ohTitle { font-size: clamp(36px, 4.4vw, 60px); line-height: 1; }
#view-overhand .ohBub { backdrop-filter: none; }
#view-overhand .ohBub { border: 1.5px solid rgba(11, 22, 32, 0.5); box-shadow: none; }
#view-overhand .ohBub.ohFor { border: 0; }

/* Overhand: a large "Trade" at the top, the smaller circles centred on the card */
.view.scrollView .pg.one:has(.ohPit) .ohHero { top: 16px; }
.view.scrollView .pg.one:has(.ohPit) .ohPit { top: 24px; bottom: 24px; }
#view-overhand .pg .lead.ohTitle, #view-overhand.view.scrollView .pg:first-child .lead.ohTitle { font-size: clamp(60px, 8vw, 104px); line-height: 1; }
.view.scrollView .pg.one:has(.ohPit) .ohHero { top: auto; bottom: calc(50% + var(--ohR, 190px) - 6px); }
.view.scrollView .pg.one:has(.ohPit) .earlyForm { left: 32px; bottom: 28px; }
@media (max-width: 700px) { .view.scrollView .pg.one:has(.ohPit) .earlyForm { left: 12px; bottom: 12px; } }

/* the email card is as far in from the corner as the logo is from its corner */
.view.scrollView .pg.one:has(.ohPit) .earlyForm { left: 86px; bottom: 61px; }
@media (max-width: 700px) { .view.scrollView .pg.one:has(.ohPit) .earlyForm { left: 34px; bottom: 28px; } }
#view-overhand .ohBub { box-shadow: 0 2px 0 rgba(11, 22, 32, 0.18), 0 4px 10px rgba(11, 22, 32, 0.12); }
#view-overhand .ohBub.ohFor { box-shadow: none; }

/* live Lotties in the Micro + Motion gallery: no container background, sized like the pictures */
.lottieBox { display: block; width: 100%; margin: 0 0 16px; background: none; box-shadow: none; border-radius: 0; break-inside: avoid; }
.lottieBox svg { display: block; width: 100%; height: auto; }
@media (max-width: 700px) { .lottieBox { margin-bottom: 10px; } }

/* Sketchbook: a ransom note, each letter in a different typeface of the site and a different colour */
.rn { display: inline-block; line-height: 1; }
.rnCrimson { font-family: "Crimson Pro", Georgia, serif; font-weight: 600; font-size: 1.12em; }
.rnNunito { font-family: "Nunito", sans-serif; font-weight: 800; }
.rnClash { font-family: "Clash Grotesk", sans-serif; font-weight: 600; }
.rnHost { font-family: "Host Grotesk", sans-serif; font-weight: 700; }
.rnSailec { font-family: "Sailec", sans-serif; font-weight: 500; }
.rnFigtree { font-family: "Figtree", sans-serif; font-weight: 700; }

/* Sketchbook: a justified grid, rows run edge to edge (js/justified.js) */
.pgGallery.justified { column-count: auto; overflow: visible; }
.pgGallery.justified img { display: block; margin: 0; border-radius: 12px; object-fit: cover; flex: none; }
.pgGallery.justified .jrow { width: 100%; }
@media (max-width: 700px) { .pgGallery.justified img { border-radius: 8px; } }

/* each sketch hangs in a gallery frame: a thin dark frame, a white mat, and a soft shadow */
.pgGallery.justified img { box-sizing: border-box; padding: clamp(8px, 1.6vw, 18px); background: #FFFFFF; border: 4px solid #2A2522; border-radius: 2px; object-fit: contain; box-shadow: 0 10px 24px -10px rgba(42, 37, 34, 0.45), 0 2px 5px rgba(42, 37, 34, 0.18); }
@media (max-width: 700px) { .pgGallery.justified img { border-width: 3px; border-radius: 2px; } }

/* the gallery note under each frame, like the little card on a museum wall */
.jfig { margin: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; flex: none; }
.jfig img { width: 100%; }
.jnote { align-self: flex-start; font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: #5C534E; background: #FFFFFF; padding: 5px 10px; border: 1px solid rgba(42, 37, 34, 0.35); border-radius: 2px; line-height: 1; box-shadow: 0 2px 4px rgba(42, 37, 34, 0.12); }

/* Overhand: the circles run the full width, the same distance from the sides as the logo and the sign-up card; "Trade" has room above them */
@media (max-width: 1100px) { .view.scrollView .pg.one:has(.ohPit) .ohPit { left: 40px; right: 40px; top: 130px; bottom: 130px; } }
@media (max-width: 700px) { .view.scrollView .pg.one:has(.ohPit) .ohPit { left: 12px; right: 12px; top: 150px; bottom: 120px; } }

/* Overhand sign-up card: one row, centred at the bottom of the view */
.view.scrollView .pg.one:has(.ohPit) .earlyForm { flex-direction: row; align-items: center; width: auto; left: 50%; right: auto; transform: translateX(-50%); bottom: 61px; }
.view.scrollView .pg.one:has(.ohPit) .earlyForm .earlyInput { width: 240px; }
.view.scrollView .pg.one:has(.ohPit) .earlyForm .earlyBtn.lockBtn { width: auto; white-space: nowrap; }
@media (max-width: 700px) { .view.scrollView .pg.one:has(.ohPit) .earlyForm { left: 50%; bottom: 28px; width: calc(100% - 24px); box-sizing: border-box; } .view.scrollView .pg.one:has(.ohPit) .earlyForm .earlyInput { width: auto; flex: 1; min-width: 0; } }

/* Overhand sign-up: no drop shadows on the field or card; the button gets a glow ring on hover once the email is valid */
#view-overhand .earlyForm, #view-overhand .earlyInput, #view-overhand .earlyInput:focus { box-shadow: none; }
#view-overhand .earlyBtn.lockBtn { transition: none; }
#view-overhand .earlyBtn.lockBtn { position: relative; overflow: visible; }
#view-overhand .earlyForm:has(.earlyInput:not(:placeholder-shown):valid) .earlyBtn.lockBtn:hover:not(:disabled)::after {
  content: ""; position: absolute; inset: -4px; border-radius: inherit; pointer-events: none; box-sizing: border-box;
  border: 4px solid #FFC400; box-shadow: 0 0 0 2px #1B2430, inset 0 0 0 2px #1B2430, 0 0 16px 4px rgba(255, 196, 0, 0.8);
  animation: ohRing 1.1s ease-out 1 forwards;
}
@keyframes ohRing { 0% { inset: -4px; opacity: 1; } 100% { inset: -18px; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #view-overhand .earlyForm:has(.earlyInput:not(:placeholder-shown):valid) .earlyBtn.lockBtn:hover:not(:disabled)::after { animation: none; } }

/* Overhand sign-up button: turns white on hover and an arrow slides in (the width stays put: the text shifts left to make room) */
#view-overhand .earlyBtn.lockBtn { transition: background-color .25s ease, color .25s ease, padding .25s ease; }
#view-overhand .earlyBtn.lockBtn::before {
  content: "\2192"; position: absolute; inset: auto; right: 16px; top: 50%; padding: 0; width: auto; height: auto; border-radius: 0;
  background: none; -webkit-mask: none; mask: none; font-size: 20px; line-height: 1; color: #1B2430; pointer-events: none;
  opacity: 0; transform: translate(-14px, -52%); transition: opacity .25s ease, transform .3s cubic-bezier(.2, .8, .2, 1);
}
#view-overhand .earlyBtn.lockBtn:hover:not(:disabled) { background: #fff; color: #1B2430; padding-left: 14px; padding-right: 34px; }
#view-overhand .earlyBtn.lockBtn:hover:not(:disabled)::before { opacity: 1; transform: translate(0, -52%); }
@media (prefers-reduced-motion: reduce) { #view-overhand .earlyBtn.lockBtn, #view-overhand .earlyBtn.lockBtn::before { transition: none; } }

/* Overhand sign-up button: inert until the email is valid */
#view-overhand .earlyBtn.lockBtn:disabled { opacity: .4; cursor: default; background: #1B2430; color: #FFDD55; }
#view-overhand .earlyBtn.lockBtn:disabled::before, #view-overhand .earlyBtn.lockBtn:disabled::after { content: none; animation: none; }

/* Happlycations logo, larger than the default list logo */
.logo.happly { height: 72px; max-width: none; }
@media (max-width: 700px) { .logo.happly { height: 60px; } }

/* ======== Phones: the project list is a stacked deck of cards (js/deck.js) ======== */
.openBtn, .peek { display: none; }
@media (max-width: 700px) {
  :root { --hdrH: 190px; }

  /* name, tagline and tabs stay put at the top */
  .hero { display: block; min-height: 0; }
  .hero > header { position: fixed; top: 0; left: 0; right: 0; z-index: 6; width: auto; max-width: none; box-sizing: border-box; padding: 26px 16px 10px; background: var(--bg); }

  /* the deck fills the screen under the header, so its middle is the middle of the device */
  .hero > nav { position: fixed; left: 0; right: 0; top: var(--hdrH); bottom: 0; margin: 0; z-index: 1; display: block; }
  .hero > nav > .ghost { display: none; }
  .hero > nav > #projectList {
    position: absolute; left: 0; right: 0; bottom: 0; top: -22px; /* from the bottom of the tabs (the header has 10px under them, and the nav starts 12px below the header) to the bottom of the device: its middle is the middle of that space */
    display: block; margin: 0; padding: 0; zoom: 1 !important; overflow: hidden; font-size: 26px;
    align-self: stretch; height: auto; min-width: 0; perspective: 900px; perspective-origin: 50% 50%; /* (filter.js puts the nav in a centred grid: .stack > #projectList { align-self: center } would shrink the deck to nothing) */
    touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  }

  #projectList li.row-break { display: none; }
  /* every card sits in the middle of the deck; js/deck.js moves, scales and fades them */
  #projectList li:not(.row-break) {
    position: absolute; left: 0; right: 0; top: 50%; margin: 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center;
    box-sizing: border-box; width: fit-content; min-width: 0; max-width: calc(100% - 32px); height: auto; padding: 9px 16px;
    background: var(--bg); border-radius: 22px; text-align: center; backface-visibility: hidden;
    box-shadow: 0 9px 20px -6px rgba(47, 39, 37, 0.21), 0 1.5px 5px rgba(47, 39, 37, 0.07); transition: background-color .3s ease, box-shadow .3s ease;
    will-change: translate, scale, rotate, opacity; transform-origin: 50% 50% !important;
  }
  /* only the card in front has its own colour; every card has a shadow, half as strong on the ones not in front */
  #projectList li.isActive:not(.row-break) { background: var(--card, #fff); box-shadow: 0 18px 40px -12px rgba(47, 39, 37, 0.42), 0 3px 10px rgba(47, 39, 37, 0.14); }
  #projectList li.is-current:not(.row-break) { display: flex !important; } /* the deck stays whole while a project is open */
  #projectList li::after, #projectList li.no-slash::after, #projectList li:last-child::after {
    content: ""; position: absolute; inset: 0; margin: 0; border-radius: inherit; background: var(--bg); opacity: var(--dim, 0);
    pointer-events: none; text-shadow: none;
  }
  #projectList li > a { max-width: 100%; zoom: 1.05; }
  #projectList.compact { display: block; }

  /* logos are grey until their card is the one in front */
  #projectList li > a, #projectList.compact li > a { transition: filter .4s ease; }
  #projectList li:not(.isActive) > a, #projectList.compact li:not(.isActive) > a { filter: grayscale(1); opacity: calc(1 - var(--pk, 0)); }
  #projectList li.isActive > a, #projectList.compact li.isActive > a { filter: none; opacity: calc(1 - var(--pk, 0)); }
  #projectList li:not(.isActive) > a:hover { filter: grayscale(1); }

  /* a small grey copy of the logo on the part of a card that peeks out from behind the front one */
  .peek { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; align-items: center; justify-content: center; zoom: .8; opacity: var(--pk, 0); pointer-events: none; filter: grayscale(1); }
  .peek * { max-width: 100%; }

  /* if the deck's script fails, the cards fall back to a plain scrolling list */
  html.deckFail .hero > nav > #projectList { overflow-y: auto; touch-action: pan-y; padding: 8px 0 40px; }
  html.deckFail #projectList li:not(.row-break) { position: relative; top: auto; left: auto; right: auto; margin: 0 auto 14px; translate: none !important; scale: none !important; opacity: 1 !important; visibility: visible !important; }
  html.deckFail #projectList li > a { opacity: 1 !important; filter: none !important; }
  html.deckFail .peek { display: none !important; }

  /* while a project is open the deck stays out of sight (the card covers the screen) */
  html.view-open .hero > nav { visibility: hidden; }

  /* About / Contact sit right under the fixed header */
  .panelText:has(.aboutJobs) { top: 0; bottom: 0; overflow-y: auto; padding-top: 8px; }
}

/* phones and touch screens: no cursor effects at all (no cursor dot, no custom cursors) */
@media (max-width: 700px), (hover: none), (pointer: coarse) {
  #mouse-circle { display: none !important; }
  *, *::before, *::after { cursor: auto !important; }
}

/* phones: the password / NDA block of a locked project (TouchTunes) sits in the middle of the card */
@media (max-width: 700px) {
  .view .pg.one { align-items: center; align-content: center; justify-items: center; height: 100%; }
  .view .pg.one .pgText.lockBox { width: 100%; align-items: center; justify-content: center; text-align: center; margin: 0 auto; }
  .view .lockBox .lockForm { justify-content: center; width: 100%; max-width: 360px; }
  .view .lockBox .lockInput { flex: 1 1 auto; min-width: 0; text-align: center; }
  .view .lockBox .lockAsk, .view .lockBox .lockMsg, .view .lockBox .lockApp { text-align: center; }
}

/* phones: while a project is open the name, tagline and tabs fade away (the card takes the whole screen) */
@media (max-width: 700px) {
  .hero > header { transition: opacity .3s ease; }
  html.view-open .hero > header { opacity: 0; pointer-events: none; }
}

/* phones: Habbot's wordmark is tight to its box, so its deck card gets a little more room */
@media (max-width: 700px) {
  #projectList li:has(> a[data-view="habbot"]):not(.row-break) { padding: 18px 28px; }
}

/* the floating "Open" button under the deck (phones): it pops in when a project settles in focus, shrinks and goes
   quiet while the deck is moving, and hides while a project is open */
.deckView { display: none; }
@media (max-width: 700px) {
  .deckView {
    display: block; position: fixed; z-index: 8; left: 50%; bottom: calc(env(safe-area-inset-bottom, 0px) + 22px);
    padding: 14px 38px; border: 0; border-radius: 999px; font: inherit; font-size: 17px; font-weight: 600; letter-spacing: .01em;
    color: #fff; background: #BDB8B5; box-shadow: none;
    transform: translateX(-50%) scale(0); opacity: 0; pointer-events: none; -webkit-tap-highlight-color: transparent;
    transition: transform .4s cubic-bezier(.34, 1.56, .64, 1), opacity .2s ease, background-color .2s ease, color .2s ease, box-shadow .2s ease;
  }
  .deckView.shown { transform: translateX(-50%) scale(.72); opacity: 1; }             /* disabled: small, solid grey */
  .deckView.ready { transform: translateX(-50%) scale(1); opacity: 1; pointer-events: auto; color: var(--ink); background: var(--btn, #F4F4F4); box-shadow: 0 10px 24px -8px rgba(47, 39, 37, .34), 0 2px 6px rgba(47, 39, 37, .12), 0 0 0 1px rgba(47, 39, 37, .06); }
  .deckView.ready:active { transform: translateX(-50%) scale(.95); transition-duration: .12s; }
  html.view-open .deckView, html.deckFail .deckView { transform: translateX(-50%) scale(0); opacity: 0; pointer-events: none; }
}
@media (prefers-reduced-motion: reduce) { .deckView { transition: none; } }

/* phones: Nanni's icon-over-wordmark logo also gets more room in its deck card */
@media (max-width: 700px) {
  #projectList li:has(> a[data-view="nanni"]):not(.row-break) { padding: 18px 46px; }
}

/* phones: only the card in focus has the soft shadow on its logo and text; the others are flat */
@media (max-width: 700px) {
  #projectList .logo, #projectList .wordmark { transition: filter .3s ease; }
  #projectList li:not(.isActive) .logo, #projectList li:not(.isActive) .wordmark { filter: none; }
  #projectList li:not(.isActive), #projectList li:not(.isActive) * { text-shadow: none; }
}

/* the round mode button (stacked carousel <-> gallery) and the gallery view itself (phones) */
.deckMode { display: none; }
@media (max-width: 700px) {
  .deckMode {
    display: flex; align-items: center; justify-content: center; position: fixed; z-index: 8; bottom: calc(env(safe-area-inset-bottom, 0px) + 22px);
    left: calc(50% + 100px); width: 52px; height: 52px; margin-left: -26px; padding: 0; border: 0; border-radius: 50%;
    color: var(--ink); background: #F4F4F4; box-shadow: 0 10px 24px -8px rgba(47, 39, 37, .34), 0 2px 6px rgba(47, 39, 37, .12), 0 0 0 1px rgba(47, 39, 37, .06);
    transform: scale(0); opacity: 0; pointer-events: none; -webkit-tap-highlight-color: transparent;
    transition: transform .4s cubic-bezier(.34, 1.56, .64, 1), opacity .2s ease, left .35s ease;
  }
  .deckMode svg { fill: currentColor; stroke: none; }
  .deckMode .icStack { display: none; }
  html.deckGallery .deckMode .icGrid { display: none; }
  html.deckGallery .deckMode .icStack { display: block; }
  .deckMode.shown { transform: scale(1); opacity: 1; pointer-events: auto; }
  .deckMode.shown:active { transform: scale(.92); transition-duration: .12s; }
  html.deckGallery .deckMode { left: 50%; }                      /* alone in the middle while the Open button is away */
  html.deckGallery .deckView { transform: translateX(-50%) scale(0); opacity: 0; pointer-events: none; }
  html.view-open .deckMode, html.deckFail .deckMode { transform: scale(0); opacity: 0; pointer-events: none; }

  html.deckGallery #projectList { overflow-y: auto; overflow-x: hidden; touch-action: pan-y; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; perspective: none; }
  html.deckGallery #projectList { -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22px, #000 calc(100% - 70px), transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 22px, #000 calc(100% - 70px), transparent 100%); }
  html.deckGallery #projectList .deckSpacer { position: absolute; left: 0; width: 1px; height: 1px; pointer-events: none; }
  /* the art wall: js/deck.js places and scales each card (translate / scale from the top left) */
  html.deckGallery #projectList li:not(.row-break) {
    position: absolute !important; top: 0 !important; left: 0 !important; right: auto !important; margin: 0 !important; max-width: none !important;
    transform-origin: 0 0 !important; opacity: 1; visibility: visible;
    background: var(--card, #F4F4F4); box-shadow: 0 6px 16px -8px rgba(47, 39, 37, 0.3), 0 1px 3px rgba(47, 39, 37, 0.08);
    will-change: auto !important; backface-visibility: visible !important;
    animation: wallIn .5s cubic-bezier(.2, .7, .2, 1) backwards; animation-delay: calc(var(--i, 0) * 28ms);
  }
  @keyframes wallIn { from { opacity: 0; } to { opacity: 1; } }
  html.deckGallery #projectList li::after { display: none; }
  html.deckGallery #projectList li > a, html.deckGallery #projectList li:not(.isActive) > a { filter: none !important; opacity: 1 !important; }
  html.deckGallery #projectList li:not(.isActive) .logo, html.deckGallery #projectList li:not(.isActive) .wordmark { filter: drop-shadow(0 2px 4px rgba(47, 39, 37, 0.22)); }
}
@media (prefers-reduced-motion: reduce) { .deckMode { transition: none; } }

/* phones: no Open / mode buttons while About or Contact is showing */
@media (max-width: 700px) {
  html:has(.panelText:not([hidden])) .deckView, html:has(.panelText:not([hidden])) .deckMode { transform: translateX(-50%) scale(0) !important; opacity: 0 !important; pointer-events: none !important; }
  html:has(.panelText:not([hidden])) .deckMode { transform: scale(0) !important; }
}


/* desktop: the row under an open project wraps onto more lines when it won't fit as one.
   It is shown shrunk by --mini (MINI in js/project.js, set on the page by the script), so it gets a layout width
   of 92vw / --mini: that way it only wraps once the shrunk row would actually run past the edges of the window */
@media (min-width: 701px) {
  #projectList.compact {
    flex-wrap: wrap;
    width: calc(92vw / var(--mini, 0.6));
    justify-self: center;
  }
}

/* desktop: the project links float. The shadow is a big, very soft one pushed down and to the right, tinted a
   little purple-grey, so each logo and label looks lifted off the page on its own */
@media (min-width: 701px) {
  #projectList { text-shadow: 12px 20px 40px rgba(45, 30, 60, 0.28); }
  #projectList .logo, #projectList .wordmark { filter: drop-shadow(12px 20px 38px rgba(45, 30, 60, 0.34)); }
}


/* =====================================================================================================
   TouchTunes: pages are a "split": words on the left, a phone on the right, one card-full each, scrolling
   vertically. The words are a sentence with coloured pills (see private/touchtunes/pages.json, which is
   encrypted by tools/lock.mjs: the markup uses the classes below).
   The card is a size container, so the type and the phone scale with the card (cqw / cqh) and every window
   size keeps the same proportions.
   ===================================================================================================== */
#view-touchtunes { container-type: size; --tt-row: max(2.4cqw, 30px); --tt-gap: max(0.85cqw, 8px); --tt-nav-w: max(10.6cqw, var(--tt-nav-px, 0px)); }
#view-touchtunes.scrollView .pg.split {
  /* each page is as tall as the whole card, so its words and phone sit in the card's own middle (the card's top padding is pulled back in) */
  position: absolute; inset: 0; margin: 0; min-height: 0; padding: 0 8cqw 0 7.6cqw;
  grid-template-columns: minmax(0, 1fr) auto;
  justify-items: start;
  align-items: center;
  align-content: center;
  column-gap: 5cqw;
  text-align: left;
}
#view-touchtunes.scrollView .viewBody { padding: 0; overflow: hidden; }
#view-touchtunes.scrollView .pg.split + .pg.split { margin-top: 0; }
#view-touchtunes.scrollView .pg.split .pgText { align-self: center; justify-content: center; min-height: calc(var(--tt-n, 1) * (var(--tt-row) + var(--tt-gap)) - var(--tt-gap)); order: 0; align-items: flex-start; text-align: left; max-width: none; width: auto; gap: 0; }
#view-touchtunes.scrollView .pg.split .pgMedia { order: 0; width: auto; height: auto; flex-wrap: nowrap; justify-self: end; }
#view-touchtunes.scrollView .pg.split .pgMedia figure { flex: none; }

/* the page label ("Intro", "Onboarding") is the page's entry in the nav list on the left of the sentence: js/views.js builds one shared
   list (.ttTabs) from the labels of every page, with a thin line (.ttRule) between it and the sentence. The labels themselves are hidden. */
#view-touchtunes .pg.split .pgText { position: relative; padding-left: calc(var(--tt-nav-w) + 1.5cqw); }
#view-touchtunes .pg.split .eyebrow.ttLabel { display: none; }
.ttTabs { position: absolute; left: -0.75cqw; top: 0; width: var(--tt-nav-w); display: flex; flex-direction: column; align-items: flex-start; gap: var(--tt-gap); pointer-events: auto; z-index: 2; }
.ttTab { position: relative; z-index: 1; display: flex; align-items: center; height: var(--tt-row); padding: 0 0.75cqw; border: 0; border-radius: 999px; background: none; color: rgba(250, 250, 250, 0.5); font: inherit; font-size: 16px; line-height: 1; text-align: left; cursor: pointer; transition: color 0.3s ease, transform 0.3s ease; white-space: nowrap; }
.ttTab:hover { color: rgba(250, 250, 250, 0.85); }
.ttTab.on { color: #FAFAFA; }
/* the highlight bubble pops out of the tab being left and into the new one */
.ttTab::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 999px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.1); box-sizing: border-box; opacity: 0; transform: scale(0.8); transition: opacity 0.18s ease, transform 0.18s ease; pointer-events: none; }
.ttTab.on::before { opacity: 1; transform: scale(1); transition: opacity 0.22s ease 0.12s, transform 0.3s cubic-bezier(0.34, 1.4, 0.64, 1) 0.12s; }
.ttRule { position: absolute; left: var(--tt-nav-w); top: 0; bottom: 0; width: 1px; background: rgba(255, 255, 255, 0.14); pointer-events: none; }
.ttTxt { display: inline-block; white-space: pre; }
.ttPill { transform-origin: 50% 55%; }

/* the sentence: each line on its own row, tall enough for the pills */
#view-touchtunes .pg.split .ttHead { font-size: clamp(16px, 2.55cqw, 38px); font-weight: 500; line-height: 2.05; letter-spacing: -0.015em; color: #FAFAFA; }
.ttLine { display: block; white-space: nowrap; }

/* the pills: glossy, fully rounded, bold white type */
.ttPill {
  --pill: #7a35e6; --pill2: #6428c8;
  display: inline-flex; align-items: center; gap: 0.28em; vertical-align: middle;
  padding: 0.04em 0.6em 0.1em; border-radius: 999px; line-height: 1.45;
  font-weight: 700; letter-spacing: -0.01em; color: #fff;
  background: linear-gradient(180deg, var(--pill) 0%, var(--pill2) 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.32), inset 0 -2px 5px rgba(0, 0, 0, 0.28);
}
.ttPill.purple { --pill: #8a43f0; --pill2: #6a2bd2; }
.ttPill.blue { --pill: #4a8af7; --pill2: #2f67dc; }
.ttPill.indigo { --pill: #3E3EE7; --pill2: #3232DC; }
.ttPill.green { --pill: #3f9f6d; --pill2: #28784c; }
.ttPill .ttPin { height: 0.72em; margin: 0; }
.ttPill .ttUser { height: 0.9em; width: auto; margin: -0.1em -0.05em -0.1em -0.1em; }
.ttPill .ttAdd { height: 0.72em; width: auto; margin: -0.1em -0.1em -0.1em -0.15em; }
.ttPill .ttCoin { height: 1.05em; width: auto; margin: -0.1em -0.05em -0.1em -0.2em; }
.ttEmoji { font-size: 0.6em; line-height: 1; font-weight: 400; }

/* the blank phone, until the screens are in */
.phoneBlank {
  height: 62cqh; aspect-ratio: 1206 / 2622; box-sizing: border-box;
  border-radius: 19% / 8.8%; background: #10151D; border: 1px solid rgba(255, 255, 255, 0.07);
}

@media (max-width: 700px) {
  #view-touchtunes.scrollView .pg.split { grid-template-columns: minmax(0, 1fr); row-gap: 28px; margin: 0; min-height: 0; padding: 28px 0; }
  #view-touchtunes.scrollView .pg.split .pgMedia { justify-self: center; }
  #view-touchtunes .pg.split .ttHead { font-size: clamp(17px, 5.6cqw, 28px); }
  #view-touchtunes.scrollView .pg.split .pgText { margin-top: 0; align-self: auto; min-height: 0; }
  #view-touchtunes .pg.split .pgText { padding-left: 0; }
  #view-touchtunes .pg.split .eyebrow.ttLabel { display: block; visibility: hidden; height: 44px; margin: 0 0 8px; padding: 0; font-size: 1px; }
  .ttTabs { left: 0; top: 0; width: 100%; flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .ttTab { font-size: 14px; padding: 8px 14px; }
  .ttRule { display: none; }
  .ttLine { white-space: normal; }
  .phoneBlank { height: min(420px, 62dvh); }
}

/* TEMPORARY dev-only skip button on the password form (localhost) */
.lockDev { margin-left: 8px; padding: 0 12px; border: 1px dashed currentColor; border-radius: 999px; background: none; color: inherit; font: inherit; font-size: 12px; opacity: 0.6; cursor: pointer; }

/* TouchTunes: the app icon keeps its own colours in the card's header (dark cards otherwise turn logos white) */
.viewHead.keepLogo .viewLogo, .viewHead.keepLogo:hover .viewLogo { filter: none !important; }

/* the password form on dark cards: pale-on-dark field, light button */
.view.dark .lockInput { color: #FAFAFA; background: rgba(255, 255, 255, 0.1); }
.view.dark .lockInput::placeholder { color: rgba(250, 250, 250, 0.5); }
.view.dark .lockInput:focus { border-color: rgba(255, 255, 255, 0.45); }
.view.dark .lockBtn { color: #03070F; background: #FAFAFA; box-shadow: 0 6px 14px -4px rgba(0, 0, 0, 0.5); }
.view.dark .lockBtn::before { content: none; }
.view.dark .lockBtn:disabled { color: rgba(250, 250, 250, 0.4); background: rgba(255, 255, 255, 0.1); box-shadow: none; }
.view.dark .lockForm.has-error .lockInput { border-color: #E5655C; background: rgba(229, 101, 92, 0.15); }
.view.dark .lockMsg { color: #FF8E86; }

/* TouchTunes is set in Proxima Nova */
#view-touchtunes, #view-touchtunes input, #view-touchtunes button { font-family: "Proxima Nova", "Host Grotesk", sans-serif; }

/* the scroll cue, bottom centre of the TouchTunes view */
.ttScroll { display: flex; align-items: center; gap: 12px; font: inherit; position: absolute; left: 50%; bottom: 3.2cqh; transform: translateX(-50%); z-index: 3; padding: 10px; border: 0; background: none; cursor: pointer; opacity: 1; transition: opacity 0.35s ease, transform 0.35s ease; }
.ttScroll.gone { opacity: 0; pointer-events: none; transform: translateX(-50%) translateY(8px); }
.ttMouse { position: relative; display: block; width: 22px; height: 34px; box-sizing: border-box; border: 1.5px solid rgba(250, 250, 250, 0.5); border-radius: 999px; }
.ttWheel { position: absolute; left: 50%; top: 6px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: rgba(250, 250, 250, 0.85); animation: ttWheel 1.8s cubic-bezier(0.5, 0, 0.2, 1) infinite; }
.ttScroll:hover .ttMouse { border-color: rgba(250, 250, 250, 0.85); }
@keyframes ttWheel { 0% { transform: translateY(0); opacity: 0; } 20% { opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { transform: translateY(12px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .ttWheel { animation: none; opacity: 0.85; } }
.ttScrollText { font-size: 16px; line-height: 1; color: rgba(255, 255, 255, 0.5); white-space: nowrap; }
.ttScroll:hover .ttScrollText { color: rgba(255, 255, 255, 0.8); }

/* mid-width cards: the sentence and phone give a little room back so nothing runs into the nav or each other */
@container (min-width: 701px) and (max-width: 1000px) {
  #view-touchtunes.scrollView .pg.split { column-gap: 2cqw; padding-right: 5cqw; padding-left: 5cqw; }
  #view-touchtunes .pg.split .ttHead { font-size: clamp(14px, 2.35cqw, 38px); }
  .phoneBlank { height: 54cqh; }
}


/* =====================================================================================================
   Nanni: the same step view as TouchTunes (pages stack, scroll / swipe / keys / tabs step between them), on a cool pale grey card in
   Satoshi. The tab list is fixed at the left of the card (js/views.js builds it from each page's .ttLabel); each page's words and
   pictures sit to the right of it. Screens narrower than 901px keep the one long scrolling page (the step view isn't wired there).
   ===================================================================================================== */
#view-nanni { --ink: #0B1530; --ink-soft: rgba(11, 21, 48, 0.58); color: var(--ink); }
#view-nanni, #view-nanni .pg, #view-nanni .pg *, #view-nanni button { font-family: "Satoshi", "Host Grotesk", system-ui, sans-serif; }
#view-nanni .ttLabel { display: none; }
@media (min-width: 901px) {
  #view-nanni { container-type: size; --tt-row: max(2.4cqw, 30px); --tt-gap: max(0.85cqw, 8px); --tt-nav-w: max(10.6cqw, var(--tt-nav-px, 0px)); }
  #view-nanni.stepView .viewBody { padding: 0; overflow: hidden; }
  #view-nanni.stepView .pg,
  #view-nanni.stepView .pg.two, #view-nanni.stepView .pg.flip, #view-nanni.stepView .pg.one, #view-nanni.stepView .pg.media {
    position: absolute; inset: 0; margin: 0; min-height: 0; gap: 0; column-gap: 3cqw; row-gap: 0;
    padding: 0 6cqw 0 calc(7.6cqw + var(--tt-nav-w) + 3.4cqw);
    display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); justify-items: start; align-items: center; align-content: center;
    text-align: left;
  }
  #view-nanni.stepView .pg.one, #view-nanni.stepView .pg.media { grid-template-columns: minmax(0, 1fr); }
  #view-nanni.stepView .pgText { order: -1; } /* the words first, whichever side the picture used to be on */
  #view-nanni.stepView .pgMedia { order: 0; }
  #view-nanni.stepView .pgText { align-items: flex-start; text-align: left; max-width: none; width: 100%; max-height: 82cqh; gap: clamp(8px, 1.2cqw, 18px); }
  #view-nanni.stepView .pg .lead { font-size: clamp(22px, 2.6cqw, 42px); line-height: 1.12; letter-spacing: -0.02em; font-weight: 500; }
  #view-nanni.stepView .pg .lead, #view-nanni.stepView .pg:first-child .lead { white-space: normal; width: 100%; max-width: 100%; align-self: flex-start; text-align: left; } /* wraps inside its column (the scrolling view keeps the first page's title on one line) */
  #view-nanni.stepView .pg:first-of-type .lead { font-size: clamp(26px, 2.9cqw, 48px); line-height: 1.3; }
  #view-nanni.stepView .pg .body, #view-nanni.stepView .pg .sub, #view-nanni.stepView .pg .quote { font-size: clamp(13px, 1.12cqw, 19px); line-height: 1.5; max-width: 40em; text-align: left; }
  #view-nanni.stepView .pg .sub { font-weight: 600; }
  #view-nanni.stepView .pg .eyebrow:not(.ttLabel) { font-size: clamp(13px, 1.12cqw, 19px); letter-spacing: 0; text-transform: none; font-weight: 500; color: var(--ink); line-height: 1.4; }
  #view-nanni.stepView .pg .eyebrow::before { display: none; }
  #view-nanni.stepView .pg .facts, #view-nanni.stepView .pg .stats { justify-content: flex-start; text-align: left; width: auto; }
  #view-nanni.stepView .pg .fact { align-items: flex-start; }
  #view-nanni.stepView .pg .quote { padding: 0; border: 0; font-style: italic; }
  #view-nanni.stepView .pgMedia { width: 100%; height: auto; max-width: none; max-height: 78cqh; flex-wrap: nowrap; justify-content: center; align-items: center; gap: 1.6cqw; }
  #view-nanni.stepView .pgMedia figure { flex: 0 1 auto; min-width: 0; margin: 0; }
  #view-nanni.stepView .pgMedia img, #view-nanni.stepView .pgMedia video { width: auto; height: auto; max-width: 100%; max-height: 78cqh; object-fit: contain; }
  #view-nanni.stepView .pgMedia:has(figure:nth-child(2)) figure { flex: 1 1 0; }
  #view-nanni.stepView .pgMedia:has(figure:nth-child(2)) img, #view-nanni.stepView .pgMedia:has(figure:nth-child(2)) video { max-height: 64cqh; }

  /* the tab list, fixed at the left: the same look as TouchTunes, in dark ink on the pale card */
  #view-nanni .ttNavWrap { position: absolute; left: 7.6cqw; top: 50%; width: var(--tt-nav-w); height: calc(var(--tt-n, 1) * (var(--tt-row) + var(--tt-gap)) - var(--tt-gap)); transform: translateY(-50%); z-index: 3; }
  #view-nanni .ttTab { color: rgba(11, 21, 48, 0.5); }
  #view-nanni .ttTab:hover { color: rgba(11, 21, 48, 0.85); }
  #view-nanni .ttTab.on { color: #0B1530; }
  #view-nanni .ttTab::before { background: rgba(11, 21, 48, 0.12); border-color: rgba(11, 21, 48, 0.06); }
  #view-nanni .ttRule { background: rgba(11, 21, 48, 0.16); }
  #view-nanni .ttScroll { color: rgba(11, 21, 48, 0.5); }
}
@media (min-width: 901px) {
  #view-nanni .ttMouse { border-color: rgba(11, 21, 48, 0.4); }
  #view-nanni .ttWheel { background: rgba(11, 21, 48, 0.7); }
  #view-nanni .ttScrollText { color: rgba(11, 21, 48, 0.5); }
  #view-nanni .ttScroll:hover .ttScrollText { color: rgba(11, 21, 48, 0.8); }
}


/* no project list while a project view is open (it stays in the page, so it can come back on close; the prev / next chevrons switch projects) */
@media (max-width: 700px) { html.view-open #projectList { opacity: 0 !important; pointer-events: none !important; } }
/* desktop: the intro (name, tagline, tabs) gives way to the row of projects above the smaller card */
@media (min-width: 701px) { html.view-open .hero > header { opacity: 0; pointer-events: none; } }

/* Nanni's phones now float on the card (their backgrounds are cut out), so the captions that used to be inside the pictures are text under them */
#view-nanni .pgMedia figcaption { margin-top: 1.2cqw; text-align: center; font-size: clamp(14px, 1.3cqw, 22px); font-weight: 500; color: var(--ink); }

/* Nanni without its tab list: the pages use the room the list had */
@media (min-width: 901px) {
  #view-nanni.noTabs.stepView .pg, #view-nanni.noTabs.stepView .pg.two, #view-nanni.noTabs.stepView .pg.flip, #view-nanni.noTabs.stepView .pg.one, #view-nanni.noTabs.stepView .pg.media { padding-left: 8cqw; padding-right: 8cqw; }
}

/* Nanni: the words sit above the phones, both in the right-hand part of the card */
@media (min-width: 901px) {
  #view-nanni.stepView .pg, #view-nanni.stepView .pg.two, #view-nanni.stepView .pg.flip, #view-nanni.stepView .pg.one, #view-nanni.stepView .pg.media {
    grid-template-columns: minmax(0, 0.5fr) minmax(0, 1.5fr); grid-template-rows: auto auto; row-gap: 2.2cqw; align-content: center; align-items: start;
    padding-left: 6cqw; padding-right: 6cqw;
  }
  #view-nanni.stepView .pg > .pgText, #view-nanni.stepView .pg > .pgMedia { grid-column: 2; order: 0; }
  #view-nanni.stepView .pg > .pgText { grid-row: 1; max-height: 34cqh; align-self: end; }
  #view-nanni.stepView .pg > .pgMedia { grid-row: 2; max-height: 52cqh; justify-content: flex-start; }
  #view-nanni.stepView .pg > .pgMedia img, #view-nanni.stepView .pg > .pgMedia video { max-height: 52cqh; }
  #view-nanni.stepView .pg > .pgMedia:has(figure:nth-child(2)) img, #view-nanni.stepView .pg > .pgMedia:has(figure:nth-child(2)) video { max-height: 44cqh; }
  /* a page with only pictures (Screens) or only words (Results) still sits in the right-hand column */
  #view-nanni.stepView .pg.media > .pgMedia { grid-row: 1 / span 2; align-self: center; max-height: 78cqh; }
  #view-nanni.stepView .pg.media > .pgMedia img { max-height: 70cqh; }
  #view-nanni.stepView .pg.one > .pgText { grid-row: 1 / span 2; align-self: center; max-height: 78cqh; }
}

/* ...and centred on the card: one column in the middle, the words centred over the phones */
@media (min-width: 901px) {
  #view-nanni.stepView .pg, #view-nanni.stepView .pg.two, #view-nanni.stepView .pg.flip, #view-nanni.stepView .pg.one, #view-nanni.stepView .pg.media {
    grid-template-columns: minmax(0, 1fr); justify-items: center; padding-left: 6cqw; padding-right: 6cqw;
  }
  #view-nanni.stepView .pg > .pgText, #view-nanni.stepView .pg > .pgMedia { grid-column: 1; }
  #view-nanni.stepView .pg > .pgText { align-items: center; text-align: center; max-width: 62cqw; }
  #view-nanni.stepView .pg > .pgText .lead, #view-nanni.stepView .pg > .pgText .body, #view-nanni.stepView .pg > .pgText .sub, #view-nanni.stepView .pg > .pgText .quote,
  #view-nanni.stepView .pg > .pgText .eyebrow:not(.ttLabel) { text-align: center; margin-left: auto; margin-right: auto; }
  #view-nanni.stepView .pg > .pgText .facts, #view-nanni.stepView .pg > .pgText .stats { justify-content: center; }
  #view-nanni.stepView .pg > .pgMedia { justify-content: center; }
  #view-nanni.stepView .pg:first-of-type .lead, #view-nanni.stepView .pg:first-child .lead { align-self: center; }
}


/* a full-width picture under a page's content (Nanni's earlier navigation menu) */
.pgFull { width: 100%; }
.pgFull img { display: block; width: 100%; height: auto; }
@media (min-width: 901px) {
  /* in the step view it runs edge to edge along the bottom of the card, and the page's words and pictures sit in the room above it */
  #view-nanni.stepView .pg:has(> .pgFull) { padding-bottom: 31cqh; }
  #view-nanni.stepView .pg > .pgFull { position: absolute; left: 0; right: 0; bottom: 0; width: auto; height: 29cqh; grid-column: auto; grid-row: auto; margin: 0; overflow: hidden; }
  #view-nanni.stepView .pg > .pgFull img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; } /* the sides are empty, so it is the middle that stays */
  #view-nanni.stepView .pg:has(> .pgFull) > .pgText { max-height: 30cqh; }
  #view-nanni.stepView .pg:has(> .pgFull) > .pgMedia { max-height: 26cqh; }
  #view-nanni.stepView .pg:has(> .pgFull) > .pgMedia:has(figure) img, #view-nanni.stepView .pg:has(> .pgFull) > .pgMedia:has(figure) video { max-height: 26cqh; }
}
@media (min-width: 901px) {
  #view-nanni.stepView .pg:has(> .pgFull) > .pgMedia:has(figure:nth-child(2)) figure { flex: 0 1 auto; } /* the pictures keep their own width and sit together in the middle */
}

/* the navigation menu animation in Nanni's view: centred, as big as the card comfortably allows */
/* Nanni's page: About + logo, Goal + phone, the nav animation in a full-width lavender frame, then two columns of words */
#view-nanni .nnFrame { position: relative; width: auto; margin: 0 var(--nn-pad); border-radius: clamp(24px, 5.5cqw, 88px); aspect-ratio: 100 / 60; overflow: hidden; display: flex; justify-content: center; align-items: flex-start; background: linear-gradient(180deg, #E8E1FC 0%, #D9CDF0 100%); }
#view-nanni .nnFrame .nnMount { width: 70%; max-width: none; flex: none; }
#view-nanni .nnNav { max-width: none; }
#view-nanni .nnCap { position: absolute; left: 0; right: 0; bottom: 4%; text-align: center; font-size: clamp(18px, 2.2cqw, 36px); font-weight: 500; letter-spacing: -0.015em; color: var(--ink); }
#view-nanni .nnHead { max-width: 12em; }
#view-nanni .nnQLab { margin-top: 5cqw; }
#view-nanni .nnQuote { margin: 0 0 1.6cqw; font-size: clamp(14px, 1.4cqw, 23px); line-height: 1.4; font-style: italic; font-weight: 500; color: #821AAF; max-width: 30em; }
#view-nanni .nnQuote cite { display: block; margin-top: 0.3cqw; font-style: normal; font-size: clamp(11px, 0.95cqw, 15px); color: rgba(11, 21, 48, 0.5); }
#view-nanni .nnColR { padding-top: 1.9cqw; }
#view-nanni .nnDoc .nnPt { margin: 0 0 1.4em; font-size: clamp(13px, 1.3cqw, 21px); line-height: 1.45; font-weight: 500; color: var(--ink); max-width: 30em; }
#view-nanni .nnPt b { font-weight: 700; }
#view-nanni .nnDoc { box-sizing: border-box; width: 100%; color: var(--ink); --nn-pad: max(7.8cqw, 24px); }
#view-nanni .nnDoc p { margin: 0; }
#view-nanni .nnLab { display: block; margin-bottom: 0.9cqw; font-size: clamp(11px, 0.95cqw, 15px); font-weight: 500; color: rgba(11, 21, 48, 0.5); }
#view-nanni .nnLead { font-size: clamp(20px, 2.5cqw, 40px); line-height: 1.3; letter-spacing: -0.015em; font-weight: 500; max-width: 19em; }
#view-nanni .nnLead + .nnLead { margin-top: 1.3em; }
#view-nanni .nnBody { font-size: clamp(15px, 1.75cqw, 28px); line-height: 1.5; font-weight: 500; letter-spacing: -0.01em; }
#view-nanni .nnBody + .nnBody { margin-top: 1.3em; }
#view-nanni .nnRow { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 6cqw; row-gap: 5cqw; padding: 0 var(--nn-pad); }
#view-nanni .nnAbout { padding-top: max(9cqw, 40px); padding-bottom: 12cqw; }
#view-nanni .nnAbout .nnLead { max-width: 22em; }
#view-nanni .nnShots { display: flex; align-items: flex-end; gap: 0.8cqw; }
#view-nanni .nnShots img { display: block; width: clamp(90px, 15.5cqw, 250px); height: auto; filter: drop-shadow(0 0.8cqw 1.6cqw rgba(11, 21, 48, 0.16)); }
#view-nanni .nnShots img.mid { width: clamp(98px, 16.6cqw, 268px); }
#view-nanni .nnGoal { padding: 0 var(--nn-pad) 12cqw; }
#view-nanni .nnGoal .nnLead { max-width: none; }
#view-nanni .nnCols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 3cqw; row-gap: 5cqw; padding: 1.6cqw var(--nn-pad) max(8cqw, 40px); }
@media (max-width: 900px) {
  #view-nanni .nnRow { grid-template-columns: minmax(0, 1fr); }
  #view-nanni .nnCols { grid-template-columns: minmax(0, 1fr); }
  #view-nanni .nnShots { justify-self: start; }
  #view-nanni .nnShots img { width: 26vw; }
  #view-nanni .nnShots img.mid { width: 28vw; }
}
@media (min-width: 901px) {
  /* Goal and Navigation text sit in one column centred on the navigation frame's midline */
  #view-nanni .nnGoal, #view-nanni .nnCols { box-sizing: border-box; width: 76cqw; max-width: calc(100% - 2 * var(--nn-pad)); margin-left: auto; margin-right: auto; padding-left: 0; padding-right: 0; }
  #view-nanni .nnFrame { aspect-ratio: 100 / 29; }
  #view-nanni .nnFrame .nnMount { width: 35.3%; }
  #view-nanni.stepView .pg.one:has(> .nnDoc) { display: block; padding: 0; overflow-y: auto; overflow-x: hidden; }
}

/* Plunk and Spotify dreams keep their original pages, shown as they were inside the card */
.view.legacyView .viewBody { padding: 0; overflow: hidden; }
.view.legacyView .pg.legacy { position: absolute; inset: 0; display: block; padding: 0; margin: 0; width: auto; height: auto; max-height: none; overflow: hidden; opacity: 1; transform: none; visibility: visible; }
.view.legacyView .legacyFrame { display: block; width: 100%; height: 100%; border: 0; background: #fff; opacity: 0; transition: opacity 0.3s ease; }
.view.legacyView .legacyFrame.ready { opacity: 1; }
.view.legacyView .viewDots, .view.legacyView .viewNav { display: none; }

/* TouchTunes' NDA / password block sits in the middle of the card, with everything in it centred */
#view-touchtunes .pg.one:has(> .lockBox) { display: flex; align-items: center; justify-content: center; padding: 0; }
#view-touchtunes .lockBox { width: 100%; max-width: none; max-height: none; margin: 0 auto; align-items: center; justify-content: center; text-align: center; }
#view-touchtunes .lockBox .body, #view-touchtunes .lockBox .lockMsg, #view-touchtunes .lockBox .lockApp, #view-touchtunes .lockBox .lockAsk { text-align: center; margin-left: auto; margin-right: auto; align-self: center; max-width: 40em; }
#view-touchtunes .lockBox .lockForm { justify-content: center; width: 100%; max-width: 420px; }
#view-touchtunes .lockBox .lockInput { flex: 1 1 auto; min-width: 0; text-align: center; }

/* inside a dark project card the mouse dot is plain white (no multiply, which would make white vanish on black) */
html.view-open.view-dark #mouse-circle { mix-blend-mode: normal; }

/* phones: Plunk and Spotify dreams scroll as the card (the frame is as tall as the page inside it) */
@media (max-width: 900px) {
  .view.legacyView .pg.legacy { overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; touch-action: pan-y; }
  .view.legacyView .legacyFrame { height: 100%; min-height: 100%; }
}

/* phones: TouchTunes' wordmark in the deck and the gallery is white */
@media (max-width: 700px) {
  #projectList li:has(> a[data-view="touchtunes"]) .wordmark,
  html.deckGallery #projectList li:has(> a[data-view="touchtunes"]):not(.isActive) .wordmark { filter: brightness(0) invert(1) !important; }
}

/* dark card (TouchTunes): the close icon stays white when the 30% white bubble is behind it */
.view.dark .viewClose.floating:hover, .view.dark .viewClose.floating:focus-visible,
.view.dark.scrollView .viewClose:hover, .view.dark.scrollView .viewClose:focus-visible { color: #fff !important; }

/* dark card (TouchTunes): the bubble that grows behind the close icon and the logo / title is 30% white, not the card's near-black tint */
.view.dark.scrollView .viewClose::before,
.view.dark.scrollView .viewHead::before { background: rgba(255, 255, 255, 0.3); border-color: transparent; box-shadow: none; }

/* Plunk and Spotify dreams: no scroll bar (the pages still scroll) */
.view.legacyView .pg.legacy { scrollbar-width: none; }
.view.legacyView .pg.legacy::-webkit-scrollbar { display: none; }

/* Rubin: a large centred mark, its wordmark below, then "Coming soon" */
#view-rubin .viewBody { padding: 0; overflow: hidden; }
#view-rubin .pg.one { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 0; }
#view-rubin .rbPage { display: flex; flex-direction: column; align-items: center; gap: min(3.4vh, 28px); text-align: center; }
#view-rubin .rbMark { display: block; width: min(15vw, 19vh); height: auto; }
#view-rubin .rbWord { display: block; width: min(30vw, 34vh); height: auto; }
#view-rubin .rbMark { filter: drop-shadow(0 8px 14px rgba(44, 34, 83, 0.28)); }
#view-rubin .rbSoon { margin: 0; font-size: clamp(16px, 1.7vw, 28px); font-weight: 500; letter-spacing: -0.01em; color: #2B1A55; }

/* the previous / next project chevrons are gone, everywhere (the page chevrons inside a project stay) */
.projNav, .projNav[hidden] { display: none !important; }

/* the project views: a big, heavy drop shadow so each card sits well off the page */
.view, .view.scrollView, .view.stepView { box-shadow: 0 70px 200px 30px rgba(20, 14, 40, 0.34), 0 34px 90px 8px rgba(20, 14, 40, 0.24), 0 10px 30px 0 rgba(20, 14, 40, 0.14); } /* very wide and soft, so it is not harsh; the drop (y offset) keeps the lift off the page */

/* the centre console's links, 0.8x (wide screens) */
@media (min-width: 901px) {
  #projectList.inline.big { font-size: 32px; }
  #projectList .logo { height: 45px; max-width: 112px; }
  #projectList .logo.wide { max-width: 112px; }
  #projectList .rowLogo .logo { height: 38px; }
  #projectList .rowLogo .wordmark { height: 18px; }
  #projectList .stackLogo.small .logo { height: 19px; }
  #projectList .withCaption .logo { height: 26px; }
  #projectList .withCaption .label { font-size: 21px; }
  #projectList .logo.altq { height: 19px; }
  #projectList .logo.pollin { height: 32px; }
  #projectList .logo.sheep { height: 22px; }
  #projectList .spotIcon { width: 20px; height: 22px; }
}

/* the little head beside the name, larger */
.who .name img { height: 38px; width: auto; }
.who .name { gap: 12px; }
@media (max-width: 700px) { .who .name img { height: 30px; } }

@media (min-width: 701px) { .view, .view.scrollView, .view.stepView { border-radius: 48px; } } /* a little rounder on desktop (js/project.js CARD_R matches, for the bubble) */

/* Seeds: the "design system" caption is gone, so the title centres on the logo; the logo takes the Plunk logo's gradient (#43E7B0 -> #4386F5, tilted a little off vertical) */
.withCaption { grid-template-rows: auto; }
.withCaption .bubble { grid-area: 1 / 1; }
.withCaption .label { grid-area: 1 / 2; align-self: center; }
.seedsIcon { background: linear-gradient(174deg, #43E7B0 24%, #4386F5 136%); }

/* Seeds at the Plunk logo's size: Plunk's mark is ~33px tall (112px wide logo) with a wordmark whose capitals are ~19px, so the Seeds mark is 33px and "Seeds" is set at 26px (Sailec caps ~0.7em); the gap is Plunk's mark-to-word gap */
#projectList .seedsIcon { height: 33px; }
#projectList .withCaption .label { font-size: 26px; }
#projectList .withCaption .bubble { margin-right: 9px; }
@media (max-width: 900px) {
  #projectList .seedsIcon { height: 42px; }
  #projectList .withCaption .label { font-size: 33px; }
  #projectList .withCaption .bubble { margin-right: 12px; }
}

/* Overhand: the early-access form once an email has been submitted (thank-you line, the address under it) */
.earlyForm.done { gap: 4px; }
.earlyForm.done .earlyThanks { margin: 0; font-size: 16px; font-weight: 600; color: #1B2430; }
.earlyForm.done .earlyAddr { margin: 0; font-size: 14px; color: #1B2430; opacity: 0.75; overflow-wrap: anywhere; }

/* Micro + Motion: the animations run down a single centred column instead of a grid */
.pgGallery.oneCol, .view.scrollView .pgGallery.oneCol { column-count: 1; column-gap: 0; max-width: 720px; }
.pgGallery.oneCol img { margin-bottom: 24px; }
.pgGallery.oneCol .lottieBox { margin-bottom: 24px; }
@media (max-width: 700px) { .pgGallery.oneCol img, .pgGallery.oneCol .lottieBox { margin-bottom: 16px; } }
/* Micro + Motion: a thin rounded divider between the animations (12% black), 88% of the screen's width on phones */
.pgGallery.oneCol .mmRule { display: block; width: 100%; height: 2px; margin: 0 0 24px; border: 0; border-radius: 999px; background: rgba(0, 0, 0, 0.12); }
@media (max-width: 700px) { .pgGallery.oneCol .mmRule { width: 88vw; max-width: none; position: relative; left: 50%; transform: translateX(-50%); margin-bottom: 16px; } }

/* phones: the "Open" button's text is white while TouchTunes (a dark card) is in focus */
@media (max-width: 700px) { .deckView.ready.lightText { color: #fff; } }

/* Seeds: the pictures run at half size, centred */
#view-seeds .pgMedia figure { width: 50%; align-self: center; }
