:root {
  color-scheme: light;
  --paper: #f5f2ec;
  --ink: #16181d;
  --muted: #5d6066;
  --night: #0c0e13;
  --night-2: #101218;
  --gold: #b3924c;
  --line: #d9d3c5;
  --line-dark: #2b2e35;
  --display: "Bodoni Moda", "Times New Roman", serif;
  --mincho: "Shippori Mincho", "Yu Mincho", serif;
  --sans: "Noto Sans JP", "Hiragino Kaku Gothic ProN", sans-serif;
  --gutter: clamp(24px, 5.6vw, 88px);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 14px/2.1 var(--sans);
}

h1, h2, h3, p, ol, ul, dl, dd { margin: 0; }
h1, h2, h3 { font-weight: 400; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }
img, video { display: block; width: 100%; object-fit: cover; }

a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 5px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

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

/* ---------- ヘッダー（脇役は明るさを落とす：Linearの判断） ---------- */
.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 40;
  color: #fff;
}

.site-header__inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding-block: 27px;
}

.brand {
  display: grid;
  justify-items: start;
  text-decoration: none;
}

.brand__word {
  font: 400 32px/1 var(--display);
  letter-spacing: .18em;
}

.brand__company {
  margin-top: 7px;
  font-size: 10px;
  line-height: 1.4;
  letter-spacing: .14em;
}

.site-header__consult {
  margin-top: 8px;
  padding-bottom: 3px;
  border-bottom: 1px solid rgb(255 255 255 / .55);
  font-size: 12px;
  letter-spacing: .22em;
  text-decoration: none;
  white-space: nowrap;
}

.site-header__consult:hover { border-bottom-color: var(--gold); }

/* ================================================================
   1. 入口：扉が開き、スクロールで店内へ進む
   ================================================================ */
.entry {
  position: relative;
  height: 460vh;
  background: var(--night);
}

.entry-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  min-height: 480px;
  overflow: hidden;
  isolation: isolate;
  background: var(--night);
  color: #fff;
}

.entry__video {
  position: absolute;
  inset: 0;
  z-index: 0;
  height: 100%;
}

.entry-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at center, rgb(12 14 19 / .30), transparent 74%),
    linear-gradient(0deg, rgb(12 14 19 / .72), transparent 34%, transparent 74%, rgb(12 14 19 / .42));
  pointer-events: none;
}

.entry__copy {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  justify-items: center;
  padding-inline: 20px;
  text-align: center;
  pointer-events: none;
}

.hero__catch {
  font: 500 clamp(21px, 3.6vw, 38px)/1.7 var(--mincho);
  letter-spacing: .16em;
}

.phrase {
  display: block;
  overflow: hidden;
  padding-block: .1em;
  margin-block: -.1em;
}

.phrase__inner {
  display: block;
  will-change: transform, opacity;
}

.hero__company {
  margin-top: 22px;
  color: rgb(255 255 255 / .78);
  font-size: 11px;
  letter-spacing: .34em;
}

/* 扉：両開き。質感は抑え、主役は背後の空間。
   JSが初期化できた場合（html.motion）だけ出す。失敗時は静止表示に落ちる */
.door, .door-seam, .entry__brand, .entry__scroll { display: none; }
html.motion .door, html.motion .door-seam { display: block; }
html.motion .entry__brand, html.motion .entry__scroll { display: grid; }

.door {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 3;
  width: 50.5%;
  background:
    linear-gradient(90deg, rgb(255 255 255 / .045), transparent 18%, transparent 82%, rgb(0 0 0 / .35)),
    repeating-linear-gradient(90deg, rgb(255 255 255 / .016) 0 1px, transparent 1px 92px),
    linear-gradient(180deg, #0a0b0f, #11131a 55%, #0a0b0f);
  will-change: transform;
}

.door--l { left: 0; }
.door--r { right: 0; transform: scaleX(-1); }

/* 扉の継ぎ目：中央の細い光の線（題材に根差す細部） */
.door-seam {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 4;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgb(226 199 138 / .85) 30%, rgb(226 199 138 / .85) 70%, transparent);
  transform: translateX(-.5px);
  pointer-events: none;
}

.entry__brand {
  position: absolute;
  inset: 0;
  z-index: 5;
  place-content: center;
  justify-items: center;
  gap: 12px;
  pointer-events: none;
}

