@charset "UTF-8";
/* ============================================================
   スクロール演出デモ / styles.css
   外部ライブラリなし。動かすのは transform と opacity のみ。
   ============================================================ */

:root {
  --ink:        #12161c;
  --ink-2:      #1b2129;
  --paper:      #f7f8f7;
  --paper-2:    #eceee9;
  --text:       #262c33;
  --text-mute:  #6b7480;
  --line:       #d9ddd6;
  --accent:     #b8734a;
  --accent-2:   #d99a6e;
  --accent-soft:#f0e2d7;

  --wrap:  1120px;
  --pad:   clamp(20px, 5vw, 40px);

  --ease:  cubic-bezier(.22, .61, .36, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font-family: "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN",
               "Hiragino Sans", Meiryo, sans-serif;
  line-height: 1.9;
  letter-spacing: .02em;
  overflow-x: hidden;
}
h1, h2, h3, p, dl, dd, ul { margin: 0; }
ul { padding: 0; list-style: none; }
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .88em;
  background: rgba(0,0,0,.05);
  padding: .1em .45em;
  border-radius: 3px;
}

.wrap { width: min(100% - var(--pad) * 2, var(--wrap)); margin-inline: auto; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: 12px 20px; z-index: 100;
}
.skip:focus { left: 0; }

/* ============================================================
   Hero / 多層パララックス
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--ink);
  color: #fff;
  isolation: isolate;
}

.hero__layers { position: absolute; inset: -10% 0; z-index: 0; }
.hero__layer  { position: absolute; inset: 0; will-change: transform; }

/* 奥 — ゆっくり動く。星のような点 */
.hero__layer--far {
  background-image:
    radial-gradient(1.5px 1.5px at 12% 22%, rgba(255,255,255,.55) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 68% 14%, rgba(255,255,255,.40) 50%, transparent 51%),
    radial-gradient(2px   2px   at 84% 46%, rgba(255,255,255,.30) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 34% 62%, rgba(255,255,255,.35) 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 52% 84%, rgba(255,255,255,.28) 50%, transparent 51%),
    radial-gradient(2px   2px   at 22% 88%, rgba(255,255,255,.22) 50%, transparent 51%);
}

/* 中景 — 稜線 */
.hero__layer--mid {
  background:
    radial-gradient(120% 70% at 50% 118%, rgba(184,115,74,.42) 0%, transparent 62%);
}
.hero__layer--mid::after {
  content: "";
  position: absolute; left: -5%; right: -5%; bottom: 12%;
  height: 46%;
  background: var(--ink-2);
  clip-path: polygon(0 62%, 14% 40%, 26% 55%, 40% 26%, 55% 48%, 68% 30%, 82% 52%, 100% 34%, 100% 100%, 0 100%);
}

/* 前景 — 手前の稜線 */
.hero__layer--near::after {
  content: "";
  position: absolute; left: -8%; right: -8%; bottom: 0;
  height: 34%;
  background: #0b0e12;
  clip-path: polygon(0 70%, 18% 44%, 33% 64%, 48% 38%, 63% 60%, 78% 40%, 92% 58%, 100% 46%, 100% 100%, 0 100%);
}

.hero__inner {
  position: relative; z-index: 1;
  text-align: center;
  padding: 0 var(--pad);
  max-width: 760px;
}
.hero__eyebrow {
  display: inline-block;
  font-size: 12px; letter-spacing: .22em;
  color: var(--accent-soft);
  border: 1px solid rgba(240,226,215,.4);
  border-radius: 999px;
  padding: 5px 16px;
  margin-bottom: 28px;
}
.hero__title {
  font-size: clamp(34px, 7vw, 68px);
  line-height: 1.28;
  font-weight: 700;
  letter-spacing: .04em;
  margin-bottom: 26px;
}
.hero__title em { font-style: normal; color: var(--accent-2); }
.hero__lead {
  font-size: clamp(14px, 1.7vw, 16px);
  color: rgba(255,255,255,.78);
  margin-bottom: 34px;
}
.hero__note { font-size: 12px; letter-spacing: .16em; color: rgba(255,255,255,.5); }

