/* こもれびシロップ LP — 値は tokens.css（正典は _desk/tokens.json）から読む */

/* ---------- 味ごとの色。割った色は計算済みの値（tokens の flavor） ---------- */
html[data-flavor="ginger"], .flavor--ginger { --syrup: var(--ginger-syrup); --soda: var(--ginger-soda); --hot: var(--ginger-hot); --milk: var(--ginger-milk); }
html[data-flavor="ume"],    .flavor--ume    { --syrup: var(--ume-syrup);    --soda: var(--ume-soda);    --hot: var(--ume-hot);    --milk: var(--ume-milk); }
html[data-flavor="yuzu"],   .flavor--yuzu   { --syrup: var(--yuzu-syrup);   --soda: var(--yuzu-soda);   --hot: var(--yuzu-hot);   --milk: var(--yuzu-milk); }

/* ---------- 土台 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scrollbar-color: var(--color-border) var(--color-bg);
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-family-base);
  font-size: var(--font-base);
  line-height: var(--line-height);
  letter-spacing: var(--tracking-base);
  font-weight: var(--font-weight-normal);
  word-break: auto-phrase;
  line-break: strict;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--ume-syrup); color: var(--color-on-primary); }
h1, h2, h3, p, ol, ul, figure { margin: 0; }
p, figcaption { text-wrap: pretty; }
ol, ul { padding: 0; list-style: none; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--color-link); text-underline-offset: 0.2em; }
:focus-visible { outline: var(--border-width-thick) solid var(--color-focus); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--content-max); margin-inline: auto; padding-inline: var(--content-gutter); }

.h2 {
  font-family: var(--font-family-heading);
  font-weight: var(--font-weight-bold);
  font-size: clamp(1.625rem, 1.1rem + 1.6vw, 2.5rem);
  line-height: var(--line-height-heading);
  letter-spacing: var(--tracking-heading);
  text-wrap: balance;
}
.h3 {
  font-family: var(--font-family-heading);
  font-weight: var(--font-weight-bold);
  font-size: clamp(1.375rem, 1.1rem + 0.8vw, 1.75rem);
  line-height: var(--line-height-heading);
  letter-spacing: var(--tracking-heading);
  text-wrap: balance;
}
.section-lead { max-width: var(--measure); margin-top: var(--space-3); color: var(--color-text-muted); }
.caption { margin-top: var(--space-2); font-size: var(--font-sm); color: var(--color-text-muted); }

/* ---------- 部品: ボタン ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: calc(var(--tap-min) + 8px);
  padding: 0 var(--space-5);
  border-radius: var(--radius);
  font-weight: var(--font-weight-bold);
  font-size: var(--font-base);
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: background-color var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}
.btn--primary { background: var(--color-primary); color: var(--color-on-primary); box-shadow: var(--shadow-1); }
.btn--primary:hover { background: var(--color-primary-hover); box-shadow: var(--shadow-2); }
.btn--inverse { background: var(--color-bg-subtle); color: var(--color-primary); }
.btn--inverse:hover { background: var(--color-bg); }
.btn:active { transform: translateY(1px); }
.btn::after {
  content: ""; width: 0.5em; height: 0.5em; margin-left: 0.75em;
  border-top: 2px solid currentColor; border-right: 2px solid currentColor;
  transform: rotate(45deg);
}
.btn--primary::after { transform: rotate(135deg) translate(-0.1em, 0.1em); }

/* ---------- 部品: 味の切り替え ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.tab {
  display: inline-flex; align-items: center; gap: var(--space-2);
  min-height: var(--tap-min);
  padding: 0 var(--space-3);
  border: var(--border-width) solid rgba(38, 22, 30, 0.28);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
  color: var(--color-text);
  font: inherit; font-weight: var(--font-weight-medium); font-size: 0.9375rem; letter-spacing: 0.04em;
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
}
.tab:hover { border-color: var(--color-text); }
.tab[aria-selected="true"] { background: var(--color-text); color: var(--color-text-inverse); border-color: var(--color-text); }
.tab__mark { width: 12px; height: 12px; flex: none; box-shadow: 0 0 0 1.5px var(--color-bg-subtle); }
.tab[data-flavor="ginger"] .tab__mark { background: var(--ginger-syrup); }
.tab[data-flavor="ume"] .tab__mark { background: var(--ume-syrup); }
.tab[data-flavor="yuzu"] .tab__mark { background: var(--yuzu-syrup); }

/* ---------- 部品: 素材シートの切り出し（2×2・どの味も同じ並べ方） ---------- */
.piece {
  width: 100%; height: 100%;
  background-repeat: no-repeat;
  background-size: 200% 200%;
  transition: opacity var(--duration-fast) var(--ease-out), transform 300ms var(--ease-out);
}
.piece--bottle { background-position: 0 0; }
.piece--glass  { background-position: 100% 0; }
.piece--a      { background-position: 0 100%; }
.piece--b      { background-position: 100% 100%; }
.piece[data-sheet="ume"]    { background-image: url(../sheet-ume.webp); }
.piece[data-sheet="ginger"] { background-image: url(../sheet-ginger.webp); }
.piece[data-sheet="yuzu"]   { background-image: url(../sheet-yuzu.webp); }
.js .piece.is-lazy:not(.is-near) { background-image: none; }
.piece.is-out { opacity: 0; transform: translateY(10px); }

