/* テンプレート：pop-sticker
   色：明るい灰色（#f6f5f2）と黒（#222）の面に、オレンジ・青・緑・ピンク・紫・黄の差し色。theme.color は使わない
   （店に合わせるときは custom.css で --orange などを変える）。カード・ボタンは角を丸める。影は使わない。
   書体（--font-heading・--font-body・--font-en・--font-script・--font-pixel）は site.yaml の theme.fonts から <html> に入る。
   動きは html.motion のときだけ付ける。JavaScript がない・「動きを減らす」設定のときは、ふつうの縦に並んだページになる。
   スクロールの進み具合は、data-scene の要素に --p（0〜1）として入る。背景の黒さは --dark
   写真を縦や横に大きく回転させない（ほぼ真横を向いたときに、色が引き伸ばされて見えるため） */

:root {
  --paper: #f6f5f2;
  --white: #fff;
  --ink: #222;
  --ink-soft: #6b675f;
  --gray: #c9c6bf;
  --line: #dcd9d2;
  --orange: #f26a21;
  --blue: #1f6fd1;
  --green: #12a05c;
  --pink: #ef4a9b;
  --purple: #8a3fe0;
  --yellow: #f5c400;
  --back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --back-io: cubic-bezier(0.68, -0.6, 0.32, 1.6);
  --expo: cubic-bezier(0.16, 1, 0.3, 1);
  --in: cubic-bezier(0.55, 0, 0.75, 0);
  --header-h: 72px;
  --callbar-h: 64px;
  --gutter: 20px;
  --radius: 24px;
  --dark: 0;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* 慣性スクロールは JavaScript で行うので、CSS のなめらかスクロールは切る */
html.motion {
  scroll-behavior: auto;
}

body {
  margin: 0;
  background: var(--paper);
  background: color-mix(in srgb, var(--ink) calc(var(--dark) * 100%), var(--paper));
  color: var(--ink);
  color: color-mix(in srgb, var(--paper) calc(var(--dark) * 100%), var(--ink));
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  line-height: 2;
  letter-spacing: 0.04em;
  padding-bottom: var(--callbar-h);
}

main {
  overflow-x: clip;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.narrow {
  max-width: 920px;
}

.section {
  padding: 96px 0;
}

.pending {
  color: var(--ink-soft);
  font-size: 0.9em;
}

.empty {
  color: var(--ink-soft);
}

/* ── デモ用の帯 ── */
.demo-banner {
  position: relative;
  z-index: 40;
  background: var(--yellow);
  color: var(--ink);
  font-size: 12px;
  text-align: center;
  padding: 6px 16px;
  line-height: 1.6;
}

.demo-banner__date {
  white-space: nowrap;
}

/* ── 写真とダミー枠 ── */
.photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
  background: var(--line);
  color: var(--ink-soft);
  font-size: 12px;
  text-align: center;
  padding: 16px;
}

/* ── 案内役のキャラ（ヘルメットくん） ── */
.chara {
  --gx: 0;
  --gy: 0;
  display: inline-block;
  width: 96px;
  line-height: 0;
  vertical-align: middle;
}

.chara svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.chara__helmet {
  fill: var(--yellow);
  stroke: var(--ink);
  stroke-width: 5;
  stroke-linejoin: round;
}

.chara__line {
  stroke: var(--ink);
  stroke-width: 4;
  stroke-linecap: round;
}

.chara__white {
  fill: #fff;
  stroke: var(--ink);
  stroke-width: 5;
}

.chara__pupils {
  fill: var(--ink);
  transform: translate(calc(var(--gx) * 6px), calc(var(--gy) * 6px));
  transition: transform 0.35s var(--back);
}

.chara.is-tracking .chara__pupils {
  transition-duration: 0.12s;
}

.chara__smile {
  opacity: 0;
  stroke: var(--ink);
  stroke-width: 6;
  stroke-linecap: round;
}

.chara[data-face='smile'] .chara__eyes {
  opacity: 0;
}

.chara[data-face='smile'] .chara__smile {
  opacity: 1;
}

.chara:not(.is-tracking)[data-gaze='left'] { --gx: -1; }
.chara:not(.is-tracking)[data-gaze='right'] { --gx: 1; }
.chara:not(.is-tracking)[data-gaze='up'] { --gy: -1; }
.chara:not(.is-tracking)[data-gaze='down'] { --gy: 1; }
.chara:not(.is-tracking)[data-gaze='left-down'] { --gx: -0.7; --gy: 0.7; }
.chara:not(.is-tracking)[data-gaze='right-down'] { --gx: 0.7; --gy: 0.7; }
.chara:not(.is-tracking)[data-gaze='left-up'] { --gx: -0.7; --gy: -0.7; }
.chara:not(.is-tracking)[data-gaze='right-up'] { --gx: 0.7; --gy: -0.7; }

/* ── 軍手・鉛筆・丸いステッカー ── */
.glove {
  width: 64px;
  height: auto;
  overflow: visible;
}

.glove__cuff,
.glove__body {
  fill: #fff;
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linejoin: round;
}

.glove__cuff {
  fill: var(--yellow);
}

.glove__rib {
  stroke: var(--ink);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.glove__dots {
  fill: var(--orange);
}

.pencil {
  width: 56px;
  height: auto;
  overflow: visible;
}

.pencil__body {
  fill: var(--orange);
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linejoin: round;
}

.pencil__wood {
  fill: #f1d3a5;
  stroke: var(--ink);
  stroke-width: 3;
  stroke-linejoin: round;
}

.pencil__lead {
  fill: var(--ink);
}

.pencil__line {
  stroke: var(--ink);
  stroke-width: 2;
}

.badge {
  display: inline-block;
  width: 120px;
  line-height: 0;
}

.badge svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.badge__bg {
  fill: var(--orange);
  stroke: var(--ink);
  stroke-width: 3;
}

.badge--blue .badge__bg { fill: var(--blue); }
.badge--green .badge__bg { fill: var(--green); }

.badge__text {
  font-family: var(--font-en);
  font-size: 11px;
  letter-spacing: 0.08em;
  fill: #fff;
  transform-origin: 60px 60px;
  animation: spin 14s linear infinite;
}

.badge__eyes circle {
  fill: #fff;
  stroke: var(--ink);
  stroke-width: 3;
}

.badge__eyes .badge__pupil {
  fill: var(--ink);
  stroke: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── スロットのように回る英字 ── */
.slot {
  white-space: nowrap;
}

.slot__char {
  display: inline-block;
  height: 1.14em;
  line-height: 1.14;
  overflow: hidden;
  vertical-align: top;
}

.slot__reel {
  display: block;
}

.motion .slot__char {
  /* --i は 0（最初の文字）〜 1（最後の文字） */
  --lp: clamp(0, calc(var(--p, 1) * 1.7 - var(--i) * 0.6), 1);
}

.motion .slot__reel {
  transform: translateY(calc(var(--lp) * -3.42em));
}

/* ── セクションの見出し：英字のラベルと下線、日本語の見出し ── */
.label {
  margin-bottom: 56px;
}

.label__en {
  display: inline-block;
  padding-bottom: 6px;
  font-family: var(--font-en);
  font-size: clamp(28px, 5.4vw, 64px);
  line-height: 1.14;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  background: linear-gradient(currentColor, currentColor) left bottom / calc(var(--p, 1) * 100%) 2px no-repeat;
}

.label__ja {
  margin-top: 12px;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 500;
}

.label--center {
  text-align: center;
}

/* ── 灰色の文字が、左から濃い文字に塗り替わる ── */
.mask {
  position: relative;
  display: block;
}

.mask__base {
  color: var(--gray);
}

.mask__ink {
  position: absolute;
  inset: 0;
  color: currentColor;
}

.motion .mask__ink {
  clip-path: inset(0 calc(100% - var(--p, 1) * 100%) 0 0);
}

/* ── ステッカー風のボタン ── */
.sticker {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 56px;
  padding: 0 14px 0 24px;
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  transform: rotate(var(--tilt, -4deg));
  transition: transform 0.5s var(--back);
}

.sticker:hover {
  transform: rotate(0deg) scale(1.06);
}

.sticker--white { background: #fff; color: var(--ink); }
.sticker--orange { background: var(--orange); }
.sticker--green { background: var(--green); }
.sticker--yellow { background: var(--yellow); color: var(--ink); }

.sticker__hand {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--ink);
  overflow: hidden;
}

.sticker__hand .glove {
  width: 40px;
  transition: transform 0.4s var(--back);
}

.sticker:hover .sticker__hand .glove {
  animation: poke 0.5s ease-in-out infinite;
}

@keyframes poke {
  50% { transform: translateX(5px); }
}

/* ── ヘッダーとメニュー ── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  padding: 0 var(--gutter);
  pointer-events: none;
}

.site-header > * {
  pointer-events: auto;
}

.site-header__name {
  position: relative;
  z-index: 2;
  font-family: var(--font-heading);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: opacity 0.3s;
}

/* 黒い場面では、店名を隠してメニューだけにする */
.site-header__name {
  opacity: calc(1 - var(--dark) * 2);
}

.menu-btn {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 52px 0 18px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  background: var(--ink);
  background: color-mix(in srgb, transparent calc(var(--dark) * 100%), var(--ink));
  border-color: color-mix(in srgb, rgba(255, 255, 255, 0.5) calc(var(--dark) * 100%), transparent);
  color: #fff;
  font-family: var(--font-en);
  font-size: 12px;
  cursor: pointer;
}

.menu-btn__chara {
  position: absolute;
  right: -6px;
  top: -10px;
  width: 52px;
  transition: transform 0.5s var(--back);
}

.menu-btn:hover .menu-btn__chara {
  transform: translateY(-6px) rotate(-10deg);
}

.is-menu-open .menu-btn {
  background: #fff;
  color: var(--ink);
}

.is-menu-open .site-header__name {
  color: #fff;
  opacity: 1;
}

.nav {
  position: fixed;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  padding: 96px var(--gutter) 48px;
  background: var(--ink);
  color: #fff;
  overflow-y: auto;
  clip-path: circle(0 at calc(100% - 60px) 36px);
  visibility: hidden;
  transition: clip-path 0.8s var(--expo), visibility 0s 0.8s;
}

.is-menu-open .nav {
  clip-path: circle(150% at calc(100% - 60px) 36px);
  visibility: visible;
  transition: clip-path 0.9s var(--expo);
}

.nav__list a {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 4px 0;
  text-decoration: none;
}

.nav__en {
  font-family: var(--font-en);
  font-size: clamp(28px, 6vw, 56px);
  line-height: 1.2;
  text-transform: uppercase;
  transition: color 0.2s, transform 0.4s var(--back);
}

.nav__list a:hover .nav__en {
  color: var(--yellow);
  transform: translateX(8px);
}

.nav__ja {
  font-size: 12px;
  color: var(--gray);
}

.nav__tel {
  font-family: var(--font-en);
  font-size: 18px;
  text-decoration: none;
}

/* ── 最初の画面 ── */
.fv {
  position: relative;
}

.fv__stage {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--header-h) + 32px) var(--gutter) calc(24px + var(--callbar-h));
  overflow: hidden;
}

.motion .fv {
  height: 190vh;
  height: 190svh;
}

.motion .fv__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
}