.hero__cue {
  position: absolute; bottom: 34px; left: 50%; z-index: 1;
  width: 1px; height: 54px;
  background: rgba(255,255,255,.22);
  overflow: hidden;
}
.hero__cue span {
  position: absolute; inset: 0;
  background: var(--accent-2);
  animation: cue 2.1s var(--ease) infinite;
}
@keyframes cue {
  0%   { transform: translateY(-100%); }
  60%  { transform: translateY(100%); }
  100% { transform: translateY(100%); }
}

/* ============================================================
   スクロール進捗バー
   ============================================================ */
.progress {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: 3px; background: transparent; pointer-events: none;
}
.progress__bar {
  height: 100%; width: 100%;
  background: var(--accent);
  transform: scaleX(0); transform-origin: 0 50%;
  will-change: transform;
}

/* ============================================================
   セクション共通
   ============================================================ */
.section { padding: clamp(80px, 13vw, 150px) 0; }
.section--alt  { background: var(--paper-2); }
.section--tech { background: var(--ink); color: rgba(255,255,255,.86); }

.sec-head { max-width: 720px; margin-bottom: clamp(40px, 6vw, 70px); }
.sec-num {
  display: block;
  font-size: 12px; letter-spacing: .22em;
  color: var(--accent);
  margin-bottom: 14px;
}
.sec-title {
  font-size: clamp(22px, 3.6vw, 34px);
  line-height: 1.5; font-weight: 700; letter-spacing: .04em;
  margin-bottom: 18px;
}
.sec-desc { color: var(--text-mute); font-size: clamp(14px, 1.6vw, 15px); }
.section--tech .sec-desc { color: rgba(255,255,255,.62); }
.sec-tech {
  margin-top: 18px; padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 13px; color: var(--text-mute);
}
.sec-tech b { color: var(--text); font-weight: 700; margin-right: 4px; }

/* ---------- 01 奥行きカード ---------- */
/* 3枚のカードは移動量が異なる（data-depth）。
   枠で切り取ることで、はみ出しを気にせず移動量を大きく取れる。
   カードが枠の外へ出入りすること自体が、窓から覗いた奥行きの表現になる。 */
.depth {
  position: relative;
  height: clamp(320px, 46vw, 420px);
  overflow: hidden;
  border-radius: 4px;
  background: #fff;
  border: 1px solid var(--line);
}
/* ラベルは中央でなく左上に置く。カード同士が重なるため、
   中央だと手前のカードに隠れて読めなくなる。 */
.depth__card {
  position: absolute;
  display: grid; place-items: start;
  padding: 14px 18px;
  border-radius: 4px;
  font-size: 13px; letter-spacing: .18em;
  will-change: transform;
}
.depth__card--3 {
  inset: 10% 22% 30% 0;
  background: var(--accent-soft); color: #8a6046;
}
.depth__card--2 {
  inset: 20% 8% 18% 18%;
  background: var(--accent); color: #fff;
  box-shadow: 0 18px 40px rgba(0,0,0,.12);
}
.depth__card--1 {
  inset: 34% 0 12% 40%;
  background: var(--ink); color: #fff;
  box-shadow: 0 24px 60px rgba(0,0,0,.22);
}

/* ---------- 02 カード ---------- */
.cards {
  display: grid; gap: 22px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 32px 26px;
}
.card__ico { color: var(--accent); font-size: 18px; }
.card h3 { font-size: 17px; margin: 12px 0 10px; letter-spacing: .06em; }
.card p  { font-size: 14px; color: var(--text-mute); }

