/* TOPページ（top__） */
.top { padding-top: 0; }

.top__mv {
  position: relative;
  z-index: 2;
  height: 800vh;
  background: transparent;
  color: var(--color-white);
}
.top__mv-sticky {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  height: 100vh;
  height: 100dvh;
  padding-top: 80px;
  overflow: hidden;
  background: var(--color-dark) url("../images/top-hero.webp") center / cover no-repeat;
}
@media (max-width: 767px) {
  .top__mv-sticky { padding-top: 60px; background-image: url("../images/top-hero-sp.webp"); }
}
.top__mv-sticky { transition: opacity 1.4s ease; }
.top__mv.is-out .top__mv-sticky { opacity: 0; pointer-events: none; }
.top__mv-canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s ease; }
.top__mv.is-3d .top__mv-canvas { opacity: 1; }
.top__mv-shade { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(90deg, rgba(26,16,9,.72) 0%, rgba(26,16,9,.25) 45%, rgba(26,16,9,0) 70%), linear-gradient(0deg, rgba(26,16,9,.45), rgba(26,16,9,0) 30%); }
.top__mv-intro { position: relative; will-change: opacity, transform; }
.top__mv-steps { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); pointer-events: none; }
.top__mv-step { position: absolute; left: 0; top: 50%; max-width: 360px; transform: translateY(-50%) translateY(24px); opacity: 0; transition: opacity .7s ease, transform .7s ease; }
.top__mv-step.is-active { opacity: 1; transform: translateY(-50%); }
.top__mv-step-no { display: block; font-family: var(--font-en); font-size: 15px; letter-spacing: 0.4em; opacity: .8; }
.top__mv-step-title { margin: 10px 0 14px; font-family: var(--font-mincho); font-size: 44px; letter-spacing: 0.2em; }
.top__mv-step-text { margin: 0; font-size: 15px; line-height: 2.1; text-align: start; opacity: .92; }
@media (max-width: 767px) {
  .top__mv-steps { top: auto; bottom: 64px; transform: none; }
  .top__mv-step { top: auto; bottom: 0; transform: translateY(24px); }
  .top__mv-step.is-active { transform: none; }
  .top__mv-step-title { font-size: 30px; margin: 6px 0 8px; }
  .top__mv-step-text { font-size: 14px; line-height: 1.9; }
}
.top__mv-dive { position: absolute; inset: 0; overflow: hidden; opacity: 0; pointer-events: none; background: radial-gradient(circle at 50% 50%, #6a3a1a 0, #3b1f0f 55%); }
.top__mv-dive::before, .top__mv-dive::after { content: ""; position: absolute; left: 50%; top: 50%; width: 40vmin; height: 40vmin; margin: -20vmin 0 0 -20vmin; border: 2px solid rgba(255, 220, 170, .35); border-radius: 50%; transform: scale(calc(.3 + var(--d, 0) * 4)); opacity: calc(1 - var(--d, 0)); }
.top__mv-dive::after { transform: scale(calc(.1 + var(--d, 0) * 2.6)); }
.top__mv-scroll { position: absolute; left: 50%; bottom: 24px; display: flex; flex-direction: column; align-items: center; gap: 8px; transform: translateX(-50%); font-family: var(--font-en); font-size: 12px; letter-spacing: 0.4em; opacity: calc(1 - var(--kv-p, 0) * 12); }
.top__mv-scroll i { width: 1px; height: 38px; background: linear-gradient(var(--color-white), transparent); animation: kvScroll 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes kvScroll { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
.top__mv-bar { position: absolute; left: 28px; top: 50%; width: 2px; height: 120px; transform: translateY(-50%); background: rgba(255,255,255,.25); }
.top__mv-bar i { display: block; width: 100%; height: 100%; background: var(--color-white); transform-origin: top; transform: scaleY(var(--kv-p, 0)); }
@media (max-width: 767px) { .top__mv-bar { left: 12px; height: 80px; } }
@media (prefers-reduced-motion: reduce) {
  .top__mv-step { transition: none; }
  .top__mv-scroll i { animation: none; }
}
.top__mv-en { display: block; margin-bottom: 20px; font-family: var(--font-en); font-size: 15px; letter-spacing: 0.4em; }
.top__mv-title { margin: 0; font-family: var(--font-mincho); font-weight: 500; font-size: 56px; line-height: 1.7; letter-spacing: 0.14em; }
@media (max-width: 767px) {
  .top__mv-title { font-size: 32px; }
}
.top__mv-lead { max-width: 480px; margin: 28px 0 0; font-size: 15px; line-height: 2.1; text-align: start; opacity: 0.9; }
@media (max-width: 767px) {
  .top__mv-lead { font-size: 14px; }
}
.top__mv-btn { margin-top: 44px; }
.top__mv .common__btn { background: transparent; border-color: var(--color-white); color: var(--color-white); }
.top__mv .common__btn:hover { background: var(--color-white); color: var(--color-brand); }

.top__concept { position: relative; z-index: 1; margin-top: -100vh; padding-top: 340px; overflow: hidden; }
/* コーヒーの中に沈んでいるように見せる：茶色のもやとぼかしが、ゆっくり晴れる */
.top__concept-tint { position: absolute; left: 0; right: 0; top: 0; height: calc(100vh + 360px); z-index: 3; pointer-events: none; background: rgba(59, 31, 15, .9); -webkit-backdrop-filter: blur(18px) saturate(.8); backdrop-filter: blur(18px) saturate(.8); -webkit-mask-image: linear-gradient(#000 calc(100% - 360px), transparent); mask-image: linear-gradient(#000 calc(100% - 360px), transparent); transition: opacity 2.6s ease .5s, backdrop-filter 2.6s ease .5s, -webkit-backdrop-filter 2.6s ease .5s; }
.top__concept.is-revealed .top__concept-tint { opacity: 0; -webkit-backdrop-filter: blur(0); backdrop-filter: blur(0); }
.top__concept .common__inner { position: relative; }
.top__concept::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 420px; pointer-events: none; background: linear-gradient(#3b1f0f 0, #3b1f0f 30%, rgba(59,31,15,0) 100%); }
.top__concept .common__inner { width: 100%; max-width: none; }
.top__concept-grid { display: grid; grid-template-columns: minmax(0, 56fr) minmax(0, 44fr); align-items: start; }
.top__concept-img { grid-column: 1; grid-row: 1; width: 100%; height: clamp(520px, 52vw, 960px); object-fit: cover; border-radius: 0; box-shadow: none; }
/* 背景色つきのテキスト：画像に少し重ね、少し下へずらして右端の画面いっぱいまで */
.top__concept-card {
  grid-column: 2; grid-row: 1;
  position: relative; z-index: 2;
  margin-left: -10vw;
  margin-top: clamp(80px, 30vw, 900px);
  padding: clamp(40px, 5vw, 96px) max(var(--gutter), 4vw) clamp(40px, 5vw, 96px) clamp(40px, 5vw, 96px);
  background: var(--color-brand-pale);
  box-shadow: 0 24px 60px var(--color-card-shadow);
}
@media (max-width: 767px) {
  .top__concept-grid { grid-template-columns: 1fr; }
  .top__concept-img { height: 360px; }
  .top__concept-card { grid-column: 1; grid-row: 2; margin: -48px 0 0 var(--gutter); padding: 40px var(--gutter) 40px 28px; }
}
.top__text { margin: 0 0 1.6em; font-size: 15px; line-height: 2.2; text-align: start; }
@media (max-width: 767px) {
  .top__text { font-size: 14px; }
}

.top__items { background: var(--color-brand-pale); overflow: clip; }
/* LINEUP：1枚=100vh のカードを sticky で重ねる（次のカードが下からせり上がって覆う） */
.top__item-list { margin: 24px 0 clamp(56px, 8vw, 96px); padding: 0; list-style: none; }
.top__item { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--color-dark); box-shadow: 0 -24px 60px rgba(43, 26, 16, .28); }
.top__item::after { content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: #1a0f08; opacity: calc(var(--p, 0) * .55); }
.top__item-link { transform: scale(calc(1 - var(--p, 0) * .06)); transform-origin: 50% 0; }
.top__item:nth-child(1) .top__item-link { background: var(--color-white); }
.top__item:nth-child(2) .top__item-link { background: var(--color-brand-pale); }
.top__item:nth-child(3) .top__item-link { background: var(--color-dark); color: #f3e8dc; }
.top__item:nth-child(3) { --item-sub: rgba(243, 232, 220, .72); --item-line: rgba(243, 232, 220, .2); --item-accent: #d9a46f; --item-gauge-bg: rgba(243, 232, 220, .18); }
.top__item-link { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); height: 100%; color: inherit; text-decoration: none; }
.top__item-visual { position: relative; overflow: hidden; height: 100%; background: var(--color-dark); }
.top__item-img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2, .7, .2, 1); }
.top__item-link:hover .top__item-img { transform: scale(1.06); }
.top__item-visual::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(0deg, rgba(43, 26, 16, .45), rgba(43, 26, 16, 0) 45%); }
.top__item-no { position: absolute; left: 20px; bottom: 8px; z-index: 1; font-family: var(--font-en); font-size: clamp(56px, 6vw, 96px); line-height: 1; font-weight: 400; color: rgba(255, 255, 255, .92); letter-spacing: .02em; }
.top__item-roast { position: absolute; right: 16px; top: 16px; z-index: 1; padding: 5px 12px; border: 1px solid rgba(255, 255, 255, .7); border-radius: 999px; font-family: var(--font-en); font-size: 12px; letter-spacing: .28em; color: #fff; backdrop-filter: blur(4px); background: rgba(43, 26, 16, .25); }
.top__item-body { display: flex; flex-direction: column; justify-content: center; align-self: center; width: min(100%, 560px); padding: clamp(24px, 4vw, 72px); padding-top: calc(clamp(24px, 4vw, 72px) + 40px); }
@media (max-width: 767px) {
  .top__item-link { grid-template-columns: 1fr; grid-template-rows: 42% 1fr; }
  .top__item-body { width: 100%; align-self: start; justify-content: flex-start; padding: 24px 24px 0; }
  .top__item-text { font-size: 13px; line-height: 1.8; margin-bottom: 14px; }
  .top__item-no { font-size: 48px; }
}
.top__item-note { margin: 0 0 8px; font-size: 13px; color: var(--item-accent, var(--color-brand)); letter-spacing: 0.1em; }
.top__item-name { margin: 0 0 20px; font-family: var(--font-mincho); font-weight: 500; font-size: clamp(26px, 3vw, 44px); letter-spacing: 0.08em; }
.top__item-gauge { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; font-family: var(--font-en); font-size: 12px; letter-spacing: .3em; color: var(--item-sub, var(--color-text-sub)); }
.top__item-gauge div { display: flex; gap: 6px; }
.top__item-gauge i { position: relative; overflow: hidden; width: 22px; height: 6px; border-radius: 3px; background: var(--item-gauge-bg, rgba(138, 75, 36, .18)); }
.top__item-gauge i.is-on::after { content: ""; position: absolute; inset: 0; background: var(--item-accent, var(--color-brand)); }
.top__item-text { margin: 0 0 22px; font-size: 15px; line-height: 2; color: var(--item-sub, var(--color-text-sub)); text-align: start; }
.top__item-price { display: flex; align-items: baseline; gap: 10px; margin: 0; padding-top: 18px; border-top: 1px solid var(--item-line, var(--color-line)); }
.top__item-weight { font-family: var(--font-en); font-size: 14px; letter-spacing: .12em; color: var(--item-sub, var(--color-text-sub)); }
.top__item-yen { font-family: var(--font-en); font-size: 40px; line-height: 1; color: var(--item-accent, var(--color-brand)); }
.top__item-unit { font-size: 12px; color: var(--item-sub, var(--color-text-sub)); }
.top__item-link:hover .top__item-name { color: var(--color-brand-soft); }

.top__roast { overflow: hidden; }
.top__roast .common__inner { width: 100%; max-width: none; }
/* CONCEPT の左右反転：画像は右（右端まで）、テキストカードは左（左端まで）で画像に少し重なる */
.top__roast-grid { display: grid; grid-template-columns: minmax(0, 44fr) minmax(0, 56fr); align-items: start; }
.top__roast-img { grid-column: 2; grid-row: 1; width: 100%; height: clamp(480px, 46vw, 860px); object-fit: cover; border-radius: 0; box-shadow: none; }
.top__roast-card {
  grid-column: 1; grid-row: 1;
  position: relative; z-index: 2;
  margin-right: -10vw;
  margin-top: clamp(60px, 14vw, 420px);
  padding: clamp(40px, 5vw, 96px) clamp(40px, 5vw, 96px) clamp(40px, 5vw, 96px) max(var(--gutter), 4vw);
  background: var(--color-brand-pale);
  box-shadow: 0 24px 60px var(--color-card-shadow);
}
@media (max-width: 767px) {
  .top__roast-grid { grid-template-columns: 1fr; }
  .top__roast-img { grid-column: 1; height: 300px; }
  .top__roast-card { grid-column: 1; grid-row: 2; margin: -48px var(--gutter) 0 0; padding: 40px 28px 40px var(--gutter); }
}
/* スクロールで、画像は右から・カードは左から向かい合うように入る */
.top__roast-grid.is-anim .top__roast-img { opacity: 0; transform: translateX(14vw); transition: transform 1.5s cubic-bezier(.2, .7, .2, 1), opacity 1.2s ease; }
.top__roast-grid.is-anim .top__roast-card { opacity: 0; transform: translateX(-14vw); transition: transform 1.5s cubic-bezier(.2, .7, .2, 1) .15s, opacity 1.2s ease .15s; }
.top__roast-grid.is-anim.is-in .top__roast-img,
.top__roast-grid.is-anim.is-in .top__roast-card { opacity: 1; transform: none; }
.top__point { display: grid; gap: 20px; margin-top: 8px; }
.top__point-item { padding-left: 20px; border-left: 2px solid var(--color-brand); text-align: start; }
.top__point-title { margin: 0 0 4px; font-family: var(--font-mincho); font-size: 17px; }
.top__point-text { margin: 0; font-size: 14px; line-height: 1.9; color: var(--color-text-sub); }

.top__news { background: var(--color-white); }
.top__news-list { max-width: 800px; margin-inline: auto; border-top: 1px solid var(--color-line); }
.top__news-item { display: flex; gap: 28px; padding: 22px 8px; border-bottom: 1px solid var(--color-line); font-size: 14px; }
@media (max-width: 767px) {
  .top__news-item { flex-direction: column; gap: 4px; }
}
.top__news-date { flex: none; font-family: var(--font-en); font-size: 15px; letter-spacing: 0.1em; color: var(--color-brand); }

.top__cta { background: var(--color-dark) url("../images/top-roast.webp") center / cover fixed; position: relative; color: var(--color-white); }
@media (hover: none), (max-width: 767px) { .top__cta { background-attachment: scroll; } }
.top__cta::before { content: ""; position: absolute; inset: 0; background: var(--color-overlay-modal); }
.top__cta .common__inner { position: relative; }
.top__cta .common__heading-ja, .top__cta .common__heading-en { color: var(--color-white); }
.top__cta .common__lead { color: var(--color-white); }
.top__cta .common__btn { background: var(--color-white); }
.top__cta .common__btn:hover { background: var(--color-brand); }

/* ローディング画面 */
html.is-loading { overflow: hidden; }
.kv-loader { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; background: var(--color-dark); color: var(--color-white); transition: opacity .9s ease, visibility .9s ease; }
.kv-loader.is-done { opacity: 0; visibility: hidden; }
.kv-loader__inner { text-align: center; }
.kv-loader__cup { position: relative; width: 64px; height: 56px; margin: 0 auto 28px; border: 2px solid var(--color-white); border-top: 0; border-radius: 0 0 30px 30px; }
.kv-loader__cup::after { content: ""; position: absolute; right: -16px; top: 10px; width: 14px; height: 20px; border: 2px solid var(--color-white); border-left: 0; border-radius: 0 12px 12px 0; }
.kv-loader__bowl { position: absolute; inset: 0; overflow: hidden; border-radius: 0 0 28px 28px; }
.kv-loader__coffee { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: #b8733a; animation: kvFill 2.4s ease-in-out infinite; }
.kv-loader__drop { position: absolute; left: 50%; top: -34px; width: 4px; height: 10px; margin-left: -2px; border-radius: 50%; background: #b8733a; animation: kvDrop 1.2s ease-in infinite; }
.kv-loader__en { margin: 0 0 8px; font-family: var(--font-en); font-size: 14px; letter-spacing: 0.4em; }
.kv-loader__text { margin: 0; font-size: 13px; letter-spacing: 0.2em; opacity: .7; }
@keyframes kvFill { 0% { height: 0; } 80%, 100% { height: 88%; } }
@keyframes kvDrop { 0% { transform: translateY(0); opacity: 1; } 100% { transform: translateY(32px); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .kv-loader__coffee, .kv-loader__drop { animation: none; } .kv-loader__coffee { height: 60%; } }

/* コーヒーの中から浮かび上がる泡 */
.top__bubbles { position: absolute; left: 0; right: 0; top: 0; height: 520px; pointer-events: none; overflow: hidden; -webkit-mask-image: linear-gradient(#000 40%, transparent); mask-image: linear-gradient(#000 40%, transparent); }
.top__bubbles i { position: absolute; left: var(--x); bottom: -40px; width: var(--s); height: var(--s); border-radius: 50%; border: 1px solid rgba(255, 225, 180, .55); background: radial-gradient(circle at 30% 30%, rgba(255, 235, 200, .35), rgba(255, 235, 200, 0) 70%); opacity: 0; animation: kvBubble var(--d) ease-in var(--l) infinite; }
@keyframes kvBubble { 0% { transform: translateY(0) scale(.6); opacity: 0; } 15% { opacity: .9; } 100% { transform: translateY(-520px) scale(1.15); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .top__bubbles i { animation: none; opacity: .5; bottom: 40%; } }

/* コーヒーに飛び込む間はヘッダーを消して、色の境目をなくす */
html.kv-dive .common_header { opacity: 0; pointer-events: none; }
.common_header { transition: opacity .6s ease; }

/* Lenis（慣性スクロール）推奨設定 */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* CONCEPT：左右から向かい合って入る */
.top__concept-grid.is-anim .top__concept-img { opacity: 0; transform: translateX(-14vw); }
.top__concept-grid.is-anim .top__concept-card { opacity: 0; transform: translateX(14vw); }
.top__concept-grid.is-anim.is-in .top__concept-img,
.top__concept-grid.is-anim.is-in .top__concept-card { opacity: 1; transform: none; }
.top__concept-grid.is-anim .top__concept-img { transition: transform 1.5s cubic-bezier(.2, .7, .2, 1), opacity 1.2s ease; }
.top__concept-grid.is-anim .top__concept-card { transition: transform 1.5s cubic-bezier(.2, .7, .2, 1) .15s, opacity 1.2s ease .15s; }

/* ===== 2回目以降：3Dなしの画像KV（html.kv-static） ===== */
html.kv-static .kv-loader { display: none; }
html.kv-static .top__mv { height: auto; z-index: auto; }
html.kv-static .top__mv-sticky { position: relative; height: 100vh; height: 100dvh; background: var(--color-dark); }
html.kv-static .top__mv-sticky::before {
  content: ""; position: absolute; inset: 0;
  background: url("../images/top-hero.webp") center / cover no-repeat;
  transform: scale(1.12); animation: kvStaticZoom 3.4s cubic-bezier(.2, .7, .2, 1) forwards;
}
@media (max-width: 767px) { html.kv-static .top__mv-sticky::before { background-image: url("../images/top-hero-sp.webp"); } }
html.kv-static .top__mv-canvas, html.kv-static .top__mv-dive, html.kv-static .top__mv-steps, html.kv-static .top__mv-bar { display: none; }
html.kv-static .top__mv-shade { z-index: 1; background: linear-gradient(90deg, rgba(26,16,9,.78) 0%, rgba(26,16,9,.4) 45%, rgba(26,16,9,0) 75%), linear-gradient(0deg, rgba(26,16,9,.5), rgba(26,16,9,0) 35%); }
html.kv-static .top__mv-intro { z-index: 2; }
html.kv-static .top__mv-scroll { z-index: 2; opacity: 1; }
html.kv-static .top__mv-en, html.kv-static .top__mv-lead, html.kv-static .top__mv-btn { opacity: 0; animation: kvStaticUp 1s ease forwards; }
html.kv-static .top__mv-en { animation-delay: .3s; }
html.kv-static .top__mv-title { opacity: 0; animation: kvStaticUp 1.1s ease .5s forwards; }
html.kv-static .top__mv-lead { animation-delay: .8s; }
html.kv-static .top__mv-btn { animation-delay: 1.05s; }
@keyframes kvStaticZoom { to { transform: scale(1); } }
@keyframes kvStaticUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }
/* 画像KVの下は通常の流れ。茶色のもやや泡は不要 */
html.kv-static .top__concept { margin-top: 0; padding-top: 120px; }
html.kv-static .top__concept::before, html.kv-static .top__concept-tint, html.kv-static .top__bubbles { display: none; }
@media (prefers-reduced-motion: reduce) {
  html.kv-static .top__mv-sticky::before, html.kv-static .top__mv-en, html.kv-static .top__mv-title, html.kv-static .top__mv-lead, html.kv-static .top__mv-btn { animation: none; opacity: 1; transform: none; }
}

/* LINEUP：カードが画面に重なったら、ゲージが左から1マスずつ塗られる */
.top__item-list.is-anim .top__item-gauge i.is-on::after { transform: scaleX(0); transform-origin: left; }
.top__item-list.is-anim .top__item.is-in i.is-on::after { animation: gaugeFill .45s ease both; }
.top__item-list.is-anim .top__item.is-in i.is-on:nth-child(1)::after { animation-delay: .5s; }
.top__item-list.is-anim .top__item.is-in i.is-on:nth-child(2)::after { animation-delay: .7s; }
.top__item-list.is-anim .top__item.is-in i.is-on:nth-child(3)::after { animation-delay: .9s; }
.top__item-list.is-anim .top__item.is-in i.is-on:nth-child(4)::after { animation-delay: 1.1s; }
.top__item-list.is-anim .top__item.is-in i.is-on:nth-child(5)::after { animation-delay: 1.3s; }
@keyframes gaugeFill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
