:root {
  --detail-ink: #0d2d55;
  --detail-blue: #213c5d;
  --detail-blue-deep: #172d48;
  --detail-paper: #f7f7f4;
  --detail-line: rgba(13, 45, 85, .18);
  --detail-ease: cubic-bezier(.22, 1, .36, 1);
}

.detail-page {
  background: var(--detail-paper);
  color: var(--detail-ink);
}

.detail-page main { overflow: clip; }

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 10px;
  padding: 12px 16px;
  border-radius: 999px;
  background: #fff;
  color: #111;
  transform: translateY(-150%);
}

.skip-link:focus { transform: none; }

.detail-header {
  position: absolute;
  z-index: 20;
  top: 48px;
  left: clamp(20px, 5.8vw, 88px);
  right: clamp(20px, 5.8vw, 88px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: clamp(22px, 4vw, 72px);
  color: #fff;
  font-size: calc(clamp(.62rem, .64vw, .74rem) + 2px);
  font-weight: 400;
  letter-spacing: -.02em;
  text-transform: uppercase;
}

.detail-header__brand { justify-self: center; width: 124px; line-height: 0; }
.detail-header__brand img { width: 100%; filter: brightness(0) invert(1); }
.detail-header__nav,
.detail-header__utility { display: flex; align-items: center; gap: clamp(12px, 1.6vw, 25px); }
.detail-header__nav { justify-self: start; }
.detail-header__utility { justify-self: end; }
.detail-header__nav span,
.detail-header__nav a,
.detail-header__utility button {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0;
  white-space: nowrap;
}
.detail-header__nav span { cursor: default; }
.detail-header__nav span::after,
.detail-header__nav a::after {
  content: "";
  position: absolute;
  right: 100%;
  bottom: 7px;
  left: 0;
  height: 1px;
  background: currentColor;
  transition: right 180ms ease;
}
.detail-header__nav span:hover::after,
.detail-header__nav a:hover::after,
.detail-header__nav a:focus-visible::after { right: 0; }
.detail-header__utility button {
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-transform: uppercase;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.finish-section {
  --finish-tone: #a9b2bd;
  position: relative;
  min-height: 100svh;
  padding: clamp(114px, 12vw, 168px) clamp(20px, 7.5vw, 118px) clamp(42px, 5vw, 78px);
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 58%, color-mix(in srgb, var(--finish-tone) 24%, transparent), transparent 28%),
    linear-gradient(180deg, #1b1d20, #3f4142 72%, #292d31);
  color: #fff;
}

.finish-section__intro { position: relative; z-index: 3; text-align: center; }
.section-kicker { margin: 0 0 14px; font-size: .76rem; letter-spacing: .02em; }
.finish-section__intro .section-kicker { color: rgba(255,255,255,.58); }
.finish-section__intro h1 {
  position: static;
  display: block;
  height: auto;
  margin: 0 0 12px;
  font-size: clamp(3rem, 5vw, 6rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -.055em;
}

.finish-section__intro > p:last-child { margin: 0; color: rgba(255,255,255,.68); font-size: clamp(.85rem, 1vw, 1rem); }

.finish-stage {
  position: relative;
  top: -72px;
  display: grid;
  grid-template-columns: minmax(230px, .85fr) minmax(360px, 1.35fr) minmax(210px, .8fr);
  align-items: center;
  gap: 3vw;
  max-width: 1440px;
  min-height: clamp(440px, 53vw, 690px);
  margin: 0 auto;
}

.finish-copy { align-self: center; z-index: 3; }
.finish-copy h2 {
  margin: 0 0 24px;
  font-size: clamp(2.3rem, 4vw, 5.2rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -.05em;
}

.finish-copy h2 span { display: block; white-space: nowrap; }

.finish-copy p,
.finish-meta p { margin: 0; color: rgba(255,255,255,.75); font-size: clamp(.88rem, 1.05vw, 1.1rem); line-height: 1.5; }
.finish-copy p { max-width: 37ch; }
.finish-meta { align-self: end; z-index: 3; padding-bottom: 12%; }
.finish-meta strong { color: #fff; font-weight: 400; }

.finish-product {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  height: 100%;
  min-height: 440px;
}

.finish-product__halo {
  position: absolute;
  width: 66%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--finish-tone);
  opacity: .13;
  filter: blur(34px);
  transition: background-color 600ms var(--detail-ease);
}

.finish-product img {
  position: relative;
  width: min(100%, 590px);
  max-height: 64svh;
  object-fit: contain;
  filter: drop-shadow(0 42px 26px rgba(0,0,0,.38));
  transform: translate3d(0, var(--product-shift, 0px), 0);
  transition: filter 500ms var(--detail-ease);
  will-change: transform;
}

.finish-picker {
  position: relative;
  top: -72px;
  z-index: 4;
  display: flex;
  gap: 12px;
  max-width: 1440px;
  margin: -54px auto 0;
}

.finish-swatch {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  padding: 4px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: transparent;
  cursor: pointer;
  transition: border-color 180ms ease, transform 180ms ease;
}

.finish-swatch:hover { transform: translateY(-2px); }
.finish-swatch.is-selected { border-color: #fff; }
.finish-swatch span { width: 100%; height: 100%; border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.finish-swatch[data-finish="silver"] span { background: linear-gradient(135deg, #535960, #d6d9da); }
.finish-swatch[data-finish="graphite"] span { background: linear-gradient(135deg, #111, #5d6266); }
.finish-swatch[data-finish="mist"] span { background: linear-gradient(135deg, #203d5e, #809db3); }
.finish-swatch[data-finish="sand"] span { background: linear-gradient(135deg, #9d927e, #e4ddd0); }

.coffee-section {
  --coffee-product-y: 0px;
  --coffee-product-scale: 1;
  --coffee-bar-mask: 0%;
  --coffee-bar-opacity: 1;
  --coffee-marker-opacity: 1;
  --coffee-controls-y: 0px;
  --coffee-controls-opacity: 1;
  margin-top: -72px;
  padding: 192px clamp(20px, 7.5vw, 118px) clamp(78px, 9vw, 140px);
  overflow: clip;
  background: #fff;
}
.coffee-section__heading {
  display: grid;
  grid-template-columns: 1fr minmax(280px, .62fr);
  gap: 8vw;
  max-width: 1440px;
  margin: 0 auto;
}

.coffee-section__heading h2,
.craft-editorial h2,
.technology-section > h2 {
  margin: 0;
  font-size: clamp(2.6rem, 4.4vw, 5.7rem);
  font-weight: 300;
  line-height: 1.04;
  letter-spacing: -.055em;
}

.coffee-section__heading p { align-self: end; max-width: 48ch; margin: 0; font-size: clamp(.94rem, 1.1vw, 1.15rem); line-height: 1.55; }

.recipe-stage { position: relative; display: grid; place-items: center; max-width: 1260px; min-height: clamp(500px, 59vw, 790px); margin: -55px auto 0; }
.recipe-scale {
  position: absolute;
  top: 45%;
  left: 7%;
  right: 7%;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  height: 48px;
  overflow: hidden;
  border-radius: 999px;
  background: linear-gradient(90deg, #6ed3ef, #dce9b6 27%, #ffd277 52%, #ff7a2e 76%, #eee4dc 76%);
  clip-path: inset(0 var(--coffee-bar-mask) 0 0 round 999px);
  opacity: var(--coffee-bar-opacity);
  will-change: clip-path, opacity;
}

.recipe-scale span { border-right: 2px solid rgba(255,255,255,.78); }
.recipe-marker { position: absolute; z-index: 2; top: calc(45% - 18px); left: 71%; width: 0; height: 0; border-right: 7px solid transparent; border-bottom: 0; border-left: 7px solid transparent; border-top: 11px solid #ff543a; opacity: var(--coffee-marker-opacity); transition: left 180ms linear, opacity 180ms linear; will-change: left, opacity; }
.recipe-machine { position: relative; z-index: 3; display: grid; place-items: start center; height: 100%; transform: translate3d(0, var(--coffee-product-y), 0) scale(var(--coffee-product-scale)); transform-origin: 50% 42%; will-change: transform; }
.recipe-machine > img { width: min(48vw, 570px); max-height: 720px; object-fit: contain; filter: drop-shadow(0 35px 28px rgba(12,29,46,.2)); }
.espresso-cup { position: absolute; bottom: 9%; width: clamp(52px, 6vw, 82px); height: clamp(38px, 4.4vw, 60px); border: 2px solid rgba(13,45,85,.5); border-top: 0; border-radius: 0 0 24px 24px; background: linear-gradient(to bottom, #7d3616 0 18%, #1c0c08 19% 70%, rgba(255,255,255,.46) 71%); box-shadow: 0 14px 18px rgba(0,0,0,.15); }
.espresso-cup::after { content: ""; position: absolute; top: 6px; right: -18px; width: 19px; height: 23px; border: 2px solid rgba(13,45,85,.5); border-left: 0; border-radius: 0 14px 14px 0; }
.steam-lines { position: absolute; z-index: 4; bottom: 16%; display: flex; gap: 9px; }
.steam-lines i { display: block; width: 2px; height: 32px; border-radius: 999px; background: linear-gradient(transparent, rgba(255,255,255,.8), transparent); animation: steam 2.5s ease-in-out infinite; }
.steam-lines i:nth-child(2) { animation-delay: -.7s; }
.steam-lines i:nth-child(3) { animation-delay: -1.4s; }

@keyframes steam { 0%,100% { opacity: 0; transform: translateY(12px) scaleY(.7); } 45% { opacity: .8; } 75% { opacity: 0; transform: translateY(-18px) scaleY(1.1); } }

.recipe-selector { display: flex; justify-content: center; gap: 8px; margin-top: -132px; opacity: var(--coffee-controls-opacity); transform: translate3d(0, var(--coffee-controls-y), 0); will-change: transform, opacity; }
.recipe-button { min-height: 46px; padding: 0 20px; border: 1px solid var(--detail-line); border-radius: 999px; background: transparent; color: var(--detail-ink); cursor: pointer; font-size: .78rem; transition: color 180ms ease, background-color 180ms ease; }
.recipe-button.is-active { background: var(--detail-ink); color: #fff; }

/* Scroll-controlled exploded product: all motion remains inside this section. */
.coffee-section .recipe-machine { transform: none; }
.coffee-section .recipe-selector { position: relative; z-index: 4; transform: none; opacity: 1; }
.coffee-section .recipe-scale { clip-path: none; opacity: 1; background: #eee4dc; }
.coffee-section .recipe-scale::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #6ed3ef, #dce9b6 32%, #ffd277 62%, #ff7a2e); clip-path: inset(0 var(--coffee-fill-rest, 24%) 0 0); }
.coffee-section .recipe-scale span { position: relative; z-index: 1; }
.coffee-section .recipe-marker { opacity: 1; transition: none; }
.recipe-parts { display: none; position: absolute; inset: 0; pointer-events: none; }
.coffee-section.has-scroll-parts .recipe-machine > img { opacity: 0; }
.coffee-section.has-scroll-parts .recipe-parts { display: block; }
.recipe-part { position: absolute; top: 0; left: 0; width: 100%; height: var(--coffee-image-height); object-fit: contain; will-change: transform; }
.recipe-part--lid { clip-path: inset(0 0 calc(100% - var(--coffee-lid-cut)) 0); transform: translate3d(0, var(--coffee-lid-y, 0px), 0); }
.recipe-part--body { clip-path: inset(var(--coffee-lid-cut) 0 calc(100% - var(--coffee-base-cut)) 0); }
.recipe-part--base { clip-path: inset(var(--coffee-base-cut) 0 0 0); transform: translate3d(0, var(--coffee-base-y, 0px), 0); }
.coffee-section.has-scroll-parts .steam-lines { display: none; }
@media (prefers-reduced-motion: reduce) {
  .coffee-section.has-scroll-parts .recipe-machine > img { opacity: 1; }
  .coffee-section.has-scroll-parts .recipe-parts { display: none; }
}

.lifestyle-section { padding: 0 clamp(20px, 7.5vw, 118px) clamp(88px, 10vw, 154px); background: #fff; }
.lifestyle-frame { position: relative; max-width: 1540px; aspect-ratio: 1.75; margin: 0 auto; overflow: hidden; border-radius: clamp(26px, 3vw, 52px); background: var(--detail-blue-deep); }
.lifestyle-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.025); transition: opacity 700ms var(--detail-ease), transform 1100ms var(--detail-ease); }
.lifestyle-image.is-active { opacity: 1; transform: scale(1); }
.lifestyle-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(7,24,43,.56), transparent 52%), linear-gradient(0deg, rgba(7,24,43,.3), transparent 45%); }
.lifestyle-frame h2 { position: absolute; z-index: 2; bottom: 7%; left: 6%; margin: 0; color: #fff; font-size: clamp(2.3rem, 4.2vw, 5.2rem); font-weight: 300; line-height: 1.03; letter-spacing: -.055em; }
.lifestyle-thumbs { position: absolute; z-index: 3; right: 4%; bottom: 4%; display: flex; gap: 10px; }
.lifestyle-thumb { width: clamp(70px, 8vw, 122px); aspect-ratio: 1.4; padding: 0; overflow: hidden; border: 2px solid transparent; border-radius: 12px; background: transparent; cursor: pointer; opacity: .72; transition: border-color 180ms ease, opacity 180ms ease; }
.lifestyle-thumb.is-active { border-color: #fff; opacity: 1; }
.lifestyle-thumb img { width: 100%; height: 100%; object-fit: cover; }

.craft-section { padding: clamp(88px, 10vw, 160px) clamp(20px, 7.5vw, 118px); background: #e8edf2; }
.craft-editorial { display: grid; grid-template-columns: .78fr 1.22fr; align-items: center; gap: clamp(44px, 8vw, 130px); max-width: 1440px; margin: 0 auto; }
.craft-editorial h2 { line-height: 64px; }
.craft-editorial__copy > p:last-child { max-width: 41ch; margin: 28px 0 0; font-size: 1rem; line-height: 1.6; }
.craft-editorial figure { margin: 0; aspect-ratio: 1.22; overflow: hidden; border-radius: clamp(24px, 3vw, 44px); }
.craft-editorial figure img { width: 100%; height: 100%; object-fit: cover; }

.technology-section { padding: clamp(90px, 10vw, 158px) clamp(20px, 7.5vw, 118px) clamp(98px, 11vw, 172px); background: #fff; color: #111; text-align: center; }
.technology-section > h2 { font-size: clamp(2.5rem, 4vw, 5rem); }
.technology-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(28px, 4.5vw, 74px); max-width: 1440px; margin: clamp(58px, 7vw, 104px) auto 0; text-align: left; }
.technology-item img { width: 42px; height: 42px; margin-bottom: 22px; object-fit: contain; filter: brightness(0); }
.technology-item h3 { margin: 0 0 14px; font-size: 1rem; font-weight: 500; line-height: 1.12; }
.technology-item p { margin: 0; color: #5f5f5f; font-size: .82rem; line-height: 1.45; }
.technology-link { display: inline-flex; align-items: center; justify-content: center; gap: 22px; min-height: 52px; margin-top: clamp(58px, 7vw, 92px); padding: 0 28px; border-radius: 999px; background: #111; color: #fff; font-size: .76rem; transition: background-color 180ms ease; }
.technology-link:hover { background: var(--blue); }

.buy-dock { position: fixed; z-index: 40; right: clamp(12px, 2vw, 32px); bottom: calc(clamp(12px, 2vw, 28px) + 72px); display: flex; align-items: center; gap: 12px; min-height: 54px; padding: 5px 5px 5px 8px; border: 1px solid rgba(13,45,85,.16); border-radius: 999px; background: rgba(255,255,255,.8); color: #111; box-shadow: 0 12px 36px rgba(13,45,85,.12); backdrop-filter: blur(16px); transform: translateY(120%); transition: transform 500ms var(--detail-ease); }
.buy-dock.is-visible { transform: none; }
.buy-dock > img { width: 42px; height: 42px; object-fit: contain; }
.buy-dock > span { font-size: .76rem; font-weight: 400; white-space: nowrap; }
.buy-dock > strong { font-size: .72rem; font-weight: 400; white-space: nowrap; }
.buy-dock button { display: flex; align-items: center; gap: 18px; min-height: 44px; padding: 0 19px; border-radius: 999px; background: var(--detail-ink); color: #fff; cursor: pointer; font-size: .72rem; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity 800ms var(--detail-ease), transform 800ms var(--detail-ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.has-scroll-motion .reveal { transition: none; }

@media (max-width: 980px) {
  .finish-stage { grid-template-columns: .9fr 1.15fr; }
  .finish-meta { display: none; }
  .finish-product img { width: 100%; }
  .finish-picker { margin-top: -24px; }
  .technology-grid { grid-template-columns: repeat(2, 1fr); gap: 52px; }
  .craft-editorial { grid-template-columns: 1fr; }
  .craft-editorial__copy { max-width: 660px; }
}

@media (max-width: 720px) {
  .detail-header { top: 20px; left: 20px; right: 20px; grid-template-columns: 1fr auto 1fr; gap: 14px; }
  .detail-header__nav { display: none; }
  .detail-header__utility button:nth-child(-n + 2) { display: none; }
  .detail-header__brand { grid-column: 2; width: 124px; }
  .detail-header__utility { grid-column: 3; }
  .finish-section { padding: 104px 20px 34px; }
  .finish-stage { display: flex; flex-direction: column; gap: 0; min-height: 620px; padding-top: 42px; }
  .finish-copy { width: 100%; }
  .finish-copy h2 { font-size: clamp(2.4rem, 11vw, 4rem); }
  .finish-copy p { max-width: 34ch; font-size: .88rem; }
  .finish-product { width: 100%; min-height: 360px; margin-top: -32px; }
  .finish-product img { width: min(100%, 410px); max-height: 420px; }
  .finish-picker { justify-content: center; margin-top: -30px; }
  .coffee-section { padding-inline: 20px; }
  .coffee-section__heading { grid-template-columns: 1fr; gap: 22px; }
  .coffee-section__heading p { font-size: .94rem; }
  .recipe-stage { min-height: 500px; }
  .recipe-scale { left: -10%; right: -10%; top: 47%; height: 34px; }
  .recipe-marker { top: calc(47% - 14px); }
  .recipe-machine > img { width: min(96vw, 430px); }
  .espresso-cup { bottom: 10%; }
  .lifestyle-section { padding-inline: 20px; }
  .lifestyle-frame { aspect-ratio: .82; }
  .lifestyle-image { object-position: 60% center; }
  .lifestyle-frame h2 { bottom: 15%; left: 7%; }
  .lifestyle-thumbs { right: auto; bottom: 4%; left: 7%; }
  .craft-section { padding-inline: 20px; }
  .technology-section { padding-inline: 20px; }
  .technology-grid { grid-template-columns: 1fr 1fr; gap: 38px 22px; }
  .technology-item p { font-size: .76rem; }
  .buy-dock { left: 12px; right: 12px; justify-content: space-between; }
  .buy-dock > strong { display: none; }
}

@media (max-width: 430px) {
  .finish-section__intro h1 { font-size: 2.8rem; }
  .finish-section__intro > p:last-child { max-width: 28ch; margin-inline: auto; }
  .recipe-selector { gap: 5px; }
  .recipe-button { padding-inline: 13px; }
  .technology-grid { grid-template-columns: 1fr; }
  .technology-item { max-width: 33ch; }
  .buy-dock > img,
  .buy-dock > span { display: none; }
  .buy-dock button { width: 100%; justify-content: space-between; padding-inline: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .finish-product img { transform: none !important; transition: none; }
  .steam-lines { display: none; }
  .lifestyle-image,
  .buy-dock,
  .recipe-marker { transition: none; }
  .recipe-scale { clip-path: none; opacity: 1; }
  .recipe-machine,
  .recipe-selector { transform: none; opacity: 1; }
}
