:root {
  --paper: #fdfcf8;
  --ink: #1f2320;
  --ink-soft: #5a605b;
  --line: rgba(31, 35, 32, 0.14);
  --rule: rgba(110, 150, 196, 0.2);
  --margin: rgba(229, 120, 110, 0.45);
  --highlight: rgba(250, 222, 120, 0.55);
  --tape: rgba(236, 226, 196, 0.85);
  --moss: #7a8d6a;
  --moss-dark: #2f4032;
  --peach: #e59675;
  --cream: #fffdf9;
  --team: #bd7155;
  --perusall: #566e76;
  --readyai: #bf9b42;
  --hand: "Caveat", "Bradley Hand", "Segoe Print", cursive;
  --rule-gap: 2rem;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --page-pad: clamp(1.25rem, 3.5vw, 4.5rem);
}

* { box-sizing: border-box; }

html {
  color-scheme: light;
  background: var(--paper);
  color: var(--ink);
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

body {
  position: relative;
  margin: 0;
  min-width: 320px;
  background-color: var(--paper);
  background-image:
    linear-gradient(90deg, transparent calc(var(--page-pad) * 0.55), var(--margin) calc(var(--page-pad) * 0.55), var(--margin) calc(var(--page-pad) * 0.55 + 1px), transparent calc(var(--page-pad) * 0.55 + 1px)),
    repeating-linear-gradient(180deg, transparent 0, transparent calc(var(--rule-gap) - 1px), var(--rule) calc(var(--rule-gap) - 1px), var(--rule) var(--rule-gap));
  background-attachment: local;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; text-decoration: none; }

button, a, [role="button"] {
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}

.skip-link {
  position: fixed;
  z-index: 20;
  left: 1rem;
  top: -4rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font-size: 0.875rem;
  transition: top 180ms var(--ease-out);
}

.skip-link:focus { top: 1rem; }

.site-header {
  position: absolute;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: max(1.25rem, env(safe-area-inset-top, 0px)) var(--page-pad) 0;
}

.wordmark {
  font-size: clamp(1rem, 1.3vw, 1.22rem);
  font-weight: 780;
  letter-spacing: 0.07em;
  line-height: 1;
}

.wordmark span { color: var(--peach); }

.header-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.8rem, 2vw, 1.75rem);
  color: var(--ink-soft);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.header-nav a {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
}

.header-nav a::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  opacity: 0;
  transform: scaleX(0.45);
  transform-origin: center;
  transition: transform 160ms ease, opacity 160ms ease;
}

/* The résumé link keeps its boxed, offset-shadow look; pressing it nudges the box into its shadow. */
.header-nav__resume {
  min-height: 1.9rem;
  border: 1px solid var(--ink);
  padding: 0 0.55rem;
  background: rgba(255, 253, 249, 0.72);
  box-shadow: 2px 2px 0 rgba(229, 120, 110, 0.5);
  color: var(--ink);
  transition: transform 140ms var(--ease-out), box-shadow 140ms var(--ease-out);
}

.header-nav .header-nav__resume::after { content: none; }
.header-nav__resume:focus-visible { outline: 2px solid var(--peach); outline-offset: 3px; }
.header-nav__resume:active { box-shadow: 0 0 0 rgba(229, 120, 110, 0.5); transform: translate(2px, 2px); }

.hero {
  position: relative;
  display: flex;
  min-height: 100svh;
  overflow: clip;
  padding: 6.8rem var(--page-pad) 2rem;
  isolation: isolate;
}

.hero::after {
  position: absolute;
  z-index: -1;
  right: -10vw;
  bottom: -26vh;
  width: min(62vw, 52rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(250, 222, 120, 0.16), transparent 65%);
  content: "";
}

.hero-orbit {
  position: absolute;
  z-index: -1;
  border: 1.5px solid rgba(90, 96, 91, 0.18);
  border-radius: 47% 53% 51% 49% / 52% 46% 54% 48%;
  pointer-events: none;
}

.hero-orbit--one { top: 12%; left: -12rem; width: 27rem; height: 27rem; }
.hero-orbit--two { right: 5%; top: 16%; width: 7.5rem; height: 7.5rem; border-style: dashed; }

.hero-grid {
  display: grid;
  align-items: center;
  grid-template-columns: minmax(17rem, 0.88fr) minmax(20rem, 1.12fr);
  gap: clamp(2.5rem, 7vw, 9rem);
  width: min(100%, 79rem);
  margin: auto;
}

.portrait-wrap { position: relative; }

.portrait-frame {
  position: relative;
  width: min(100%, 27rem);
  margin: 0 auto;
  padding: 0.85rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(31, 35, 32, 0.08), 0 14px 30px -12px rgba(31, 35, 32, 0.22);
  transform: rotate(-2deg);
}

.portrait-frame::before {
  position: absolute;
  z-index: 2;
  top: -0.8rem;
  left: 50%;
  width: 7.5rem;
  height: 1.7rem;
  background: var(--tape);
  box-shadow: 0 1px 2px rgba(31, 35, 32, 0.08);
  content: "";
  transform: translateX(-50%) rotate(2.5deg);
}

.portrait-frame img {
  display: block;
  width: 100%;
  aspect-ratio: 0.86;
  object-fit: cover;
  object-position: center top;
  background: #e6ebe4;
}

.hero-copy { max-width: 43rem; }

.eyebrow {
  margin: 0 0 0.75rem;
  color: #c0574a;
  font-family: var(--hand);
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1;
  transform: rotate(-1.5deg);
  transform-origin: left center;
}

.eyebrow span { color: var(--peach); }

h1, h2, h3, p { margin-top: 0; }

h1 {
  max-width: 12ch;
  margin-bottom: 1.5rem;
  font-size: clamp(2.7rem, 5.6vw, 6rem);
  font-weight: 610;
  letter-spacing: -0.075em;
  line-height: 0.95;
}

h1 em {
  padding-inline: 0.08em;
  background: linear-gradient(180deg, transparent 52%, var(--highlight) 52%, var(--highlight) 92%, transparent 92%);
  color: var(--moss-dark);
  font-family: var(--hand);
  font-size: 1.12em;
  font-style: normal;
  font-weight: 700;
  letter-spacing: -0.01em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* Hero headline written like a pen: each line is revealed left to right while a
   nib travels along it, then the highlighter swipes under the handwritten words.
   script.js splits the headline into .pen-line blocks only while this runs. */
.pen-line {
  --pen-delay: 0ms;
  position: relative;
  display: block;
  width: fit-content;
}

@media (prefers-reduced-motion: no-preference) {
  [data-pen-heading].is-pen-writing .pen-line {
    animation: about-pen-line 700ms var(--ease-in-out) var(--pen-delay) both;
  }

  [data-pen-heading].is-pen-writing .pen-line::after {
    position: absolute;
    top: 0.1em;
    left: 0;
    color: var(--peach);
    content: "✒";
    font-family: var(--hand);
    font-size: 0.38em;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
    animation: pen-nib 700ms var(--ease-in-out) var(--pen-delay) both;
  }

  [data-pen-heading].is-pen-writing em {
    background-repeat: no-repeat;
    animation: pen-highlight 520ms var(--ease-out) var(--pen-highlight-delay, 0ms) both;
  }
}

/* The rest of the hero comes into focus with the headline: the eyebrow first,
   the portrait over the whole writing, then the summary and links as the
   highlighter lands. Opacity and blur only, so the elements' own rotations stay. */
@media (prefers-reduced-motion: no-preference) {
  .hero.is-revealing .eyebrow { animation: hero-focus-in 600ms var(--ease-out) both; }
  .hero.is-revealing .portrait-frame { animation: hero-focus-in 2200ms var(--ease-out) both; }
  .hero.is-revealing .hero-summary { animation: hero-focus-in 700ms var(--ease-out) var(--hero-text-delay, 0ms) both; }
  .hero.is-revealing .hero-actions { animation: hero-focus-in 700ms var(--ease-out) calc(var(--hero-text-delay, 0ms) + 150ms) both; }
}

@keyframes hero-focus-in {
  from { opacity: 0; filter: blur(12px); }
  to { opacity: 1; filter: blur(0); }
}

@keyframes pen-nib {
  0% { left: 0; opacity: 0; transform: translate(-130%, 0.08em) rotate(-28deg); }
  12%, 86% { opacity: 1; }
  100% { left: 100%; opacity: 0; transform: translate(-40%, -0.03em) rotate(-28deg); }
}

@keyframes pen-highlight {
  from { background-size: 0% 100%; }
  to { background-size: 100% 100%; }
}

.hero-summary {
  max-width: 37rem;
  margin-bottom: 2rem;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.25vw, 1.22rem);
  letter-spacing: -0.02em;
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.55rem;
}

.hero-action {
  display: inline-flex;
  gap: 0.45rem;
  align-items: center;
  border-bottom: 1px solid currentColor;
  padding-bottom: 0.2rem;
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 740;
  letter-spacing: -0.02em;
}

.hero-action--work { color: var(--ink-soft); }

.hero-actions .hero-action > span {
  display: inline-block;
  transition: transform 160ms ease;
}

.hero-action:focus-visible { outline: 2px solid var(--peach); outline-offset: 3px; }

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .hero-actions .hero-action:hover > span { transform: translateX(20%); }
  .hero-actions .hero-action--work:hover > span { transform: translateY(20%); }
}

.selected-work {
  padding: clamp(5rem, 10vw, 10rem) var(--page-pad) clamp(4rem, 7vw, 7rem);
  border-top: 1px dashed var(--line);
  color: var(--ink);
}

.work-heading,
.work-layout {
  width: min(90%, 70rem);
  margin-inline: auto;
}

.work-heading { margin-bottom: clamp(2rem, 4vw, 3.5rem); }

.work-heading__line {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
}

.work-heading__line .eyebrow { margin: 0; }

.chapter-stack { display: grid; gap: clamp(2rem, 4vw, 3rem); }

.chapter-case {
  --accent: var(--team);
  --accent-shadow: rgba(189, 113, 85, 0.38);
  position: relative;
  display: grid;
  grid-template-areas: "copy media";
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
  block-size: clamp(22rem, 30vw, 26rem);
  overflow: visible;
  border: 1px solid rgba(31, 35, 32, 0.3);
  background: rgba(255, 253, 249, 0.82);
  box-shadow: 4px 4px 0 var(--accent-shadow);
  color: var(--ink);
  isolation: isolate;
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}

.project-teamup { --accent: var(--team); --accent-shadow: rgba(189, 113, 85, 0.38); }
.project-perusall { --accent: var(--perusall); --accent-shadow: rgba(86, 110, 118, 0.38); }
.project-readyai { --accent: var(--readyai); --accent-shadow: rgba(191, 155, 66, 0.42); }

.chapter-case::before {
  position: absolute;
  z-index: 3;
  top: auto;
  bottom: calc(100% - 0.22rem);
  left: 16%;
  width: 6.5rem;
  height: 1.35rem;
  background: var(--tape);
  content: "";
  transform: rotate(-2deg);
}

.chapter-case .case-media {
  position: relative;
  z-index: 0;
  grid-area: media;
  overflow: hidden;
}

.chapter-case .case-media::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(270deg, rgba(255, 253, 249, 0.05), rgba(31, 35, 32, 0.16));
  content: "";
}

.chapter-case .case-media > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.94;
  filter: brightness(1.04) saturate(0.96);
  transform: scale(1.01);
  transition: transform 260ms var(--ease-out), opacity 200ms ease;
}