.entry__brand-word {
  font: 400 clamp(44px, 8.5vw, 96px)/1 var(--display);
  letter-spacing: .22em;
  text-indent: .22em;
  color: #fff;
}

.entry__brand-sub {
  font-size: 11px;
  letter-spacing: .34em;
  text-indent: .34em;
  color: rgb(255 255 255 / .62);
}

.entry__scroll {
  position: absolute;
  inset: auto 0 26px;
  z-index: 5;
  justify-items: center;
  gap: 10px;
  font-size: 10px;
  letter-spacing: .4em;
  text-indent: .4em;
  color: rgb(255 255 255 / .66);
  pointer-events: none;
}

.entry__scroll::after {
  content: "";
  width: 1px;
  height: 44px;
  background: linear-gradient(180deg, rgb(255 255 255 / .66), transparent);
}

/* ---------- 2. 課題の場面 ---------- */
.scene { padding-block: clamp(72px, 10vw, 150px) clamp(80px, 11vw, 170px); }

.scene__frame {
  position: relative;
  width: min(1440px, calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
  overflow: hidden;
  background: var(--night);
}

.scene__photo {
  aspect-ratio: 16 / 10;
  will-change: transform;
}

.scene__frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgb(12 14 19 / .66), transparent 46%);
  pointer-events: none;
}

.scene__line {
  position: absolute;
  inset: auto auto 34px 40px;
  z-index: 1;
  max-width: min(720px, calc(100% - 80px));
  color: #fff;
  font: 500 clamp(20px, 3.2vw, 38px)/1.65 var(--mincho);
  letter-spacing: .06em;
}

/* 行単位マスクリビール（JSが .line-mask / .line-inner を生成） */
.line-mask {
  display: block;
  overflow: hidden;
  padding-block: .08em;
  margin-block: -.08em;
}

.line-inner {
  display: block;
  will-change: transform, opacity;
}

html.motion .line-inner {
  transform: translateY(112%);
  opacity: 0;
}

html.motion .revealed .line-inner {
  transform: translateY(0);
  opacity: 1;
  transition: transform 1s cubic-bezier(.19, 1, .22, 1), opacity .7s ease;
}

html.motion .scene__photo { opacity: 0; }

html.motion .scene.revealed .scene__photo {
  opacity: 1;
  transition: opacity 1.1s ease;
}

/* ================================================================
   3. カウントアップ：数字は線と数字だけに金を使う（ZENBIの判断）
   ================================================================ */
.count {
  position: relative;
  height: 260vh;
  background: var(--night);
}

.count-stage {
  position: sticky;
  top: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  height: 100vh;
  height: 100svh;
  min-height: 480px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 90% 60% at 50% 42%, rgb(255 255 255 / .05), transparent 70%),
    linear-gradient(180deg, var(--night), var(--night-2) 50%, var(--night));
  color: #fff;
  text-align: center;
}

.count__label {
  font-size: 12px;
  letter-spacing: .42em;
  text-indent: .42em;
  color: rgb(255 255 255 / .58);
}

.count__num {
  margin-top: 6px;
  font: 400 clamp(190px, 32vw, 400px)/1 var(--display);
  font-optical-sizing: auto;
  color: var(--gold);
}

.count__rule {
  width: min(340px, 56vw);
  height: 1px;
  margin-top: 30px;
  background: rgb(255 255 255 / .14);
}

.count__rule span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--gold);
  transform-origin: left center;
}

.count__names {
  display: flex;
  gap: clamp(22px, 5vw, 64px);
  margin-top: 30px;
}

.count__names li {
  font: 400 clamp(13px, 1.7vw, 19px)/1.4 var(--display);
  letter-spacing: .18em;
  color: rgb(255 255 255 / .92);
}

.count__names li::before {
  content: "";
  display: block;
  width: 5px;
  height: 5px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: var(--gold);
}

/* ================================================================
   4. 壁：額装ポスターが1枚ずつ登場し、壁に揃う
   ================================================================ */
.wall {
  position: relative;
  height: 430vh;
  background: var(--night);
}

.wall-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  min-height: 480px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 100% 55% at 50% 0%, rgb(255 255 255 / .055), transparent 65%),
    linear-gradient(180deg, var(--night-2), var(--night) 30%);
  color: #fff;
}

