
:root { --toolbar-height: 0px; }
.motion-toggle {
  position: absolute; z-index: 4; top: clamp(.7rem, 2vw, 1.25rem); right: max(4%, calc((100% - 1240px) / 2));
  min-height: 44px; padding: .55em .85em; border: 1px solid #fff6e7c9; border-radius: 2px;
  background: #271a19e8; color: #fff5e7; font-family: inherit;
  font-size: .77rem; font-weight: 700; cursor: pointer;
}
.motion-toggle[hidden], .roast-controls[hidden] { display: none; }
.motion-toggle:focus-visible, .roast-controls button:focus-visible { outline: 3px solid #b45539; outline-offset: 4px; }
:root {--wine:#501d25;--cream:#fff5e7;}
.stage-journey, .film-journey { position: relative; overflow-anchor: none; --progress: 0; }
.stage-intro, .film-window { isolation: isolate; position: relative; color: var(--cream); background: #2a1417; }
.stage-intro, .film-window {
  min-height: clamp(410px, calc(100svh - var(--toolbar-height)), 1020px);
  display: flex;
  align-items: center;
  overflow: clip;
}
.stage-backdrop, .film-poster, .film-video {
  position: absolute;
  z-index: -2;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 54%;
}
.stage-intro::before, .film-window::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, rgba(30,10,12,.94), rgba(39,16,18,.78) 35%, rgba(35,13,14,.13) 77%),
    linear-gradient(0deg, #291013a6, transparent 32%);
}
.opening-copy {
  width: min(90%, 1240px);
  margin-inline: auto;
  padding: 4rem 0 6rem;
}
.opening-copy h1 { font-size: clamp(3rem, 6.1vw, 6.4rem); line-height: 1.14; letter-spacing: -.055em; }
.opening-brand {
  display: inline-block;
  padding-bottom: .6rem;
  border-bottom: 1px solid #e3bb93;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: .94rem;
  letter-spacing: .13em;
}
.opening-context { margin: 1.3rem 0 .6rem; font-size: .85rem; font-weight: 700; color: #f3cda8; }
.opening-lead { margin-top: 1.1rem; max-width: 29em; font-size: clamp(.91rem, 1.45vw, 1.1rem); }
.opening-copy .cta { margin-top: 1.5rem; background: #f9e4c7; color: #492022; }
.opening-scroll {
  position: absolute;
  left: max(5%, calc((100% - 1240px) / 2));
  bottom: 1rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: .85rem;
  text-underline-offset: .4em;
  font-size: .8rem;
  font-weight: 700;
}

.roast-showcase {
  display: grid;
  align-items: center;
  background: #f7e7d5;
  color: #421e23;
  padding: clamp(2.2rem, 6vw, 6rem) 5%;
}
.roast-inner {
  display: grid;
  grid-template-columns: minmax(0,.82fr) minmax(0,1.18fr);
  gap: clamp(1.4rem, 6vw, 6rem);
  align-items: center;
  width: min(100%, 1160px);
  margin-inline: auto;
}
.roast-title h2 {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-weight: 600;
  font-size: clamp(2.3rem, 5vw, 4.5rem);
  line-height: 1.14;
}
.opening-continue {
  display: inline-block;
  margin-top: 1rem;
  text-underline-offset: .4em;
  font-size: .86rem;
  font-weight: 700;
}
.roast-carousel { min-width: 0; touch-action: pan-y; }
.roast-track { list-style: none; padding: 0; margin: 0; }
.roast-slide {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0,.93fr) minmax(0,1.07fr);
  min-height: 238px;
  background: #fff4e5;
  border: 1px solid #bb9784;
}
.roast-slide + .roast-slide { margin-top: .65rem; }
.roast-slide[hidden] { display: none; }
.roast-carousel:has(.roast-controls:not([hidden])) .roast-slide { margin-top: 0; }
.roast-picture { position: relative; background: #dfc4a4; min-height: 100%; }
.roast-picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 28%; }
.roast-copy { align-self: center; padding: clamp(.85rem, 2.5vw, 2rem); }
.roast-copy p:first-child { color: #825143; font-size: .8rem; font-weight: 700; }
.roast-copy h3 {
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: clamp(1.8rem, 4vw, 3.15rem);
  letter-spacing: -.045em;
  line-height: 1.25;
  margin: .32rem 0 .6rem;
}
.roast-copy p:last-child { font-size: .88rem; }
.roast-controls { display: flex; gap: .8rem; align-items: center; justify-content: space-between; margin-top: .8rem; }
.roast-controls button {
  min-width: 46px;
  min-height: 44px;
  border: 1px solid #a57968;
  border-radius: 50%;
  background: transparent;
  color: var(--wine);
  cursor: pointer;
  font-size: 1.3rem;
}
.roast-controls button:hover { background: #ecd1b9; }
.roast-controls span { font: .9rem Georgia, serif; color: #704535; }

@media (min-height: 520px) {
  .motion-on .stage-journey { min-height: calc(190svh - var(--toolbar-height)); }
  .motion-on .stage-window, .motion-on .film-window {
    position: sticky;
    top: var(--toolbar-height);
    height: calc(100svh - var(--toolbar-height));
  }
  .motion-on .stage-window { isolation: isolate; overflow: clip; }
  .motion-on .stage-intro, .motion-on .roast-showcase { position: absolute; inset: 0; min-height: 0; }
  .motion-on .stage-intro { opacity: calc(1 - var(--progress)); }
  .motion-on .stage-intro > :is(.opening-copy, .opening-scroll) {
    opacity: clamp(0, calc(1 - 3 * var(--progress)), 1);
  }
  .motion-on .roast-inner { opacity: clamp(0, calc(2.7 * (var(--progress) - .37)), 1); }
  .motion-on .stage-backdrop { transform: scale(calc(1 + .12 * var(--progress))); }
  .motion-on .roast-showcase {
    opacity: var(--progress);
    transform: translateY(calc(2rem * (1 - var(--progress))));
  }
  .motion-on .stage-window [inert] { pointer-events: none; }
  .motion-on .roast-slide:not([hidden]) { animation: quiet-in .38s ease-out both; }
  .motion-on .film-journey { min-height: calc(262svh - var(--toolbar-height)); }
}

.film-window::before {
  background:
    linear-gradient(90deg, #210e10ed 0%, #291517b9 32%, #190e0f40 72%),
    linear-gradient(0deg, #211012d9 0%, transparent 37%, transparent 82%, #21101237);
}
.film-poster, .film-video { object-position: 58% center; }
.film-video, .film-meter { visibility: hidden; }
.motion-on .film-window.video-ready .film-video, .motion-on .film-window.video-ready .film-meter { visibility: visible; }
.motion-on .film-load-failed .film-meter { visibility: hidden; }
.film-meter {
  position: absolute;
  right: max(5%, calc((100% - 1240px) / 2));
  bottom: 1.5rem;
  width: min(22%, 235px);
  color: var(--cream);
}
.film-meter > div:first-child {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .55rem;
  font-size: .75rem;
  font-weight: 700;
}
.film-rail { height: 2px; background: #fff4e56b; }
.film-rail span { display: block; height: 100%; width: 100%; background: #fff1dc; transform-origin: left; transform: scaleX(var(--progress)); }

@media (max-width: 760px) {
  .stage-intro, .film-window { align-items: end; }
  .stage-intro::before, .film-window::before {
    background: linear-gradient(0deg, #210e11 0%, #251114e6 26%, #30171980 55%, #37201b22 86%);
  }
  .stage-backdrop, .film-poster, .film-video { object-position: 58% 25%; }
  .opening-copy { padding: 3.1rem 0 5.2rem; }
  .opening-copy h1 { font-size: clamp(2.5rem, 11vw, 4rem); }
  .opening-brand { font-size: .83rem; }
  .opening-context { margin-top: .85rem; font-size: .8rem; }
  .opening-lead { margin-top: .65rem; }
  .opening-copy .cta { margin-top: .9rem; }
  .opening-scroll { bottom: .6rem; font-size: .74rem; }
  .roast-showcase { padding-block: 1.6rem; }
  .roast-inner { grid-template-columns: 1fr; gap: .85rem; }
  .roast-title h2 { font-size: clamp(2rem, 9vw, 3.55rem); }
  .opening-continue { margin-top: .5rem; }
  .roast-slide { min-height: 175px; }
  .roast-picture { min-height: 145px; }
  .roast-copy p:last-child { font-size: .83rem; }
  .film-meter { width: 36%; bottom: .95rem; }
  .film-meter > div:first-child { gap: .3rem; font-size: .64rem; }
}
@media (max-width: 374px) {
  .film-meter > div:first-child { flex-wrap: wrap; }
}
@media (max-height: 650px) and (min-height: 520px) {
  .motion-on .roast-slide { min-height: 148px; }
  .motion-on .roast-showcase { padding-block: 1rem; }
  .opening-copy { padding-block: 2rem 4rem; }
}

.motion-on .film-journey.film-load-failed { min-height: 0; }
.motion-on .film-load-failed .film-window { position: relative; }

@media (max-height: 519px) {
  .version-stage .stage-window .motion-toggle { top: .6rem; }
}

@keyframes quiet-in { from { opacity: .3; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
