/* ───────────────────────── Flowify · paper pages ─────────────────────────
   the sheet · scribbled X · pin board · sticky notes · team/process/faq · foot */

body.paper-page { min-height: 100dvh; }

/* ── the sheet: one big piece of pastel paper laid on the desk ── */
.sheet {
  position: relative;
  max-width: 1140px;
  min-height: calc(100dvh - 28px);
  margin: 14px auto;
  background: var(--sheet-bg, var(--butter));
  border: 2.5px solid var(--ink);
  border-radius: var(--radius-wonky);
  box-shadow: 7px 9px 0 rgba(58, 58, 58, .14);
  padding: clamp(64px, 7vw, 96px) clamp(22px, 5vw, 72px) clamp(28px, 3vw, 44px);
  overflow: clip;
}
body[data-page="web"]    .sheet { --sheet-bg: var(--pink);   --accent: var(--pink-accent);   --accent-ink: var(--pink-ink);   view-transition-name: sheet-web; }
body[data-page="app"]    .sheet { --sheet-bg: var(--mint);   --accent: var(--mint-accent);   --accent-ink: var(--mint-ink);   view-transition-name: sheet-app; }
body[data-page="mkt"]    .sheet { --sheet-bg: var(--lilac);  --accent: var(--lilac-accent);  --accent-ink: var(--lilac-ink);  view-transition-name: sheet-mkt; }
body[data-page="studio"] .sheet { --sheet-bg: var(--butter); --accent: var(--butter-accent); --accent-ink: var(--butter-ink); view-transition-name: sheet-studio; }
body[data-page="faq"]    .sheet { --sheet-bg: #F3EFE2;       --accent: var(--lilac-accent);  --accent-ink: var(--lilac-ink);  view-transition-name: sheet-faq; }
body[data-page="hi"]     .sheet { --sheet-bg: var(--paper);  --accent: var(--pink-accent);   --accent-ink: var(--pink-ink);   view-transition-name: sheet-hi; }

/* ── scribbled X · back to the desk ── */
.sheet-close {
  position: absolute;
  top: 18px;
  right: 20px;
  z-index: 12;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: rgba(250, 246, 239, .85);
  border: 2px solid var(--ink);
  border-radius: 50% 46% 52% 48% / 46% 52% 48% 50%;
  transition: transform .3s var(--spring), background-color .25s ease;
}
.sheet-close:focus-visible {
  transform: rotate(-8deg) scale(1.1);
  background: var(--paper);
}
.sheet-close:focus-visible { outline: 3px dashed var(--ink); outline-offset: 3px; }
.sheet-close:active, .sheet-close.pressing { transform: scale(.88); background: var(--paper); transition: transform .08s ease; }
.sheet-close svg { width: 26px; height: 26px; }
.sheet-close .stroke { stroke-width: 3.2; }

/* ── sheet head ── */
.sheet-head {
  display: flex;
  align-items: center;
  gap: clamp(20px, 4vw, 56px);
  margin-bottom: clamp(36px, 4.5vw, 60px);
}
.sheet-head-copy { flex: 1 1 36ch; }
.sheet-head h1 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2.1rem, 4.4vw, 3.4rem);
  line-height: 1.08;
  margin-bottom: 14px;
}
.sheet-lede {
  font-size: clamp(1.02rem, 1.3vw, 1.18rem);
  font-weight: 500;
  line-height: 1.65;
  color: var(--ink);
  max-width: 52ch;
}
/* hero price anchor — qualifies the lead before they read the whole page */
.sheet-price {
  display: inline-flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .5ch;
  margin-top: 16px;
  font-family: var(--font-body);
  font-size: 1.02rem;
  font-weight: 500;
  color: var(--ink-soft);
}
.sheet-price strong {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--flow-ink);
}
/* client testimonials (studio + future landing pages) */
.testi-wall {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 12px;
}
.testi {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(255, 255, 255, .55);
  border: 2px solid var(--ink);
  border-radius: 18px 24px 18px 26px / 24px 18px 26px 18px;
  padding: 18px 20px;
  box-shadow: 3px 4px 0 rgba(58, 58, 58, .1);
}
.testi blockquote {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
}
.testi blockquote::before { content: "\201C"; }
.testi blockquote::after { content: "\201D"; }
.testi figcaption {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
  font-size: .9rem;
  color: var(--ink-soft);
}
.testi-avatar {
  width: 50px; height: 50px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--paper);
}
.testi-who { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.testi figcaption strong { font-family: var(--font-head); font-weight: 700; font-size: 1rem; color: var(--ink); }
.testi figcaption a { color: var(--flow-ink); font-size: .85rem; margin-top: 2px; }
/* placeholder cards read as obviously unfinished so they can't ship by accident */
.testi[data-placeholder] { opacity: .6; border-style: dashed; }
.sheet-head-doodle {
  flex: 0 1 320px;
  min-width: 200px;
}
.sheet-head-doodle svg { width: 100%; height: auto; }

/* ── generic sheet sections ── */
.sheet-section { margin: 0 auto clamp(40px, 5vw, 64px); }
.sheet-section > h2 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  margin-bottom: 18px;
}
.sheet-section > p {
  font-size: clamp(.98rem, 1.15vw, 1.08rem);
  font-weight: 500;
  line-height: 1.7;
  color: var(--ink);
  max-width: 70ch;
  margin-bottom: 12px;
}

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
/* each chip is a real button now: tap/hover reveals what that bit of work means,
   so the pill-look reads as an honest affordance instead of a dead button */