.fv__side {
  display: none;
}

.fv__title {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--font-en);
  font-size: clamp(40px, min(15vw, 13vh), 150px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  text-align: center;
}

.fv__line {
  --lp: clamp(0, calc(var(--p, 0) * 1.8 - var(--li) * 0.16), 1);
  position: relative;
  display: block;
  /* 下へ進むと、1行ずつ上へ飛んでいく */
  transform: translateY(calc(var(--lp) * -260%));
  opacity: calc(1 - var(--lp) * 1.2);
}

.fv__word--ghost {
  color: color-mix(in srgb, var(--ink) 10%, transparent);
}

.fv__script {
  position: absolute;
  left: 50%;
  top: 46%;
  z-index: 1;
  font-family: var(--font-script);
  font-size: 1.32em;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  color: var(--orange);
  white-space: nowrap;
  transform: translate(-50%, -50%) rotate(-8deg);
  padding: 0 0.2em;
}

.fv__chara {
  position: absolute;
  left: -0.45em;
  top: -0.42em;
  width: 0.78em;
  transform: rotate(-12deg);
}

.fv__glove {
  position: absolute;
  right: -0.9em;
  top: 0.05em;
  width: 0.95em;
  transform: rotate(-150deg) scaleY(-1);
}

/* 登場：単語が下から跳ねて出る → 筆記体が書かれる → 軍手とキャラが跳ねて出る（読み込みが終わってから） */
.motion .fv__word {
  display: inline-block;
  opacity: 0;
}