/* ---------- 屋号の札（瓶のラベルと同じ: 白い札に味の色の正方形1つ） ---------- */
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px;
  background: var(--color-bg-subtle);
  font-family: var(--font-family-heading); font-weight: var(--font-weight-bold);
  font-size: 1rem; letter-spacing: 0.08em; line-height: 1.4;
  box-shadow: var(--shadow-1);
}
.brand__mark { width: 12px; height: 12px; background: var(--syrup); transition: background-color var(--duration-base) var(--ease-out); }

/* =========================================================
   1. 最初の画面（スマホが先。900px から PC の組み）
   ========================================================= */
.hero {
  --u: calc(100vw / 375);
  position: relative;
  display: flex; flex-direction: column;
  min-height: 100svh;
  padding: 14px 16px 20px;
  background: var(--soda);
  overflow: hidden;
  view-timeline: --hero block;
  transition: background-color var(--duration-base) var(--ease-out);
}
.hero__brand { align-self: flex-start; }
.hero__title {
  margin-top: 14px;
  font-family: var(--font-family-heading); font-weight: var(--font-weight-bold);
  font-size: min(calc(28 * var(--u)), 2.25rem);
  line-height: 1.38; letter-spacing: 0.02em;
  text-wrap: balance;
}
.hero__stage { position: relative; container-type: size; height: clamp(200px, calc(100svh - 500px), calc(340 * var(--u))); margin-top: 2px; flex: none; }
.layer { position: absolute; inset: 0; }
.enter { position: absolute; aspect-ratio: 1; }
.float { width: 100%; height: 100%; }
/* スマホ: 舞台の高さ = 瓶の箱。瓶の中心は 46% */
.enter--bottle { width: 100cqh; left: calc(46% - 50cqh); bottom: 0; }
.enter--glass  { width: 66cqh; left: calc(46% + 10cqh); bottom: 0.4cqh; }
.enter--a      { width: 56cqh; left: calc(46% - 60cqh); bottom: -8cqh; }
.enter--b      { display: none; }
.layer--front .piece { filter: blur(0.6px); }
.hero__shadow { position: absolute; inset: 0; pointer-events: none; }
.hero__shadow::before, .hero__shadow::after {
  content: ""; position: absolute;
  background: radial-gradient(closest-side, rgba(38, 22, 30, var(--a, 0.3)), transparent);
}
/* 瓶の足元（瓶の中心 = 40%）とグラスの足元 */
.hero__shadow::before { left: calc(46% - 24cqh); width: 48cqh; bottom: -2.4cqh; height: 6.4cqh; }
.hero__shadow::after { --a: 0.18; left: calc(46% + 16cqh); width: 56cqh; bottom: -2.4cqh; height: 5.6cqh; }