.chip {
  position: relative;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .82rem;
  color: var(--ink);
  padding: 6px 14px;
  background: rgba(250, 246, 239, .75);
  border: 1.5px solid var(--ink);
  border-radius: 10px 14px 9px 15px / 14px 9px 15px 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .2s var(--spring), background-color .2s ease, box-shadow .2s ease;
}
.chip:focus-visible { outline: 3px dashed var(--ink); outline-offset: 3px; }
.chip.is-open {
  background: var(--accent, var(--butter));
  box-shadow: 2px 3px 0 rgba(58, 58, 58, .16);
}
/* the note that pops out of a chip — one plain line on what that capability is */
.chip-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 12px);
  z-index: 6;
  width: max-content;
  max-width: 220px;
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: .98rem;
  line-height: 1.3;
  text-align: center;
  color: var(--ink);
  background: var(--note-bg, var(--butter));
  border: 2px solid var(--ink);
  border-radius: 6px 10px 5px 11px / 10px 5px 11px 6px;
  box-shadow: 3px 5px 0 rgba(58, 58, 58, .14);
  padding: 9px 12px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(calc(-50% + var(--tip-shift, 0px))) translateY(4px);
  transition: opacity .18s ease, transform .22s var(--spring), visibility 0s .18s;
}
.chip-tip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 12px;
  height: 12px;
  margin-top: -7px;
  background: var(--note-bg, var(--butter));
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: translateX(calc(-50% - var(--tip-shift, 0px))) rotate(45deg);
}
.chip.is-open .chip-tip {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(calc(-50% + var(--tip-shift, 0px))) translateY(0);
  transition-delay: 0s;
}
@media (hover: hover) and (pointer: fine) {
  .chip:hover {
    transform: translateY(-2px) rotate(-1deg);
    box-shadow: 3px 4px 0 rgba(58, 58, 58, .16);
  }
  .chip:hover .chip-tip,
  .chip:focus-visible .chip-tip {
    opacity: 1;
    visibility: visible;
    transform: translateX(calc(-50% + var(--tip-shift, 0px))) translateY(0);
    transition-delay: 0s;
  }
}

/* ── PIN BOARD ── */
/* The section that holds the board reveals on scroll with `transform:
   translateY(...)` (base.css .reveal). A transformed ancestor becomes the
   containing block for an opened pin card (position:fixed), so the card would
   centre on this tall section instead of the viewport — flinging it off-screen
   for a frame until the reveal transition lands on `transform:none`. Reveal
   THIS section by opacity only (keep the fade, drop the transform) so an open
   card always anchors to the viewport. */
html:not(.no-js) .reveal:has(.pinboard) { transform: none; }

.pinboard {
  position: relative;
  background: rgba(255, 255, 255, .42);
  border: 2.5px dashed var(--ink-soft);
  border-radius: var(--radius-wonky);
  padding: clamp(26px, 3.5vw, 44px) clamp(20px, 3vw, 40px) clamp(30px, 3.5vw, 48px);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(218px, 1fr));
  gap: clamp(22px, 3vw, 36px);
  align-items: start;
}

/* polaroid */
.pin-card {
  position: relative;
  background: #FFFDF8;
  border: 2px solid var(--ink);
  border-radius: 3px 6px 4px 7px / 6px 4px 7px 3px;
  box-shadow: 4px 6px 0 rgba(58, 58, 58, .14);
  padding: 12px 12px 14px;
  transform: rotate(var(--rot, 0deg));
  cursor: pointer;
  /* the card is a role=button <article>, not an <a>/<button>, so the base
     tap-highlight reset misses it — kill iOS's blue tap flash on open */
  -webkit-tap-highlight-color: transparent;
  transition: transform .35s var(--spring), box-shadow .3s ease;
  text-align: center;
}
.pin-card:nth-child(4n+1) { --rot: -2.2deg; }
.pin-card:nth-child(4n+2) { --rot: 1.6deg; }
.pin-card:nth-child(4n+3) { --rot: -1.1deg; }
.pin-card:nth-child(4n+4) { --rot: 2.3deg; }
.pin-card:not(.is-open):focus-visible {
  transform: rotate(0deg) translateY(-6px) scale(1.025);
  box-shadow: 6px 10px 0 rgba(58, 58, 58, .18);
  z-index: 3;
}
.pin-card:focus-visible { outline: 3px dashed var(--ink); outline-offset: 4px; }

.pushpin {
  position: absolute;
  top: -13px;
  left: 50%;
  width: 26px;
  height: 30px;
  transform: translateX(-50%) rotate(var(--pinrot, -4deg));
  z-index: 4;
  pointer-events: none;
  filter: drop-shadow(1px 2px 0 rgba(58, 58, 58, .25));
  transition: transform .25s var(--spring);
}
.pin-card.is-open .pushpin { opacity: 0; }

.pin-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  background: var(--paper);
  display: grid;
  place-items: center;
}
.pin-media img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.pin-media svg { width: 72%; height: auto; }

