/* 珈琲観測所 LP — モーショングラフィックス（sky.js と対）
   .sky-on は <head> の小さなスクリプトが付ける（動きを減らす設定のときは付かない）。
   sky.js が読み込めない・動かないときは外れて（遅くとも 4 秒後）、従来の表示に戻る。
   .sky-on がないとき、このファイルの部品はすべて非表示（HERO は元の画像のまま）。 */

.skystage, .scrolly, .symorph { display: none; }

/* =====================================================================
   1) HERO「空の観測窓」
   ===================================================================== */
.sky-on .xhero__media img { display: none; }
.sky-on .skystage { display: block; padding-inline: var(--gutter); }

.skystage__window {
  --accent-text: var(--ink);           /* 最初に円（快晴）を描くときは墨 */
  --accent: var(--ink);
  position: relative; overflow: hidden; isolation: isolate;
  /* スマホは縦長。aspect-ratio と min-height を併用すると幅が押し広げられるので、高さで指定する */
  height: clamp(480px, 128vw, 600px);
  border-radius: var(--tile-radius);
  background-color: var(--ground, var(--paper-2));
  color: var(--ink);
  transition: background-color 1.1s var(--ease), color .6s var(--ease);
}
/* 空の上のほうだけ、商品の色を薄くにじませる */
.skystage__window::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-color: var(--accent);
  opacity: .16;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
  transition: background-color 1.1s var(--ease), opacity 1.1s var(--ease);
}
.skystage__window.is-dark { color: var(--on-dark); }
.skystage__window.is-dark::before { opacity: .22; }

.skystage__sky {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; pointer-events: none;
}

.skystage__body {
  position: absolute; inset: 0 0 64px; z-index: 1;
  display: grid; align-content: center; justify-items: center;
  gap: clamp(16px, 4vw, 24px);
  padding: 28px 24px 0;
  text-align: center;
}
.skystage__mark {
  display: block; width: min(42%, 180px); height: auto; overflow: visible;
  color: var(--accent-text);
  transition: color 1.1s var(--ease);
}
.skystage__window.is-dark .skystage__mark { color: var(--accent-dark); }

.skystage__text { transition: opacity .36s var(--ease), transform .36s var(--ease); }
.skystage__text.is-swap { opacity: 0; transform: translateY(8px); }

.skystage__no {
  font-family: var(--en); font-size: 12px; letter-spacing: .18em; line-height: 1.6;
  color: var(--accent-text);
}
.skystage__name {
  display: flex; align-items: baseline; justify-content: center; flex-wrap: wrap; gap: 4px 14px;
  margin-top: 6px;
}
.skystage__kanji {
  font-size: clamp(54px, 15vw, 104px); font-weight: 700; line-height: 1; letter-spacing: .04em;
}
.skystage__en {
  font-family: var(--en); font-size: 11px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gray);
}
.skystage__one {
  margin: 14px auto 0; max-width: 21em;
  font-size: clamp(14.5px, 3.9vw, 17px); line-height: 1.8;
  word-break: auto-phrase; text-wrap: balance;   /* 文節の途中で折り返さない（対応ブラウザのみ） */
}
.skystage__meta { margin-top: 4px; font-size: 13px; letter-spacing: .04em; color: var(--gray); }
.skystage__link {
  display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin-top: 2px;
  font-size: 15px; font-weight: 500; letter-spacing: .04em;
  color: var(--accent-text); text-decoration: none;
}
.skystage__link::after { content: "›"; font-size: 1.25em; line-height: 1; transform: translateY(-1px); }
.skystage__link:hover { text-decoration: underline; text-underline-offset: 4px; }

.skystage__window.is-dark .skystage__no,
.skystage__window.is-dark .skystage__link { color: var(--accent-dark); }
.skystage__window.is-dark .skystage__en,
.skystage__window.is-dark .skystage__meta { color: rgba(240, 234, 221, .72); }
.skystage__window.is-dark :focus-visible { outline-color: var(--on-dark); }