.wall__label {
  position: absolute;
  top: 34px;
  left: var(--gutter);
  font-size: 11px;
  letter-spacing: .3em;
  color: rgb(255 255 255 / .5);
}

/* ピクチャーレール：額を吊る線（題材に根差す細部） */
.wall__rail {
  position: absolute;
  top: 15.5%;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--line-dark);
}

.wall__grid {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(18px, 3.4vw, 52px);
  padding-inline: var(--gutter);
}

.poster {
  position: relative;
  width: min(27vw, 372px);
  background: #14161c;
  border: 1px solid var(--line-dark);
  box-shadow: 0 34px 70px rgb(0 0 0 / .55), 0 4px 14px rgb(0 0 0 / .5);
  will-change: transform, opacity;
}

.poster__media {
  overflow: hidden;
  background: #000;
}

.poster__media img {
  aspect-ratio: 4 / 3;
}

.poster__media--typo {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
}

.poster__typo-word {
  font: 400 clamp(40px, 5.6vw, 76px)/1 var(--display);
  letter-spacing: .05em;
  color: transparent;
  -webkit-text-stroke: 1px rgb(255 255 255 / .55);
}

.poster__plate {
  padding: 18px 20px 20px;
  border-top: 1px solid var(--line-dark);
}

.poster__name {
  font: 400 clamp(24px, 2.9vw, 40px)/1.15 var(--display);
  letter-spacing: .05em;
}

.poster__location {
  margin-top: 7px;
  font-size: 9px;
  letter-spacing: .3em;
  color: rgb(255 255 255 / .46);
}

.wall__caption {
  position: absolute;
  inset: auto 0 5.5%;
  text-align: center;
  font: 500 clamp(15px, 2vw, 20px)/1.6 var(--mincho);
  letter-spacing: .14em;
  color: rgb(255 255 255 / .88);
}

/* ================================================================
   5. 横移動：カメラが室内を横に流れ、細部へ寄る
   ================================================================ */
.pan {
  position: relative;
  height: 340vh;
  background: var(--night);
}

.pan-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  min-height: 480px;
  overflow: hidden;
  background: var(--night);
  color: #fff;
}

.pan__label {
  position: absolute;
  top: 34px;
  left: var(--gutter);
  z-index: 2;
  font: 400 11px/1.4 var(--display);
  letter-spacing: .34em;
  color: rgb(255 255 255 / .5);
}

.pan__track {
  display: flex;
  height: 100%;
  will-change: transform;
}

.pan__panel {
  flex: 0 0 100%;
  height: 100%;
  overflow: hidden;
}

.pan__panel img {
  height: 100%;
  will-change: transform;
}

.pan__progress {
  position: absolute;
  inset: auto var(--gutter) 30px;
  height: 1px;
  background: rgb(255 255 255 / .18);
}

.pan__progress span {
  display: block;
  height: 100%;
  width: 100%;
  background: rgb(255 255 255 / .75);
  transform-origin: left center;
}

/* ---------- 6. 支援内容（デモ5同一） ---------- */
.services {
  width: min(1200px, calc(100% - 2 * var(--gutter)));
  margin-inline: auto;
  padding-block: clamp(84px, 11vw, 160px) clamp(30px, 4vw, 60px);
}

.service {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(28px, 5vw, 72px);
  margin-bottom: clamp(84px, 11vw, 150px);
}

.service--reverse { grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); }
.service--reverse .service__media { order: 2; }
.service--reverse .service__copy { order: 1; }

.service__media { overflow: hidden; background: var(--night); }
.service__media video, .service__media img { aspect-ratio: 16 / 9; }

.service__copy .number {
  display: block;
  margin-bottom: 14px;
  color: var(--gold);
  font: 400 30px/1 var(--display);
}

.service__en {
  margin-bottom: 12px;
  color: var(--gold);
  font: 400 12px/1.4 var(--display);
  letter-spacing: .34em;
}

.service__copy h3 {
  font: 500 clamp(34px, 4.8vw, 60px)/1.35 var(--mincho);
  letter-spacing: .04em;
}

.service__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-top: 18px;
}