.pin-title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.12rem;
  margin-top: 10px;
}
.pin-cap {
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: 1.12rem;
  color: var(--accent-ink, var(--ink-soft));
  line-height: 1.2;
}

/* the open polaroid: a big paper sheet, fade+scale only (GPU-friendly).
   one full-width column — a small header (thumb + title/caption) then the
   content row (.pin-more), which holds the before/after as a wide hero */
.pin-card.is-open {
  position: fixed;
  z-index: 60;
  left: 50%;
  top: 50%;
  width: min(880px, calc(100vw - 28px));
  max-height: 90dvh;
  overflow: hidden;        /* the card clips; only the content column scrolls */
  transform: translate(-50%, -50%) rotate(0deg);
  /* the JS animation owns the transform while open — the idle springy tilt
     transition (var(--spring) overshoots) must not run on it too, or the two
     fight and the card overshoots centre for a frame on open */
  transition: none;
  cursor: default;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto 1fr;
  grid-template-areas:
    "media title"
    "media cap"
    "more  more";
  gap: 2px 16px;
  text-align: left;
  padding: 26px 28px 30px;
  box-shadow: 10px 14px 0 rgba(58, 58, 58, .22);
}
/* small header thumb beside the title (explicit w+h overrides the 4/3 ratio) */
.pin-card.is-open .pin-media { grid-area: media; width: 92px; height: 92px; align-self: start; }
.pin-card.is-open .pin-title { grid-area: title; align-self: end; font-size: 1.6rem; margin-top: 2px; }
.pin-card.is-open .pin-cap { grid-area: cap; font-size: 1.3rem; }
.pin-card.is-open .pin-more { grid-area: more; }

/* image-only cards (no before/after, no gallery): the thumbnail is the only
   visual, so let it be a full-width banner hero instead of a 92px chip */
.pin-card.is-open:not(:has(.pin-gallery, .shots)) {
  grid-template-columns: 1fr;
  grid-template-areas:
    "media"
    "title"
    "cap"
    "more";
}
.pin-card.is-open:not(:has(.pin-gallery, .shots)) .pin-media {
  width: 100%;
  height: auto;
  max-height: 320px;
}

/* keeps the board from reflowing while a card is lifted off it */
.pin-ghost { visibility: hidden; }

.pin-more { display: none; }
.pin-card.is-open .pin-more {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin-top: 6px;
  min-height: 0;           /* let the 1fr grid row shrink */
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 6px;
}
.pin-more p {
  font-size: .98rem;
  font-weight: 500;
  line-height: 1.7;
  color: var(--ink);
  max-width: 62ch;         /* readable measure; the gallery still spans full width */
}

/* before/after (or screen) strip inside an opened card — two pinned snaps */
.pin-gallery {
  display: flex;
  gap: 10px;
  width: 100%;
  margin: 2px 0;
}
.pin-gallery figure {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.pin-gallery img {
  width: 100%;
  aspect-ratio: var(--ga, 3 / 4);
  max-height: clamp(300px, 48vh, 560px);   /* keep tall portrait feeds in check */
  object-fit: cover;
  object-position: top;
  display: block;
  border: 1.5px solid var(--ink);
  border-radius: 3px 5px 2px 6px / 5px 2px 6px 3px;
  background: var(--paper);
}
.pin-gallery figcaption {
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: .92rem;
  color: var(--ink-soft);
  text-align: center;
}

/* ── clickable gallery: pinned polaroid thumbnails that open a lightbox ── */
.shots {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 14px 12px;
  width: 100%;
  margin: 4px 0 2px;
}
/* the before → after feature pair */
.ba {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}
.ba .shot { flex: 1 1 0; min-width: 0; }
.ba-arrow {
  flex: 0 0 auto;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--accent-ink, var(--ink-soft));
  transform: rotate(-4deg);
}
/* each thumb is a little pinned photo you can open */
.shot {
  position: relative;
  display: block;
  padding: 7px 7px 5px;
  background: #FFFDF8;
  border: 2px solid var(--ink);
  border-radius: 4px 7px 5px 8px / 7px 5px 8px 4px;
  box-shadow: 3px 4px 0 rgba(58, 58, 58, .14);
  cursor: zoom-in;
  -webkit-tap-highlight-color: transparent;
  transform: rotate(var(--tilt, -1.5deg));
  transition: transform .25s var(--spring), box-shadow .25s ease;
  font: inherit;
  text-align: center;
}
.shot:nth-child(even) { --tilt: 1.7deg; }
.shot img {
  width: 100%;
  height: auto;             /* let aspect-ratio drive height — the width/height
                              attrs must not pin it to the intrinsic height */
  aspect-ratio: var(--ga, 3 / 4);
  max-height: clamp(300px, 48vh, 560px);   /* keep tall portrait feeds in check */
  object-fit: cover;
  object-position: top;
  display: block;
  border: 1.5px solid var(--ink);
  border-radius: 2px;
  background: var(--paper);
}
.shot--wide { --ga: 16 / 9; }
/* direct thumbs (e.g. the ad creatives) share a row two-up; the .ba pair owns its own */
.shots > .shot { flex: 1 1 calc(50% - 6px); min-width: 0; }
.shot figcaption {
  margin-top: 5px;
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: .9rem;
  color: var(--ink-soft);
  line-height: 1.1;
}
/* a little "open me" magnifier badge */
.shot::after {
  content: "";
  position: absolute;
  top: 11px;
  right: 11px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(250, 246, 239, .94) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233A3A3A' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='10' cy='10' r='6'/%3E%3Cpath d='M15 15 L20 20'/%3E%3C/svg%3E") center / 14px no-repeat;
  border: 1.5px solid var(--ink);
  opacity: 0;
  transform: scale(.7);
  transition: opacity .2s ease, transform .2s var(--spring);
  pointer-events: none;
}
.shot:focus-visible { outline: 3px dashed var(--ink); outline-offset: 3px; }
.shot:focus-visible::after { opacity: 1; transform: scale(1); }
@media (hover: hover) and (pointer: fine) {
  .shot:hover {
    transform: rotate(0deg) translateY(-3px) scale(1.03);
    box-shadow: 5px 8px 0 rgba(58, 58, 58, .2);
    z-index: 2;
  }
  .shot:hover::after { opacity: 1; transform: scale(1); }
}