/* 色の帯（スマホは横一列の色見本） */
.bands {
  display: flex; gap: 3px;
  margin-top: 8px; padding: 4px;
  background: var(--color-bg-subtle);
  box-shadow: var(--shadow-1);
}
.band { position: relative; flex: 1; height: 38px; transform-origin: 50% 100%; transition: background-color var(--duration-base) var(--ease-out); }
.band--syrup { background: var(--syrup); }
.band--soda  { background: var(--soda); }
.band--hot   { background: var(--hot); }
.band--milk  { background: var(--milk); }
.bands { padding-bottom: 26px; }
.band__label { position: absolute; left: 0; top: calc(100% + 4px); font-size: 0.75rem; line-height: 1.5; font-weight: var(--font-weight-medium); white-space: nowrap; letter-spacing: 0.02em; }

.hero__lead { margin-top: 12px; font-size: 0.875rem; line-height: 1.75; }
.hero__tabs { margin-top: 12px; }
@media (max-width: 599px) {
  .tabs { flex-wrap: nowrap; gap: 6px; }
  .tabs .tab { position: relative; flex: 1; justify-content: center; padding: 4px 4px 0; font-size: 0.8125rem; letter-spacing: 0; white-space: nowrap; overflow: hidden; }
  .tabs .tab__mark { position: absolute; left: 0; right: 0; top: 0; width: auto; height: 4px; box-shadow: none; }
}
.hero__cta { margin-top: 12px; width: 100%; }

@media (min-width: 900px) {
  .hero {
    --u: min(calc(100vw / 1440), calc(100svh / 900));
    display: grid;
    grid-template-columns: 57% minmax(0, 1fr);
    grid-template-rows: 1fr auto auto auto auto auto 1fr;
    height: 100svh; min-height: 620px;
    padding: 0 6% 0 0;
    background: var(--color-bg);
  }
  .hero__brand { grid-column: 2; grid-row: 2; justify-self: start; position: relative; z-index: 2; font-size: max(0.9375rem, calc(17 * var(--u))); }
  .hero__title { grid-column: 2; grid-row: 3; position: relative; z-index: 2; margin-top: calc(28 * var(--u)); font-size: clamp(2rem, calc(54 * var(--u)), 4rem); line-height: 1.32; }
  .hero__lead  { grid-column: 2; grid-row: 4; position: relative; z-index: 2; margin-top: calc(22 * var(--u)); max-width: 26em; font-size: max(0.9375rem, calc(17 * var(--u))); line-height: 1.85; }
  .hero__tabs  { grid-column: 2; grid-row: 5; position: relative; z-index: 2; margin-top: calc(32 * var(--u)); flex-wrap: wrap; gap: 8px; }
  .hero__cta   { grid-column: 2; grid-row: 6; position: relative; z-index: 2; justify-self: start; width: auto; min-width: 240px; margin-top: calc(20 * var(--u)); }
  /* 文字の札: 見出し〜ボタンを、屋号の札・帯の札と同じ白い札に載せる。お湯と牛乳の帯の境が文字の上を横切らないように（直し1） */
  .hero::before {
    content: ""; grid-column: 2; grid-row: 2 / 7; position: relative; z-index: 1;
    margin: calc(-44 * var(--u)) 0 calc(-44 * var(--u)) calc(-32 * var(--u));
    background: var(--color-bg-subtle); box-shadow: var(--shadow-1);
  }

  /* 帯は画面いっぱいの縦の色票 */
  .bands {
    position: absolute; inset: 0; z-index: 0;
    margin: 0; padding: 0; gap: 0;
    background: none; box-shadow: none;
  }
  .band { height: auto; flex: 0 0 26%; }
  .band--syrup { flex-basis: 22%; }
  .band__label {
    top: calc(28 * var(--u)); left: calc(24 * var(--u));
    padding: 4px 12px;
    background: var(--color-bg-subtle);
    font-size: max(0.75rem, calc(14 * var(--u)));
    box-shadow: var(--shadow-1);
  }
  .hero__stage { position: absolute; inset: 0; z-index: 1; height: auto; margin: 0; }
  .enter--bottle { width: calc(760 * var(--u)); left: calc(22% - 380 * var(--u)); bottom: calc(70 * var(--u)); }
  .enter--glass  { width: calc(460 * var(--u)); left: calc(22% + 76 * var(--u)); bottom: calc(66 * var(--u)); }
  .enter--a      { width: calc(370 * var(--u)); left: calc(22% - 320 * var(--u)); bottom: calc(-6 * var(--u)); }
  .enter--b      { display: block; width: calc(330 * var(--u)); left: calc(48% - 270 * var(--u)); bottom: calc(6 * var(--u)); }
  .layer--front .piece { filter: blur(1.5px); }
  .hero__shadow::before { left: calc(22% - 170 * var(--u)); width: calc(320 * var(--u)); bottom: calc(52 * var(--u)); height: calc(40 * var(--u)); --a: 0.34; }
  .hero__shadow::after { left: calc(22% + 126 * var(--u)); width: calc(320 * var(--u)); bottom: calc(52 * var(--u)); height: calc(32 * var(--u)); }
}