.chapter-case.project-perusall .case-media {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: clamp(1.2rem, 2vw, 2rem) clamp(1.1rem, 2vw, 1.7rem) clamp(1.2rem, 2vw, 2rem) clamp(3.5rem, 6vw, 5rem);
  background: linear-gradient(135deg, #f0f2ee, #e2e5e1);
}

.chapter-case.project-perusall .case-media::after { content: none; }

.chapter-case.project-perusall .case-media > img {
  position: relative;
  z-index: 1;
  width: min(78%, 26rem);
  height: auto;
  max-height: 78%;
  border: 0.3rem solid #fffdf9;
  border-radius: 0.25rem;
  box-shadow: 0 1.15rem 2rem -1.4rem rgba(31, 35, 32, 0.44);
  object-fit: contain;
  opacity: 1;
  filter: brightness(1.02) saturate(0.92);
  transform: none;
}

.chapter-case.project-readyai .case-media {
  background:
    radial-gradient(circle at 12% 14%, rgba(255, 253, 249, 0.86) 0 0.45rem, transparent 0.5rem),
    radial-gradient(circle at 89% 86%, rgba(123, 208, 216, 0.24), transparent 36%),
    linear-gradient(145deg, #e8f8f7, #cceff1 58%, #dff4ee);
}

.chapter-case.project-readyai .case-media::after { content: none; }

.readyai-learning-board {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: clamp(0.35rem, 1vw, 0.75rem);
  width: 100%;
  height: 100%;
  padding: clamp(1.15rem, 2.4vw, 1.8rem) clamp(0.75rem, 1.7vw, 1.35rem) clamp(0.75rem, 1.5vw, 1.2rem);
  overflow: hidden;
  isolation: isolate;
}

.readyai-learning-board::before {
  position: absolute;
  z-index: 0;
  top: clamp(0.78rem, 1.4vw, 1.1rem);
  right: 12%;
  left: 12%;
  height: 2px;
  background:
    radial-gradient(circle at 0 50%, #54bfc8 0 0.27rem, transparent 0.3rem),
    radial-gradient(circle at 50% 50%, #54bfc8 0 0.27rem, transparent 0.3rem),
    radial-gradient(circle at 100% 50%, #54bfc8 0 0.27rem, transparent 0.3rem),
    linear-gradient(90deg, #54bfc8, #8ed9d9);
  content: "";
}

.readyai-learning-board__screen {
  position: relative;
  z-index: 1;
  display: block;
  min-width: 0;
  overflow: hidden;
  border: 0.18rem solid rgba(255, 253, 249, 0.9);
  border-radius: clamp(0.45rem, 1vw, 0.8rem);
  background: #e7f7f7;
  box-shadow: 0 0.85rem 1.55rem -1.05rem rgba(27, 78, 84, 0.52);
}

.readyai-learning-board__screen::before {
  position: absolute;
  z-index: 1;
  top: 0.38rem;
  left: 0.38rem;
  width: 0.42rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255, 253, 249, 0.95);
  box-shadow: 0 0 0 0.12rem rgba(84, 191, 200, 0.42);
  content: "";
}

.readyai-learning-board__screen img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  opacity: 1;
  filter: none;
  object-fit: contain;
  transform: none;
  transition: none;
}

.readyai-learning-board__screen--intro {
  align-self: end;
  transform: rotate(-2deg) translateY(0.28rem);
}

.readyai-learning-board__screen--map {
  align-self: center;
  transform: translateY(-0.25rem);
}

.readyai-learning-board__screen--exercise {
  align-self: start;
  transform: rotate(2deg) translateY(0.1rem);
}

.chapter-case__copy {
  position: relative;
  display: flex;
  grid-area: copy;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 1.6rem;
}

.chapter-case .case-type {
  position: absolute;
  top: 1.6rem;
  left: 1.6rem;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.7rem;
  font-weight: 740;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.chapter-case h3 {
  margin: 0 0 0.75rem;
  font-size: clamp(2.6rem, 4.2vw, 4.35rem);
  font-weight: 610;
  letter-spacing: -0.08em;
  line-height: 0.88;
}

.chapter-case .case-summary {
  max-width: 29rem;
  margin: 0 0 1.2rem;
  color: var(--ink-soft);
  font-size: 0.94rem;
  line-height: 1.42;
}

.chapter-case .case-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid currentColor;
  padding-bottom: 0.22rem;
  color: var(--moss-dark);
  font-size: 0.74rem;
  font-weight: 760;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.chapter-case .case-link i { font-size: 1rem; font-style: normal; }

.chapter-case:focus-visible { outline: 3px solid var(--peach); outline-offset: 5px; }

.case-gallery {
  --gallery-row: clamp(2.5rem, 4vw, 3.5rem);
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: var(--gallery-row);
  gap: clamp(1rem, 1.9vw, 1.6rem);
}

.gallery-case {
  --accent: var(--team);
  --accent-shadow: rgba(189, 113, 85, 0.38);
  position: relative;
  display: block;
  min-width: 0;
  overflow: visible;
  border: 1px solid rgba(31, 35, 32, 0.3);
  background: rgba(255, 253, 249, 0.82);
  box-shadow: 4px 4px 0 var(--accent-shadow);
  color: var(--ink);
  isolation: isolate;
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out), opacity 180ms ease;
}

.gallery-case--teamup { grid-column: 1; grid-row: 1 / span 7; }
.gallery-case--perusall { grid-column: 1; grid-row: 8 / span 9; }
.gallery-case--readyai { grid-column: 2; grid-row: 1 / span 9; }
.gallery-case--coming { grid-column: 2; grid-row: 10 / span 4; }

.gallery-case:not(.gallery-case--coming)::before {
  position: absolute;
  z-index: 3;
  bottom: calc(100% - 0.22rem);
  left: 16%;
  width: 6.5rem;
  height: 1.35rem;
  background: var(--tape);
  content: "";
  transform: rotate(-2deg);
}

.gallery-case .case-media {
  position: absolute;
  z-index: 0;
  inset: 0;
  overflow: hidden;
  background: #e6ebe4;
}

.gallery-case .case-media > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.96;
  filter: brightness(1.03) saturate(0.95);
  transform: scale(1.01);
  transition: transform 260ms var(--ease-out), opacity 200ms ease;
}

.gallery-case__copy {
  position: absolute;
  z-index: 2;
  right: 0;
  bottom: 0;
  left: 0;
  padding: clamp(1rem, 2vw, 1.55rem);
  background: linear-gradient(180deg, transparent 0%, rgba(255, 253, 249, 0.78) 26%, rgba(255, 253, 249, 0.97) 100%);
}

.gallery-case .case-type {
  margin: 0 0 0.38rem;
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 760;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.gallery-case h3 {
  margin: 0 0 0.45rem;
  font-size: clamp(2.2rem, 4vw, 3.9rem);
  font-weight: 610;
  letter-spacing: -0.075em;
  line-height: 0.9;
}

.gallery-case .case-summary {
  max-width: 32rem;
  margin: 0 0 0.8rem;
  color: var(--ink-soft);
  font-size: 0.88rem;
  line-height: 1.4;
}

.gallery-case .case-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid currentColor;
  padding-bottom: 0.22rem;
  color: var(--moss-dark);
  font-size: 0.7rem;
  font-weight: 760;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.gallery-case .case-link i { font-size: 0.9rem; font-style: normal; }

.gallery-case.project-perusall .case-media {
  display: block;
  padding: 0;
  background: #f4f2ec;
}

.gallery-case.project-perusall .case-media > img {
  position: absolute;
  /* Fill the image zone while keeping the laptop upright and proportionate. */
  top: -8%;
  left: 65%;
  width: auto;
  height: 96%;
  max-width: none;
  max-height: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  object-fit: contain;
  object-position: center;
  opacity: 0.98;
  filter: brightness(1.04) saturate(0.88);
  transform: translateX(-50%);
  transform-origin: center center;
}

.gallery-case.project-readyai .case-media {
  position: absolute;
  inset: 0;
  min-height: auto;
  background: #e3f6f4;
}

.gallery-case--readyai {
  display: block;
}

.gallery-case--readyai .readyai-learning-board {
  display: block;
  padding: 0;
  overflow: hidden;
  transform: scale(1);
  transition: transform 260ms var(--ease-out);
}

.gallery-case--readyai .readyai-learning-board::before {
  content: none;
}

.gallery-case--readyai .readyai-learning-board::after {
  content: none;
}

.gallery-case--readyai .readyai-learning-board__screen {
  position: absolute;
  z-index: 1;
  overflow: hidden;
  aspect-ratio: 375 / 812;
  border: 0.18rem solid #fffdf9;
  border-radius: 0.9rem;
  background: #fffdf9;
  box-shadow: 0 0.8rem 1.45rem -1rem rgba(25, 76, 82, 0.3);
  opacity: 0.88;
}

.gallery-case--readyai .readyai-learning-board__screen::before {
  content: none;
}

.gallery-case--readyai .readyai-learning-board__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Fan of three: intro screen in front, two activity screens tucked behind it */
.gallery-case--readyai .readyai-learning-board__screen--main {
  z-index: 2;
  top: 3%;
  left: 50%;
  width: 36%;
  opacity: 1;
  box-shadow: 0 1.4rem 2.2rem -1.2rem rgba(25, 76, 82, 0.42);
  transform: translateX(-50%);
}

.gallery-case--readyai .readyai-learning-board__screen--picture-choice,
.gallery-case--readyai .readyai-learning-board__screen--animal-swim {
  top: 11%;
  left: 50%;
  width: 28%;
  opacity: 1;
  transform-origin: 50% 100%;
  transition: transform 320ms var(--ease-out);
}

.gallery-case--readyai .readyai-learning-board__screen--picture-choice { transform: translateX(-118%) rotate(-7deg); }
.gallery-case--readyai .readyai-learning-board__screen--animal-swim { transform: translateX(18%) rotate(7deg); }

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .gallery-case--readyai:hover .readyai-learning-board__screen--picture-choice { transform: translateX(-128%) rotate(-10deg); }
  .gallery-case--readyai:hover .readyai-learning-board__screen--animal-swim { transform: translateX(28%) rotate(10deg); }
}

.gallery-case--readyai .case-link {
  align-self: flex-start;
  width: max-content;
  max-width: 100%;
}

.gallery-case--coming {
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding: clamp(1.2rem, 2.7vw, 2rem);
  border-color: rgba(189, 113, 85, 0.48);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 253, 249, 0.24) 58%),
    #fbfaf3;
  box-shadow: 4px 4px 0 rgba(189, 113, 85, 0.2);
  color: var(--moss-dark);
}

.gallery-case--coming::after {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 24%, rgba(189, 113, 85, 0.56) 0 0.22rem, transparent 0.25rem),
    radial-gradient(circle at 76% 32%, rgba(122, 141, 106, 0.45) 0 0.18rem, transparent 0.22rem),
    repeating-linear-gradient(135deg, transparent 0 1.5rem, rgba(47, 64, 50, 0.1) 1.5rem 1.65rem);
  content: "";
  opacity: 0.42;
}

.gallery-case--coming h3 {
  position: relative;
  z-index: 1;
  max-width: 10ch;
  margin: 0;
  color: inherit;
  font-size: clamp(1.6rem, 2.8vw, 2.7rem);
  line-height: 0.95;
}

.gallery-case--coming h3 em {
  color: #925943;
  font-family: var(--hand);
  font-size: 1.1em;
  font-style: normal;
  font-weight: 700;
}

.gallery-case:focus-visible { outline: 3px solid var(--peach); outline-offset: 5px; }

@supports selector(.case-gallery:has(> a.gallery-case:focus-visible)) {
  .case-gallery:has(> a.gallery-case:focus-visible) > a.gallery-case:not(:focus-visible) {
    opacity: 0.42;
  }
}

.more-work {
  padding: clamp(5rem, 10vw, 9rem) var(--page-pad) clamp(5rem, 9vw, 8rem);
  border-top: 1px dashed var(--line);
  color: var(--ink);
}

.more-work__heading,
.more-work__grid {
  width: min(90%, 70rem);
  margin-inline: auto;
}

.more-work__heading { margin-bottom: clamp(1.4rem, 2.8vw, 2.4rem); }
.more-work__heading .eyebrow { margin-bottom: 0.85rem; }

.more-work__heading h2 {
  max-width: 14ch;
  margin: 0;
  font-size: clamp(2.5rem, 4.6vw, 5.1rem);
  font-weight: 610;
  letter-spacing: -0.075em;
  line-height: 0.94;
}

.more-work__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 3vw, 2.75rem);
  align-items: start;
}

.learning-case,
.work-draft {
  position: relative;
  border: 1px solid rgba(31, 35, 32, 0.34);
  background: rgba(255, 253, 249, 0.76);
  box-shadow: 4px 4px 0 rgba(229, 120, 110, 0.35);
}

.learning-case {
  overflow: visible;
  padding: 0;
  isolation: isolate;
}

.learning-case::before {
  position: absolute;
  z-index: 2;
  top: -0.65rem;
  left: clamp(2rem, 12%, 6rem);
  width: 6.7rem;
  height: 1.45rem;
  background: var(--tape);
  content: "";
  pointer-events: none;
  transform: rotate(-2.5deg);
}

.learning-case__link {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
}