/* ── lightbox: the full, uncropped image ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: none;
  place-items: center;
  padding: clamp(16px, 4vw, 48px);
  background: rgba(40, 38, 34, .82);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.lightbox.show { display: grid; }
.lightbox-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: min(1080px, 100%);
  max-height: 100%;
}
.lightbox-frame {
  max-width: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  background: #FFFDF8;
  border: 2.5px solid var(--ink);
  border-radius: 5px 9px 6px 10px / 9px 6px 10px 5px;
  box-shadow: 10px 14px 0 rgba(0, 0, 0, .32);
  padding: 10px;
}
.lightbox-frame img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 78vh;
  border-radius: 2px;
}
.lightbox-meta {
  display: flex;
  align-items: baseline;
  gap: 14px;
}
.lightbox figcaption {
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: 1.15rem;
  color: #FFF7F0;
}
.lightbox-count {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .82rem;
  color: rgba(255, 247, 240, .7);
}
.lightbox-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: rgba(250, 246, 239, .92);
  border: 2px solid var(--ink);
  border-radius: 50% 46% 52% 48% / 46% 52% 48% 50%;
  cursor: pointer;
  transition: background-color .2s ease;
}
.lightbox-prev { left: -12px; }
.lightbox-next { right: -12px; }
.lightbox-btn svg, .lightbox-close svg { width: 22px; height: 22px; }
.lightbox-btn .stroke, .lightbox-close .stroke { stroke-width: 3; }
.lightbox-close {
  position: absolute;
  top: -10px;
  right: -10px;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: rgba(250, 246, 239, .95);
  border: 2px solid var(--ink);
  border-radius: 50% 46% 52% 48% / 46% 52% 48% 50%;
  cursor: pointer;
  transition: transform .25s var(--spring), background-color .2s ease;
}
.lightbox-btn:focus-visible, .lightbox-close:focus-visible { outline: 3px dashed #FFF7F0; outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) {
  .lightbox-prev:hover, .lightbox-next:hover { background: var(--paper); }
  .lightbox-close:hover { background: var(--paper); transform: rotate(-7deg) scale(1.07); }
}
@media (max-width: 768px) {
  .lightbox-prev { left: 0; }
  .lightbox-next { right: 0; }
  .lightbox-btn { width: 44px; height: 44px; }
  .lightbox-frame img { max-height: 70vh; }
}

/* "visit the live site" chip inside an opened polaroid (the card-click handler
   in paper.js leaves links alone, so this navigates instead of toggling) */
.pin-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  align-self: flex-start;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: .9rem;
  letter-spacing: .01em;
  color: var(--ink);
  text-decoration: none;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 12px 16px 10px 18px / 16px 10px 18px 12px;
  padding: 7px 14px 8px;
  box-shadow: 2px 3px 0 rgba(58, 58, 58, .14);
  transition: transform .25s var(--spring), box-shadow .2s ease, background-color .2s ease, color .2s ease;
}
.pin-link svg { display: block; }
.pin-link:focus-visible { outline: 3px dashed var(--ink); outline-offset: 3px; }
.pin-link:active, .pin-link.pressing {
  transform: translateY(2px);
  box-shadow: 0 1px 0 rgba(58, 58, 58, .14);
}
@media (hover: hover) and (pointer: fine) {
  .pin-link:hover {
    transform: translateY(-2px) rotate(-1deg);
    background: var(--flow-red);
    color: #FFF7F0;
    box-shadow: 3px 5px 0 rgba(58, 58, 58, .2);
  }
}

.pin-close {
  display: none;
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  place-items: center;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 50% 46% 52% 48% / 46% 52% 48% 50%;
  cursor: pointer;
  transition: transform .25s var(--spring);
}
.pin-card.is-open .pin-close { display: grid; }
.pin-close svg { width: 18px; height: 18px; }
.pin-close .stroke { stroke-width: 3; }