.motion.is-loaded .fv__word {
  animation: rise 0.9s var(--back) calc(0.1s + var(--i) * 0.16s) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(55%); }
  to { opacity: 1; transform: none; }
}

.motion .fv__script {
  clip-path: inset(-20% 100% -20% 0);
}

.motion.is-loaded .fv__script {
  animation: write 1.1s cubic-bezier(0.45, 0, 0.2, 1) 0.75s forwards;
}

@keyframes write {
  to { clip-path: inset(-20% -5% -20% 0); }
}

.motion .fv__chara,
.motion .fv__glove {
  opacity: 0;
}

.motion.is-loaded .fv__chara {
  animation: pop-chara 0.8s var(--back) 1.5s both;
}

.motion.is-loaded .fv__glove {
  animation: pop-glove 0.7s var(--back) 1.75s both;
}

@keyframes pop-chara {
  from { opacity: 0; transform: translateY(50%) rotate(-12deg) scale(0.3); }
  to { opacity: 1; transform: rotate(-12deg); }
}

@keyframes pop-glove {
  from { opacity: 0; transform: translateY(60%) rotate(-150deg) scaleY(-1) scale(0.3); }
  to { opacity: 1; transform: rotate(-150deg) scaleY(-1); }
}

/* 弓なりの写真の帯（JavaScript が1枚ずつ位置と向きを決める） */
.bow {
  position: relative;
  z-index: 1;
  margin: 32px calc(var(--gutter) * -1) 0;
  overflow: hidden;
}

.bow__track {
  display: flex;
  gap: 12px;
  padding: 0 var(--gutter);
  overflow-x: auto;
}