/* 開幕（読み込んだときに1回）。JS が無い・動きを減らす設定では、最初から完成形 */
@keyframes band-fill { from { transform: scaleY(0); } }
@keyframes rise { from { opacity: 0; transform: translateY(calc(40 * var(--u))); } }
@keyframes come-left { from { opacity: 0; transform: translateX(calc(-80 * var(--u))); } }
@keyframes come-right { from { opacity: 0; transform: translateX(calc(70 * var(--u))); } }
@keyframes come-right-low { from { opacity: 0; transform: translate(calc(90 * var(--u)), calc(30 * var(--u))); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(16px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes shadow-in { from { opacity: 0; transform: scaleX(0.4); } }
@keyframes bob { 0%, 100% { transform: translateY(calc(-6 * var(--u))); } 50% { transform: translateY(calc(6 * var(--u))); } }
@keyframes bob-l { 0%, 100% { transform: translateY(calc(-6 * var(--u))) rotate(-2deg); } 50% { transform: translateY(calc(6 * var(--u))) rotate(2deg); } }
@keyframes bob-r { 0%, 100% { transform: translateY(calc(-6 * var(--u))) rotate(2deg); } 50% { transform: translateY(calc(6 * var(--u))) rotate(-2deg); } }

@media (prefers-reduced-motion: no-preference) {
  .js-motion .band { animation: band-fill 600ms var(--ease-out) both; }
  .js-motion .band:nth-child(2) { animation-delay: 80ms; }
  .js-motion .band:nth-child(3) { animation-delay: 160ms; }
  .js-motion .band:nth-child(4) { animation-delay: 240ms; }
  .js-motion .band__label { animation: fade 400ms ease-out 900ms both; }
  .js-motion .hero__shadow { animation: shadow-in 800ms var(--ease-out) 300ms both; }
  .js-motion .enter--bottle { animation: rise 800ms var(--ease-out) 300ms both; }
  .js-motion .enter--glass { animation: come-right 700ms var(--ease-out) 550ms both; }
  .js-motion .enter--b { animation: come-right-low 700ms var(--ease-out) 630ms both; }
  .js-motion .enter--a { animation: come-left 700ms var(--ease-out) 710ms both; }
  .js-motion .hero::before { animation: fade 400ms ease-out 650ms both; }
  .js-motion .hero__brand { animation: fade-up 500ms var(--ease-out) 700ms both; }
  .js-motion .hero__title { animation: fade-up 500ms var(--ease-out) 750ms both; }
  .js-motion .hero__lead { animation: fade-up 500ms var(--ease-out) 820ms both; }
  .js-motion .hero__tabs { animation: fade-up 500ms var(--ease-out) 880ms both; }
  .js-motion .hero__cta { animation: fade-up 500ms var(--ease-out) 940ms both; }

  /* 待機: 脇役だけ、周期と遅れをばらして上下する。瓶は動かさない */
  .float--glass { animation: bob 4.3s ease-in-out infinite; }
  .float--a { animation: bob-l 5.2s ease-in-out -1.4s infinite; }
  .float--b { animation: bob-r 3.4s ease-in-out -0.6s infinite; }

  /* スクロール: 最初の画面が上へ抜けるあいだ、瓶は遅く・脇役は速く（2層） */
  @supports (animation-timeline: view()) {
    .layer--bottle { animation: px-slow linear both; animation-timeline: --hero; animation-range: exit 0% exit 100%; }
    .layer--back, .layer--front { animation: px-fast linear both; animation-timeline: --hero; animation-range: exit 0% exit 100%; }
    @keyframes px-slow { to { transform: translateY(calc(-60 * var(--u))); } }
    @keyframes px-fast { to { transform: translateY(calc(-180 * var(--u))); } }
  }
}

/* =========================================================
   2. 3つの味（味ごとに1本の帯。地はその味の炭酸水割りの色）
   ========================================================= */
.flavors { padding-top: var(--section-space); }
.section-head { padding-bottom: var(--space-6); }
.flavor { background: var(--soda); }
.flavor__inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  padding-block: var(--space-6);
}
.flavor__swatch { position: relative; height: 300px; }
.flavor__chip {
  position: absolute; left: 0; top: 0;
  display: flex; flex-direction: column;
  width: 150px; height: 270px; padding: 6px;
  background: var(--color-bg-subtle);
  box-shadow: var(--shadow-1);
}
.flavor__fill { flex: 1; background: var(--syrup); transform-origin: 50% 100%; }
.flavor__chiplabel { padding-top: 6px; font-size: var(--font-sm); font-weight: var(--font-weight-medium); line-height: 1.4; }
.flavor__bottle { position: absolute; left: 70px; bottom: 0; width: 290px; aspect-ratio: 1; }
.flavor__bottle::before {
  content: ""; position: absolute; left: 30%; right: 30%; bottom: -2px; height: 18px;
  background: radial-gradient(closest-side, rgba(38, 22, 30, 0.3), transparent);
}
.flavor__bottle .piece { position: relative; }
.flavor__materials { margin-top: var(--space-1); font-weight: var(--font-weight-bold); letter-spacing: 0.12em; }
.flavor__text > p:last-child { margin-top: var(--space-2); max-width: 24em; text-wrap: pretty; }
.flavor__things { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-2); }
.flavor__things .piece { aspect-ratio: 1.6; height: auto; background-size: 200% 322%; background-position-y: 85.5%; }

@media (min-width: 768px) {
  .flavor__inner { grid-template-columns: 330px minmax(0, 1fr) minmax(0, 400px); align-items: center; gap: var(--space-6); padding-block: var(--space-7); }
  .flavor__swatch { height: 380px; }
  .flavor__chip { width: 190px; height: 340px; padding: 8px; }
  .flavor__bottle { left: 70px; width: 360px; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .flavor__inner { grid-template-columns: 300px minmax(0, 1fr); }
  .flavor__things { grid-column: 1 / -1; max-width: 420px; }
}

/* =========================================================
   3. 割り方（3列の色票と、原液が落ちて広がる動画）
   ========================================================= */
.mix { padding-block: var(--section-space); }
.mix__inner { display: grid; gap: var(--space-5); }
.mix__head .tabs { margin-top: var(--space-4); }
.mix__film { margin: 0; }
.mix__video { width: 100%; aspect-ratio: 720 / 808; object-fit: cover; background: #E6EFEE; border-radius: var(--radius); }
.mix__chips { display: grid; gap: var(--space-3); }
.chip { display: grid; grid-template-columns: 96px 1fr; background: var(--color-bg-subtle); box-shadow: var(--shadow-1); padding: 6px; gap: var(--space-3); align-items: center; }
.chip__color { aspect-ratio: 1; transition: background-color var(--duration-base) var(--ease-out); }
.chip--soda .chip__color { background: var(--soda); }
.chip--hot .chip__color  { background: var(--hot); }
.chip--milk .chip__color { background: var(--milk); }
.chip__name { font-family: var(--font-family-heading); font-weight: var(--font-weight-bold); font-size: 1.25rem; line-height: 1.4; }
.chip__note { margin-top: 2px; font-size: 0.875rem; line-height: 1.7; color: var(--color-text-muted); }

@media (min-width: 900px) {
  .mix__inner { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); column-gap: var(--space-6); row-gap: var(--space-6); }
  .mix__head { grid-column: 1 / -1; }
  .mix__chips { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-3); align-self: stretch; padding-bottom: 2.4em; }
  .chip { grid-template-columns: 1fr; grid-template-rows: 1fr auto; align-items: stretch; padding: 8px; gap: 0; }
  .chip__color { aspect-ratio: auto; min-height: 240px; }
  .chip__label { padding: 12px 6px 6px; }
}

/* =========================================================
   4. 作り手のこと
   ========================================================= */
.maker { padding-block: var(--section-space); background: var(--color-bg-subtle); }
.maker__inner { display: grid; gap: var(--space-5); align-items: center; }
.maker__photo { margin: 0; }
.maker__frame { overflow: hidden; border-radius: var(--radius); aspect-ratio: 1024 / 688; background: var(--color-bg); }
.maker__frame img { width: 100%; height: 100%; object-fit: cover; }
.maker__text p { margin-top: var(--space-3); max-width: 26em; }
.maker__text .h2 + p { margin-top: var(--space-4); }
@media (min-width: 900px) {
  .maker__inner { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-7); }
}