.service__tags li {
  padding: 4px 12px;
  border: 1px solid var(--line);
  font-size: 12px;
  line-height: 1.6;
}

html.motion .service__copy > *,
html.motion .service__tags li {
  opacity: 0;
  transform: translateY(22px);
}

html.motion .service__copy > h3 {
  opacity: 1;
  transform: none;
}

html.motion .service.revealed .service__copy > *,
html.motion .service.revealed .service__tags li {
  opacity: 1;
  transform: none;
  transition: opacity .8s ease, transform .85s cubic-bezier(.19, 1, .22, 1);
}

/* ---------- 7. 流れ（細いライン） ---------- */
.flow { padding-block: clamp(30px, 5vw, 70px) clamp(84px, 11vw, 150px); }

.flow__line {
  position: relative;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.flow__line::before {
  content: "";
  position: absolute;
  inset: 9px 0 auto;
  height: 1px;
  background: var(--line);
}

.flow__line::after {
  content: "";
  position: absolute;
  inset: 9px auto auto 0;
  width: calc(var(--flow-p, 0) * 100%);
  height: 1px;
  background: var(--gold);
}

.flow__line li {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
}

.flow__num {
  padding-inline: 10px;
  background: var(--paper);
  color: var(--gold);
  font: 400 19px/1 var(--display);
}

.flow__word {
  font-size: 13px;
  letter-spacing: .12em;
  white-space: nowrap;
}

html.motion .flow__num {
  color: #c6bfa9;
  transition: color .45s ease;
}

html.motion .flow__word {
  color: var(--muted);
  transition: color .45s ease;
}

html.motion .flow__line li.lit .flow__num { color: var(--gold); }
html.motion .flow__line li.lit .flow__word { color: var(--ink); }

/* ---------- 8. 締め：静かなワンカット ---------- */
.closing {
  position: relative;
  display: grid;
  min-height: 94vh;
  place-items: center;
  overflow: hidden;
  background: var(--night);
  color: #fff;
  text-align: center;
}

.closing__photo {
  position: absolute;
  inset: 0;
  height: 100%;
}

.closing::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgb(12 14 19 / .38), rgb(12 14 19 / .68) 78%),
    linear-gradient(0deg, rgb(12 14 19 / .8), transparent 40%, transparent 70%, rgb(12 14 19 / .55));
}

.closing__inner {
  position: relative;
  z-index: 1;
  padding: 90px 20px;
}

.cta__title {
  font: 500 clamp(26px, 4.6vw, 46px)/1.6 var(--mincho);
  letter-spacing: .1em;
}

.cta__button {
  display: inline-block;
  margin-top: 46px;
  padding: 16px 52px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: #fff;
  font-size: 14px;
  letter-spacing: .24em;
  text-decoration: none;
}

.cta__button:hover { background: rgb(179 146 76 / .16); }

html.motion .closing__inner {
  opacity: 0;
  transform: translateY(14px);
}

html.motion .closing.revealed .closing__inner {
  opacity: 1;
  transform: none;
  transition: opacity 1.4s ease, transform 1.4s cubic-bezier(.19, 1, .22, 1);
}

/* ---------- 会社概要 ---------- */
.company { padding-block: clamp(72px, 9vw, 120px); }

.company__layout {
  display: grid;
  grid-template-columns: minmax(220px, .7fr) minmax(0, 1.3fr);
  gap: 24px 46px;
  align-items: start;
}

.company__title {
  font: 500 20px/1.6 var(--mincho);
  letter-spacing: .18em;
}

.company__facts > div {
  display: grid;
  grid-template-columns: 83px minmax(0, 1fr);
  gap: 10px 16px;
  align-items: baseline;
  padding-block: 14px;
  border-top: 1px solid var(--line);
}

.company__facts > div:last-child { border-bottom: 1px solid var(--line); }

.company__facts dt {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .1em;
}

/* ---------- フッター ---------- */
.site-footer {
  overflow: hidden;
  padding-block: 45px 24px;
  background: var(--night);
  color: #fff;
}

.site-footer__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 25px;
}

.site-footer__address {
  color: rgb(255 255 255 / .6);
  font-size: 12px;
  letter-spacing: .08em;
}

.site-footer__word {
  font: 400 26vw/.92 var(--display);
  font-optical-sizing: none;
  font-variation-settings: "opsz" 96;
  text-align: center;
  letter-spacing: .015em;
  color: rgb(255 255 255 / .14);
}

