.coffee {
  --coffee-paper: #e7d9c5;
  --coffee-ink: #4d342b;
  --coffee-rule: #bca88d;
  --serif: "Noto Serif CJK SC", "Songti SC", STSong, Editorial, SimSun, serif;
  background: var(--coffee-paper);
  color: var(--coffee-ink);
  font-family: var(--serif);
}
.coffee-stage { position: relative; overflow: clip; padding: 32px 7% 44px; }
.coffee-kicker { color: var(--coffee-ink); font: 500 14px/1.4 var(--sans); letter-spacing: .25em; text-transform: uppercase; }
.coffee-title { margin: 16px 0 24px; font-size: clamp(52px, 11vw, 90px); font-weight: 600; line-height: 1.03; letter-spacing: -.075em; }
.coffee-lead { display: block; font-size: .74em; font-weight: 400; }
.coffee-letterline { display: flex; align-items: flex-end; width: 100%; white-space: nowrap; color: #80552f; letter-spacing: 0; }
.coffee-letterline img { display: block; width: 91%; height: auto; flex: none; }
.coffee-letterline span { transform: translate(-.12em, -.16em); font-size: .42em; font-weight: 400; line-height: 1; }
.coffee-portrait { width: min(84%, 390px); margin: 18px auto; aspect-ratio: 3 / 4; }
.coffee-photo > img { display: block; width: 100%; height: auto; }
.coffee-photo:has(> .living-portrait) > img { display: none; }
.coffee-intro { font-size: 17px; line-height: 1.85; }
.coffee-baseline { display: none; }
.coffee-curriculum { margin-top: 32px; }
.coffee-label { margin: 0 0 10px; color: #805e3e; font: 500 14px/1.4 var(--sans); letter-spacing: .2em; }
.coffee-course { display: grid; gap: 4px; align-items: start; padding: 12px 0; border-top: 1px solid var(--coffee-rule); }
.coffee-course h4 { margin: 0; font-size: 22px; line-height: 1.35; font-weight: 650; }
.coffee-course p { font: 400 clamp(14px, 1.12vw, 17px)/1.65 var(--sans); }
.coffee-experience {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: clamp(14px, 2.3vw, 36px);
  margin-top: 22px;
  padding-top: 12px;
  border-top: 1px solid var(--coffee-rule);
}
.coffee-experience .coffee-label { grid-column: 1 / -1; }
.coffee-experiences {
  grid-area: 2 / 1;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) repeat(2, minmax(0, 1fr));
  gap: 10px clamp(10px, 1.8vw, 24px);
}
.coffee-sculpture {
  grid-area: 2 / 2;
  align-self: end;
  width: clamp(76px, 7vw, 108px);
  height: auto;
}
.coffee-experiences h4 { margin: 0 0 3px; font-size: 19px; font-weight: 650; line-height: 1.2; }
.coffee-experiences p { font: 400 clamp(14px, 1vw, 15px)/1.5 var(--sans); }

@media (max-width: 767px) {
  .coffee-experience { grid-template-columns: minmax(0, 1fr); row-gap: 12px; }
  .coffee-experiences { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .coffee-sculpture { grid-area: 3 / 1; justify-self: end; width: 60px; }
}

@media (min-width: 768px) and (min-height: 720px) and (prefers-reduced-motion: no-preference) {
  .scroll-stage .coffee { height: calc(100svh + 1150px); }
  .scroll-stage .coffee-stage { position: sticky; top: 0; height: 100svh; padding: 0; isolation: isolate; }
  .scroll-stage .coffee-portrait {
    position: absolute;
    z-index: 2;
    left: calc(4% + var(--coffee-p) * 1%);
    bottom: calc(3% + var(--coffee-p) * 40%);
    width: min(calc(42% - var(--coffee-p) * 18%), calc(63svh - var(--coffee-p) * 31.5svh));
    margin: 0;
  }
  .scroll-stage .coffee-title {
    position: absolute;
    z-index: 3;
    left: calc(48% - var(--coffee-p) * 19%);
    top: calc(19% - var(--coffee-p) * 4%);
    width: 49%;
    margin: 0;
    transform: scale(calc(1 - var(--coffee-p) * .56));
    transform-origin: top left;
    font-size: clamp(52px, min(8.1vw, 13.7svh), 140px);
  }
  .scroll-stage .coffee-letterline { margin-left: 2%; }
  .scroll-stage .coffee-letterline img { width: 93%; }
  .scroll-stage .coffee-kicker { position: absolute; z-index: 2; left: 49%; top: 15%; opacity: calc(1 - var(--coffee-p)); }
  .scroll-stage .coffee-intro {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 61%;
    width: 38%;
    transform: translateY(calc(var(--coffee-p) * -40px));
    font-size: clamp(17px, 1.7vw, 26px);
    opacity: var(--coffee-intro);
    visibility: var(--coffee-intro-visibility);
  }
  .scroll-stage .coffee-baseline {
    position: absolute;
    z-index: 1;
    inset: 91% 6% auto;
    display: block;
    height: 1px;
    background: var(--coffee-rule);
    opacity: calc(1 - var(--coffee-p));
  }
  .scroll-stage .coffee-curriculum, .scroll-stage .coffee-experience {
    position: absolute;
    z-index: 4;
    right: 6%;
    margin: 0;
    opacity: var(--coffee-q);
    visibility: var(--coffee-reading);
    transform: translateY(calc((1 - var(--coffee-q)) * 25px));
  }
  .scroll-stage .coffee-curriculum { left: 30%; top: 33%; }
  .scroll-stage .coffee-course { grid-template-columns: 36% 1fr; gap: 14px; }
  .scroll-stage .coffee-course h4 { font-size: clamp(17px, 1.7vw, 28px); }
  .scroll-stage .coffee-experience { left: 6%; bottom: 5%; }
  .scroll-stage .coffee-experiences h4 { font-size: clamp(15px, 1.3vw, 21px); }
}