/* =========================================================
   5. 詰め合わせと定期便（3本の瓶の底を1本の棚の線にそろえる）
   ========================================================= */
.set { padding-block: var(--section-space); }
.set__grid { display: grid; gap: var(--space-4); margin-top: var(--space-5); }
.offer { padding: var(--space-5) var(--space-4); background: var(--color-bg-subtle); border: var(--border-width) solid var(--color-border); border-radius: var(--radius); display: flex; flex-direction: column; }
.offer > p { margin-top: var(--space-2); }
.shelf { display: flex; justify-content: center; gap: 0; height: 210px; margin-bottom: var(--space-4); border-bottom: var(--border-width-thick) solid var(--color-text); }
.shelf__bottle { position: relative; width: 33.33%; max-width: 120px; }
.shelf__bottle .piece { position: absolute; left: 50%; bottom: 0; width: 210px; height: 210px; transform: translate(-50%, 2.5%); }
.offer__big { font-family: var(--font-family-heading); font-weight: var(--font-weight-bold); font-size: 2.5rem; line-height: 1; height: 150px; display: flex; align-items: flex-end; padding-bottom: var(--space-3); margin: 0 0 var(--space-4); border-bottom: var(--border-width-thick) solid var(--color-text); }
/* 「1」を棚の瓶と同じ高さまで立て、札の上半分を空けない（直し2） */
.offer__big span { font-size: 9rem; color: var(--ume-syrup); margin-inline: 0.06em; line-height: 0.8; }
.offer > .price { display: flex; align-items: baseline; gap: var(--space-3); margin-top: auto; padding-top: var(--space-4); }
.price__label { font-size: var(--font-sm); color: var(--color-text-muted); }
.price__value { font-weight: var(--font-weight-bold); font-size: var(--font-lg); }
@media (min-width: 768px) {
  .offer__big { height: 210px; }
  .offer__big span { font-size: 15rem; }
  .set__grid { grid-template-columns: 1fr 1fr; gap: var(--space-5); }
  .offer { padding: var(--space-6) var(--space-5); }
}