/* light paper veil instead of a heavy dark dim */
.board-backdrop {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: rgba(250, 246, 239, .72);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.board-backdrop.show { opacity: 1; pointer-events: auto; }

/* paper.js portals BOTH the open card and this veil out to <body>, so they sit
   in the root stacking context — card (z 60) over veil (z 55) over the page —
   and position:fixed always resolves against the viewport, never a transformed
   ancestor in the .sheet subtree. We only drop the sheet's view-transition-name
   while open so an in-card link's navigation doesn't try to morph the open sheet. */
body.pin-open .sheet { view-transition-name: none !important; }

/* "yours next?" empty slot */
.pin-slot {
  border: 2.5px dashed var(--ink-soft);
  border-radius: 3px 6px 4px 7px / 6px 4px 7px 3px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--ink-soft);
  text-decoration: none;
  transform: rotate(var(--rot, 1.4deg));
  transition: transform .3s var(--spring), background-color .25s ease;
}
.pin-slot svg { width: 34px; height: 34px; }
.pin-slot .stroke { stroke-width: 2.6; }

/* sticky note (on boards and walls) */
.sticky-note {
  position: relative;
  display: inline-block;
  background: var(--note-bg, var(--butter));
  border: 2px solid var(--ink);
  border-radius: 3px 7px 4px 8px / 7px 4px 8px 3px;
  box-shadow: 3px 5px 0 rgba(58, 58, 58, .12);
  padding: 16px 18px 14px;
  font-weight: 700;
  transform: rotate(var(--rot, -1.5deg));
  text-align: center;
}
.sticky-note::before {
  content: "";
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%) rotate(-3deg);
  width: 64px;
  height: 18px;
  background: rgba(250, 246, 239, .92);
  border: 1.5px solid rgba(58, 58, 58, .35);
}
.sticky-note strong {
  display: block;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.7rem;
  color: var(--accent-ink, var(--butter-ink));
  line-height: 1.15;
}
.sticky-note span {
  display: block;
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--ink);
  line-height: 1.25;
  margin-top: 2px;
  max-width: 22ch;
}
/* the note only shows inside an open card (.pin-more is hidden otherwise); key
   it off the card, not .pinboard, since the open card is portalled out to <body> */
.pin-card.is-open .sticky-note { align-self: center; justify-self: center; }

/* ── the round table (studio page) · the whole team around one table ── */
.round-table {
  position: relative;
  width: min(750px, 100%);
  /* top seats overhang the scene by ~half a seat — reserve room for them */
  margin: clamp(30px, 5vw, 42px) auto 0;
}
.table-scene { position: relative; aspect-ratio: 2 / 1; }
.table-top {
  position: absolute;
  inset: 8% 4%;
  width: 92%;
  height: 84%;
}
.table-top .stroke { stroke-width: 2.6; }

.seats { list-style: none; }
.seat-spot {
  position: absolute;
  left: var(--sx);
  top: var(--sy);
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}
.seat {
  position: relative;
  display: block;
  width: 96px;
  height: 96px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: 50% 46% 52% 48% / 46% 52% 48% 50%;
  box-shadow: 3px 4px 0 rgba(58, 58, 58, .14);
  transition: transform .3s var(--spring), box-shadow .3s ease;
}
.seat--partner { border: 2px dashed var(--ink-soft); }
.seat:focus-visible { outline: 3px dashed var(--ink); outline-offset: 3px; }
.seat-doodle, .seat-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: opacity .35s ease;
}
.seat-doodle .stroke { stroke-width: 2.4; }
.seat-photo { object-fit: cover; opacity: 0; }
.seat.is-active,
.seat:focus-visible {
  transform: scale(1.12) rotate(-3deg);
  box-shadow: 4px 6px 0 var(--accent);
}
.seat.is-active .seat-photo,  .seat:focus-visible .seat-photo  { opacity: 1; }
.seat.is-active .seat-doodle, .seat:focus-visible .seat-doodle { opacity: 0; }
.seat-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .92rem;
  color: var(--ink);
  background: rgba(250, 246, 239, .85);
  border-radius: 8px 12px 7px 13px / 12px 7px 13px 8px;
  padding: 1px 9px 2px;
  pointer-events: none;
}

/* center cards: stacked, crossfaded; only one .is-shown at a time */
.table-cards {
  position: absolute;
  inset: 20% 14%;
  display: grid;
  place-items: center;
  text-align: center;
}
.center-card {
  grid-area: 1 / 1;
  width: 100%;
  opacity: 0;
  visibility: hidden;
  transform: scale(.96) rotate(-1deg);
  transition: opacity .3s ease, transform .35s var(--spring), visibility 0s .3s;
}
.center-card.is-shown {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition-delay: 0s;
}
.card-avatar {
  display: none;  /* desktop: the seat itself shows the photo; shown again ≤768 */
  place-items: center;
  width: 64px;
  height: 64px;
  overflow: hidden;
  background: var(--paper);
  border: 2.5px solid var(--ink);
  border-radius: 50% 46% 52% 48% / 46% 52% 48% 50%;
  margin-bottom: 8px;
}
.card-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.center-card h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.25rem;
}
.role {
  display: block;
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--accent-ink, var(--flow-ink));
  margin: 2px 0 8px;
}
.center-card p {
  font-size: .82rem;
  font-weight: 500;
  line-height: 1.5;
  color: var(--ink);
  max-width: 52ch;
  margin-inline: auto;
}
.center-card--default .card-note {
  display: block;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--ink-soft);
  transform: rotate(-2deg);
  margin-top: 6px;
}
.center-card--default .hint-hover { display: none; }
.center-card--default .doodle { width: 72px; height: auto; }