/* 切り替えボタン（6つの記号）と一時停止 */
.skystage__nav {
  position: absolute; left: 0; right: 0; bottom: 12px; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  padding-inline: 56px;
}
.skystage__dots { display: flex; gap: 2px; margin: 0; padding: 0; list-style: none; }
.skystage__dots button,
.skystage__pause {
  display: grid; place-items: center;
  width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: 50%; background: none; cursor: pointer;
  color: inherit;
}
.skystage__dots svg {
  width: 18px; height: 18px; overflow: visible;
  color: var(--c); opacity: .4;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.skystage__window.is-dark .skystage__dots svg { color: var(--cd); }
.skystage__dots button:hover svg { opacity: .75; }
.skystage__dots button[aria-pressed="true"] svg { opacity: 1; transform: scale(1.22); }

.skystage__pause { position: absolute; right: 10px; top: 0; }
.skystage__pause span {
  display: block; width: 10px; height: 12px;
  border-inline: 3px solid currentColor; opacity: .55;
  transition: opacity .3s var(--ease);
}
.skystage__pause:hover span { opacity: .9; }
.skystage__pause[aria-pressed="true"] span {           /* 止めているときは「再生」の三角 */
  width: 0; height: 0; border-inline: 0; margin-left: 3px;
  border-left: 11px solid currentColor;
  border-top: 7px solid transparent; border-bottom: 7px solid transparent;
}

/* 次の空までの残り時間 */
.skystage__bar {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  height: 2px; pointer-events: none;
}
.skystage__bar i {
  display: block; height: 100%;
  background: var(--accent-text); opacity: .5;
  transform: scaleX(0); transform-origin: 0 50%;
}
.skystage__window.is-dark .skystage__bar i { background: var(--accent-dark); }

@media (min-width: 768px) {
  .skystage__window { height: auto; aspect-ratio: 3 / 2; }
  .skystage__body {
    inset: 0 0 56px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center; justify-items: stretch;
    gap: clamp(24px, 5vw, 72px);
    padding: 0 clamp(36px, 7vw, 104px);
    text-align: left;
  }
  .skystage__mark { justify-self: center; width: min(100%, 300px); }
  .skystage__name { justify-content: flex-start; }
  .skystage__one { margin-left: 0; }
}
@media (min-width: 1100px) {
  .skystage__window { aspect-ratio: 16 / 9; }
}

/* =====================================================================
   2) ABOUT「一本の線」
   ===================================================================== */
.sky-on .scrolly { display: block; width: min(100%, 340px); margin: 40px auto 0; }
.scrolly__svg { display: block; width: 100%; height: auto; overflow: visible; color: var(--ink); }
.scrolly__steps {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 0;
  margin-top: 10px; font-size: 12.5px; letter-spacing: .1em; line-height: 1.6;
  color: var(--gray);
}
.scrolly__step { opacity: .5; transition: opacity .5s var(--ease), color .5s var(--ease); }
.scrolly__step + .scrolly__step::before { content: "—"; margin-inline: .8em; opacity: .6; }
.scrolly__step.is-on { opacity: 1; color: var(--ink); }

@media (min-width: 1080px) {
  .sky-on .section--about .about__shell { max-width: calc(1120px + var(--gutter) * 2); }
  .sky-on .about__body {
    display: grid; grid-template-columns: clamp(320px, 32vw, 440px) minmax(0, 1fr);
    gap: clamp(56px, 6vw, 88px); align-items: start;
    margin-top: 56px;
  }
  .sky-on .about__body .prose { margin-top: 0; }
  .sky-on .scrolly {
    position: sticky; top: max(96px, calc(50vh - 230px));
    width: 100%; margin: 0;
  }
}

/* =====================================================================
   3) 記号の節 — 大きな円が6つの記号に描き変わる
   ===================================================================== */
.sky-on .symorph {
  display: grid; justify-items: center; gap: 14px;
  margin: clamp(44px, 9vw, 64px) auto 0;
}
.symorph__mark {
  display: block; width: clamp(112px, 30vw, 160px); height: auto; overflow: visible;
  color: var(--ink);
  transition: color .6s var(--ease);
}
.symorph__label {
  display: grid; gap: 2px; line-height: 1.5;
  transition: opacity .22s var(--ease), transform .22s var(--ease);
}
.symorph__label.is-swap { opacity: 0; transform: translateY(4px); }
.symorph__ja { font-size: 20px; font-weight: 700; letter-spacing: .12em; }
.symorph__en {
  font-family: var(--en); font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gray);
}
/* 大きな円が順に描き変わるので、下の一覧は少し間を詰める */
.sky-on .symorph + .symbols { margin-top: clamp(40px, 8vw, 56px); }

@media print {
  .skystage, .scrolly, .symorph { display: none !important; }
  .sky-on .xhero__media img { display: block !important; }
}