.bow__item {
  flex: none;
  width: clamp(200px, 30vw, 440px);
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.bow__empty {
  display: block;
  width: 100%;
  height: 100%;
}

.bow__empty--0 { background: var(--orange); }
.bow__empty--1 { background: var(--blue); }
.bow__empty--2 { background: var(--green); }

.motion .bow {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6%;
  height: 52%;
  margin: 0;
  overflow: visible;
  perspective: 900px;
  perspective-origin: 50% 30%;
  /* 下へ進むと、帯ごと上へ抜けていく */
  transform: rotate(-7deg) translateY(calc(var(--p, 0) * -70%));
}

.motion .bow__track {
  position: absolute;
  inset: 0;
  display: block;
  padding: 0;
  overflow: visible;
  transform-style: preserve-3d;
}

.motion .bow__item {
  position: absolute;
  left: 0;
  top: 8%;
  backface-visibility: hidden;
  will-change: transform;
}

.fv__catch {
  position: relative;
  z-index: 3;
  display: inline-block;
  margin-top: 24px;
  max-width: 22em;
  padding: 10px 18px;
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  font-family: var(--font-heading);
  font-size: clamp(15px, 2vw, 20px);
  font-weight: 500;
  line-height: 1.6;
  transform: rotate(-3deg);
}

.motion .fv__foot {
  position: absolute;
  left: var(--gutter);
  /* デモの帯があるときは、その高さぶん上げる（最初の画面で隠れないように） */
  bottom: calc(28px + var(--callbar-h) + var(--banner-h, 0px));
  z-index: 3;
  /* 下へ進むと、写真の帯と一緒に上へ抜ける */
  transform: translateY(calc(var(--p, 0) * -40vh));
  opacity: calc(1 - var(--p, 0) * 1.6);
}

.motion .fv__catch {
  margin: 0;
  opacity: 0;
}

.motion.is-loaded .fv__catch {
  animation: pop-catch 0.7s var(--back) 0.4s both;
}

@keyframes pop-catch {
  from { opacity: 0; transform: translateY(40px) rotate(-3deg) scale(0.8); }
  to { opacity: 1; transform: rotate(-3deg); }
}

/* ── 想い ── */
.concept__label {
  margin-bottom: 40px;
}

.concept__en {
  display: inline-block;
  padding-bottom: 6px;
  font-family: var(--font-en);
  font-size: clamp(18px, 2.6vw, 30px);
  line-height: 1.14;
  text-transform: uppercase;
  background: linear-gradient(currentColor, currentColor) left bottom / calc(var(--p, 1) * 100%) 1px no-repeat;
}

.concept__label {
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.concept__ja {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
}

/* 白抜き・ドット文字・筆記体の3行 */
.stack {
  display: flex;
  flex-direction: column;
  margin-bottom: 56px;
  font-size: clamp(48px, 10vw, 140px);
  line-height: 1;
  text-transform: uppercase;
}

.stack__line {
  --lp: clamp(0, calc(var(--p, 1) * 1.6 - var(--li) * 0.2), 1);
  position: relative;
  display: block;
  width: max-content;
}

.motion .stack__line {
  transform: translateY(calc((1 - var(--lp)) * 60%));
  opacity: var(--lp);
}

.stack__line--outline {
  font-family: var(--font-en);
  color: transparent;
  -webkit-text-stroke: 2px var(--ink);
  letter-spacing: -0.01em;
}

.stack__line--pixel {
  font-family: var(--font-pixel);
  font-size: 1.12em;
  line-height: 0.9;
}

.stack__line--script {
  font-family: var(--font-script);
  font-size: 1.4em;
  line-height: 0.9;
  text-transform: none;
  color: var(--orange);
  margin-top: -0.12em;
}

.stack__chara {
  position: absolute;
  right: -0.9em;
  top: -0.3em;
  width: 0.8em;
}

.motion .stack__chara {
  transform: rotate(calc((1 - var(--p, 1)) * 40deg)) scale(calc(0.4 + var(--p, 1) * 0.6));
}

.concept__body {
  font-size: clamp(16px, 1.7vw, 19px);
  line-height: 2.3;
}

.concept__line {
  max-width: 40em;
}

/* 鉛筆で書いていくように、キャッチコピーが現れる */
.write {
  position: relative;
  display: inline-block;
  margin-bottom: 24px;
  font-family: var(--font-heading);
  font-size: clamp(24px, 3.6vw, 40px);
  line-height: 1.5;
  color: var(--blue);
}

.motion .write__ink {
  display: inline-block;
  clip-path: inset(-10% calc(100% - var(--p, 1) * 100%) -10% 0);
}

.write__pen {
  display: none;
}

.motion .write__pen {
  display: block;
  position: absolute;
  top: -0.2em;
  left: calc(var(--p, 1) * 100%);
  width: 1.4em;
  opacity: calc((1 - var(--p, 1)) * 10);
  pointer-events: none;
}

.write__pen .pencil {
  width: 100%;
  transform: translate(-20%, -20%);
}

/* ── 大きな文字の帯 ── */
.loop {
  overflow: hidden;
  padding: 24px 0;
}

.loop__track {
  display: flex;
  width: max-content;
  animation: flow 40s linear infinite;
}

.motion .loop__track {
  animation: none;
}

@keyframes flow {
  to { transform: translateX(-33.333%); }
}

.loop__unit {
  display: flex;
  align-items: center;
  flex: none;
  gap: 0.24em;
  padding-right: 0.3em;
  font-size: clamp(64px, 14vw, 220px);
  line-height: 1.3;
  white-space: nowrap;
}

.loop__script {
  font-family: var(--font-script);
  font-size: 1.1em;
}

.loop__thin {
  font-family: var(--font-en);
  color: transparent;
  -webkit-text-stroke: 1.5px currentColor;
  -webkit-text-stroke-color: var(--ink);
}

.loop__bold {
  font-family: var(--font-en);
}

.loop__chara {
  width: 0.7em;
}

/* ── 対応している工事 ── */
.services {
  background: var(--ink);
  color: #fff;
}

.motion .services {
  background: none;
  color: inherit;
  padding-bottom: 0;
}

.services__lead {
  text-align: center;
  padding-bottom: 72px;
}

.services__lead .label__en {
  font-size: clamp(14px, 1.8vw, 18px);
  background-size: 0 0;
}

.services__lead .label {
  margin-bottom: 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  padding-bottom: 32px;
}

.services__lead .label__ja {
  display: none;
}

.services__text {
  max-width: 34em;
  margin: 0 auto;
  font-size: clamp(15px, 1.6vw, 18px);
}

.services .mask__base {
  color: #6b6b6b;
}

.services__stickers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin-top: 48px;
}

.svc__titles {
  display: grid;
  gap: 16px;
  padding: 0 var(--gutter);
}

.svc__title {
  font-family: var(--font-heading);
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.3;
  color: var(--c, #fff);
}

.svc__title a {
  text-decoration: none;
}

.svc__title a:hover {
  text-decoration: underline;
}

.svc__title--pink { --c: var(--pink); }
.svc__title--green { --c: var(--green); }
.svc__title--purple { --c: #b07bff; }
.svc__title--yellow { --c: var(--yellow); }
.svc__title--white { --c: #fff; }
.svc__title--blue { --c: #5aa2ff; }
.svc__title--orange { --c: var(--orange); }

.ring {
  display: none;
}

.svc__num,
.svc__ruler {
  display: none;
}

.motion .svc {
  height: calc(var(--steps) * 70vh + 100vh);
  height: calc(var(--steps) * 70svh + 100svh);
}

.motion .svc__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

/* 工事の名前：真ん中の上に、1文字ずつ下からせり上がって入れ替わる */
.motion .svc__titles {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--header-h) + 1vh);
  z-index: 2;
  display: block;
  height: 1.2em;
  padding: 0 var(--gutter);
  font-size: clamp(30px, 6vw, 88px);
  text-align: center;
  pointer-events: none;
}

.motion .svc__title {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  top: 0;
  font-size: inherit;
  line-height: 1.2;
  font-weight: 500;
  overflow: hidden;
}

.ch {
  display: inline-block;
}

.motion .svc__title .ch,
.motion .card__title .ch {
  transform: translateY(110%);
  transition: transform 0.55s var(--expo) calc(var(--i) * 0.025s);
}

.motion .svc__title.is-past .ch {
  transform: translateY(-110%);
  transition-timing-function: var(--in);
  transition-duration: 0.35s;
}

.motion .svc__title.is-active .ch {
  transform: none;
  transition-delay: calc(0.12s + var(--i) * 0.03s);
}

/* 写真：外から見た筒。スクロールに合わせて回る（JavaScript が1枚ずつ向きを決める）。
   正面の写真を押すと、その工事の詳細ページへ */
.motion .ring {
  display: block;
  position: absolute;
  inset: 0;
  perspective: 2000px;
  perspective-origin: 50% 40%;
}

.motion .ring__stage {
  position: absolute;
  left: 50%;
  top: 56%;
  transform-style: preserve-3d;
  transform: rotateX(-7deg);
}

.motion .ring__panel {
  --pw: clamp(160px, 22vw, 270px);
  position: absolute;
  left: calc(var(--pw) / -2);
  top: calc(var(--pw) * -0.625);
  width: var(--pw);
  aspect-ratio: 4 / 5;
  will-change: transform;
}

.ring__link {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 8px;
  transition: opacity 0.3s;
}

/* 速くスクロールすると、写真が少しゆがむ */
.ring__link .photo {
  transform: skewY(calc(var(--v, 0) * 8deg)) scale(1.12);
  transition: transform 0.6s var(--expo);
}

/* 後ろ側の写真は薄くして、押せないようにする */
.motion .ring__panel.is-back .ring__link {
  opacity: 0.35;
  pointer-events: none;
}

.motion .ring__panel:not(.is-front):not(.is-back) .ring__link {
  opacity: 0.8;
}

/* 正面の写真には「くわしく見る」の丸。乗ると写真が少し寄る */
.ring__view {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.4) rotate(-20deg);
  transition: opacity 0.3s, transform 0.5s var(--back);
}

.ring__panel.is-front .ring__view {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(-8deg);
}

.ring__panel.is-front .ring__link:hover .ring__view {
  transform: translate(-50%, -50%) scale(1.12) rotate(0deg);
}

.ring__panel.is-front .ring__link:hover .photo {
  transform: scale(1.2);
}

.svc__hint {
  display: none;
}

.motion .svc__hint {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(var(--header-h) + 1vh + clamp(30px, 6vw, 88px) * 1.2 + 4px);
  z-index: 2;
  font-size: 12px;
  text-align: center;
  color: var(--gray);
}

.ring__empty {
  display: block;
  width: 100%;
  height: 100%;
}

.ring__empty--0 { background: var(--orange); }
.ring__empty--1 { background: var(--blue); }
.ring__empty--2 { background: var(--green); }

/* 番号と目盛り：画面の下 */
.motion .svc__num {
  display: block;
  position: absolute;
  left: 50%;
  bottom: calc(52px + var(--callbar-h));
  height: 1.2em;
  overflow: hidden;
  font-family: var(--font-en);
  font-size: 22px;
  line-height: 1.2;
  transform: translateX(-50%);
}

.svc__nums {
  display: flex;
  flex-direction: column;
  transform: translateY(calc(var(--active, 0) * -1.2em));
  transition: transform 0.5s var(--back);
}

.motion .svc__ruler {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(16px + var(--callbar-h));
  height: 14px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.4) 0 1px, transparent 1px 7px) calc(var(--p, 0) * -60vw) 100% / auto 10px repeat-x;
}