/* no-JS: list every card under the table, photos shown */
html.no-js .table-cards { position: static; display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
html.no-js .center-card { opacity: 1; visibility: visible; transform: none; }
html.no-js .center-card--default { display: none; }
html.no-js .card-avatar { display: inline-grid; }
html.no-js .seat-photo { opacity: 1; }

/* ── process steps (studio page) · a staircase down a zigzag thread ── */
.steps-wrap { position: relative; }
.steps {
  list-style: none;
  display: flex;
  flex-direction: column;
}
.step { width: min(58%, 470px); }
.step:nth-child(even) { align-self: flex-end; }
.step + .step { margin-top: -44px; }  /* each card pulls up so the descent reads diagonal */

/* the pencil takes a walk: a scribble thread that slaloms the whitespace
   between the cards — loops, curls, waves — scrubbed by scroll, with a
   spark riding the pen tip and sprinkle doodles inking in as it passes */
.steps-zig {
  position: absolute;
  inset: -16px 0 -12px;
  width: 100%;
  height: calc(100% + 28px);
  pointer-events: none;
  z-index: 0;
  overflow: visible;
}
.steps-zig .zig {
  fill: none;
  stroke: url(#zig-grad);
  stroke-width: 3.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .55;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
.steps-zig .zig-doodle .stroke { stroke-width: 3; opacity: .85; }
.steps-zig .zig-tip { display: none; }
.steps-zig .zig-tip .stroke { stroke-width: 3; }
/* the thread draws itself ONCE when its section scrolls into view — a single
   short animation instead of a scroll-scrubbed one that re-painted the whole
   SVG path every frame you scrolled. (.in is set by the IntersectionObserver
   in paper.js.) The traveling pen-tip spark is dropped: it only worked with
   the scroll timeline and was the single most expensive thing on the page. */
.sheet-section.in .steps-zig .zig { animation: draw 1.4s ease-out .25s forwards; }
/* the sprinkle doodles ink in via the shared .doodle.drawn rule in base.css,
   triggered by the same IntersectionObserver — no per-element scroll wiring */
@media (prefers-reduced-motion: reduce) {
  .steps-zig .zig { stroke-dasharray: none; stroke-dashoffset: 0; }
  .steps-zig .zig-tip { display: none !important; }
}
@media (max-width: 768px) {
  .steps-zig { display: none; }  /* steps stack single-column — the thread no longer maps */
}

.step {
  position: relative;
  background: rgba(255, 255, 255, .55);
  border: 2px dashed var(--ink-soft);
  border-radius: var(--radius-wonky);
  padding: 24px 22px 28px;
}
.step-doodle { width: 44px; height: 44px; margin-bottom: 12px; }
.step-doodle .stroke { stroke-width: 2.6; }

/* ── sketched-to-life cards · each card pencils itself onto the page ── */
/* the hand-drawn frame replaces the CSS dashed border once JS is up */
html:not(.no-js) .step { border-color: transparent; }
html.no-js .step-frame, html.no-js .num-scribble { display: none; }
.step-frame {
  position: absolute;
  inset: -3px;
  width: calc(100% + 6px);
  height: calc(100% + 6px);
  pointer-events: none;
  overflow: visible;
}
.step-frame .stroke { stroke-width: 2.5; stroke: var(--ink-soft); }
html:not(.no-js) .step h3 em { border-color: transparent; }
.num-scribble {
  position: absolute;
  inset: -5px;
  width: calc(100% + 10px);
  height: calc(100% + 10px);
  pointer-events: none;
  overflow: visible;
}
.num-scribble .stroke { stroke-width: 2.4; }

/* the cards pencil themselves onto the page ONCE, when scrolled into view:
   each card zigs in from an alternating side and its pencil work (frame, icon,
   number circle, underline) draws via the shared .doodle.drawn rule. Driven by
   the IntersectionObserver in paper.js (.reveal → .in, .doodle → .drawn) — no
   scroll-scrubbed `animation-timeline`, so scrolling never re-paints these SVGs.
   This is what made the studio page choppy on phones. */
html:not(.no-js) .step.reveal:not(.in) { transform: translateY(30px) translateX(-22px) rotate(-2deg); }
html:not(.no-js) .step.reveal:nth-child(even):not(.in) { transform: translateY(30px) translateX(22px) rotate(2deg); }
.step.reveal:nth-child(2) { transition-delay: .1s; }
.step.reveal:nth-child(3) { transition-delay: .2s; }
.step.reveal:nth-child(4) { transition-delay: .3s; }
.step .step-doodle { --d: 350ms; }
.step .num-scribble { --d: 650ms; }
.step h3 .u-line { --d: 850ms; }

/* a friendly wiggle when you point at the icon */
@keyframes step-wiggle {
  0%, 100% { transform: rotate(0deg); }
  30% { transform: rotate(-2.4deg) translateY(-1px); }
  65% { transform: rotate(1.8deg); }
}
@media (hover: hover) and (pointer: fine) {
  .step:hover .step-doodle { animation: step-wiggle .5s ease-in-out; }
}
.step h3 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 9px;
}
.step h3 em {
  position: relative;
  font-style: normal;
  font-family: var(--font-hand);
  font-size: 1.25rem;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 50% 46% 52% 48% / 46% 52% 48% 50%;
  background: var(--paper);
}
.step p {
  font-size: .92rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--ink);
}

/* ── sticky-note wall (studio/faq) ── */
.notes-wall {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(20px, 3vw, 36px);
}
.notes-wall .sticky-note { padding: 22px 24px 18px; }
.notes-wall .sticky-note strong { font-size: 2.2rem; }
.notes-wall .sticky-note span { font-size: 1.15rem; max-width: 24ch; }
.notes-wall .sticky-note:nth-child(2n) { --rot: 1.8deg; }
.notes-wall .sticky-note:nth-child(3n) { --rot: -1deg; }

/* ── the letter (say-hi) ── */
.letter {
  position: relative;
  max-width: 620px;
  margin: 0 auto clamp(36px, 5vw, 56px);
  background: #FFFDF8;
  border: 2.5px solid var(--ink);
  border-radius: 6px 10px 7px 11px / 10px 7px 11px 6px;
  box-shadow: 6px 8px 0 rgba(58, 58, 58, .14);
  padding: clamp(28px, 4vw, 44px) clamp(22px, 4vw, 48px);
  transform: rotate(-.8deg);
  background-image: repeating-linear-gradient(
    transparent, transparent 2.05em,
    rgba(74, 91, 217, .18) 2.05em, rgba(74, 91, 217, .18) calc(2.05em + 1.5px)
  );
}
.letter::before, .letter::after {
  content: "";
  position: absolute;
  width: 78px;
  height: 24px;
  top: -13px;
  background: #F6DFA8;
  opacity: .85;
  border: 1.5px solid rgba(58, 58, 58, .35);
}
.letter::before { left: -24px; transform: rotate(-36deg); }
.letter::after  { right: -24px; transform: rotate(36deg); background: #F9CDB8; }
.letter p {
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: clamp(1.3rem, 1.9vw, 1.55rem);
  line-height: 2.05em;
  color: var(--ink);
}
.letter p + p { margin-top: 0; }
.letter .blank {
  display: inline-block;
  min-width: 9ch;
  border-bottom: 2px dashed var(--flow-red);
  color: var(--ink-soft);
  text-align: center;
}
.letter-sign {
  display: block;
  text-align: right;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--flow-ink);
  margin-top: 4px;
  transform: rotate(-2deg);
}

/* ── faq ── */
.faq-list { display: flex; flex-direction: column; gap: 14px; max-width: 820px; margin: 0 auto; }
.faq-list details {
  background: rgba(255, 255, 255, .6);
  border: 2px solid var(--ink);
  border-radius: 16px 22px 14px 24px / 22px 14px 24px 16px;
  padding: 0 22px;
  transition: background-color .25s ease;
}
.faq-list details[open] { background: var(--butter); }
.faq-list summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(1rem, 1.3vw, 1.15rem);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary:active, .faq-list summary.pressing { background: rgba(58, 58, 58, .05); border-radius: 14px; }
.faq-list summary::after {
  content: "+";
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  font-family: var(--font-hand);
  font-size: 1.5rem;
  font-weight: 700;
  border: 2px solid var(--ink);
  border-radius: 50% 46% 52% 48% / 46% 52% 48% 50%;
  background: var(--paper);
  transition: transform .3s var(--spring);
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details > p {
  padding: 0 0 20px;
  font-size: .98rem;
  font-weight: 500;
  line-height: 1.7;
  color: var(--ink);
  max-width: 70ch;
}

/* ── sheet CTA + foot ── */
.sheet-cta {
  text-align: center;
  margin: clamp(44px, 6vw, 72px) auto clamp(36px, 5vw, 56px);
}
.sheet-cta h2 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
  margin-bottom: 20px;
}
.cta-alt {
  display: block;
  margin-top: 18px;
  font-family: var(--font-hand);
  font-weight: 600;
  font-size: 1.2rem;
  color: var(--ink-soft);
}
.cta-alt a { color: var(--flow-ink); }
.cta-alt a:active, .cta-alt a.pressing { opacity: .6; }

.sheet-foot {
  border-top: 2px dashed var(--ink-soft);
  padding-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px 22px;
  flex-wrap: wrap;
}
.sheet-foot .foot-logo { width: 92px; height: auto; display: block; }
.sheet-foot nav { display: flex; gap: 4px 18px; flex-wrap: wrap; }
.sheet-foot nav a {
  font-size: .9rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
}
.sheet-foot nav a:active, .sheet-foot nav a.pressing { color: var(--flow-ink); opacity: .6; }
.sheet-foot > span { font-size: .85rem; font-weight: 600; color: var(--ink-soft); }

.foot-social { display: flex; gap: 10px; }
.foot-social a {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--paper);
  border: 2px solid var(--ink);
  border-radius: 14px 18px 12px 20px / 18px 12px 20px 14px;
  transition: transform .3s var(--spring);
}
.foot-social a svg { width: 23px; height: 23px; }
.foot-social a .stroke { stroke-width: 2; }
.foot-social .fb .bub { stroke: #3D6AD6; }
.foot-social .ig .bub { stroke: #D94A7E; }

.foot-copy { display: inline-flex; align-items: center; gap: 8px; }
.mk-flag { width: 30px; height: auto; flex-shrink: 0; transform: rotate(-2deg); }

/* ── margin doodads ── */
.doodad {
  position: absolute;
  pointer-events: none;
  opacity: .9;
}
.doodad .stroke { stroke-width: 2.4; }
.doodad--ring { opacity: .25; }

/* ── responsive ── */
/* mobile page-open: the sheet fades in once when the page paints (replaces the
   heavy cross-document snapshot morph that stuttered on phones). Opacity ONLY —
   no transform: a transform on .sheet makes it the containing block for the
   `position:fixed` opened pin card, which (with .sheet's overflow:clip and full
   page height) flung the card off-centre for a frame if you tapped during the
   entrance. Opacity keeps the entrance without ever moving the card.
   Desktop keeps the view-transition paper-unfold. */
@keyframes sheet-in {
  from { opacity: 0; }
}
@media (max-width: 768px) {
  /* extra bottom room so the fixed chat/sound corners never sit on the footer */
  .sheet {
    margin: 8px; min-height: calc(100dvh - 16px); padding-top: 76px; padding-bottom: 60px;
    /* `backwards` (not `both`): apply the pre-start state to avoid a flash, but
       stop filling once the entrance ends — a forwards-filling transform/opacity
       animation keeps .sheet a stacking context on iOS, trapping the open pin
       card under the body-level veil (see body.pin-open .sheet above). */
    animation: sheet-in .44s var(--spring) backwards;
  }
  .brand { position: absolute; }
  /* animating a full-viewport backdrop blur is the jankiest thing iOS Safari
     can do — a slightly stronger paper veil looks the same and stays smooth */
  .board-backdrop {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(250, 246, 239, .82);
  }
  .sheet-close { top: 12px; right: 12px; width: 48px; height: 48px; }

  .sheet-head { flex-direction: column-reverse; align-items: flex-start; gap: 14px; }
  /* in a column flex the 36ch flex-basis becomes *height* — kill it */
  .sheet-head-copy { flex-basis: auto; }
  .sheet-head-doodle { flex-basis: auto; width: min(58vw, 260px); align-self: center; }

  .pinboard { grid-template-columns: 1fr 1fr; gap: 18px 14px; padding: 22px 14px 26px; }
  .pin-title { font-size: .98rem; }
  .pin-cap { font-size: .98rem; }

  .pin-card.is-open {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto 1fr;
    grid-template-areas:
      "media title"
      "media cap"
      "more  more";
    width: calc(100vw - 16px);
    max-height: calc(100dvh - 16px);
    padding: 16px 16px 20px;
  }
  .pin-card.is-open .pin-media { width: 64px; height: 64px; }
  /* before/after stacks on narrow screens; the arrow turns to point down */
  .ba { flex-direction: column; }
  .ba-arrow { transform: rotate(86deg); }

  /* the table shrinks; the person card moves below it as a paper card */
  .round-table { width: min(480px, 100%); }
  .seat { width: 64px; height: 64px; }
  .seat-name { font-size: .8rem; }
  .card-avatar { display: inline-grid; }
  .table-cards {
    position: static;
    inset: auto;
    margin-top: 44px;   /* bottom seats + name labels spill past the scene edge */
    min-height: 250px;  /* reserved so switching people never reflows the page */
  }
  .center-card {
    background: rgba(255, 255, 255, .55);
    border: 2px dashed var(--ink-soft);
    border-radius: var(--radius-wonky);
    padding: 18px 16px 20px;
  }
  .center-card--default { background: none; border: none; }
  .step { width: 100%; }
  .step + .step { margin-top: 14px; }

  .sheet-foot { flex-direction: column; align-items: center; text-align: center; }
  .sheet-foot nav { justify-content: center; }
}

/* ── pointer-only interactions (no sticky hover on touch) ── */
@media (hover: hover) and (pointer: fine) {
  .sheet-close:hover {
    transform: rotate(-8deg) scale(1.1);
    background: var(--paper);
  }
  .pin-card:not(.is-open):hover {
    transform: rotate(0deg) translateY(-6px) scale(1.025);
    box-shadow: 6px 10px 0 rgba(58, 58, 58, .18);
    z-index: 3;
  }
  .pin-card:not(.is-open):hover .pushpin { transform: translateX(-50%) rotate(var(--pinrot, -4deg)) translateY(-2px); }
  .pin-close:hover { transform: rotate(-8deg) scale(1.1); }
  .pin-slot:hover {
    transform: rotate(0deg) scale(1.03);
    background: rgba(250, 246, 239, .6);
    color: var(--ink);
  }
  .seat:hover {
    transform: scale(1.12) rotate(-3deg);
    box-shadow: 4px 6px 0 var(--accent);
  }
  .seat:hover .seat-photo  { opacity: 1; }
  .seat:hover .seat-doodle { opacity: 0; }
  .center-card--default .hint-hover { display: block; }
  .center-card--default .hint-tap { display: none; }
  .sheet-foot nav a:hover {
    color: var(--flow-ink);
    text-decoration: underline wavy;
    text-underline-offset: 4px;
  }
  .foot-social a:hover { transform: rotate(-4deg) scale(1.08); }
}
