/* =========================================================
   季節のギフトLP ひな形
   中央にスマホ幅のカラム、PCでは左右に背景写真と雪
   ========================================================= */
:root {
  /* ▼ 色はここだけ。content.json の colors から apply スクリプトが書き込みます */
  --paper: #f7f2e8;
  --paper-deep: #ede5d6;
  --ink: #22302a;
  --ink-soft: #5d6a63;
  --accent: #a4282c;
  --accent-deep: #6a1016;
  --sub: #1f4a3a;
  --gold: #b48a3c;
  --gold-light: #ecd08a;
  --bg: #86181f;
  --bg-light: #92202a;
  --bg-dark: #6c1118;
  --particle: #ffffff;
  /* ▲ 色はここまで */
  --line: rgba(34, 48, 42, .16);
  --col: 480px;
  --pad: 28px;
  --ja: "Zen Old Mincho", "Hiragino Mincho ProN", "Yu Mincho", serif;
  --en: "Bodoni Moda", "Didot", "Times New Roman", serif;
  --ease: cubic-bezier(.22, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ja);
  font-size: 15px;
  line-height: 2;
  letter-spacing: .06em;
  -webkit-font-smoothing: antialiased;
}
body.is-lock { overflow: hidden; }
img { display: block; width: 100%; height: 100%; object-fit: cover; }
p, h1, h2, h3, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- 背景（PCの左右） ---------- */
.weave {
  position: fixed; inset: 0; z-index: 0; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 40%, var(--bg-light) 0%, var(--bg) 55%, var(--bg-dark) 100%);
}
.weave img { display: none; }
@media (min-width: 1024px) {
  .weave img {
    display: block; position: absolute; top: 0; height: 100%;
    width: calc((100vw - var(--col)) / 2 + 2px); object-fit: cover;
  }
  .weave-l { left: 0; object-position: left top; }
  .weave-r { right: 0; object-position: right top; }
}
.snow { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.flake {
  position: absolute; top: -40px;
  color: var(--particle);
  filter: drop-shadow(0 1px 2px rgba(34, 48, 42, .18));
  animation: fall linear infinite;
}
.flake svg { display: block; width: 100%; height: 100%; animation: sway ease-in-out infinite alternate; }
@keyframes fall { to { transform: translateY(calc(100vh + 80px)) rotate(360deg); } }
@keyframes sway { from { transform: translateX(-18px); } to { transform: translateX(18px); } }

/* ---------- カラム ---------- */
main {
  position: relative; z-index: 1;
  max-width: var(--col);
  margin: 0 auto;
  background: var(--paper);
  overflow-x: clip;
  box-shadow: 0 0 70px rgba(20, 10, 10, .45);
}

/* ---------- サイド（PCのみ） ---------- */
.side { display: none; }
@media (min-width: 1024px) {
  .side {
    display: flex; flex-direction: column; justify-content: center;
    position: fixed; top: 0; bottom: 0; z-index: 1;
    width: calc((100vw - var(--col)) / 2);
    padding: 0 clamp(24px, 4vw, 72px);
  }
  .side-card { position: relative; color: var(--paper); text-shadow: 0 2px 14px rgba(60, 6, 12, .55); }
  .side-l { left: 0; align-items: flex-start; }
  .side-r { right: 0; align-items: flex-end; text-align: right; }
  .side-r .side-card { margin-top: 16vh; }
  .side-sub { font-family: var(--en); font-style: italic; font-size: clamp(20px, 1.9vw, 26px); line-height: 1.4; margin-bottom: 6px; color: var(--gold-light); letter-spacing: .08em; }
  .side-brand { font-family: var(--en); font-size: clamp(34px, 3.6vw, 56px); line-height: 1.15; letter-spacing: .01em; max-width: 6em; }
  .side-season { font-size: 12px; letter-spacing: .3em; color: rgba(247, 242, 232, .82); margin-bottom: 28px; }
  .side-nav { display: grid; gap: 18px; }
  .side-link { display: grid; line-height: 1.4; transition: color .3s, transform .4s var(--ease); }
  .side-link:hover { color: var(--gold-light); transform: translateX(-6px); }
  .side-link-en { font-family: var(--en); font-style: italic; font-size: 22px; letter-spacing: .02em; }
  .side-link-ja { font-size: 11px; letter-spacing: .2em; color: rgba(247, 242, 232, .78); }
}

/* ---------- ローディング ---------- */
.loader {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-content: center; justify-items: center; gap: 10px;
  background: var(--sub); color: var(--paper);
  transition: opacity .7s ease, visibility .7s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader-sub { font-size: 11px; letter-spacing: .3em; opacity: .8; }
.loader-brand { font-family: var(--en); font-size: 34px; letter-spacing: .02em; line-height: 1.3; }
.loader-num { font-family: var(--en); font-style: italic; font-size: 15px; margin-top: 18px; font-variant-numeric: tabular-nums; }
.loader-bar { width: 200px; height: 8px; background: rgba(247, 242, 232, .16); overflow: hidden; }
.loader-fill {
  height: 100%; width: 100%; transform: scaleX(0); transform-origin: left;
  background-color: var(--accent);
  background-image: repeating-linear-gradient(90deg, rgba(240, 200, 90, .9) 0 2px, transparent 2px 10px, rgba(16, 26, 60, .6) 10px 16px, transparent 16px 24px);
}

/* ---------- ヘッダー ---------- */
.header {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  height: 56px; padding: 0 var(--pad);
  transition: background .4s, box-shadow .4s;
}
.header.is-scrolled { background: rgba(247, 242, 232, .92); backdrop-filter: blur(8px); box-shadow: 0 1px 0 var(--line); }
.logo { font-family: var(--en); font-size: 19px; letter-spacing: .02em; }
.header-link { font-family: var(--en); font-style: italic; font-size: 16px; }
.u { position: relative; }
.u::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .4s var(--ease);
}
.u:hover::after { transform: scaleX(1); transform-origin: left; }
.progress {
  position: absolute; left: 0; bottom: -1px; height: 2px; width: 100%;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
}

/* ---------- ボタン ---------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 232px; height: 60px; padding: 0 36px;
  background: var(--accent); color: var(--paper);
  font-size: 15px; letter-spacing: .22em;
  border-radius: 2px;
  transition: background .3s, transform .35s var(--ease);
  will-change: transform;
}
.btn::before {
  content: ""; position: absolute; inset: 5px;
  border: 1px dashed rgba(247, 242, 232, .55); border-radius: 1px; pointer-events: none;
}
.btn:hover { background: var(--accent-deep); }
.btn-label { position: relative; z-index: 1; }
.rip {
  position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .35);
  transform: scale(0); animation: rip .7s ease-out forwards; pointer-events: none;
}
@keyframes rip { to { transform: scale(1); opacity: 0; } }

/* ---------- ボタン右下のモチーフステッカー（背景透過PNG） ---------- */
.btn-wrap { position: relative; display: inline-block; }
.btn-sticker {
  position: absolute; right: -30px; bottom: -26px; z-index: 2;
  width: 68px; height: auto; object-fit: contain; pointer-events: none;
  transform: rotate(-8deg);
  filter: drop-shadow(0 5px 6px rgba(30, 20, 10, .28));
  animation: sticker 4.5s ease-in-out infinite alternate;
}
@keyframes sticker { from { transform: rotate(-8deg) translateY(0); } to { transform: rotate(-3deg) translateY(-4px); } }

/* ---------- ヒーロー ---------- */
.hero { position: relative; padding: 12px var(--pad) 72px; text-align: center; }
.hero-en {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  margin-top: 8px;
  font-family: var(--en); font-style: italic; font-weight: 500;
  font-size: clamp(26px, 7.6vw, 42px); line-height: 1.2; color: var(--accent); letter-spacing: .01em;
  white-space: nowrap;
}
.hero-en::before, .hero-en::after { content: ""; flex: 1; min-width: 8px; height: 1px; background: var(--gold); }
.hero-tag { position: relative; width: 78%; margin: 46px auto 0; }
.hero-twine {
  position: absolute; left: 50%; bottom: calc(100% - 22px); width: 1px; height: 58px;
  background: repeating-linear-gradient(180deg, var(--gold) 0 4px, transparent 4px 6px);
  transform: rotate(4deg); transform-origin: bottom;
}
.hero-frame {
  position: relative; aspect-ratio: 3 / 4; overflow: hidden;
  clip-path: polygon(20% 0, 80% 0, 100% 13%, 100% 100%, 0 100%, 0 13%);
  background: var(--paper-deep);
}
.hero-hole {
  position: absolute; left: 50%; top: 16px; width: 14px; height: 14px; margin-left: -7px;
  border-radius: 50%; background: var(--paper); box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25);
}
.slide { position: absolute; inset: 0; opacity: 0; transform: scale(1.12); transition: opacity 1.4s ease; }
.slide.is-active { opacity: 1; animation: zoomout 5.4s linear forwards; }
@keyframes zoomout { from { transform: scale(1.12); } to { transform: scale(1); } }
.hero-copy {
  position: relative; z-index: 2;
  margin: 22px 0 0; text-align: left;
  font-size: clamp(23px, 6.9vw, 36px); font-weight: 500; line-height: 1.6; letter-spacing: .1em; white-space: nowrap;
}
.hero-float {
  position: absolute; z-index: 3; right: 30px; top: 46%;
  width: 88px; height: 88px;
  animation: float 5s ease-in-out infinite alternate;
}
.hero-float img {
  border-radius: 50%; object-position: 50% 35%;
  border: 3px solid var(--paper);
  box-shadow: 0 10px 24px rgba(34, 48, 42, .22);
}
/* 丸い写真を囲んで、ゆっくり回る文字 */
.float-ring { position: absolute; inset: -26%; width: 152%; height: 152%; overflow: visible; animation: ring 26s linear infinite; }
.float-ring text {
  font-family: var(--en); font-size: 7.6px; font-weight: 500; letter-spacing: .08em;
  fill: var(--accent); stroke: var(--paper); stroke-width: 2.4px; paint-order: stroke; stroke-linejoin: round;
}
.hero-float2 { right: auto; left: 26px; top: 19%; width: 70px; height: 70px; animation-duration: 6s; animation-delay: -2s; }
.hero-float2 .float-ring { animation-direction: reverse; animation-duration: 32s; }
.hero-float2 .float-ring text { font-size: 8.6px; }
@keyframes ring { to { transform: rotate(360deg); } }
@keyframes float { from { transform: translateY(-9px) rotate(-4deg); } to { transform: translateY(9px) rotate(4deg); } }
.hero-note { margin: 22px 0 34px; text-align: left; font-size: 14px; color: var(--ink-soft); }