.motion .svc__ruler::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 1px;
  height: 36px;
  background: #fff;
}

/* ── 選ばれる理由：黒の上の白いカード ── */
.features {
  background: var(--ink);
  color: #fff;
}

.motion .features {
  background: none;
  color: inherit;
}

.features__head {
  text-align: center;
  margin-bottom: 56px;
}

.features__en {
  font-family: var(--font-en);
  font-size: clamp(48px, 10vw, 120px);
  font-weight: 400;
  line-height: 1.14;
  color: #d8d6d0;
  text-transform: uppercase;
}

.features__ja {
  margin-top: 8px;
  font-size: 14px;
}

.card {
  position: relative;
  max-width: 1160px;
  margin: 0 var(--gutter);
  padding: 40px 24px 32px;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}

.card__dots,
.card__chara,
.card__badge {
  display: none;
}

.card__item + .card__item {
  margin-top: 56px;
  padding-top: 56px;
  border-top: 1px solid var(--line);
}

.card__num {
  font-family: var(--font-en);
  font-size: 14px;
  color: var(--ink-soft);
}

.card__num span {
  display: none;
}

.card__title {
  margin: 8px 0 20px;
  font-family: var(--font-heading);
  font-size: clamp(24px, 4.6vw, 64px);
  font-weight: 500;
  line-height: 1.25;
  color: var(--c);
}