.site-footer__copyright {
  margin-top: 27px;
  color: rgb(255 255 255 / .65);
  font-size: 12px;
}

/* ---------- モバイル固定バー（PCでは非表示） ---------- */
.mobile-bar { display: none; }

@media (max-width: 760px) {
  :root { --gutter: 24px; }

  body { padding-bottom: calc(54px + env(safe-area-inset-bottom)); }

  .site-header__inner { padding-block: 19px; }
  .brand__word { font-size: 25px; }
  .brand__company { margin-top: 4px; }
  .site-header__consult { margin-top: 5px; font-size: 11px; }

  .entry-stage { min-height: 440px; }
  .hero__catch { letter-spacing: .1em; }
  .hero__company { margin-top: 16px; }
  .entry__brand-word { letter-spacing: .14em; text-indent: .14em; }

  .scene__photo { aspect-ratio: 4 / 3.4; }
  .scene__line {
    inset: auto auto 20px 20px;
    max-width: calc(100% - 40px);
  }

  .count__names { gap: 18px; flex-wrap: wrap; justify-content: center; }

  .wall__grid {
    flex-direction: column;
    gap: 12px;
    padding-block: 48px 72px;
  }

  .poster { width: min(54vw, 210px); }
  .poster__plate { padding: 10px 12px 12px; }
  .poster__name { font-size: 20px; }
  .poster__location { margin-top: 4px; }
  .poster__media img, .poster__media--typo { aspect-ratio: 16 / 9; }
  .wall__rail { display: none; }
  /* 固定の相談バーに隠れない位置へ */
  .wall__caption { inset: auto 0 84px; }

  .service,
  .service--reverse { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .service--reverse .service__media { order: 0; }
  .service--reverse .service__copy { order: 1; }
  .service__copy .number { font-size: 24px; margin-bottom: 10px; }
  .service__copy h3 { font-size: clamp(30px, 8.6vw, 40px); }

  .flow__line {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 12px;
  }
  .flow__line::before, .flow__line::after { display: none; }
  .flow__line li { justify-items: start; text-align: left; }
  .flow__num { padding-inline: 0; }

  .closing { min-height: 78vh; }
  .cta__button { margin-top: 36px; padding: 14px 42px; }

  .company__layout { grid-template-columns: minmax(0, 1fr); }

  .site-footer { padding-block: 30px 20px; }
  .site-footer__top { flex-direction: column; }
  .site-footer__copyright { margin-top: 16px; }

  .mobile-bar {
    position: fixed;
    inset: auto 0 0;
    z-index: 60;
    display: block;
    padding: 15px 20px calc(15px + env(safe-area-inset-bottom));
    background: var(--night);
    color: #fff;
    font-size: 13px;
    letter-spacing: .26em;
    text-align: center;
    text-decoration: none;
  }
}

@media (max-width: 760px) and (max-height: 720px) {
  .poster { width: min(48vw, 190px); }
  .wall__grid { padding-block: 44px 64px; }
}

/* ---------- 動きを減らす設定では全て静止表示（checklists/motion） ---------- */
@media (prefers-reduced-motion: reduce) {
  .entry, .count, .wall, .pan { height: auto; }
  .entry-stage, .count-stage, .wall-stage, .pan-stage {
    position: static;
    height: auto;
    min-height: 0;
  }
  .entry-stage { min-height: 88vh; }
  .door, .door-seam, .entry__scroll { display: none; }
  .entry__brand { display: none; }
  .count-stage { padding-block: 90px; }
  .wall-stage { padding-block: 90px 110px; }
  .wall__grid { position: static; }
  .wall__label { top: 26px; }
  .wall__caption { inset: auto 0 34px; }
  .pan-stage { height: auto; }
  .pan__track { flex-direction: column; transform: none !important; }
  .pan__panel { flex: none; height: 52vh; }
  .pan__panel img { transform: none !important; }
  .pan__progress { display: none; }
  .poster { opacity: 1 !important; transform: none !important; }
  html.motion .line-inner,
  html.motion .service__copy > *,
  html.motion .service__tags li,
  html.motion .scene__photo,
  html.motion .closing__inner {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