.learning-case__media {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  aspect-ratio: 2266 / 1592;
  border-bottom: 1px solid rgba(31, 35, 32, 0.2);
  padding: clamp(0.55rem, 1.1vw, 0.85rem);
  background: linear-gradient(135deg, #eef2ef, #dfe8e2);
}

.learning-case__media::before {
  position: absolute;
  z-index: 0;
  inset: clamp(0.28rem, 0.6vw, 0.45rem);
  border: 1px solid rgba(91, 105, 96, 0.28);
  border-radius: clamp(0.38rem, 0.8vw, 0.6rem);
  background: linear-gradient(145deg, #f7f8f5, #e4e8e4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 0.6rem 1rem -0.9rem rgba(42, 57, 47, 0.56);
  content: "";
}

.learning-case__media::after {
  position: absolute;
  z-index: 2;
  top: clamp(0.42rem, 0.8vw, 0.62rem);
  left: 50%;
  width: clamp(0.2rem, 0.32vw, 0.28rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: #a9b6af;
  box-shadow: 0 0 0 0.08rem rgba(255, 255, 255, 0.65);
  content: "";
  pointer-events: none;
  transform: translateX(-50%);
}

.learning-case__media img {
  position: relative;
  z-index: 1;
  display: block;
  width: auto;
  height: 100%;
  max-width: 100%;
  border: 1px solid rgba(91, 105, 96, 0.28);
  border-radius: clamp(0.18rem, 0.45vw, 0.32rem);
  box-shadow: 0 0.4rem 0.7rem -0.65rem rgba(42, 57, 47, 0.46);
  object-fit: contain;
  object-position: center;
}

.learning-case__body {
  position: relative;
  padding: clamp(1.2rem, 2.2vw, 1.7rem);
}

.learning-case h3,
.work-draft h3 {
  margin: 0;
  color: var(--ink);
  font-weight: 610;
  letter-spacing: -0.065em;
  line-height: 0.95;
}

.learning-case h3 {
  max-width: 13ch;
  font-size: clamp(2rem, 3.05vw, 3.25rem);
}

.learning-case__tools {
  margin: 0.95rem 0 0;
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.learning-case__tools span {
  color: var(--moss-dark);
  font-weight: 760;
}

.learning-case__reveal {
  display: grid;
  grid-template-rows: 1fr;
  margin-top: 1.35rem;
}

.learning-case__reveal-inner {
  min-height: 0;
  overflow: hidden;
}

.learning-case__reveal-content {
  display: grid;
  gap: 1rem;
  border-top: 1px solid rgba(31, 35, 32, 0.2);
  padding-top: 1rem;
}

.learning-case__reveal p {
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(0.88rem, 1.05vw, 1rem);
  letter-spacing: -0.015em;
  line-height: 1.45;
}

.learning-case__artifact {
  display: inline-flex;
  width: max-content;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid currentColor;
  padding-bottom: 0.22rem;
  color: var(--moss-dark);
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.learning-case__artifact i {
  font-size: 0.9rem;
  font-style: normal;
}

/* Projects use an artifact/workshop language instead of the visual-case poster treatment above. */
.learning-case--studio {
  --studio-paper: #f8f5ec;
  --studio-ink: #2f4032;
  --studio-soft: #4f6151;
  --studio-line: rgba(47, 64, 50, 0.22);
  --studio-sage: #f4e0a2;
  --studio-shadow: #e8c1b6;
  overflow: visible;
  border: 0;
  padding: clamp(1rem, 2.8vw, 2.1rem);
  background: var(--studio-paper);
  box-shadow: 7px 7px 0 var(--studio-shadow);
  color: var(--studio-ink);
}

.learning-case--studio::before { content: none; }

.learning-case--studio::after {
  position: absolute;
  inset: 0;
  border: 1px solid var(--studio-line);
  content: "";
  pointer-events: none;
}

.learning-case--studio .learning-case__link {
  color: var(--studio-ink);
}

.learning-case--studio .learning-case__media {
  margin: 1.1rem 0 clamp(1.2rem, 3vw, 2.15rem);
  padding: clamp(0.55rem, 1.2vw, 0.9rem);
  border: 1px solid #c7d1c5;
  border-radius: 1.25rem;
  background: #fffdf9;
  box-shadow: 0 0.45rem 0 rgba(47, 64, 50, 0.11);
}

.learning-case--studio .learning-case__media::before {
  inset: 0.22rem;
  border: 1px solid rgba(83, 105, 92, 0.2);
  border-radius: 1rem;
  background: #f2f5f1;
  box-shadow: none;
}

.learning-case--studio .learning-case__media::after {
  top: 0.35rem;
  width: 0.32rem;
  background: #7a8d6a;
  box-shadow: 0 0 0 2px #eef2ec;
}

.learning-case--studio .learning-case__media video,
.learning-case--studio .learning-case__media img {
  width: 100%;
  height: auto;
  max-height: none;
  border: 0;
  border-radius: 0.75rem;
  box-shadow: none;
  object-fit: cover;
}

.learning-case--studio .learning-case__body {
  padding: 0;
  color: var(--studio-ink);
}

.learning-case--studio h3 {
  max-width: 13ch;
  color: var(--studio-ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.35rem, 1.75vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.07em;
  line-height: 0.91;
}

.learning-case--studio .learning-case__tools {
  width: fit-content;
  margin-top: 1rem;
  border-bottom: 1px solid var(--studio-line);
  padding-bottom: 0.35rem;
  color: var(--studio-soft);
}

.learning-case--studio .learning-case__tools span { color: var(--studio-ink); }

.learning-case--studio .learning-case__reveal-content {
  border-top-color: var(--studio-line);
}

.learning-case--studio .learning-case__reveal p { color: var(--studio-soft); }

.learning-case--studio .learning-case__artifact {
  border: 1px solid var(--studio-sage);
  padding: 0.75rem 0.9rem;
  color: var(--studio-ink);
  background: var(--studio-sage);
}

/* A second project card with its own offset-shadow colour. */
.learning-case--english { --studio-shadow: #c5d3e6; }
.learning-case__media video { position: relative; z-index: 1; display: block; }

/* Small status line above a project card's picture. It sits in the gap every
   card already has above its picture, so pictures in a row stay aligned. */
.learning-case__status {
  position: absolute;
  top: clamp(1rem, 2.8vw, 2.1rem);
  left: clamp(1rem, 2.8vw, 2.1rem);
  margin: 0;
  line-height: 1;
  color: #c0574a;
  font-size: 0.68rem;
  font-weight: 780;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.learning-case--studio .learning-case__link:focus-visible {
  outline-color: #e59675;
}

.work-draft__status {
  margin: 0 0 1rem;
  color: #c0574a;
  font-size: 0.68rem;
  font-weight: 780;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

@media (hover: hover) and (pointer: fine) {
  .learning-case__reveal {
    grid-template-rows: 0fr;
    margin: 0;
    transition: grid-template-rows 200ms var(--ease-out);
  }

  .learning-case__reveal-content {
    opacity: 0;
    transform: translateY(-0.25rem);
    transition:
      opacity 180ms ease,
      transform 200ms var(--ease-out);
  }

  .learning-case__link:hover .learning-case__reveal {
    grid-template-rows: 1fr;
  }

  .learning-case__link:hover .learning-case__reveal-content {
    opacity: 1;
    transform: translateY(0);
  }

}

.learning-case__link:focus-visible {
  outline: 3px solid var(--peach);
  outline-offset: 5px;
}

.learning-case__link:focus-visible .learning-case__reveal {
  grid-template-rows: 1fr;
  transition: none;
}

.learning-case__link:focus-visible .learning-case__reveal-content {
  opacity: 1;
  transform: none;
  transition: none;
}

@media (max-width: 620px) {
  .learning-case--studio {
    padding: 1rem;
    box-shadow: 5px 5px 0 var(--studio-shadow);
  }
  .learning-case__status { top: 1rem; left: 1rem; }
}

.work-drafts { display: grid; gap: clamp(1.5rem, 3vw, 2.75rem); }


.work-draft {
  display: flex;
  flex-direction: column;
  min-height: clamp(15rem, 21vw, 18rem);
  padding: clamp(1.35rem, 2.4vw, 2rem);
}

.work-draft--ai { box-shadow: 4px 4px 0 rgba(110, 150, 196, 0.36); }
.work-draft--ihuman { box-shadow: 4px 4px 0 rgba(250, 222, 120, 0.58); }

.work-draft h3 {
  max-width: 11ch;
  font-size: clamp(2rem, 3.2vw, 3.2rem);
}

.work-draft > p:not(.work-draft__status) {
  max-width: 28rem;
  margin: 1rem 0 1.35rem;
  color: var(--ink-soft);
  font-size: 0.94rem;
  letter-spacing: -0.015em;
  line-height: 1.48;
}

.work-draft__tag {
  width: max-content;
  margin-top: auto;
  align-self: flex-end;
  border-bottom: 1px solid currentColor;
  padding-bottom: 0.22rem;
  color: var(--moss-dark);
  font-size: 0.72rem;
  font-weight: 740;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: end;
  padding: 2.5rem var(--page-pad) max(2.5rem, env(safe-area-inset-bottom, 0px));
  border-top: 1px dashed var(--line);
  color: var(--ink);
}

.site-footer p { margin: 0; color: var(--ink-soft); font-family: var(--hand); font-size: 1.6rem; line-height: 1.1; }
.site-footer a { border-bottom: 1px solid currentColor; padding-bottom: 0.25rem; font-weight: 720; }

@media (hover: hover) and (pointer: fine) {
  .header-nav a:hover { color: var(--ink); }
  .header-nav a:hover::after { opacity: 1; transform: scaleX(1); }
  .header-nav__resume:hover { box-shadow: 3px 3px 0 rgba(229, 120, 110, 0.7); transform: translate(-1px, -1px); }

  @supports selector(.case-gallery:has(> a.gallery-case:hover)) {
    .case-gallery:not(:has(> a.gallery-case:focus-visible)):has(> a.gallery-case:hover) > a.gallery-case:not(:hover) {
      opacity: 0.42;
    }
  }

  .chapter-case:hover {
    transform: translateY(-0.4rem);
    box-shadow: 0 24px 38px -22px rgba(31, 35, 32, 0.4);
  }

  .chapter-case:hover .case-media > img {
    opacity: 1;
    transform: scale(1.04);
  }

  .chapter-case.project-perusall:hover .case-media > img,
  .chapter-case.project-readyai:hover .readyai-learning-board__screen img { transform: none; }

  .gallery-case:not(.gallery-case--coming):hover {
    transform: translateY(-0.4rem);
    box-shadow: 0 24px 38px -22px rgba(31, 35, 32, 0.4);
  }

  .gallery-case:not(.gallery-case--coming):hover .case-media > img {
    opacity: 1;
    transform: scale(1.035);
  }

  .gallery-case.project-perusall:hover .case-media > img { transform: translateX(-50%) scale(1.02); }
  .gallery-case.project-readyai:hover .readyai-learning-board__screen img { transform: none; }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .gallery-case.project-readyai:hover .readyai-learning-board { transform: scale(1.035); }
}

@media (max-width: 850px) {
  .hero { min-height: auto; padding-top: 7.8rem; padding-bottom: 6.5rem; }
  .hero-grid { grid-template-columns: 0.78fr 1.22fr; gap: 2.5rem; }

  .more-work__grid { grid-template-columns: minmax(0, 1fr); }
  .work-drafts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .work-heading,
  .work-layout { width: min(100%, 48rem); }

  .work-heading__line { display: block; }

  .more-work__heading,
  .more-work__grid { width: min(100%, 48rem); }

  .more-work__grid { grid-template-columns: minmax(0, 1fr); }
  .work-drafts { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .chapter-case {
    display: grid;
    grid-template-areas: "media" "copy";
    grid-template-columns: 1fr;
    grid-template-rows: minmax(0, 0.47fr) minmax(0, 0.53fr);
    block-size: 34rem;
  }

  .chapter-case__copy { padding: 1.2rem 1.25rem; }

  .chapter-case .case-type {
    top: 1.2rem;
    left: 1.25rem;
  }

  .chapter-case h3 { font-size: clamp(2.75rem, 12vw, 4rem); }

  .case-gallery {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 1.75rem;
  }

  .gallery-case--teamup,
  .gallery-case--perusall,
  .gallery-case--readyai,
  .gallery-case--coming {
    grid-column: auto;
    grid-row: auto;
  }

  .gallery-case--teamup { min-block-size: 24rem; }
  .gallery-case--perusall,
  .gallery-case--readyai { min-block-size: 30rem; }
  .gallery-case--coming { min-block-size: 12rem; }

  .gallery-case--readyai { min-block-size: 34rem; }

  .gallery-case--readyai .readyai-learning-board__screen--main {
    top: 4%;
    width: clamp(7rem, 30vw, 12.5rem);
  }

  .gallery-case--readyai .readyai-learning-board__screen--picture-choice,
  .gallery-case--readyai .readyai-learning-board__screen--animal-swim {
    top: 9%;
    width: clamp(5.5rem, 23vw, 9.75rem);
  }

  .gallery-case__copy { padding: 1.2rem 1.25rem; }
  .gallery-case h3 { font-size: clamp(2.55rem, 12vw, 4rem); }

  .gallery-case.project-perusall .case-media {
    padding: 0;
  }

  .gallery-case.project-perusall .case-media > img {
    top: -6%;
    left: 63%;
    width: auto;
    height: 92%;
    max-width: none;
    max-height: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    object-fit: contain;
    object-position: center;
  }

  .chapter-case.project-perusall .case-media {
    justify-content: center;
    padding: 0.8rem;
  }

  .chapter-case.project-perusall .case-media > img {
    width: 100%;
    height: 100%;
    max-height: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    object-fit: cover;
  }

  .readyai-learning-board { padding: 1.05rem 0.7rem 0.6rem; }
}

@media (max-width: 620px) {
  .site-header { padding-top: max(1rem, env(safe-area-inset-top, 0px)); }
  .wordmark { font-size: 0.95rem; }
  .header-nav { gap: 0.75rem; font-size: 0.72rem; }
  .hero { padding-top: 6rem; padding-bottom: 5.25rem; }
  .hero-grid { grid-template-columns: 1fr; gap: 2.25rem; }
  .portrait-frame { width: min(86%, 23rem); }
  h1 { max-width: 10ch; font-size: clamp(3.1rem, 14.5vw, 4.4rem); }
  .hero-summary { font-size: 1rem; }
  .hero-orbit--one { width: 20rem; height: 20rem; left: -11rem; top: 17%; }
  .hero-orbit--two { top: 10%; right: -2rem; }
  .selected-work { padding-top: 4.5rem; }
  .work-heading,
  .work-layout { width: min(100%, 28rem); }

  .more-work { padding-top: 4.5rem; }
  .more-work__heading,
  .more-work__grid { width: min(100%, 28rem); }
  .work-drafts { grid-template-columns: minmax(0, 1fr); }

  .site-footer { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition-duration: 150ms !important;
    transition-timing-function: ease !important;
  }
  .about-title--pen.is-pen-writing .about-title__line {
    animation: none;
    clip-path: none;
    opacity: 1;
    transform: none;
  }
  .about-title--pen.is-pen-writing .about-title__line::after {
    animation: none;
    content: none;
  }
  .chapter-case { transition: none; }
  .chapter-case:hover { transform: none; }
  .gallery-case { transition: none; }
  .gallery-case:hover { transform: none; }
  .learning-case__reveal,
  .learning-case__reveal-content { transition: none; }
  .learning-case__reveal-content { transform: none; }
}

/* About */
.about-hero {
  position: relative;
  display: grid;
  min-height: min(100svh, 60rem);
  overflow: clip;
  padding: clamp(6.75rem, 11vw, 9rem) var(--page-pad) clamp(5.5rem, 9vw, 8rem);
  isolation: isolate;
}

.about-hero::after {
  position: absolute;
  z-index: -1;
  right: -12vw;
  bottom: -28vh;
  width: min(58vw, 48rem);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(250, 222, 120, 0.2), transparent 66%);
  content: "";
}

.about-hero__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-template-rows: 1fr auto 1fr;
  column-gap: clamp(0.5rem, 2vw, 1.75rem);
  min-height: clamp(34rem, 70svh, 45rem);
  width: min(100%, 79rem);
  margin: auto;
}

.about-hero__copy {
  grid-column: 3 / 11;
  grid-row: 2;
  width: 100%;
  max-width: 48rem;
  margin-inline: auto;
  z-index: 1;
  text-align: center;
}

.about-hero__copy h1 {
  max-width: 14ch;
  margin: 0 auto clamp(3.75rem, 7vw, 5.75rem);
  font-size: clamp(2.6rem, 5vw, 5.7rem);
  text-align: center;
}

.about-title--pen {
  --pen-line-duration: 850ms;
  container-type: inline-size;
}

.about-title__line {
  --pen-delay: 0ms;
  position: relative;
  display: block;
}

.about-title__line:nth-child(2) { --pen-delay: 720ms; }
.about-title__line:nth-child(3) { --pen-delay: 1440ms; }
.about-title__line:nth-child(4) { --pen-delay: 2160ms; }
.about-title__line:nth-child(5) { --pen-delay: 2880ms; }

@media (prefers-reduced-motion: no-preference) {
  .about-title--pen.is-pen-writing .about-title__line {
    animation: about-pen-line var(--pen-line-duration) var(--ease-in-out) var(--pen-delay) both;
  }

  .about-title--pen.is-pen-writing .about-title__line::after {
    position: absolute;
    top: 0.14em;
    left: 0;
    color: var(--peach);
    content: "✒";
    font-family: var(--hand);
    font-size: 0.38em;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
    animation: about-pen-nib var(--pen-line-duration) var(--ease-in-out) var(--pen-delay) both;
  }
}

@keyframes about-pen-line {
  from {
    clip-path: inset(0 100% 0 0);
    opacity: 0.46;
    transform: translate3d(0, 0.13em, 0);
  }
  to {
    clip-path: inset(0 0 0 0);
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes about-pen-nib {
  0% {
    opacity: 0;
    transform: translate3d(-130%, 0.08em, 0) rotate(-28deg);
  }
  12%, 86% { opacity: 1; }
  100% {
    opacity: 0;
    transform: translate3d(calc(100cqw - 0.95em), -0.03em, 0) rotate(-28deg);
  }
}

.hero-action--story {
  margin-inline: auto;
  color: var(--moss-dark);
}

.hero-action--story > span {
  display: inline-block;
  transition: transform 160ms ease;
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .hero-action--story:hover > span { transform: translateY(20%); }
}

.about-story-section,
.about-notes-section {
  padding: clamp(5.5rem, 11vw, 10rem) var(--page-pad);
  border-top: 1px dashed var(--line);
}

.about-section-heading {
  width: min(100%, 79rem);
  margin: 0 auto clamp(2.75rem, 6vw, 5.25rem);
}

.about-section-heading--notes {
  margin-bottom: clamp(1.25rem, 2.4vw, 2.25rem);
}

.about-section-heading .eyebrow { margin-bottom: 0.9rem; }

.about-section-heading h2 {
  max-width: 13ch;
  margin: 0 0 1.1rem;
  color: var(--ink);
  font-size: clamp(2.5rem, 4.8vw, 5.25rem);
  font-weight: 610;
  letter-spacing: -0.075em;
  line-height: 0.94;
}

.about-section-heading > p:last-child {
  max-width: 36rem;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.25vw, 1.16rem);
  letter-spacing: -0.02em;
  line-height: 1.52;
}

.about-story-layout {
  display: grid;
  grid-template-columns: minmax(19rem, 0.95fr) minmax(21rem, 1.05fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
  width: min(100%, 79rem);
  margin: 0 auto;
}

.about-story-visual {
  position: sticky;
  top: clamp(5.5rem, 12vh, 8rem);
  align-self: start;
  width: min(100%, 23rem);
  margin-inline: auto;
}

.about-story-index {
  display: flex;
  gap: 0.38rem;
  align-items: baseline;
  margin: 0 0 1rem 0.4rem;
  color: var(--moss-dark);
  font-size: 0.7rem;
  font-weight: 760;
  letter-spacing: 0.09em;
}

.about-story-index span:last-child { color: var(--ink-soft); }

.story-polaroid {
  position: relative;
  margin: 0;
  padding: 0.8rem 0.8rem 2.8rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(31, 35, 32, 0.08), 0 18px 38px -18px rgba(31, 35, 32, 0.3);
  transform: rotate(-1.4deg);
}

.story-polaroid::before {
  position: absolute;
  z-index: 2;
  top: -0.78rem;
  left: 50%;
  width: 6.6rem;
  height: 1.5rem;
  background: var(--tape);
  box-shadow: 0 1px 2px rgba(31, 35, 32, 0.08);
  content: "";
  transform: translateX(-50%) rotate(2.4deg);
}

.story-polaroid img {
  display: block;
  width: 100%;
  aspect-ratio: 1.08;
  object-fit: cover;
  background: #e6ebe4;
}

.story-polaroid.is-landscape img {
  aspect-ratio: 1.75;
  object-fit: contain;
  background: #edf0ec;
}

.story-polaroid figcaption {
  position: absolute;
  right: 0.95rem;
  bottom: 0.78rem;
  left: 0.95rem;
  color: var(--moss-dark);
  font-family: var(--hand);
  font-size: clamp(1.1rem, 1.8vw, 1.5rem);
  line-height: 1;
  text-align: center;
}

.about-story-copy {
  display: grid;
  gap: clamp(4rem, 11vw, 8.5rem);
  padding-bottom: clamp(1rem, 4vw, 4rem);
}

.about-story-step {
  min-height: min(72svh, 39rem);
  border-left: 1px solid rgba(31, 35, 32, 0.22);
  padding: 0.2rem 0 0.5rem clamp(1.35rem, 3vw, 2.5rem);
  color: var(--ink-soft);
  opacity: 0.52;
  transform: translateX(0);
  transition: opacity 180ms ease, transform 220ms var(--ease-out), color 180ms ease;
}

.about-story-step.is-active {
  color: var(--ink);
  opacity: 1;
  transform: translateX(0.45rem);
}

.about-story-step__number {
  margin-bottom: 1.35rem;
  color: #c0574a;
  font-family: var(--hand);
  font-size: clamp(1.4rem, 2.1vw, 1.85rem);
  font-weight: 700;
  line-height: 1;
  transform: rotate(-1deg);
  transform-origin: left center;
}

/* Applied only while the GSAP story reveal is active. The handwritten labels
   remain fully legible when JavaScript or motion is unavailable. */
.about-story-step__number[data-story-title-reveal] {
  --story-title-muted: rgba(192, 87, 74, 0.2);
  --story-title-full: #c0574a;
  color: var(--story-title-muted);
}

.about-story-step > p:last-child {
  max-width: 32rem;
  margin-bottom: 0;
  font-size: clamp(1.28rem, 2.05vw, 1.78rem);
  letter-spacing: -0.04em;
  line-height: 1.42;
}

.about-story-step strong {
  color: var(--moss-dark);
  font-weight: 720;
}

.about-story-layout.has-story-line-reveal .about-story-step,
.about-story-layout.has-story-line-reveal .about-story-step.is-active {
  color: var(--ink);
  opacity: 1;
  transform: none;
  transition: none;
}

.about-story-step > p:last-child[data-story-line-reveal] {
  --story-line-muted: rgba(31, 35, 32, 0.2);
  --story-line-full: var(--ink);
}

.about-story-reveal__line {
  display: block;
  color: var(--story-line-muted);
}

.about-story-step > p:last-child[data-story-line-reveal] strong {
  color: inherit;
}

.about-notes-section {
  position: relative;
  overflow: clip;
}

.about-notes-section::after {
  position: absolute;
  z-index: -1;
  top: 8%;
  right: -12rem;
  width: 28rem;
  height: 28rem;
  border: 1px dashed rgba(90, 96, 91, 0.2);
  border-radius: 50%;
  content: "";
}

.about-section-heading--notes h2 { max-width: 16ch; }

.about-section-heading--notes h2 span {
  color: var(--moss-dark);
  font-family: var(--hand);
  font-size: 0.82em;
  letter-spacing: -0.02em;
}

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

.memory-collage {
  position: relative;
  container-type: inline-size;
  width: min(100%, 70rem);
  height: clamp(24.5rem, 34vw, 26rem);
  margin: 0 auto;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}

.memory-collage::-webkit-scrollbar { display: none; }

.memory-collage__track {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  width: max-content;
  min-width: 100%;
  height: 100%;
  gap: clamp(1.4rem, 3vw, 2.4rem);
  padding: 10.5rem 1.25rem 1.5rem;
  transform: translate3d(0, 0, 0);
  will-change: auto;
}

@keyframes memory-row-flow {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-4.5rem, 0, 0); }
}

@media (min-width: 851px) and (prefers-reduced-motion: no-preference) {
  .memory-collage.is-in-view .memory-collage__track {
    animation: memory-row-flow 12s linear infinite;
    will-change: transform;
  }
}

.memory-card {
  --memory-lift: 0px;
  --memory-offset-y: 0px;
  --memory-rotation: 0deg;
  position: relative;
  display: block;
  flex: 0 0 auto;
  width: clamp(11.25rem, 19vw, 14rem);
  aspect-ratio: 1;
  overflow: visible;
  isolation: isolate;
  border: 0;
  border-radius: 0;
  margin: 0;
  padding: 0;
  background: var(--cream);
  box-shadow: 0 0 0 0.38rem rgba(255, 253, 249, 0.92), 0 22px 36px -24px rgba(31, 35, 32, 0.42);
  color: var(--cream);
  cursor: pointer;
  font: inherit;
  text-align: left;
  transform: translate3d(0, calc(var(--memory-offset-y) + var(--memory-lift)), 0) rotate(var(--memory-rotation));
  transform-origin: center;
  transition: transform 180ms var(--ease-out);
}

.memory-card img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #e6ebe4;
}

.memory-card--left {
  --memory-rotation: -3deg;
  --memory-offset-y: 0.55rem;
}

.memory-card--top {
  --memory-rotation: 2deg;
  --memory-offset-y: -0.6rem;
}

.memory-card--right {
  --memory-rotation: 1.5deg;
  --memory-offset-y: 0.4rem;
}

.memory-card--bottom {
  --memory-rotation: -2.5deg;
  --memory-offset-y: -0.45rem;
}

.memory-card__note {
  position: absolute;
  z-index: 4;
  bottom: calc(100% + 0.7rem);
  left: 50%;
  display: grid;
  box-sizing: border-box;
  width: min(8.5rem, calc(100% - 2rem));
  min-height: 6.25rem;
  place-items: center;
  padding: 0.6rem 0.65rem;
  background: var(--cream);
  box-shadow: 0 0 0 1px rgba(31, 35, 32, 0.14), 0 10px 18px -14px rgba(31, 35, 32, 0.42);
  color: var(--moss-dark);
  font-family: var(--hand);
  font-size: clamp(0.82rem, 0.95vw, 0.9rem);
  font-weight: 700;
  line-height: 1.15;
  overflow-wrap: anywhere;
  pointer-events: none;
  text-align: center;
  opacity: 0;
  transform: translate3d(-50%, 0.45rem, 0) rotate(2deg) scale(0.97);
  transform-origin: center bottom;
  transition: opacity 160ms var(--ease-out), transform 160ms var(--ease-out);
}

.memory-card.is-revealed {
  z-index: 6;
}

.memory-card.is-revealed .memory-card__note,
.memory-card:focus-visible .memory-card__note {
  opacity: 1;
  transform: translate3d(-50%, 0, 0) rotate(2deg) scale(1);
}

.memory-card:focus-visible {
  z-index: 6;
  outline: 2px solid var(--peach);
  outline-offset: 5px;
}

.memory-card.is-instant .memory-card__note {
  transition: none;
}

.memory-collage:focus-within .memory-collage__track {
  animation-play-state: paused;
}

@media (hover: hover) and (pointer: fine) {
  .memory-collage:has(.memory-card:hover) .memory-collage__track {
    animation-play-state: paused;
  }

  .memory-card:hover {
    z-index: 6;
  }

  .memory-card:hover .memory-card__note {
    opacity: 1;
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .memory-card:hover {
    --memory-lift: -0.55rem;
  }

  .memory-card:hover .memory-card__note {
    transform: translate3d(-50%, 0, 0) rotate(2deg) scale(1);
  }
}

/* On wider screens, set the photo row lower in the collage so the larger
   lower-right callouts have room to open without crowding the heading. */
@media (min-width: 721px) {
  .about-section-heading--notes {
    margin-bottom: clamp(1.5rem, 2.5vw, 2.25rem);
  }

  .memory-collage {
    height: clamp(25rem, 35vw, 26rem);
  }

  .memory-collage__track {
    align-items: flex-start;
    gap: clamp(1.75rem, 3vw, 2.6rem);
    padding: 3rem 1.75rem 1rem;
  }

  .memory-card {
    width: clamp(11.75rem, 21vw, 14rem);
  }

  .memory-card__note {
    top: calc(100% - 2rem);
    right: auto;
    bottom: auto;
    left: calc(100% - 9.25rem);
    width: min(9.25rem, calc(100% - 1.75rem));
    min-height: 7rem;
    padding: 0.75rem 0.8rem;
    font-size: clamp(0.96rem, 1.1vw, 1.06rem);
    line-height: 1.14;
    transform: translate3d(0.45rem, 0.45rem, 0) rotate(2deg) scale(0.97);
    transform-origin: top left;
  }

  .memory-card.is-revealed .memory-card__note,
  .memory-card:focus-visible .memory-card__note {
    transform: translate3d(0, 0, 0) rotate(2deg) scale(1);
  }
}

@media (min-width: 721px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .memory-card:hover .memory-card__note {
    transform: translate3d(0, 0, 0) rotate(2deg) scale(1);
  }
}

@media (max-width: 850px) {
  .about-hero { min-height: auto; padding-top: 7.8rem; padding-bottom: 6rem; }
  .about-hero__grid { min-height: clamp(34rem, 70svh, 43rem); }
  .about-story-layout { gap: 3.5rem; }
  .about-story-step { min-height: min(70svh, 35rem); }
}

@media (max-width: 720px) {
  .about-hero {
    display: block;
    min-height: auto;
    padding-top: 6.5rem;
    padding-bottom: 4.5rem;
  }
  .about-hero__grid {
    display: flex;
    min-height: 0;
    flex-direction: column;
    gap: 2rem;
  }
  .about-hero__copy {
    max-width: 34rem;
    text-align: center;
  }
  .about-hero__copy h1 { max-width: 13ch; margin-inline: auto; text-align: center; }
  .hero-action--story { margin-inline: auto; }

  .about-story-layout { grid-template-columns: 1fr; }
  .about-story-visual {
    position: relative;
    top: auto;
    width: min(100%, 22rem);
    margin: 0 auto 2.75rem;
  }
  .about-story-copy { gap: 3rem; }
  .about-story-step {
    min-height: auto;
    border-left: 0;
    padding: 0;
    color: var(--ink);
    opacity: 1;
    transform: none;
  }
  .about-story-step.is-active { transform: none; }

  .memory-collage {
    display: block;
    width: min(100%, 48rem);
    height: auto;
    min-height: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }
  .memory-collage__track {
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    justify-content: flex-start;
    width: max-content;
    min-width: 100%;
    height: auto;
    gap: clamp(1.35rem, 5vw, 2rem);
    min-height: 0;
    padding: 10rem 1.25rem 1.7rem;
    animation: none;
    transform: none;
    will-change: auto;
  }
  .memory-collage .memory-card {
    position: relative;
    inset: auto;
    width: clamp(11rem, 60vw, 13rem);
    margin: 0;
    aspect-ratio: 1;
    overflow: visible;
  }
  .memory-card__note {
    top: auto;
    bottom: calc(100% + 0.7rem);
    width: min(8.5rem, calc(100% - 2rem));
  }
}

@media (min-width: 721px) and (max-width: 800px) {
  .memory-collage__track {
    justify-content: flex-start;
    animation: none;
    transform: none;
  }
}

@media (max-width: 620px) {
  .about-hero { padding-top: 6rem; padding-bottom: 5rem; }
  .about-hero__copy h1 { font-size: clamp(3rem, 13.2vw, 4.35rem); }
  .about-section-heading h2 { font-size: clamp(2.55rem, 12vw, 4rem); }
  .about-story-step > p:last-child { font-size: 1.25rem; }
}

@media (max-width: 460px) {
  .memory-collage__track { gap: 1.25rem; padding-inline: 1.25rem; }
  .memory-collage .memory-card {
    width: min(64vw, 13rem);
    aspect-ratio: 1;
    margin: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .about-story-step,
  .about-story-step.is-active,
  .memory-card {
    color: var(--ink);
    opacity: 1;
    transform: none;
    transition: none;
  }

  .memory-collage {
    height: auto;
    overflow: visible;
  }

  .memory-collage__track {
    width: 100%;
    min-width: 0;
    height: auto;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-end;
    padding: 9rem 0 0;
    animation: none;
    transform: none;
    will-change: auto;
  }

  .memory-collage .memory-card {
    width: min(calc(50% - 1rem), 13rem);
    --memory-offset-y: 0px;
  }

  .memory-card__note {
    transform: translate3d(-50%, 0, 0) rotate(2deg);
    transition: opacity 150ms var(--ease-out);
  }

  .memory-card.is-revealed .memory-card__note {
    transform: translate3d(-50%, 0, 0) rotate(2deg);
  }

  .memory-card:focus-visible .memory-card__note {
    transform: translate3d(-50%, 0, 0) rotate(2deg);
  }

  .about-story-step.is-active { transform: none; }
}

@media (prefers-reduced-motion: reduce) and (min-width: 721px) {
  .memory-collage__track {
    align-items: flex-start;
    padding: 3rem 1.75rem 1rem;
  }

  .memory-card__note,
  .memory-card.is-revealed .memory-card__note,
  .memory-card:focus-visible .memory-card__note {
    transform: translate3d(0, 0, 0) rotate(2deg);
  }
}

/* Team-up case study */
body.teamup-page {
  --teamup-lime: #d6d85d;
  --teamup-lime-dark: #a8aa2a;
  --teamup-orange: #f68537;
  --teamup-orange-dark: #d9611b;
  --teamup-surface: #fbfcf0;
  --teamup-text: #2c3319;
  --teamup-space-label: 0.7rem;
  --teamup-space-paragraph: 1rem;
  --teamup-space-list: clamp(0.65rem, 1.2vw, 1rem);
  --teamup-space-content: clamp(1.5rem, 3vw, 2.25rem);
  --teamup-space-module: clamp(3rem, 6vw, 5rem);
  --teamup-space-feature: clamp(4rem, 8vw, 7rem);
  --teamup-space-section: clamp(5rem, 10vw, 9rem);
  background-color: var(--paper);
  background-image: none;
  color: var(--ink);
}

.teamup-page main { overflow: clip; }

.teamup-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.1rem;
  border-bottom: 0;
  padding: 0.9rem var(--page-pad);
  background: var(--teamup-text);
}

.teamup-header__edge-link {
  position: relative;
  display: inline-flex;
  gap: 0.5rem;
  min-height: 1.4rem;
  align-items: center;
  color: #fffdf9;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.teamup-header__edge-link::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: currentColor;
  content: "";
  opacity: 0;
  transform: scaleX(0.45);
  transition: transform 160ms ease, opacity 160ms ease;
}

.teamup-header__edge-link > span { display: inline-block; }

.teamup-header__edge-link:focus-visible {
  outline: 2px solid var(--teamup-orange-dark);
  outline-offset: 0.25rem;
}

.teamup-header__edge-link:active { transform: scale(0.97); }

.teamup-page h1,
.teamup-page h2,
.teamup-page h3,
.teamup-page h4,
.teamup-page p { margin-top: 0; }

.teamup-hero {
  position: relative;
  display: grid;
  width: 100%;
  min-height: calc(100svh - 4.1rem);
  margin: 0;
  overflow: clip;
  padding: clamp(3.6rem, 7.5vw, 7.4rem) var(--page-pad) clamp(4.4rem, 8vw, 7.2rem);
  background: var(--teamup-text);
  color: #fffdf9;
}

.teamup-hero > * {
  width: min(100%, 77rem);
  margin-right: auto;
  margin-left: auto;
}

.teamup-kicker,
.teamup-section-label {
  margin-bottom: var(--teamup-space-label);
  color: #b95b42;
  font-family: var(--hand);
  font-size: clamp(1.3rem, 2.1vw, 1.65rem);
  font-weight: 700;
  line-height: 1;
}

.teamup-kicker { transform: rotate(-1.25deg); transform-origin: left center; }

/* The title sits first and the screen panel slides up over its lower edge;
   the panel's translucent top and backdrop blur let the letters show through. */
.teamup-hero__visual {
  --teamup-hero-panel-height: clamp(25rem, 46vw, 44rem);
  --teamup-hero-panel-inset: clamp(1rem, 3vw, 3rem);
  --teamup-hero-title-size: clamp(5.2rem, 13.2vw, 12.25rem);
  position: relative;
  z-index: 0;
  display: grid;
  isolation: isolate;
  min-height: 0;
}

.teamup-hero h1 {
  position: relative;
  z-index: 0;
  grid-row: 1;
  width: 100%;
  max-width: none;
  margin: 0;
  color: #fffdf9;
  font-size: var(--teamup-hero-title-size);
  font-weight: 650;
  letter-spacing: -0.085em;
  line-height: 0.71;
  text-align: center;
}

.teamup-hero h1 span { color: inherit; }

.teamup-hero__statement {
  max-width: 43rem;
  margin: 0;
  color: #fffdf9;
  font-size: clamp(1.2rem, 1.7vw, 1.55rem);
  letter-spacing: -0.045em;
  line-height: 1.36;
}

.teamup-facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  max-width: none;
  margin: 0;
  border: 0;
  padding: 0;
}

.teamup-facts div {
  min-width: 0;
  border-bottom: 1px solid rgba(255, 253, 249, 0.18);
  padding: 0.76rem 0;
}

.teamup-facts div:first-child { padding-top: 0; }
.teamup-facts dt,
.teamup-persona-card dt {
  margin-bottom: 0.22rem;
  color: var(--ink-soft);
  font-size: 0.65rem;
  font-weight: 760;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.teamup-facts dd,
.teamup-persona-card dd { margin: 0; font-size: 0.84rem; line-height: 1.35; }

.teamup-hero .teamup-facts dt { color: var(--teamup-lime); }
.teamup-hero .teamup-facts dd { color: rgba(255, 253, 249, 0.78); }

.teamup-hero__info {
  display: grid;
  grid-template-columns: minmax(14rem, 0.32fr) minmax(0, 0.68fr);
  align-items: start;
  gap: clamp(2rem, 7vw, 7rem);
  margin-top: var(--teamup-space-module);
  padding-top: clamp(1.3rem, 2.5vw, 2rem);
}

.teamup-hero__summary {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--teamup-space-content);
  padding-left: clamp(1.5rem, 4vw, 4.5rem);
}

.teamup-hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem 1.1rem;
}

.teamup-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-bottom: 1px solid currentColor;
  padding-bottom: 0.22rem;
  color: var(--teamup-text);
  font-size: 0.86rem;
  font-weight: 780;
  letter-spacing: -0.02em;
}

.teamup-link span { display: inline-block; }

.teamup-link--primary {
  border: 1px solid var(--teamup-orange);
  border-bottom-width: 3px;
  padding: 0.72rem 0.92rem 0.58rem;
  background: var(--teamup-orange);
  color: #fffdf9;
}

.teamup-hero .teamup-link { color: #fffdf9; }
.teamup-hero .teamup-link--primary {
  border-color: var(--teamup-lime);
  background: var(--teamup-lime);
  color: var(--teamup-text);
}
.teamup-hero .teamup-link:active { transform: scale(0.97); }

.teamup-hero__media {
  position: relative;
  z-index: 1;
  grid-row: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  justify-items: center;
  gap: clamp(1.2rem, 3.1vw, 3rem);
  width: 100%;
  height: var(--teamup-hero-panel-height);
  margin: calc(var(--teamup-hero-title-size) * -0.18) 0 0;
  padding: var(--teamup-hero-panel-inset);
  overflow: hidden;
  border: 0;
  background: linear-gradient(
    180deg,
    rgba(251, 252, 240, 0.78) 0%,
    rgba(251, 252, 240, 0.94) 44%,
    rgba(251, 252, 240, 0.98) 100%
  );
  box-shadow: 0 1.5rem 3.5rem -2.65rem rgba(10, 13, 5, 0.58);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

.teamup-hero__screen {
  position: relative;
  z-index: 1;
  display: block;
  width: min(100%, clamp(10rem, 18vw, 15.25rem));
  max-height: calc(var(--teamup-hero-panel-height) - (var(--teamup-hero-panel-inset) * 2));
  height: auto;
  opacity: 0.94;
  filter: drop-shadow(0 1.125rem 1.8rem rgba(15, 18, 10, 0.24));
}

.teamup-overview {
  display: grid;
  grid-template-columns: minmax(14rem, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(2.5rem, 8vw, 9rem);
  width: min(100% - (var(--page-pad) * 2), 69rem);
  margin: 0 auto;
  border-block: 1px dashed rgba(31, 35, 32, 0.19);
  padding-block: var(--teamup-space-section);
}

.teamup-section-intro h2,
.teamup-case-section h2,
.teamup-finished h2,
.teamup-reflection h2 {
  margin-bottom: 0;
  color: var(--teamup-text);
  font-size: clamp(2.55rem, 5.4vw, 5.5rem);
  font-weight: 640;
  letter-spacing: -0.075em;
  line-height: 0.92;
}

.teamup-section-intro h2 { max-width: 8ch; }

.teamup-case-section h2 em,
.teamup-finished h2 em,
.teamup-reflection h2 em {
  color: var(--teamup-orange-dark);
  font-family: var(--hand);
  font-size: 1.06em;
  font-style: normal;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.teamup-overview__copy {
  max-width: 40rem;
  color: var(--ink-soft);
  font-size: clamp(1.15rem, 1.75vw, 1.48rem);
  letter-spacing: -0.033em;
  line-height: 1.5;
}

.teamup-overview__copy p + p { margin-top: var(--teamup-space-paragraph); }

.teamup-case-section {
  width: min(100% - (var(--page-pad) * 2), 72rem);
  margin: 0 auto;
  padding-block: var(--teamup-space-section);
}

.teamup-section-heading {
  display: grid;
  grid-template-columns: minmax(11rem, 0.55fr) minmax(0, 1.45fr);
  align-items: start;
  gap: 1.5rem clamp(2rem, 6vw, 7rem);
}

.teamup-section-heading .teamup-section-label { padding-top: 0.3rem; }
.teamup-section-heading h2 { max-width: 12ch; }

.teamup-prose {
  width: min(100%, 46rem);
  margin: var(--teamup-space-content) 0 0 auto;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  letter-spacing: -0.02em;
  line-height: 1.6;
}

.teamup-prose p + p { margin-top: var(--teamup-space-paragraph); }

/* Center the research reading column while keeping its editorial copy left aligned. */
.teamup-case-section--research .teamup-section-heading {
  display: block;
  width: min(100%, 46rem);
  margin-inline: auto;
  text-align: left;
}

.teamup-case-section--research .teamup-section-heading .teamup-section-label {
  margin-bottom: var(--teamup-space-label);
  padding-top: 0;
}

.teamup-case-section--research .teamup-section-heading h2,
.teamup-case-section--research .teamup-insights h2 {
  max-width: 21ch;
  margin: 0;
  font-size: clamp(2rem, 3vw, 3rem);
  letter-spacing: -0.055em;
  line-height: 1.08;
  text-align: left;
}

.teamup-case-section--research .teamup-prose {
  width: min(100%, 46rem);
  margin: var(--teamup-space-content) auto 0;
  text-align: left;
}

/* Keep the ideas, testing, UI and metrics introductions on the same editorial reading column as sections 01 and 02. */
.teamup-case-section--ideas .teamup-section-heading,
.teamup-case-section--metrics .teamup-section-heading,
.teamup-case-section--ui .teamup-section-heading,
.teamup-case-section--testing .teamup-section-heading {
  display: block;
  width: min(100%, 46rem);
  margin-inline: auto;
  text-align: left;
}

.teamup-case-section--ideas .teamup-section-heading .teamup-section-label,
.teamup-case-section--metrics .teamup-section-heading .teamup-section-label,
.teamup-case-section--ui .teamup-section-heading .teamup-section-label,
.teamup-case-section--testing .teamup-section-heading .teamup-section-label {
  margin-bottom: var(--teamup-space-label);
  padding-top: 0;
}

.teamup-case-section--ideas .teamup-section-heading h2,
.teamup-case-section--testing .teamup-section-heading h2,
.teamup-case-section--metrics .teamup-section-heading h2,
.teamup-case-section--ui .teamup-section-heading h2 {
  max-width: 21ch;
  margin: 0;
  font-size: clamp(2rem, 3vw, 3rem);
  letter-spacing: -0.055em;
  line-height: 1.08;
  text-align: left;
}

.teamup-case-section--ideas .teamup-prose,
.teamup-case-section--metrics .teamup-prose,
.teamup-case-section--ui .teamup-prose,
.teamup-case-section--testing .teamup-prose {
  width: min(100%, 46rem);
  margin: var(--teamup-space-content) auto 0;
  text-align: left;
}

.teamup-voice-cards {
  display: grid;
  gap: var(--teamup-space-list);
  width: min(100%, 46rem);
  margin: var(--teamup-space-module) auto 0;
  padding: clamp(0.7rem, 1.6vw, 1.1rem);
  background: #f0f1ec;
}

.teamup-voice-card {
  position: relative;
  display: flex;
  min-height: clamp(7.5rem, 10vw, 9.5rem);
  width: 100%;
  align-items: center;
  margin: 0;
  overflow: visible;
  border: 1px solid rgba(44, 51, 25, 0.12);
  padding: clamp(1.35rem, 2.5vw, 2rem) clamp(1.65rem, 4vw, 3rem);
  background: #fffdf9;
  box-shadow: 0 1.2rem 2.2rem -1.8rem rgba(31, 35, 32, 0.38);
}

.teamup-voice-card:nth-child(odd) {
  justify-content: flex-end;
  padding-left: clamp(4.65rem, 9vw, 6.25rem);
}

.teamup-voice-card:nth-child(even) {
  justify-content: flex-start;
  padding-right: clamp(4.65rem, 9vw, 6.25rem);
}

.teamup-voice-card:nth-child(2) { background: #fff9f3; }
.teamup-voice-card:nth-child(3) { background: #fbfcf0; }

.teamup-voice-card__mark {
  position: absolute;
  z-index: 0;
  top: 50%;
  color: rgba(168, 170, 42, 0.28);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(5.25rem, 10vw, 8rem);
  font-weight: 700;
  line-height: 0.45;
  pointer-events: none;
  transform: translateY(-50%);
}

.teamup-voice-card:nth-child(odd) .teamup-voice-card__mark { left: clamp(-0.95rem, -1vw, -0.35rem); }
.teamup-voice-card:nth-child(even) .teamup-voice-card__mark { right: clamp(-0.95rem, -1vw, -0.35rem); transform: translateY(-50%) scaleX(-1); }
.teamup-voice-card:nth-child(2) .teamup-voice-card__mark { color: rgba(246, 133, 55, 0.28); }
.teamup-voice-card:nth-child(4) .teamup-voice-card__mark { color: rgba(217, 97, 27, 0.24); }

.teamup-voice-card__avatar {
  position: absolute;
  z-index: 1;
  bottom: 0.3rem;
  display: block;
  width: clamp(4rem, 7vw, 5.75rem);
  height: auto;
  pointer-events: none;
  filter: drop-shadow(0 0.35rem 0.55rem rgba(31, 35, 32, 0.14));
}

.teamup-voice-card:nth-child(odd) .teamup-voice-card__avatar { left: 0.45rem; }
.teamup-voice-card:nth-child(even) .teamup-voice-card__avatar { right: 0.45rem; }

/* Nudge the first speaker toward the quote while preserving clear reading space. */
@media (min-width: 621px) {
  .teamup-voice-card:first-child { padding-left: clamp(6rem, 11vw, 8rem); }
  .teamup-voice-card:first-child .teamup-voice-card__avatar {
    bottom: clamp(1rem, 1.5vw, 1.25rem);
    left: clamp(1.15rem, 1.6vw, 1.35rem);
  }
}

.teamup-voice-card p {
  position: relative;
  z-index: 1;
  max-width: 33ch;
  margin: 0;
  color: var(--teamup-text);
  font-size: clamp(1.1rem, 1.5vw, 1.45rem);
  font-style: italic;
  font-weight: 590;
  letter-spacing: -0.045em;
  line-height: 1.25;
  text-align: left;
}

.teamup-insights {
  width: min(100%, 46rem);
  margin: var(--teamup-space-module) auto 0;
  text-align: left;
}

.teamup-insights__copy {
  margin-top: var(--teamup-space-content);
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  letter-spacing: -0.02em;
  line-height: 1.6;
}

.teamup-insights__copy p { margin: 0; }

.teamup-insights__copy ul {
  display: grid;
  gap: var(--teamup-space-list);
  margin: var(--teamup-space-content) 0;
  padding: 0;
  list-style: none;
}

.teamup-insights__copy li {
  position: relative;
  padding-left: 1.2rem;
}

.teamup-insights__copy li::before {
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 0.42rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--teamup-orange);
  content: "";
}

/* The lead-in that closes a list of findings reads as a takeaway. */
.teamup-insights__copy ul ~ p:last-child {
  color: var(--teamup-text);
  font-weight: 640;
}

.teamup-iteration__number {
  display: block;
  margin-bottom: 1.5rem;
  color: var(--teamup-orange-dark);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

/* The idea directions become a small scroll narrative: fixed copy, changing proof. */
.teamup-story {
  position: relative;
  width: min(100%, 72rem);
  margin: var(--teamup-space-module) auto 0;
}

.teamup-story__scene {
  display: grid;
  grid-template-columns: minmax(18rem, 0.82fr) minmax(26rem, 1.18fr);
  align-items: start;
  gap: clamp(3rem, 6vw, 6rem);
}

.teamup-story__copy {
  display: grid;
  gap: var(--teamup-space-feature);
}

.teamup-story__copy-panel { margin: 0; }

.teamup-story__number {
  margin: 0 0 var(--teamup-space-label);
  color: var(--teamup-orange-dark);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.teamup-story__copy-panel h3,
.teamup-ideas-static__copy h3 {
  max-width: 13ch;
  margin: 0;
  color: var(--teamup-text);
  font-size: clamp(2rem, 3.2vw, 3.25rem);
  font-weight: 640;
  letter-spacing: -0.06em;
  line-height: 0.98;
}

.teamup-story__copy-panel > p:last-child,
.teamup-ideas-static__copy > p:last-child {
  max-width: 33ch;
  margin: var(--teamup-space-content) 0 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.35vw, 1.12rem);
  letter-spacing: -0.02em;
  line-height: 1.58;
}

.teamup-story__visuals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: clamp(1rem, 2.4vw, 1.75rem);
  min-width: 0;
}

.teamup-story__column { display: grid; gap: clamp(2.5rem, 5vw, 4rem); }
.teamup-story__column--offset { margin-top: clamp(4rem, 8vw, 6.5rem); }

.teamup-story__column figure { margin: 0; }
.teamup-story__column img {
  display: block;
  width: 100%;
  height: auto;
  border: 0.14rem solid #fffdf9;
  border-radius: clamp(0.5rem, 1vw, 0.8rem);
  background: #fffdf9;
  box-shadow: 0 1.15rem 1.9rem -1.5rem rgba(44, 51, 25, 0.48);
}

/* Hand-placed review notes: a card sits above its target point and the
   arrow drops from the card to that point. --note-shift slides only the card. */
.teamup-story__column figure { position: relative; }

.teamup-note {
  --note-arrow: 2.6rem;
  position: absolute;
  z-index: 1;
  top: var(--note-y);
  left: var(--note-x);
  width: max-content;
  max-width: 11.5rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(31, 35, 32, 0.12);
  border-radius: 0.55rem;
  background: #fbf8ef;
  box-shadow: 0 0.15rem 0.35rem rgba(31, 35, 32, 0.08), 0 1rem 1.8rem -0.8rem rgba(31, 35, 32, 0.38);
  color: #4a4f4b;
  font-size: 0.82rem;
  font-weight: 620;
  letter-spacing: -0.01em;
  line-height: 1.38;
  transform: translate(calc(-50% + var(--note-shift, 0rem)), calc(-100% - var(--note-arrow)));
}

.teamup-note svg {
  position: absolute;
  top: 100%;
  left: calc(50% - var(--note-shift, 0rem));
  width: 1.4rem;
  height: var(--note-arrow);
  overflow: visible;
  fill: none;
  stroke: var(--teamup-orange-dark);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  transform: translateX(-50%);
}

/* UI choices canvas: one dot-grid board (16:10). Group boxes are placed in
   canvas %, pictures inside each group in group %. Hover or focus a group to
   fade the others and show its note beside it. */
.teamup-ui-canvas {
  position: relative;
  aspect-ratio: 16 / 10;
  margin-top: var(--teamup-space-module);
  border-radius: clamp(0.75rem, 1.5vw, 1.25rem);
  background-color: #f3f4ee;
  background-image: radial-gradient(rgba(44, 51, 25, 0.13) 1px, transparent 1.2px);
  background-size: 20px 20px;
}

.teamup-ui-canvas__hint {
  position: absolute;
  top: 1.1rem;
  right: 1.25rem;
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.78rem;
  letter-spacing: -0.01em;
  transition: opacity 160ms ease-out;
}

.teamup-ui-canvas.is-focusing .teamup-ui-canvas__hint { opacity: 0; }

.teamup-ui-group {
  position: absolute;
  top: var(--y);
  left: var(--x);
  width: var(--w);
  height: var(--h);
  margin: 0;
  border-radius: 0.9rem;
  /* Only the pictures catch the pointer, so a group's empty corners never steal hover. */
  pointer-events: none;
  transition: opacity 200ms ease-out;
}

.teamup-ui-group:focus-visible { outline: 2px solid var(--teamup-lime-dark); outline-offset: 6px; }

.teamup-ui-group img {
  position: absolute;
  top: var(--py);
  left: var(--px);
  width: var(--pw);
  height: auto;
  border: 0.14rem solid #fffdf9;
  border-radius: clamp(0.45rem, 0.9vw, 0.75rem);
  background: #fffdf9;
  box-shadow: 0 1.15rem 1.9rem -1.5rem rgba(44, 51, 25, 0.48);
  pointer-events: auto;
  transition: transform 200ms var(--ease-out), box-shadow 200ms ease-out;
}

.teamup-ui-canvas.is-focusing .teamup-ui-group:not(.is-active) { opacity: 0.32; }
.teamup-ui-group.is-active { z-index: 2; }
.teamup-ui-group.is-active img { box-shadow: 0 1.5rem 2.4rem -1.4rem rgba(44, 51, 25, 0.55); transform: translateY(-3px); }

/* Each group's own caption is the accessible text; on the board it stays
   hidden and the floating note copies it. */
.teamup-ui-group__note {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.teamup-ui-canvas__note {
  position: absolute;
  z-index: 3;
  width: min(17rem, 40%);
  padding: 1rem 1.1rem 1.1rem;
  border: 1px solid rgba(31, 35, 32, 0.12);
  border-radius: 0.7rem;
  background: #fbf8ef;
  box-shadow: 0 0.15rem 0.35rem rgba(31, 35, 32, 0.08), 0 1rem 1.8rem -0.8rem rgba(31, 35, 32, 0.38);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px) scale(0.98);
  transition: opacity 120ms ease-out, transform 120ms ease-out;
}

.teamup-ui-canvas__note.is-visible {
  opacity: 1;
  transform: none;
  transition: opacity 180ms var(--ease-out), transform 180ms var(--ease-out);
}

.teamup-ui-canvas__note .teamup-story__number { margin-bottom: 0.45rem; }
.teamup-ui-canvas__note h3,
.teamup-ui-group__note h3 { margin: 0 0 0.4rem; color: var(--teamup-text); font-size: 1.15rem; font-weight: 650; letter-spacing: -0.04em; line-height: 1.15; }
.teamup-ui-canvas__note p:last-child,
.teamup-ui-group__note p:last-child { margin: 0; color: var(--ink-soft); font-size: 0.9rem; line-height: 1.5; }

@media (prefers-reduced-motion: reduce) {
  .teamup-ui-canvas__note,
  .teamup-ui-canvas__note.is-visible,
  .teamup-ui-group.is-active img { transform: none; }
}

/* Phones: no board. Groups stack and each shows its caption under the pictures. */
@media (max-width: 860px) {
  .teamup-ui-canvas { display: grid; gap: 2.5rem; aspect-ratio: auto; padding: 1.25rem; }
  .teamup-ui-canvas__hint,
  .teamup-ui-canvas__note { display: none; }
  .teamup-ui-group {
    position: relative;
    inset: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    width: auto;
    height: auto;
    pointer-events: auto;
  }
  .teamup-ui-group img { position: static; width: auto; max-width: 100%; }
  .teamup-ui-group .g-screen { width: 46%; }
  .teamup-ui-group .g-card { width: 40%; max-width: 11rem; }
  .teamup-ui-group .g-event { width: 48%; }
  .teamup-ui-group__note { position: static; flex-basis: 100%; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
}

.teamup-ideas-static { display: none; }

/* Pinned copy on the left; the lo-fi strip scrolls past on the right and the
   row matching the active copy stays at full strength. */
@media (min-width: 961px) {
  .teamup-story[data-enhanced="true"] .teamup-story__copy {
    position: sticky;
    top: 0;
    display: block;
    height: 100svh;
  }

  .teamup-story[data-enhanced="true"] .teamup-story__copy-panel {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
    transition: opacity 120ms var(--ease-out), visibility 0s linear 120ms;
  }

  .teamup-story[data-enhanced="true"] .teamup-story__copy-panel.is-active {
    opacity: 1;
    visibility: visible;
    transition: opacity 280ms var(--ease-out) 60ms;
  }

  .teamup-story[data-enhanced="true"] .teamup-story__visuals {
    padding-block: clamp(4rem, 12svh, 7rem);
  }

  .teamup-story[data-enhanced="true"] [data-story-item] {
    opacity: 0.3;
    transition: opacity 240ms var(--ease-out);
  }

  .teamup-story[data-enhanced="true"] [data-story-item].is-active { opacity: 1; }

  .teamup-story[data-enhanced="true"] .teamup-note {
    opacity: 0;
    scale: 0.96;
    transform-origin: 50% 100%;
    transition: opacity 160ms var(--ease-out), scale 160ms var(--ease-out);
  }

  .teamup-story[data-enhanced="true"] figure.is-active .teamup-note {
    opacity: 1;
    scale: 1;
    transition: opacity 240ms var(--ease-out) 120ms, scale 240ms var(--ease-out) 120ms;
  }
}

@media (max-width: 960px) {
  .teamup-story--ideas { display: none; }
  .teamup-ideas-static {
    display: grid;
    gap: var(--teamup-space-feature);
    width: min(100%, 46rem);
    margin: var(--teamup-space-module) auto 0;
  }

  .teamup-ideas-static article { display: grid; gap: var(--teamup-space-content); }
  .teamup-ideas-static__copy { max-width: 36rem; }
  .teamup-ideas-static__media {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
    gap: clamp(0.65rem, 2.2vw, 1.15rem);
    max-width: 34rem;
    padding: 0.55rem 0;
  }

  .teamup-ideas-static__media figure { margin: 0; }
  .teamup-ideas-static__media figure:first-child { transform: translateY(-0.5rem); }
  .teamup-ideas-static__media figure:last-child { transform: translateY(0.5rem); }
  .teamup-ideas-static__media img {
    display: block;
    width: 100%;
    border: 0.14rem solid #fffdf9;
    border-radius: clamp(0.45rem, 1vw, 0.75rem);
    background: #fffdf9;
    box-shadow: 0 0.9rem 1.55rem -1.25rem rgba(44, 51, 25, 0.45);
  }

  .teamup-story__summary { display: none; }
}

@media (min-width: 961px) and (prefers-reduced-motion: reduce) {
  .teamup-story[data-enhanced="true"] .teamup-story__copy-panel,
  .teamup-story[data-enhanced="true"] .teamup-story__copy-panel.is-active,
  .teamup-story[data-enhanced="true"] [data-story-item],
  .teamup-story[data-enhanced="true"] .teamup-note,
  .teamup-story[data-enhanced="true"] figure.is-active .teamup-note {
    scale: 1;
    transition: none;
  }
}

.teamup-persona-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 1.85rem);
  margin-top: var(--teamup-space-module);
}

.teamup-persona-card {
  overflow: hidden;
  border: 1px solid rgba(44, 51, 25, 0.18);
  background: #fffdf9;
  box-shadow: 3px 3px 0 rgba(214, 216, 93, 0.32);
}

.teamup-persona-card > img {
  display: block;
  width: 100%;
  aspect-ratio: 1.15 / 0.82;
  object-fit: cover;
  object-position: center 33%;
  filter: saturate(0.86) contrast(0.98);
}

.teamup-persona-card:nth-child(2) > img { object-position: center 45%; }
.teamup-persona-card:nth-child(3) > img { object-position: center 35%; }

.teamup-persona-card__body { padding: 1.2rem; }
.teamup-persona-card__type {
  margin-bottom: 0.35rem;
  color: var(--teamup-orange-dark);
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.teamup-persona-card h3 { margin-bottom: 0.75rem; color: var(--teamup-text); font-size: 1.9rem; letter-spacing: -0.065em; }
.teamup-persona-card blockquote {
  min-height: 5.6rem;
  margin: 0 0 1rem;
  color: var(--ink-soft);
  font-size: 0.93rem;
  font-style: italic;
  letter-spacing: -0.015em;
  line-height: 1.45;
}

.teamup-persona-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  margin: 0;
  border-block: 1px solid rgba(44, 51, 25, 0.12);
  padding-block: 0.75rem;
}

.teamup-persona-card dd { color: var(--teamup-text); font-size: 0.71rem; }
.teamup-persona-card__lists { display: grid; gap: 0.75rem; margin-top: 0.9rem; }
.teamup-persona-card__lists h4 { margin: 0 0 0.25rem; color: var(--teamup-orange-dark); font-size: 0.63rem; letter-spacing: 0.1em; text-transform: uppercase; }
.teamup-persona-card__lists p { margin: 0; color: var(--ink-soft); font-size: 0.78rem; line-height: 1.45; }

.teamup-problem {
  margin-top: 0;
  padding: var(--teamup-space-section) var(--page-pad);
  background: var(--paper);
  color: var(--ink);
}

/* Consecutive research and problem sections share one section-scale transition. */
.teamup-case-section--research + .teamup-problem { padding-top: 0; }

/* Keep the problem statement on the same centered reading column as the research above. */
.teamup-problem__inner { width: min(100%, 46rem); margin: 0 auto; }

.teamup-problem__context,
.teamup-problem__frustrations {
  max-width: 46rem;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  letter-spacing: -0.02em;
  line-height: 1.6;
}

/* The label leads directly into its first content block, as it does in section 01. */
.teamup-problem__context {
  margin-top: 0;
  padding-bottom: var(--teamup-space-module);
}
.teamup-problem__context p,
.teamup-problem__frustrations p { margin: 0; }
.teamup-problem__context p + p { margin-top: var(--teamup-space-paragraph); }

.teamup-problem__question {
  max-width: 21ch;
  margin: 0;
  color: var(--teamup-text);
  font-size: clamp(2rem, 3vw, 3rem);
  font-weight: 640;
  letter-spacing: -0.055em;
  line-height: 1.08;
  text-align: left;
}

.teamup-problem__frustrations { margin-top: var(--teamup-space-content); }
.teamup-problem__frustrations ul {
  display: grid;
  gap: var(--teamup-space-list);
  margin: var(--teamup-space-content) 0;
  padding: 0;
  list-style: none;
}

.teamup-problem__frustrations li {
  position: relative;
  padding-left: 1.2rem;
}

.teamup-problem__frustrations li::before {
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 0.42rem;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--teamup-orange);
  content: "";
}

.teamup-problem__prompt { color: var(--teamup-text); font-weight: 640; }

.teamup-hmw-frame {
  position: relative;
  left: 50%;
  width: min(calc(100vw - (var(--page-pad) * 2)), 72rem);
  margin: var(--teamup-space-content) 0 0;
  border: 1px solid rgba(44, 51, 25, 0.3);
  border-left: clamp(0.3rem, 0.65vw, 0.5rem) solid var(--teamup-lime-dark);
  padding: clamp(1.35rem, 3vw, 2.5rem);
  background: var(--teamup-surface);
  box-shadow: clamp(0.25rem, 0.55vw, 0.5rem) clamp(0.25rem, 0.55vw, 0.5rem) 0 rgba(214, 216, 93, 0.34);
  transform: translateX(-50%);
}

.teamup-hmw-frame::before {
  position: absolute;
  top: -0.22rem;
  left: clamp(1rem, 2.2vw, 1.8rem);
  width: clamp(3rem, 7vw, 5rem);
  height: 0.28rem;
  background: var(--teamup-orange);
  content: "";
}

.teamup-hmw {
  max-width: 32ch;
  margin: 0 auto;
  color: var(--teamup-text);
  font-family: var(--hand);
  font-size: clamp(1.9rem, 3.6vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.04;
}

.teamup-case-section--testing { border-top: 1px dashed rgba(31, 35, 32, 0.19); }
.teamup-iteration-list { display: grid; gap: var(--teamup-space-feature); margin-top: var(--teamup-space-module); }

/* Stacked iteration: copy stays on the section reading column, and each change
   gets a full-width before/after panel underneath. */
.teamup-iteration__intro,
.teamup-change__copy {
  width: min(100%, 46rem);
  margin-inline: auto;
}

.teamup-iteration__intro h3 { margin-bottom: var(--teamup-space-paragraph); color: var(--teamup-text); font-size: clamp(1.75rem, 3vw, 2.7rem); letter-spacing: -0.065em; line-height: 0.98; }
.teamup-iteration__intro > p:last-child,
.teamup-change__copy p {
  margin: 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.4vw, 1.18rem);
  letter-spacing: -0.02em;
  line-height: 1.6;
}

.teamup-change { margin-top: var(--teamup-space-module); }

.teamup-change__copy h4 {
  margin: 0 0 var(--teamup-space-label);
  color: var(--teamup-text);
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  font-weight: 680;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.teamup-compare {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  margin-top: var(--teamup-space-content);
  border-radius: clamp(0.75rem, 1.5vw, 1.25rem);
  overflow: clip;
}

.teamup-compare--even { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.teamup-compare__side {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(1.25rem, 2.5vw, 2rem);
  margin: 0;
  padding: clamp(1.75rem, 4vw, 3.5rem) clamp(1rem, 3vw, 2.5rem);
}

.teamup-compare__side--before { background: #e9e7de; }
.teamup-compare__side--after { background: var(--teamup-text); }

.teamup-compare__label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.teamup-compare__side--before .teamup-compare__label { color: var(--ink-soft); }
.teamup-compare__side--after .teamup-compare__label { color: var(--teamup-lime); }

.teamup-compare__screens {
  display: flex;
  justify-content: center;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  width: 100%;
}

.teamup-compare__screens > img,
.teamup-compare__screen { flex: 0 1 15rem; min-width: 0; }

.teamup-compare__screen { position: relative; }

.teamup-compare__screens img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: clamp(0.6rem, 1.2vw, 1rem);
  background: #fffdf9;
  box-shadow: 0 1.15rem 1.9rem -1.4rem rgba(20, 24, 12, 0.55);
}

/* Side notes sit in the panel beside the screen and point back at it, so the
   screen is nudged left to make room. */
.teamup-compare__screen:has(.teamup-note--side) { margin-right: clamp(8rem, 14vw, 12rem); }

.teamup-note--side {
  max-width: 10.5rem;
  transform: translate(var(--note-arrow), -50%);
}

.teamup-note--side svg {
  top: 50%;
  right: 100%;
  left: auto;
  width: var(--note-arrow);
  height: 1.4rem;
  transform: translateY(-50%);
}

@media (max-width: 720px) {
  .teamup-compare { grid-template-columns: minmax(0, 1fr); }

  /* No room beside the screen on phones: the note becomes a caption below it. */
  .teamup-compare__screen:has(.teamup-note--side) { margin-right: 0; }
  .teamup-note--side {
    position: static;
    width: auto;
    max-width: none;
    margin: 1rem 0 0;
    transform: none;
  }
  .teamup-note--side svg { display: none; }
}


.teamup-case-section--ui { border-top: 1px dashed rgba(31, 35, 32, 0.19); }

/* Copy beside the phone video. The copy starts on the same left edge as the
   case sections' 46rem reading column (centred inside the 72rem page width). */
.teamup-finished {
  --teamup-finished-edge: max(var(--page-pad), calc((100vw - 72rem) / 2));
  display: grid;
  grid-template-columns: minmax(0, 26rem) auto;
  justify-content: space-between;
  align-items: center;
  column-gap: clamp(2.5rem, 6vw, 6rem);
  margin-top: 0;
  padding: var(--teamup-space-section) var(--teamup-finished-edge);
  padding-left: calc(var(--teamup-finished-edge) + max(0px, (min(100vw - var(--page-pad) * 2, 72rem) - 46rem) / 2));
  background: #f4f4d4;
}

.teamup-finished__copy h2 { max-width: 21ch; margin-bottom: var(--teamup-space-content); font-size: clamp(2rem, 3vw, 3rem); letter-spacing: -0.055em; line-height: 1.08; }
.teamup-finished__copy > p:not(.teamup-section-label) { margin-bottom: var(--teamup-space-content); color: var(--ink-soft); font-size: clamp(1rem, 1.4vw, 1.18rem); letter-spacing: -0.02em; line-height: 1.6; }
/* The walkthrough plays inside a phone frame sized to the viewport height. */
.teamup-finished__media {
  display: grid;
  justify-items: center;
  gap: 1rem;
  margin: 0;
}

.teamup-phone {
  width: min(100%, calc(min(76svh, 44rem) * 0.4587));
  padding: 0.6rem;
  border-radius: clamp(2rem, 4vw, 2.75rem);
  background: var(--teamup-text);
  box-shadow: 0 0 0 1px rgba(255, 253, 249, 0.08) inset, 0 2rem 3.5rem -2rem rgba(44, 51, 25, 0.55);
}

.teamup-phone video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: clamp(1.5rem, 3.2vw, 2.2rem);
  background: #fbfcf0;
}

.teamup-video-toggle {
  min-height: 2.5rem;
  padding: 0 1rem;
  border: 1px solid rgba(44, 51, 25, 0.22);
  border-radius: 999px;
  background: #fffdf9;
  color: var(--teamup-text);
  font: 700 0.78rem/1 Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background-color 150ms ease-out, border-color 150ms ease-out;
}

.teamup-video-toggle:focus-visible { outline: 2px solid var(--teamup-lime-dark); outline-offset: 3px; }
.teamup-video-toggle:active { transform: scale(0.97); }

@media (hover: hover) and (pointer: fine) {
  .teamup-video-toggle:hover { border-color: var(--teamup-text); }
}

.teamup-metrics-table-wrap { width: min(100%, 46rem); margin: var(--teamup-space-content) auto 0; overflow-x: auto; border: 1px solid rgba(44, 51, 25, 0.16); background: #fffdf9; }
.teamup-metrics-table { width: 100%; min-width: 44rem; border-collapse: collapse; color: var(--teamup-text); }
.teamup-metrics-table th,
.teamup-metrics-table td { padding: 1.15rem 1.2rem; border-bottom: 1px solid rgba(44, 51, 25, 0.14); text-align: left; vertical-align: top; }
.teamup-metrics-table thead th { background: var(--teamup-text); color: #fffdf9; font-size: 0.7rem; letter-spacing: 0.09em; text-transform: uppercase; }
.teamup-metrics-table tbody th { width: 24%; font-size: 0.87rem; letter-spacing: -0.02em; }
.teamup-metrics-table td { color: var(--ink-soft); font-size: 0.86rem; line-height: 1.45; }
.teamup-metrics-table tr:last-child th,
.teamup-metrics-table tr:last-child td { border-bottom: 0; }

/* Same centred reading column as the case sections above. */
.teamup-reflection {
  width: min(100% - (var(--page-pad) * 2), 72rem);
  margin: 0 auto;
  border-top: 1px dashed rgba(31, 35, 32, 0.19);
  padding-block: var(--teamup-space-section);
}

.teamup-reflection > * { width: min(100%, 46rem); margin-inline: auto; }
.teamup-reflection > .teamup-section-label { margin-bottom: var(--teamup-space-label); }
.teamup-reflection h2 {
  max-width: 21ch;
  margin-bottom: var(--teamup-space-content);
  font-size: clamp(2rem, 3vw, 3rem);
  letter-spacing: -0.055em;
  line-height: 1.08;
}
.teamup-reflection__copy { color: var(--ink-soft); font-size: clamp(1rem, 1.4vw, 1.18rem); letter-spacing: -0.02em; line-height: 1.6; }
.teamup-reflection__copy p + p { margin-top: var(--teamup-space-paragraph); }

.teamup-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 1.5rem;
  border-top: 1px dashed rgba(31, 35, 32, 0.19);
  padding: clamp(2.5rem, 5vw, 4rem) var(--page-pad) max(2.5rem, env(safe-area-inset-bottom, 0px));
}

.teamup-footer p { margin: 0; color: var(--ink-soft); font-family: var(--hand); font-size: clamp(1.35rem, 2.4vw, 1.8rem); line-height: 1; }
.teamup-footer a { border-bottom: 1px solid currentColor; padding-bottom: 0.25rem; color: var(--teamup-text); font-size: 0.95rem; font-weight: 760; }

.teamup-progress {
  position: fixed;
  z-index: 15;
  top: 50%;
  right: max(0.55rem, env(safe-area-inset-right));
  display: none;
  grid-template-areas: "rail";
  width: 1.25rem;
  transform: translateY(-50%);
}

.teamup-progress__count {
  position: absolute;
  bottom: calc(100% + 0.7rem);
  left: 50%;
  margin: 0;
  color: var(--teamup-orange-dark);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  transform: translateX(-50%);
  white-space: nowrap;
}

.teamup-progress__track,
.teamup-progress__steps {
  grid-area: rail;
  width: 1px;
  height: clamp(15rem, 38vh, 24rem);
}

.teamup-progress__track {
  position: relative;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(44, 51, 25, 0.2);
}

.teamup-progress__fill {
  position: absolute;
  inset: 0;
  display: block;
  background: var(--teamup-orange);
  transform: scaleY(0);
  transform-origin: top;
  will-change: transform;
}

.teamup-progress__steps {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  margin: 0;
  padding: 0;
  list-style: none;
}

.teamup-progress__step {
  position: relative;
  display: grid;
  width: 1.25rem;
  height: 1.25rem;
  place-items: center;
  margin-left: -0.59rem;
  color: var(--teamup-text);
}

.teamup-progress__step::before {
  width: 0.38rem;
  aspect-ratio: 1;
  border: 1px solid rgba(44, 51, 25, 0.42);
  border-radius: 50%;
  background: var(--paper);
  content: "";
}

.teamup-progress__step[aria-current="step"]::before {
  border-color: var(--teamup-orange-dark);
  background: var(--teamup-orange);
  box-shadow: 0 0 0 0.2rem rgba(246, 133, 55, 0.2);
}

.teamup-progress__step > span {
  position: absolute;
  top: 50%;
  right: calc(100% + 0.55rem);
  border: 1px solid rgba(44, 51, 25, 0.14);
  padding: 0.3rem 0.42rem;
  background: rgba(253, 252, 248, 0.96);
  color: var(--teamup-text);
  font-size: 0.56rem;
  font-weight: 780;
  letter-spacing: 0.06em;
  opacity: 0;
  pointer-events: none;
  text-transform: uppercase;
  transform: translate(0.25rem, -50%);
  white-space: nowrap;
}

.teamup-progress__step:focus-visible {
  outline: 2px solid var(--teamup-orange-dark);
  outline-offset: 0.16rem;
}

.teamup-progress__step:focus-visible > span {
  opacity: 1;
  transform: translate(0, -50%);
}

@media (min-width: 960px) {
  .teamup-progress { display: grid; }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .teamup-progress__step > span { transition: opacity 140ms var(--ease-out), transform 140ms var(--ease-out); }
  .teamup-progress__step:hover > span,
  .teamup-progress__step:focus-visible > span { opacity: 1; transform: translate(0, -50%); }
  .teamup-progress__step:hover::before { border-color: var(--teamup-orange-dark); }
}

@media (prefers-reduced-motion: reduce) {
  .teamup-progress__fill { will-change: auto; }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .teamup-header__edge-link:hover::after { opacity: 1; transform: scaleX(1); }
  .teamup-header__edge-link > span { transition: transform 160ms var(--ease-out); }
  .teamup-header__edge-link--home:hover > span:first-child { transform: translateX(-0.16rem); }
  .teamup-header__edge-link--next:hover > span:last-child { transform: translateX(0.16rem); }
  .teamup-link { transition: transform 160ms var(--ease-out), color 160ms ease, background-color 160ms ease; }
  .teamup-link:hover { color: var(--teamup-orange-dark); }
  .teamup-link--primary:hover { background: var(--teamup-orange-dark); color: #fffdf9; transform: translateY(-0.15rem); }
  .teamup-hero .teamup-link:hover { color: var(--teamup-lime); }
  .teamup-hero .teamup-link--primary:hover { border-color: var(--teamup-orange); background: var(--teamup-orange); color: var(--teamup-text); }
  .teamup-persona-card { transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out); }
  .teamup-persona-card:hover { box-shadow: 5px 7px 0 rgba(214, 216, 93, 0.44); transform: translateY(-0.3rem); }
}

@media (max-width: 920px) {
  .teamup-hero {
    min-height: auto;
    padding-block: 3.75rem 4.8rem;
  }

  .teamup-hero__media { max-width: none; transform: none; }
  .teamup-hero__info { grid-template-columns: 1fr; gap: 2rem; }
  .teamup-hero__summary { padding-top: 1.5rem; padding-left: 0; }
  .teamup-overview,
  .teamup-section-heading { grid-template-columns: 1fr; gap: 1.25rem; }
  .teamup-section-heading .teamup-section-label { padding-top: 0; }
  .teamup-prose { margin-left: 0; }
  .teamup-persona-grid { grid-template-columns: 1fr; max-width: 37rem; }
  .teamup-persona-card { display: grid; grid-template-columns: minmax(10rem, 0.72fr) minmax(0, 1.28fr); }
  .teamup-persona-card > img { height: 100%; aspect-ratio: auto; }
  .teamup-finished { grid-template-columns: 1fr; padding-inline: var(--page-pad); }
  .teamup-finished__copy { width: min(100%, 46rem); margin-inline: auto; }
  .teamup-finished__media { margin-top: var(--teamup-space-module); }
}

@media (max-width: 620px) {
  body.teamup-page {
    --teamup-space-paragraph: 0.9rem;
    --teamup-space-list: 0.65rem;
    --teamup-space-content: 1.25rem;
    --teamup-space-module: 2.5rem;
    --teamup-space-feature: 3.25rem;
    --teamup-space-section: 4rem;
  }
  .teamup-header { min-height: 3.8rem; padding-block: 0.75rem; }
  .teamup-header__edge-link { font-size: 0.65rem; }
  .teamup-hero { width: 100%; padding-block: 3.2rem 3.65rem; }
  .teamup-hero__visual {
    --teamup-hero-panel-height: clamp(18.5rem, 76vw, 23rem);
    --teamup-hero-panel-inset: clamp(0.55rem, 2.5vw, 0.9rem);
    --teamup-hero-title-size: clamp(4.15rem, 20vw, 6.6rem);
    min-height: 0;
    aspect-ratio: auto;
  }
  .teamup-hero__media {
    gap: clamp(0.45rem, 2vw, 0.8rem);
  }
  .teamup-hero__screen { width: min(100%, clamp(5.75rem, 23.5vw, 7.75rem)); }
  .teamup-facts { grid-template-columns: 1fr; gap: 0; }
  .teamup-hero__statement { font-size: 1.1rem; }
  .teamup-section-intro h2,
  .teamup-case-section h2 { font-size: clamp(2.65rem, 12.8vw, 4rem); }
  .teamup-overview { width: min(100% - (var(--page-pad) * 2), 34rem); }
  .teamup-case-section,
  .teamup-reflection { width: min(100% - (var(--page-pad) * 2), 34rem); }
  .teamup-voice-cards { gap: var(--teamup-space-list); margin-top: var(--teamup-space-module); padding: 0.55rem; }
  .teamup-voice-card,
  .teamup-voice-card:nth-child(odd),
  .teamup-voice-card:nth-child(even) {
    width: 100%;
    min-height: 7rem;
    justify-content: flex-start;
    margin-inline: 0;
    padding: 1.15rem 1.1rem 1.15rem 4rem;
  }
  .teamup-voice-card__mark,
  .teamup-voice-card:nth-child(even) .teamup-voice-card__mark {
    right: auto;
    left: -0.55rem;
    font-size: 6.5rem;
    transform: translateY(-50%);
  }
  .teamup-voice-card__avatar,
  .teamup-voice-card:nth-child(even) .teamup-voice-card__avatar {
    right: auto;
    bottom: 0.2rem;
    left: 0.25rem;
    width: 3.25rem;
  }
  .teamup-voice-card p { max-width: 30ch; font-size: clamp(1.05rem, 4.3vw, 1.25rem); }
  .teamup-persona-card { display: block; }
  .teamup-persona-card > img { height: auto; aspect-ratio: 1.25 / 0.78; }
  .teamup-persona-card blockquote { min-height: auto; }
  .teamup-ideas-static__copy h3 { font-size: clamp(1.9rem, 9vw, 2.55rem); }
  .teamup-ideas-static__media { max-width: 100%; padding: 0.55rem 0; }
  .teamup-iteration__intro h3 { font-size: clamp(1.7rem, 8.5vw, 2.45rem); }
  .teamup-metrics-table-wrap { width: calc(100% + (var(--page-pad) * 2)); margin-left: calc(var(--page-pad) * -1); border-inline: 0; }
  .teamup-finished__media { width: 100%; }
  .teamup-footer { align-items: flex-start; flex-direction: column; gap: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .teamup-page *,
  .teamup-page *::before,
  .teamup-page *::after { scroll-behavior: auto; }
}

/* ---------- Case-study pieces shared beyond Team-up ---------- */

/* An image on the reading column (or the full section width with --wide). */
.teamup-figure {
  width: min(100%, 46rem);
  margin: var(--teamup-space-content) auto 0;
}

.teamup-figure--wide { width: 100%; }
.teamup-figure--narrow { width: min(100%, 30rem); }

.teamup-figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(44, 51, 25, 0.12);
  border-radius: clamp(0.5rem, 1vw, 0.8rem);
  background: #fff;
}

/* Before/after panels holding desktop screenshots: one wide image per side. */
.teamup-compare--desktop .teamup-compare__screens > img { flex: 1 1 100%; }

.teamup-change__copy .teamup-iteration__number { margin-bottom: var(--teamup-space-label); }

.teamup-change__list {
  display: grid;
  gap: var(--teamup-space-list);
  margin: var(--teamup-space-content) 0 0;
  padding: 0;
  color: var(--ink-soft);
  font-size: clamp(0.98rem, 1.25vw, 1.08rem);
  line-height: 1.55;
  list-style: none;
}

.teamup-change__list li { position: relative; padding-left: 1rem; }
.teamup-change__list li::before { position: absolute; top: 0.62em; left: 0; width: 0.38rem; aspect-ratio: 1; border-radius: 50%; background: var(--teamup-orange); content: ""; }
.teamup-change__list strong { color: var(--teamup-text); font-weight: 680; }

.teamup-voice-card cite {
  display: block;
  margin-top: 0.6rem;
  color: var(--ink-soft);
  font-size: 0.82rem;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.teamup-voice-card cite::before { content: "— "; }

/* Interview pain points, styled like review cards: rounded white cards of
   alternating widths on a soft panel, the friction tag sitting on each card's
   top edge and the student's name beneath the quote. */
.case-pain-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.4vw, 1.75rem) clamp(0.75rem, 1.6vw, 1.1rem);
  margin: var(--teamup-space-content) 0 0;
  padding: clamp(1.75rem, 3.5vw, 2.75rem) clamp(1rem, 2.5vw, 2rem) clamp(1rem, 2.5vw, 2rem);
  border-radius: clamp(0.75rem, 1.5vw, 1.25rem);
  background: #f3f1ee;
  list-style: none;
}

.case-pain {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1.25rem, 2.8vw, 2.25rem) clamp(1.25rem, 2.4vw, 1.75rem);
  border-radius: clamp(0.85rem, 1.6vw, 1.25rem);
  background: #fff;
}

.case-pain--wide { grid-column: span 7; }
.case-pain--narrow { grid-column: span 5; }

.case-pain__tag {
  position: absolute;
  top: 0;
  left: clamp(1.25rem, 2.8vw, 2.25rem);
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  background: var(--teamup-orange-dark);
  color: #fffdf9;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.04em;
  transform: translateY(-50%);
}

.case-pain blockquote { margin: 0; }
.case-pain blockquote p {
  margin: 0;
  color: var(--teamup-text);
  font-size: clamp(1.02rem, 1.45vw, 1.22rem);
  letter-spacing: -0.015em;
  line-height: 1.6;
}

.case-pain__who {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-style: italic;
  font-weight: 700;
}

.case-pain__who::before { content: "— "; }

@media (max-width: 720px) {
  .case-pain--wide,
  .case-pain--narrow { grid-column: 1 / -1; }
}

/* A single wide hero visual (a laptop) instead of three phones. */
/* A single photo (a laptop on a desk) that fills the panel edge to edge. The image's
   background is extended to the panel's shape, so cover keeps the laptop at its
   original size instead of scaling the device up. */
.teamup-hero__media--single { grid-template-columns: minmax(0, 1fr); padding: 0; background: none; }
.teamup-hero__screen--laptop {
  --teamup-hero-overlap: calc(var(--teamup-hero-title-size) * 0.18);
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  opacity: 1;
  filter: none;
  /* The strip that slides over the title is see-through, so the letters show
     softly (the panel's backdrop blur) before the photo turns solid. */
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0, rgba(0, 0, 0, 0.55) var(--teamup-hero-overlap), #000 calc(var(--teamup-hero-overlap) + 2.5rem));
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0, rgba(0, 0, 0, 0.55) var(--teamup-hero-overlap), #000 calc(var(--teamup-hero-overlap) + 2.5rem));
}

/* Final product with a wide (desktop) recording: copy on the reading column,
   the video full width underneath in a white frame. */
.teamup-finished--stacked {
  display: block;
  padding-left: var(--teamup-finished-edge);
}

.teamup-finished--stacked .teamup-finished__copy { width: min(100%, 46rem); margin-inline: auto; }
.teamup-finished--stacked .teamup-finished__media { margin-top: var(--teamup-space-module); }

.case-video-frame {
  width: 100%;
  padding: clamp(0.5rem, 1.2vw, 0.9rem);
  border-radius: clamp(0.85rem, 1.6vw, 1.25rem);
  background: #fff;
  box-shadow: 0 2rem 3.5rem -2.4rem rgba(43, 32, 27, 0.5);
}

.case-video-frame video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: clamp(0.5rem, 1vw, 0.75rem);
  background: #f7f7f9;
}

/* Short screen-recording clips in place of still screenshots. */
.case-clip {
  display: block;
  width: 100%;
  height: auto;
  border-radius: clamp(0.5rem, 1vw, 0.8rem);
  background: #fffdf9;
  box-shadow: 0 1.15rem 1.9rem -1.4rem rgba(20, 24, 12, 0.55);
  cursor: pointer;
}

.case-clip:focus-visible { outline: 2px solid var(--teamup-lime-dark); outline-offset: 3px; }
.teamup-compare--desktop .teamup-compare__screens > video,
.teamup-compare--desktop .teamup-compare__screen { flex: 1 1 100%; }

/* A hand-drawn style ring around a detail in a screenshot. */
.case-circle {
  position: absolute;
  top: var(--y);
  left: var(--x);
  width: 3.4%;
  aspect-ratio: 1.25;
  border: 1.5px solid var(--teamup-orange);
  border-radius: 50%;
  pointer-events: none;
  transform: translate(-50%, -50%) rotate(-8deg);
}

/* A note that sits below its target, with the arrow pointing up. */
.teamup-note--below { transform: translate(calc(-50% + var(--note-shift, 0rem)), var(--note-arrow)); }
.teamup-note--below svg { top: auto; bottom: 100%; transform: translateX(-50%) rotate(180deg); }

/* ---------- Perusall: same layout, Perusall's brand orange ---------- */
body.case-perusall {
  --teamup-lime: #ffc49f;          /* light peach: labels and buttons on dark */
  --teamup-lime-dark: #e0580a;     /* Perusall orange: rules, borders, focus */
  --teamup-orange: #e0580a;
  --teamup-orange-dark: #b5460a;   /* orange text on paper, AA contrast */
  --teamup-surface: #fdf3ec;
  --teamup-text: #2b201b;          /* warm charcoal: hero, headings, dark panels */
}

.case-perusall .teamup-hmw-frame { box-shadow: clamp(0.25rem, 0.55vw, 0.5rem) clamp(0.25rem, 0.55vw, 0.5rem) 0 rgba(224, 88, 10, 0.22); }
.case-perusall .teamup-voice-card:nth-child(3) { background: #fdf3ec; }
.case-perusall .teamup-voice-card__mark { color: rgba(224, 88, 10, 0.22); }
.case-perusall .teamup-finished { background: #fdf3ec; }

/* Star rating in place of a review card's tag (filled stars in the first span). */
.case-pain__stars {
  position: absolute;
  top: 0;
  left: clamp(1.25rem, 2.8vw, 2.25rem);
  color: #c9cbd3;
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  line-height: 1;
  transform: translateY(-55%);
}

.case-pain__stars span { color: #f2b51c; }

/* Learning experience framework: four layers read left to right. */
.case-framework,
.case-journey {
  margin: var(--teamup-space-content) 0 0;
  padding: clamp(1.25rem, 3vw, 2.25rem);
  border-radius: clamp(0.75rem, 1.5vw, 1.25rem);
  background: var(--teamup-surface);
}

.case-framework figcaption,
.case-journey figcaption { margin-bottom: clamp(1.25rem, 2.5vw, 1.75rem); }
.case-framework figcaption h3,
.case-journey figcaption h3 { margin: 0 0 0.35rem; color: var(--teamup-text); font-size: clamp(1.2rem, 1.8vw, 1.45rem); letter-spacing: -0.04em; }
.case-framework figcaption p,
.case-journey figcaption p { margin: 0; color: var(--ink-soft); font-size: 0.95rem; line-height: 1.5; }

/* Big to small: each layer is narrower and deeper in colour than the one above,
   with a scale from "Big picture" to "Details" down the side. */
.case-framework__body {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(0.75rem, 2vw, 1.5rem);
}

.case-framework__scale {
  position: relative;
  display: flex;
  justify-content: space-between;
  margin: 0;
  padding-left: 0.9rem;
  color: var(--ink-soft);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  /* Vertical text reads top to bottom, so "Big picture" sits at the top and "Details" at the bottom. */
  writing-mode: vertical-rl;
}

/* The line darkens from the big picture (top) to the details (bottom). */
.case-framework__scale::after {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: linear-gradient(180deg, rgba(21, 57, 61, 0.15), var(--teamup-text));
  content: "";
}

.case-framework ol {
  display: grid;
  justify-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.case-framework li {
  display: grid;
  grid-template-columns: minmax(9rem, 0.9fr) minmax(0, 1.4fr) auto;
  align-items: baseline;
  column-gap: clamp(0.75rem, 2vw, 1.5rem);
  box-sizing: border-box;
  padding: clamp(0.9rem, 1.8vw, 1.2rem) clamp(1rem, 2.2vw, 1.5rem);
  border-radius: 0.85rem;
  color: var(--teamup-text);
}

.case-framework li:nth-child(1) { width: 100%; background: #d9f3f3; }
.case-framework li:nth-child(2) { width: 88%; background: #ade4e4; }
.case-framework li:nth-child(3) { width: 76%; background: #60cccc; }
.case-framework li:nth-child(4) { width: 64%; background: var(--teamup-text); color: #fffdf9; }

.case-framework__layer {
  grid-column: 1;
  grid-row: 1 / span 2;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  color: inherit;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.case-framework__layer span { opacity: 0.6; }
.case-framework h4 { grid-column: 2; margin: 0; font-size: clamp(1rem, 1.5vw, 1.15rem); letter-spacing: -0.03em; line-height: 1.2; }
.case-framework li > p:nth-of-type(2) { grid-column: 2; margin: 0.2rem 0 0; font-size: 0.88rem; line-height: 1.45; opacity: 0.85; }

.case-framework__scope {
  grid-column: 3;
  grid-row: 1 / span 2;
  margin: 0;
  font-size: 0.75rem;
  font-weight: 700;
  white-space: nowrap;
  opacity: 0.8;
}

@media (max-width: 860px) {
  .case-framework li { grid-template-columns: minmax(0, 1fr); row-gap: 0.25rem; }
  .case-framework__layer,
  .case-framework h4,
  .case-framework li > p:nth-of-type(2),
  .case-framework__scope { grid-column: 1; grid-row: auto; }
  .case-framework li:nth-child(1) { width: 100%; }
  .case-framework li:nth-child(2) { width: 94%; }
  .case-framework li:nth-child(3) { width: 88%; }
  .case-framework li:nth-child(4) { width: 82%; }
}

/* Ideal learner journey: a table of stages; scrolls sideways on small screens. */
.case-journey__scroll { overflow-x: auto; }

.case-journey table {
  width: 100%;
  min-width: 46rem;
  border-collapse: separate;
  border-spacing: 0.4rem;
  margin: -0.4rem;
  table-layout: fixed;
  color: var(--teamup-text);
  font-size: 0.86rem;
  line-height: 1.45;
}

.case-journey th,
.case-journey td { padding: 0.75rem 0.8rem; border-radius: 0.6rem; text-align: left; vertical-align: top; }
.case-journey tr > :first-child { width: 8.5rem; padding-left: 0; background: none; color: var(--ink-soft); font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.case-journey__phases th { background: var(--teamup-text); color: #fffdf9; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; }
.case-journey__stages th { background: #fff; font-weight: 750; }
.case-journey td { background: #fff; color: var(--ink-soft); }
.case-journey__feel td { color: var(--teamup-text); font-weight: 600; }

/* Engagement curve: one face per stage, placed by engagement level and joined by a line.
   Faces and line share the same inset box, so x/y percentages line up. */
.case-journey__curve td { padding: 0; }

.case-journey__chart {
  position: relative;
  height: clamp(7rem, 11vw, 9rem);
  /* Reaches half a column gap past each edge, so faces sit over their column centres. */
  margin: 0 -0.2rem;
}

.case-journey__chart svg,
.case-journey__chart span { position: absolute; }

.case-journey__chart svg {
  inset: 1.4rem 0;
  width: 100%;
  height: calc(100% - 2.8rem);
  overflow: visible;
}

.case-journey__chart polyline {
  fill: none;
  stroke: var(--teamup-lime-dark);
  stroke-dasharray: 5 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.case-journey__chart span {
  top: calc(1.4rem + (100% - 2.8rem) * var(--y) / 100);
  left: var(--x);
  display: grid;
  width: 2.6rem;
  aspect-ratio: 1;
  place-items: center;
  border: 2px solid var(--teamup-lime-dark);
  border-radius: 50%;
  background: #fff;
  font-size: 1.35rem;
  line-height: 1;
  transform: translate(-50%, -50%);
}

/* Illustrations reused from the books, on a soft strip. */
.case-illustrations {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: center;
  gap: clamp(1.5rem, 5vw, 4rem);
  width: min(100%, 46rem);
  margin: var(--teamup-space-content) auto 0;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border-radius: clamp(0.75rem, 1.5vw, 1.25rem);
  background: var(--teamup-surface);
}

.case-illustrations img { width: auto; height: clamp(5rem, 9vw, 7.5rem); }

/* A subheading inside a section's reading column. */
.case-subhead {
  margin: 0;
  color: var(--teamup-text);
  font-size: clamp(1.2rem, 1.8vw, 1.5rem);
  font-weight: 680;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

/* ---------- AI + Me: same layout, the app's turquoise ---------- */
body.case-aime {
  --teamup-lime: #9fe3e3;          /* light teal: labels on dark */
  --teamup-lime-dark: #2a9d9d;     /* rules, borders, focus */
  --teamup-orange: #e49c24;        /* the app's amber accent (non-text) */
  --teamup-orange-dark: #9b5c08;   /* amber text on paper, AA contrast */
  --teamup-surface: #eef9f9;
  --teamup-text: #15393d;          /* deep teal ink: header, headings, dark panels */
}

/* The hero takes the app's turquoise. It is light, so hero text is ink, not white. */
.case-aime .teamup-hero { background: #60cccc; color: var(--teamup-text); }
.case-aime .teamup-hero h1,
.case-aime .teamup-hero__statement,
.case-aime .teamup-hero .teamup-link,
.case-aime .teamup-hero .teamup-facts dt { color: var(--teamup-text); }
.case-aime .teamup-hero .teamup-facts dd { color: rgba(21, 57, 61, 0.82); }
.case-aime .teamup-facts div { border-bottom-color: rgba(21, 57, 61, 0.2); }
.case-aime .teamup-hero .teamup-link--primary { border-color: var(--teamup-text); background: var(--teamup-text); color: #fffdf9; }
.case-aime .teamup-hmw-frame { box-shadow: clamp(0.25rem, 0.55vw, 0.5rem) clamp(0.25rem, 0.55vw, 0.5rem) 0 rgba(42, 157, 157, 0.25); }
.case-aime .teamup-voice-card__mark { color: rgba(42, 157, 157, 0.24); }

@media (hover: hover) and (pointer: fine) {
  .case-aime .teamup-hero .teamup-link:hover { color: #0b2326; }
  .case-aime .teamup-hero .teamup-link--primary:hover { border-color: #fffdf9; background: #fffdf9; color: var(--teamup-text); }
}

/* ---------- Opening a case study ---------- */
/* Cross-page transition: the clicked card's picture grows into the case study's
   hero panel (and shrinks back on Back) while the rest of the page crossfades.
   Browsers without view transitions simply navigate. */
@view-transition { navigation: auto; }

.gallery-case--teamup .case-media { view-transition-name: case-teamup; }
.gallery-case--readyai .case-media { view-transition-name: case-aime; }
.gallery-case--perusall .case-media { view-transition-name: case-perusall; }
body.teamup-page:not(.case-aime):not(.case-perusall) .teamup-hero__media { view-transition-name: case-teamup; }
.case-aime .teamup-hero__media { view-transition-name: case-aime; }
.case-perusall .teamup-hero__media { view-transition-name: case-perusall; }

::view-transition-group(case-teamup),
::view-transition-group(case-aime),
::view-transition-group(case-perusall) {
  animation-duration: 560ms;
  animation-timing-function: var(--ease-in-out);
}

::view-transition-old(root),
::view-transition-new(root) { animation-duration: 320ms; }

/* Press feedback the moment a card is clicked. */
.gallery-case:not(.gallery-case--coming):active {
  transform: translateY(-0.15rem) scale(0.985);
  transition-duration: 90ms;
}

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .gallery-case:not(.gallery-case--coming):active { transform: none; }
}

/* Colophon: credits + reference sites, shared by every footer */
.site-footer, .teamup-footer { flex-wrap: wrap; }
.site-footer .site-colophon, .teamup-footer .site-colophon {
  display: flex;
  flex: 1 0 100%;
  width: 100%;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  margin-top: 0.75rem;
  padding-top: 1rem;
  border-top: 1px dotted var(--line, rgba(31, 35, 32, 0.19));
  color: var(--ink-soft);
  font-family: inherit;
  font-size: 0.8rem;
  line-height: 1.5;
}
.site-footer .site-colophon p, .teamup-footer .site-colophon p {
  margin: 0;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}
.site-colophon__refs { display: flex; flex-wrap: wrap; gap: 0.25rem 0.9rem; }
.site-colophon__refs span { font-size: 0.72rem; font-weight: 720; letter-spacing: 0.08em; text-transform: uppercase; }
.site-footer .site-colophon a, .teamup-footer .site-colophon a {
  border-bottom: 1px solid transparent;
  padding-bottom: 0;
  color: inherit;
  font-size: inherit;
  font-weight: 600;
  transition: border-color 160ms ease, color 160ms ease;
}
.site-footer .site-colophon a:hover, .teamup-footer .site-colophon a:hover,
.site-footer .site-colophon a:focus-visible, .teamup-footer .site-colophon a:focus-visible { border-bottom-color: currentColor; color: var(--ink); }