.card__item--green { --c: var(--green); }
.card__item--yellow { --c: #d9a900; }
.card__item--orange { --c: var(--orange); }
.card__item--blue { --c: var(--blue); }

.card__photo {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 8px;
  margin-bottom: 20px;
}

.card__empty {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--c);
}

.card__body {
  max-width: 32em;
}

.card__foot {
  margin-top: 32px;
  text-align: right;
}

.motion .features__track {
  height: calc(var(--count) * 90vh + 100vh);
  height: calc(var(--count) * 90svh + 100svh);
}

.motion .features__sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--header-h) + 8px) 0 calc(16px + var(--callbar-h));
}

.motion .card {
  width: calc(100% - var(--gutter) * 2);
  height: 100%;
  max-height: 680px;
  margin: 0;
  padding: 32px 24px;
  transform: scale(calc(0.72 + var(--p, 1) * 0.28));
}

.motion .card__list {
  position: relative;
  height: calc(100% - 64px);
}

.motion .card__item {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  pointer-events: none;
}

.motion .card__item.is-active {
  pointer-events: auto;
}

.motion .card__num span {
  display: inline;
}

/* 番号・本文はふわっと入れ替わる。見出しは1文字ずつ。写真は横から開く（回転はさせない） */
.motion .card__num,
.motion .card__body {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.3s, transform 0.5s var(--expo);
}

.motion .card__item.is-active .card__num,
.motion .card__item.is-active .card__body {
  opacity: 1;
  transform: none;
  transition-delay: 0.2s;
}

.motion .card__title {
  overflow: hidden;
}

.motion .card__item.is-past .card__title .ch {
  transform: translateY(-110%);
  transition-timing-function: var(--in);
  transition-duration: 0.35s;
}

.motion .card__item.is-active .card__title .ch {
  transform: none;
  transition-delay: calc(0.1s + var(--i) * 0.03s);
}

.motion .card__photo {
  aspect-ratio: auto;
  min-height: 0;
  margin-bottom: 16px;
  clip-path: inset(0 100% 0 0 round 8px);
  transition: clip-path 0.7s var(--expo);
}

.motion .card__item.is-past .card__photo {
  clip-path: inset(0 0 0 100% round 8px);
  transition-duration: 0.45s;
}

.motion .card__item.is-active .card__photo {
  clip-path: inset(0 0 0 0 round 8px);
  transition-delay: 0.12s;
}

.motion .card__dots {
  position: absolute;
  right: 18px;
  top: 50%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: translateY(-50%);
}

.card__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gray);
  transition: background 0.3s, transform 0.4s var(--back);
}

.card__dot.is-active {
  background: var(--ink);
  transform: scale(1.5);
}

/* キャラはカードの中を跳ねて移る */
.motion .card__chara {
  display: block;
  position: absolute;
  z-index: 3;
  width: 64px;
  left: 24px;
  top: -36px;
  transition: left 0.9s var(--back-io), top 0.9s var(--back-io);
}

.motion .card__chara[data-spot='1'] { left: calc(100% - 96px); top: 30%; }
.motion .card__chara[data-spot='2'] { left: 50%; top: -36px; }
.motion .card__chara[data-spot='3'] { left: 30%; top: calc(100% - 44px); }

.motion .card__badge {
  display: block;
  position: absolute;
  z-index: 2;
  right: 20px;
  top: -40px;
  width: 92px;
}