/* =========================================================
   6. 注文への誘い
   ========================================================= */
.order { position: relative; overflow: hidden; background: var(--ume-syrup); color: var(--color-on-primary); padding-block: var(--section-space); }
.order__bottle { display: none; }
@media (min-width: 900px) {
  .order__bottle { display: block; position: absolute; right: max(2%, calc(50% - 600px)); bottom: 0; width: min(500px, 38vw); aspect-ratio: 1; }
  .order__bottle::before { content: ""; position: absolute; left: 32%; right: 32%; bottom: 1%; height: 6%; background: radial-gradient(closest-side, rgba(20, 6, 12, 0.45), transparent); }
  .order__bottle .piece { position: relative; }
  .order__inner { position: relative; z-index: 1; }
}
.order__inner { display: flex; flex-direction: column; align-items: flex-start; }
.order__title { font-family: var(--font-family-heading); font-weight: var(--font-weight-bold); font-size: clamp(1.75rem, 1.2rem + 2vw, 3rem); line-height: 1.35; text-wrap: balance; }
.order__lead { margin-top: var(--space-4); max-width: var(--measure); }
.order .btn { margin-top: var(--space-5); min-width: 240px; }
.order :focus-visible { outline-color: var(--color-on-primary); }
.order__note { margin-top: var(--space-3); font-size: var(--font-sm); }
.footer { background: var(--color-bg-inverse); color: var(--color-text-inverse); padding: var(--space-4) var(--content-gutter); text-align: center; }
.footer__note { font-size: var(--font-sm); }
@media (max-width: 767px) {
  .order .btn { width: 100%; }
}