/* ---------- 03 横スクロール ---------- */
.hscroll { height: 300vh; position: relative; }
.hscroll__stage {
  position: sticky; top: 0;
  height: 100svh;
  display: flex; align-items: center;
  overflow: hidden;
}
.hscroll__track {
  display: flex; gap: clamp(16px, 3vw, 34px);
  padding-inline: var(--pad);
  will-change: transform;
}
.panel {
  flex: 0 0 auto;
  width: clamp(230px, 34vw, 400px);
  height: clamp(300px, 46vh, 460px);
  border-radius: 4px;
  display: grid; place-content: center; gap: 10px;
  text-align: center;
  color: #fff;
}
.panel__n { font-size: 12px; letter-spacing: .28em; opacity: .7; }
.panel p  { font-size: clamp(20px, 3vw, 30px); letter-spacing: .2em; font-weight: 700; }
.panel--1 { background: var(--ink); }
.panel--2 { background: #3d4a44; }
.panel--3 { background: var(--accent); }
.panel--4 { background: #8a6046; }

/* ---------- 04 数値 ---------- */
.stats {
  display: grid; gap: 2px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 4px; overflow: hidden;
}
.stat { background: var(--paper-2); padding: 34px 26px; text-align: center; }
.stat dt { font-size: 13px; color: var(--text-mute); letter-spacing: .1em; }
.stat dd {
  margin: 10px 0 0;
  font-size: clamp(34px, 6vw, 54px);
  font-weight: 700; line-height: 1.2; color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat small { font-size: 14px; font-weight: 400; color: var(--text-mute); margin-left: 6px; }

/* ---------- 05 マスク ---------- */
.reveal-box { height: clamp(300px, 52vw, 520px); }
.reveal-box__art {
  height: 100%;
  display: grid; place-items: center;
  background:
    linear-gradient(135deg, var(--ink) 0%, #33413c 46%, var(--accent) 100%);
  /* JS が --p（0〜1）を書き込み、切り抜きと拡大に反映する */
  --p: 0;
  clip-path: inset(calc((1 - var(--p)) * 22%) calc((1 - var(--p)) * 14%) round 4px);
  transform: scale(calc(1.06 - var(--p) * .06));
  will-change: clip-path, transform;
}
.reveal-box__label {
  color: rgba(255,255,255,.9);
  font-size: clamp(13px, 2vw, 18px);
  letter-spacing: .32em;
}

/* ---------- 技術メモ ---------- */
.notes dl { display: grid; gap: 0; }
.notes dt {
  font-weight: 700; font-size: 15px; letter-spacing: .06em;
  color: #fff;
  padding-top: 24px; margin-top: 24px;
  border-top: 1px solid rgba(255,255,255,.14);
}
.notes dl > dt:first-child { border-top: 0; margin-top: 0; padding-top: 0; }
.notes dd {
  margin: 8px 0 0; font-size: 14px; color: rgba(255,255,255,.62);
}
.notes code { background: rgba(255,255,255,.1); color: #fff; }

/* ---------- footer ---------- */
.foot { background: #0b0e12; color: rgba(255,255,255,.5); padding: 46px 0; }
.foot__note { font-size: 13px; }
.foot__note b { color: rgba(255,255,255,.85); }
.foot__sign { font-size: 12px; letter-spacing: .18em; margin-top: 14px; }

/* ============================================================
   出現アニメーション（JSが .is-in を付与）
   ============================================================ */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--d, 0ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }

/* ============================================================
   動きを減らす設定への配慮
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero__cue span { animation: none; }
  .hero__layer, .depth__card, .hscroll__track { transform: none !important; }
  .reveal-box__art { clip-path: inset(0 round 4px) !important; transform: none !important; }
  .hscroll { height: auto; }
  .hscroll__stage { position: static; height: auto; overflow-x: auto; }
}

/* ============================================================
   スマートフォン — 演出は控えめに
   ============================================================ */
@media (max-width: 767px) {
  .hscroll { height: 220vh; }
  .depth { height: 300px; }
  .depth__card { font-size: 12px; }
}