.motion .card__foot {
  position: absolute;
  right: 24px;
  bottom: 24px;
  margin: 0;
}

@media (min-width: 900px) {
  .card {
    margin: 0 auto;
    padding: 56px;
  }

  .card__item {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    column-gap: 48px;
  }

  .card__num,
  .card__title {
    grid-column: 1 / -1;
  }

  .card__photo {
    margin: 0;
  }

  .motion .card {
    padding: 56px 72px 48px;
  }

  .motion .card__item {
    grid-template-columns: 1.15fr 1fr;
    grid-template-rows: auto auto 1fr;
    column-gap: 48px;
  }

  .motion .card__photo {
    grid-column: 1;
    grid-row: 3;
    margin: 0 0 8px;
  }

  .motion .card__body {
    grid-column: 2;
    grid-row: 3;
    align-self: start;
  }

  .motion .card__foot {
    right: 72px;
    bottom: 48px;
  }

  .motion .card__badge {
    width: 120px;
    right: 72px;
    top: -52px;
  }
}

/* ── 施工事例：大きな灰色の英字の上に、列ごとにずれて流れるカード ── */
.works {
  position: relative;
  overflow: hidden;
}

.works__big {
  position: absolute;
  left: 0;
  right: 0;
  top: 48px;
  font-family: var(--font-en);
  font-size: clamp(64px, 15vw, 220px);
  line-height: 1;
  text-align: center;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ink) 8%, transparent);
  pointer-events: none;
  white-space: nowrap;
}

.motion .works__big {
  transform: translateY(calc(var(--p, 0) * 30vh));
}

.works .container {
  position: relative;
}

.works__grid {
  display: grid;
  gap: 48px 32px;
}

@media (min-width: 700px) {
  .works__grid {
    grid-template-columns: repeat(3, 1fr);
    padding-top: 40px;
  }

  .work:nth-child(3n + 2) {
    margin-top: 80px;
  }

  .work:nth-child(3n) {
    margin-top: -20px;
  }

  /* 列ごとにスクロールの速さを変える */
  .motion .work {
    transform: translateY(calc((var(--p, 0.5) - 0.5) * var(--speed)));
  }

  .motion .work[style*='--col:0'] { --speed: 40px; }
  .motion .work[style*='--col:1'] { --speed: -160px; }
  .motion .work[style*='--col:2'] { --speed: 100px; }
}

.work__photo {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px;
}

.work__photo img {
  transition: transform 0.8s var(--expo);
}

.work:hover .work__photo img {
  transform: scale(1.05);
}

.work__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--ink-soft);
}

.work__tag {
  padding: 2px 12px;
  border-radius: 4px;
  background: #0c7d47; /* 白い小さな文字が読めるよう、緑を少し濃く */
  color: #fff;
  font-size: 11px;
  line-height: 1.8;
}

.work__title {
  margin-top: 6px;
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 500;
  line-height: 1.6;
}

.work__note {
  margin-top: 6px;
  font-size: 13px;
}

/* ── 工事の詳細ページ ── */
.detail {
  padding: calc(var(--header-h) + 48px) 0 96px;
}

.detail--pink { --c: var(--pink); }
.detail--green { --c: var(--green); }
.detail--purple { --c: var(--purple); }
.detail--yellow { --c: #d9a900; }
.detail--white { --c: var(--ink); }
.detail--blue { --c: var(--blue); }
.detail--orange { --c: var(--orange); }

.detail__back {
  margin-bottom: 32px;
  font-size: 13px;
}

.detail__back a {
  text-decoration: none;
}

.detail__en {
  display: inline-block;
  padding-bottom: 4px;
  font-family: var(--font-en);
  font-size: clamp(16px, 2vw, 22px);
  line-height: 1.14;
  text-transform: uppercase;
  background: linear-gradient(currentColor, currentColor) left bottom / calc(var(--p, 1) * 100%) 1px no-repeat;
}

.detail__title {
  margin: 16px 0 40px;
  font-family: var(--font-heading);
  font-size: clamp(28px, 7vw, 96px);
  font-weight: 500;
  line-height: 1.25;
  color: var(--c);
  overflow: hidden;
}

/* 開いたとき、名前が1文字ずつ下からせり上がる */
.motion .detail__title .ch {
  transform: translateY(110%);
}

.motion.is-loaded .detail__title .ch {
  transform: none;
  transition: transform 0.7s var(--expo) calc(0.1s + var(--i) * 0.04s);
}

.detail__grid {
  display: grid;
  gap: 32px;
}

.detail__photo {
  margin: 0;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
}

.motion .detail__photo {
  clip-path: inset(0 100% 0 0 round var(--radius));
}

.motion.is-loaded .detail__photo {
  clip-path: inset(0 0 0 0 round var(--radius));
  transition: clip-path 1s var(--expo) 0.3s;
}

.detail__body {
  font-size: 16px;
}

.detail__note {
  margin: 24px 0 32px;
  font-size: 14px;
  color: var(--ink-soft);
}

.detail__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 24px;
  margin-top: 80px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
}

.detail__nav .sticker:only-child {
  margin-left: auto;
}