/* ---------- スクロールに結びつく小さな動き（対応しないブラウザ・動きを減らす設定では完成形のまま） ---------- */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .flavor__fill { animation: fill-up linear both; animation-timeline: view(); animation-range: entry 10% cover 40%; }
    .flavor__bottle .piece { animation: lift linear both; animation-timeline: view(); animation-range: entry 0% cover 35%; }
    .chip__color { animation: dilute linear both; animation-timeline: view(); }
    .chip--soda .chip__color { --to: var(--soda); animation-range: entry 40% cover 35%; }
    .chip--hot .chip__color  { --to: var(--hot);  animation-range: entry 60% cover 42%; }
    .chip--milk .chip__color { --to: var(--milk); animation-range: entry 80% cover 49%; }
    .maker__frame img { scale: 1.07; animation: drift linear both; animation-timeline: view(); animation-range: cover 0% cover 100%; }
    .shelf__bottle { animation: place linear both; animation-timeline: view(); }
    .shelf__bottle:nth-child(1) { animation-range: entry 30% cover 30%; }
    .shelf__bottle:nth-child(2) { animation-range: entry 45% cover 35%; }
    .shelf__bottle:nth-child(3) { animation-range: entry 60% cover 40%; }
    @keyframes fill-up { from { transform: scaleY(0.4); } }
    @keyframes lift { from { transform: translateY(36px); } }
    @keyframes dilute { from { background-color: var(--syrup); } to { background-color: var(--to); } }
    @keyframes drift { from { transform: translateY(-3%); } to { transform: translateY(3%); } }
    @keyframes place { from { opacity: 0; transform: translateY(-28px); } }
  }
}

/* ---------- 節の文と絵: 画面に入ったら出る（クラスは main.js が付ける。付かなければ完成形のまま） ---------- */
@media (prefers-reduced-motion: no-preference) {
  .rv { opacity: 0; transform: translateY(28px); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); transition-delay: var(--d, 0ms); }
  .rv.is-in { opacity: 1; transform: none; }
  /* 写真は、瓶のふたを開けるように左から開く */
  .rv-wipe { clip-path: inset(0 100% 0 0); transition: clip-path 1100ms var(--ease-in-out); }
  .is-in > .rv-wipe { clip-path: inset(0); }
}