/* ---------- リボン（サテンのギフトリボンに文字が流れる） ---------- */
.ribbon { margin-top: -10px; }
.ribbon svg { display: block; width: 100%; height: auto; overflow: visible; }
.ribbon path { fill: none; }
.ribbon-shadow { stroke: rgba(60, 20, 20, .3); stroke-width: 36; }
.ribbon-edge { stroke: var(--accent-deep); stroke-width: 40; }
.ribbon-band { stroke: var(--accent); stroke-width: 38; }
.ribbon-satin { stroke: url(#satin); stroke-width: 38; }
.ribbon-sheen { stroke: rgba(255, 236, 226, .2); stroke-width: 9; }
.ribbon-fold { stroke: rgba(50, 4, 10, .16); stroke-width: 10; }
.ribbon-stitch { stroke: rgba(240, 210, 150, .55); stroke-width: .8; stroke-dasharray: 3 2.5; }
.ribbon-text {
  fill: var(--gold-light); font-family: var(--en); font-size: 13px; font-weight: 500; letter-spacing: .3em;
}

/* ---------- セクション共通 ---------- */
.sec { padding: 84px var(--pad); }
.en { font-family: var(--en); font-style: italic; font-weight: 400; font-size: 44px; line-height: 1.2; letter-spacing: .01em; }
.en-sub {
  display: flex; align-items: center; gap: 12px; margin-top: 6px;
  font-size: 12px; letter-spacing: .28em; color: var(--ink-soft);
}
.en-sub::before { content: ""; width: 28px; height: 1px; background: var(--accent); }
.lead { margin-top: 40px; font-size: 25px; font-weight: 500; line-height: 1.7; letter-spacing: .12em; }
.body { margin-top: 22px; }
.fade { opacity: 0; transform: translateY(26px); transition: opacity .9s ease, transform .9s var(--ease); }
.fade.is-in { opacity: 1; transform: none; }
.mark {
  background: linear-gradient(transparent 62%, rgba(232, 190, 80, .7) 62%) no-repeat left / 0% 100%;
  transition: background-size 1.1s var(--ease) .3s;
}
.mark.is-on { background-size: 100% 100%; }

/* パララックス */
.para { position: relative; margin-top: 48px; padding-bottom: 60px; }
.para-bg { width: 82%; height: auto; aspect-ratio: 3 / 4; will-change: transform; }
.para-mark {
  position: absolute; right: 0; bottom: 0; width: 44%; height: auto; aspect-ratio: 1;
  border: 6px solid var(--paper); will-change: transform;
}

/* ---------- Pick up ---------- */
.products { display: grid; gap: 44px; margin-top: 44px; }
.card { cursor: pointer; transition: opacity .9s ease, transform .5s var(--ease), box-shadow .5s; background: var(--paper); }
.ph { aspect-ratio: 4 / 5; overflow: hidden; background: var(--paper-deep); }
.ph img { transition: transform .9s var(--ease); }
.card-area { margin-top: 16px; font-size: 12px; letter-spacing: .24em; color: var(--accent); }
.card-name { font-size: 18px; font-weight: 500; letter-spacing: .08em; }
.card-price { font-family: var(--en); font-size: 20px; }
.card-price small { font-family: var(--ja); font-size: 11px; color: var(--ink-soft); margin-left: 8px; letter-spacing: .1em; }
@media (hover: hover) {
  .card.is-in:hover { transform: translateY(-8px); box-shadow: 0 24px 40px -18px rgba(34, 48, 42, .35); }
  .card:hover .ph img { transform: scale(1.06); }
}

/* ---------- ピン留め ---------- */
.pin { height: 300vh; height: 300svh; background: var(--sub); color: var(--paper); }
.pin-inner {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: flex; flex-direction: column; padding: 76px var(--pad) 28px;
}
.pin .en-sub { color: rgba(247, 242, 232, .7); }
.pin .en-sub::before { background: var(--gold); }
.pin-stage { position: relative; flex: 1; margin-top: 24px; min-height: 0; }
.pin-card {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  opacity: 0; transform: translateY(24px) scale(.98);
  transition: opacity .7s ease, transform .7s var(--ease);
}
.pin-card.is-active { opacity: 1; transform: none; }
.pin-card img { flex: 1; min-height: 0; }
.pin-no { margin-top: 14px; font-family: var(--en); font-style: italic; font-size: 24px; line-height: 1.3; color: var(--gold-light); }
.pin-title { font-size: 15px; line-height: 1.8; }
.pin-count { margin-top: 10px; font-family: var(--en); font-size: 13px; letter-spacing: .2em; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- 横スクロール ---------- */
.hs { position: relative; }
.hs-inner {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; gap: 36px;
}
.hs-head { padding: 0 var(--pad); }
.hs-track { display: flex; gap: 20px; padding: 0 var(--pad); width: max-content; will-change: transform; }
.hs-item { width: 236px; flex-shrink: 0; }
.swatch { display: block; aspect-ratio: 3 / 4; overflow: hidden; background: var(--paper-deep); box-shadow: 0 16px 30px -16px rgba(34, 48, 42, .45); }
.hs-item figcaption { margin-top: 12px; font-size: 12px; letter-spacing: .2em; color: var(--ink-soft); line-height: 1.6; }
.hs-item b { display: block; font-family: var(--en); font-style: italic; font-weight: 400; font-size: 22px; letter-spacing: .02em; color: var(--ink); }

/* ---------- ビフォーアフター ---------- */
.ba { --pos: 50%; position: relative; margin-top: 36px; aspect-ratio: 3 / 2; overflow: hidden; user-select: none; background: var(--paper-deep); }
.ba-pane { position: absolute; inset: 0; }
.ba-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-label {
  position: absolute; bottom: 10px; padding: 0 10px;
  font-family: var(--en); font-style: italic; font-size: 14px; line-height: 2;
  background: rgba(247, 242, 232, .9);
}
.ba-after .ba-label { right: 10px; }
.ba-before .ba-label { left: 10px; }
.ba-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: var(--paper); pointer-events: none; }
.ba-knob {
  position: absolute; top: 50%; left: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px;
  display: grid; place-items: center; border-radius: 50%;
  background: var(--accent); color: var(--paper);
  font-family: var(--en); font-style: italic; font-size: 13px; letter-spacing: .04em;
  box-shadow: 0 6px 16px rgba(34, 48, 42, .3);
}
.ba-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; touch-action: pan-y; }
.ba:has(.ba-range:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- スクロールスナップ ---------- */
.snap {
  display: flex; gap: 16px; margin: 40px calc(var(--pad) * -1) 0; padding: 0 var(--pad) 12px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 var(--pad);
  scrollbar-width: none;
}
.snap::-webkit-scrollbar { display: none; }
.snap-item {
  flex: 0 0 84%; scroll-snap-align: start;
  display: flex; flex-direction: column;
  padding: 24px 22px; background: #fff; border: 1px solid var(--line);
}
.snap-no { font-family: var(--en); font-style: italic; font-size: 34px; line-height: 1; color: var(--accent); }
.snap-title { margin-top: 12px; font-size: 19px; font-weight: 500; letter-spacing: .1em; }
.snap-item p:not(.snap-no) { font-size: 14px; line-height: 1.9; min-height: 7.6em; }
.snap-item img { margin-top: 16px; height: auto; aspect-ratio: 4 / 3; }
.snap-hint { margin-top: 10px; text-align: center; font-family: var(--en); font-style: italic; font-size: 13px; color: var(--ink-soft); }

/* ---------- Q&A ---------- */
.faq { margin-top: 36px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  position: relative; list-style: none; cursor: pointer;
  padding: 20px 36px 20px 30px; font-size: 15px; line-height: 1.8; font-weight: 500;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "Q"; position: absolute; left: 0; top: 16px; font-family: var(--en); font-style: italic; font-size: 20px; color: var(--accent); }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px; margin-top: -7px;
  border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
  transform: rotate(45deg); transition: transform .3s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { padding: 0 6px 22px 30px; font-size: 14px; color: var(--ink-soft); }

/* ---------- CTA ---------- */
.cta { text-align: center; background: var(--paper-deep); padding-bottom: 96px; }
.cta-big { font-family: var(--en); font-style: italic; font-size: clamp(52px, 15vw, 72px); line-height: 1.02; color: var(--accent); }
.cta-ja { margin-top: 18px; font-size: 16px; font-weight: 500; letter-spacing: .3em; }
.cta-photo { margin: 32px 0 30px; height: auto; aspect-ratio: 3 / 2; }
.cta-limit { margin-bottom: 24px; font-size: 16px; font-weight: 500; line-height: 1.7; }
.cta-limit-label {
  display: block; width: max-content; margin: 0 auto 8px; padding: 0 14px;
  font-size: 11px; letter-spacing: .26em; font-weight: 400; line-height: 2.2;
  color: var(--paper); background: var(--sub);
}
.cta-note { margin-top: 26px; font-size: 13px; color: var(--ink-soft); line-height: 2; }

/* ---------- フッター ---------- */
footer { padding: 48px var(--pad) 56px; text-align: center; background: var(--sub); color: rgba(247, 242, 232, .78); font-size: 11px; line-height: 2; }
.footer-logo { font-family: var(--en); font-size: 24px; color: var(--paper); margin-bottom: 12px; }

/* ---------- 離脱防止ポップアップ ---------- */
.modal {
  position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px;
  background: rgba(20, 30, 26, .55); opacity: 0; transition: opacity .4s;
}
.modal[hidden] { display: none; }
.modal.is-open { opacity: 1; }
.modal-box {
  width: min(420px, 100%); padding: 44px 32px 28px; text-align: center;
  background: var(--paper); border-top: 10px solid var(--accent);
  transform: translateY(18px); transition: transform .5s var(--ease);
}
.modal.is-open .modal-box { transform: none; }
.modal-en { font-family: var(--en); font-style: italic; font-size: 16px; color: var(--accent); }
.modal-title { margin: 8px 0 12px; font-size: 21px; font-weight: 500; line-height: 1.7; letter-spacing: .1em; }
.modal-box .btn { margin-top: 22px; }
.modal-close { display: block; margin: 16px auto 0; font-size: 12px; letter-spacing: .2em; color: var(--ink-soft); border-bottom: 1px solid currentColor; }

/* ---------- マウスストーカー（PCのみ） ---------- */
.stalker { position: fixed; inset: 0; z-index: 80; pointer-events: none; opacity: 0; transition: opacity .4s; }
.stalker.is-on { opacity: 1; }
.stalker-flake {
  position: absolute; left: 0; top: 0; color: var(--gold-light); will-change: transform;
  filter: drop-shadow(0 0 3px rgba(255, 244, 210, .95)) drop-shadow(0 0 8px rgba(236, 208, 138, .7));
}
.stalker-flake svg { display: block; width: 100%; height: 100%; animation: twinkle 1.5s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: .35; transform: scale(.6); } 50% { opacity: 1; transform: scale(1.1); } }

/* ---------- 動きを減らす設定 ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .fade { opacity: 1; transform: none; transition: none; }
  .mark { background-size: 100% 100%; transition: none; }
  .hero-float, .slide.is-active, .btn-sticker, .float-ring { animation: none; }
  .slide { transform: none; }
  .snow { display: none; }
}