@media (min-width: 900px) {
  .detail__grid {
    grid-template-columns: 1.3fr 1fr;
    gap: 56px;
    align-items: start;
  }
}

/* ── 下からせり上がって出る ── */
.motion .rise {
  opacity: var(--p, 1);
  transform: translateY(calc((1 - var(--p, 1)) * 80px));
}

/* ── 会社概要・採用・アクセス ── */
.panel {
  padding: 16px 28px;
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}

.company__row {
  display: grid;
  grid-template-columns: 7em 1fr;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}

.company__row:last-child {
  border-bottom: 0;
}

.company__row dt {
  color: var(--ink-soft);
}

.access {
  display: grid;
  gap: 40px;
}

.access__name {
  font-family: var(--font-heading);
  font-size: 20px;
}

.access__hours {
  margin: 8px 0 32px;
  font-size: 14px;
}

.map {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 0;
  border-radius: var(--radius);
}

.map--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--line);
  color: var(--ink-soft);
  font-size: 13px;
}

/* ── 問い合わせ ── */
.contact {
  padding: 24px var(--gutter) 96px;
}

.contact__panel {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 64px 24px 56px;
  border-radius: var(--radius);
  background: var(--orange);
  color: var(--ink);
  text-align: center;
}

.motion .contact__panel {
  transform: scale(calc(0.86 + var(--p, 1) * 0.14));
}

.contact__en {
  position: relative;
  display: inline-block;
  font-family: var(--font-en);
  font-size: clamp(44px, 11vw, 168px);
  font-weight: 400;
  line-height: 1.14;
  text-transform: uppercase;
}

.contact__chara {
  position: absolute;
  right: -0.4em;
  top: -0.5em;
  width: 0.62em;
  transform: rotate(14deg);
}

.contact__chara.is-jump {
  animation: jump 0.6s var(--back) infinite alternate;
}

@keyframes jump {
  to { transform: translateY(-14px) rotate(-8deg); }
}

.contact__title {
  margin: 16px 0;
  font-family: var(--font-heading);
  font-size: clamp(18px, 2.6vw, 28px);
}

.contact__tel {
  display: inline-block;
  font-family: var(--font-en);
  font-size: clamp(26px, 5vw, 48px);
  line-height: 1.3;
  text-decoration: none;
}

.contact__hours {
  font-size: 13px;
}

.contact__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px;
  margin-top: 40px;
}

/* ── フッター ── */
.site-footer {
  position: relative;
  margin-top: 40px;
  padding: 72px var(--gutter) 24px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--ink);
  color: #fff;
  font-size: 13px;
}

.site-footer__chara {
  position: absolute;
  right: var(--gutter);
  top: -84px;
  width: 92px;
}

.motion .site-footer__chara {
  transform: translateY(calc((1 - var(--p, 1)) * 70px)) rotate(calc((1 - var(--p, 1)) * 20deg));
}

.site-footer__chara .chara__smile {
  stroke: var(--ink);
}

.site-footer__inner {
  display: grid;
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
}

.site-footer__name {
  font-family: var(--font-heading);
  font-size: 20px;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.site-footer__nav a {
  text-decoration: none;
}

.site-footer__bottom {
  display: flex;
  justify-content: space-between;
  max-width: 1200px;
  margin: 40px auto 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  font-family: var(--font-en);
  font-size: 10px;
}

.site-footer__bottom a {
  text-decoration: none;
}

/* ── スマホ下の電話・地図ボタン ── */
.callbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  gap: 8px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: var(--paper);
  border-top: 1px solid var(--line);
}

.callbar__btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  color: var(--ink);
  font-size: 14px;
  text-decoration: none;
}

.callbar__btn--primary {
  flex: 1.4;
  background: var(--ink);
  color: #fff;
}

/* ── スマホ幅：写真の帯を少し上げて、英単語とのあいだを詰める ── */
@media (max-width: 899px) {
  .motion .bow {
    bottom: 8%;
    height: 44%;
  }
}

/* ── PC幅 ── */
@media (min-width: 900px) {
  :root {
    --gutter: 40px;
    --header-h: 88px;
  }

  body {
    padding-bottom: 0;
  }

  .callbar {
    display: none;
  }

  .section {
    padding: 160px 0;
  }

  .motion .fv__foot {
    bottom: calc(40px + var(--banner-h, 0px));
  }

  .fv__stage {
    padding-bottom: 32px;
  }

  .motion .svc__num {
    bottom: 60px;
  }

  .motion .svc__ruler {
    bottom: 24px;
  }

  .motion .features__sticky {
    padding-bottom: 24px;
  }

  /* 左右のふちに、縦書きの小さな文字 */
  .fv__side {
    display: block;
    position: absolute;
    top: 50%;
    z-index: 2;
    margin: 0;
    font-size: 11px;
    letter-spacing: 0.2em;
    writing-mode: vertical-rl;
    transform: translateY(-50%);
  }

  .fv__side--l {
    left: 28px;
  }

  .fv__side--r {
    right: 28px;
  }

  .access {
    grid-template-columns: 1fr 1.2fr;
    align-items: end;
  }

  .site-footer__inner {
    grid-template-columns: 1fr 1.6fr;
    align-items: end;
  }
}
