/* ================= base ================= */
:root {
  --black: #111;
  --white: #fff;
  --cream: #f2ecdf;
  --blue-gray: #dfe7ec;
  --salmon: #f2a687;
  --accent: #2b6bd8;
  --font-en: "Montserrat", sans-serif;
  --font-jp: "Zen Kaku Gothic New", sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-jp);
  color: var(--black);
  background: var(--white);
  overflow-x: hidden;
  line-height: 1.9;
}
/* iOS WebKitはbodyのoverflow-x:hiddenで子孫のposition:stickyが効かなくなる。
   clipはスクロールコンテナを作らず横はみ出しだけ抑えるので、対応ブラウザではこちらを使う */
@supports (overflow: clip) {
  body { overflow-x: clip; }
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity .9s ease, transform .9s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ================= header ================= */
.site-header {
  position: fixed; inset: 0 0 auto 0;
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: 22px 28px; z-index: 100;
  pointer-events: none;
}
.site-title {
  font-family: var(--font-en); font-weight: 800; font-size: 24px;
  letter-spacing: .01em; pointer-events: auto;
}
.site-title .jp { font-family: var(--font-jp); font-weight: 900; font-size: 21px; }
.site-logo { display: block; height: 22px; width: auto; }
/* 手書きバーガーボタン: 筆致アイコン3コマをスクロール/ホバーでコマ送り */
.menu-btn {
  pointer-events: auto; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  background: none; border: none; color: var(--black);
  padding: 4px 6px;
  transition: transform .25s ease;
}
.menu-btn:hover { transform: scale(1.08) rotate(-2deg); }
.mb-icon { display: block; width: 58px; height: 34px; }
.mb-icon--x { width: 34px; height: 33px; }
.mb-icon svg { display: block; width: 100%; height: 100%; fill: currentColor; }
.mb-icon use { display: none; }
[data-icon-index="0"] .mb-icon use:nth-child(1),
[data-icon-index="1"] .mb-icon use:nth-child(2),
[data-icon-index="2"] .mb-icon use:nth-child(3) { display: inline; }
.mb-label {
  font-family: var(--font-en); font-weight: 700; font-size: 12px;
  letter-spacing: .14em; line-height: 1; color: currentColor;
}
.menu-lines i { display: block; width: 16px; height: 2px; background: var(--white); }

/* menu overlay（3色カーテン＋段差リビール） */
.menu-overlay {
  position: fixed; inset: 0; color: var(--white);
  z-index: 200; display: grid; place-items: center;
  visibility: hidden; pointer-events: none;
}
.menu-overlay.is-open { visibility: visible; pointer-events: auto; }
.menu-overlay.is-closing { visibility: visible; }

/* 曲面エッジを先頭に下から覆う3枚のカーテン */
.menu-curtains { position: absolute; inset: 0; overflow: hidden; }
.curtain {
  position: absolute; inset: 0;
  transform: translateY(112%);
  transition: transform .7s cubic-bezier(.76, 0, .24, 1);
}
.curtain::before, .curtain::after {
  content: ""; position: absolute; left: -10%; width: 120%; height: 18vh;
  border-radius: 50%; background: inherit;
}
.curtain::before { top: -9vh; }   /* 上向きに進む時の先頭の曲面 */
.curtain::after { bottom: -9vh; }  /* 上へ抜ける時のお尻の曲面 */
.c1 { background: var(--cream); z-index: 1; }
.c2 { background: var(--salmon); z-index: 2; transition-delay: .09s; }
.c3 { background: var(--black); z-index: 3; transition-delay: .18s; }
.menu-overlay.is-open .curtain { transform: translateY(0); }
/* 閉じる時: 黒→サーモン→クリームの順に上へ剥がれて色が減っていく */
.menu-overlay.is-closing .curtain { transform: translateY(-112%); transition-duration: .65s; }
.menu-overlay.is-closing .c3 { transition-delay: .28s; }
.menu-overlay.is-closing .c2 { transition-delay: .38s; }
.menu-overlay.is-closing .c1 { transition-delay: .48s; }

.menu-list {
  list-style: none; position: relative; z-index: 10;
  display: flex; flex-direction: column; gap: clamp(4px, 1.4vh, 12px);
}
.menu-list li { overflow: hidden; padding: 2px 0; } /* 行ごとのマスク */
.menu-overlay a {
  display: flex; align-items: baseline; gap: 18px;
  transform: translateY(135%) rotate(4deg); transform-origin: 0 100%;
  transition: transform .3s ease-in;
}
.menu-overlay.is-open a {
  transform: none;
  transition: transform .6s cubic-bezier(.2, .85, .25, 1.02);
  transition-delay: calc(.46s + var(--i) * .065s);
}
.menu-overlay.is-closing a {
  transform: translateY(-135%) rotate(-3deg);
  transition-delay: calc(var(--i) * .03s);
}
.m-no { font-family: var(--font-en); font-weight: 700; font-size: 13px; color: var(--salmon); }
.m-en {
  font-family: var(--font-en); font-weight: 800;
  font-size: clamp(36px, 6.4vw, 72px); line-height: 1.12;
  color: var(--black); -webkit-text-stroke: 4px var(--white);
  paint-order: stroke; /* ストロークの上に地色の塗りを重ね、輪郭の重なりノイズを消す */
  transition: color .3s ease;
}
.menu-overlay a:hover .m-en { color: var(--salmon); }
.m-jp { font-weight: 700; font-size: 13px; color: rgba(255,255,255,.55); }
.m-arrow {
  font-family: var(--font-en); font-weight: 800; font-size: 20px; color: var(--salmon);
  opacity: 0; transform: translateX(-14px);
  transition: opacity .25s ease, transform .3s cubic-bezier(.2,.8,.25,1);
}
.menu-overlay a:hover .m-arrow { opacity: 1; transform: none; }

.menu-close {
  position: absolute; top: 22px; right: 30px; z-index: 10;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: none; color: var(--white); border: none; cursor: pointer;
  padding: 4px 6px;
  opacity: 0; transition: opacity .3s ease, transform .25s ease;
}
.menu-close:hover { transform: scale(1.08) rotate(2deg); }
.menu-overlay.is-open .menu-close { opacity: 1; transition-delay: .7s; }
.menu-overlay.is-closing .menu-close { opacity: 0; transition: opacity .15s ease; }
.menu-foot {
  position: absolute; bottom: 26px; left: 0; right: 0; z-index: 10;
  text-align: center; font-family: var(--font-en); font-weight: 600;
  font-size: 12px; letter-spacing: .14em; color: rgba(255,255,255,.5);
  opacity: 0; transition: opacity .4s ease;
}
.menu-overlay.is-open .menu-foot { opacity: 1; transition-delay: .85s; }
.menu-overlay.is-closing .menu-foot { opacity: 0; transition: opacity .15s ease; }

/* ページ遷移: ジグソーパズル（ピースはJSが動的生成） */
.puzzle-wipe { position: fixed; inset: 0; z-index: 300; pointer-events: none; }
.puzzle-wipe.is-on { pointer-events: auto; }
.puzzle-wipe svg { display: block; width: 100%; height: 100%; }
.puzzle-piece {
  transform-box: fill-box; transform-origin: center;
  /* 画面の外から放り込まれてくる初期位置 */
  transform: translate3d(var(--px, 0), var(--py, -120px), 0) rotate(var(--pr, 20deg)) scale(var(--ps, 1.1));
  opacity: 0;
  transition: transform .55s cubic-bezier(.18, .85, .28, 1.04), opacity .22s ease;
  will-change: transform, opacity;
}
/* かちりと収まる */
.puzzle-wipe.is-on .puzzle-piece { transform: none; opacity: 1; }
/* 抜けるときは重さに負けて落ちていく */
.puzzle-wipe.is-off .puzzle-piece {
  transform: translate3d(0, var(--ey, 110px), 0) rotate(var(--er, 20deg)) scale(.9);
  opacity: 0;
  transition: transform .72s cubic-bezier(.42, 0, .74, .42), opacity .46s ease .16s;
}

/* パズルに覆われている間、メニューを無音で畳むための一時クラス */
.menu-overlay.no-anim, .menu-overlay.no-anim * { transition: none !important; }

@media (prefers-reduced-motion: reduce) {
  .curtain, .menu-overlay a, .menu-close, .menu-foot, .puzzle-piece { transition: none !important; }
}

/* ================= hero ================= */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  overflow: hidden;
}
/* ローディング：ロゴが左から順に描かれていく */
.loader {
  position: fixed; inset: 0; z-index: 200;
  background: var(--white);
  transition: opacity .45s ease;
}
.loader.done { opacity: 0; pointer-events: none; }
.loader svg { display: block; width: 100%; height: 100%; }
.loader .ld {
  stroke-dasharray: 1 1; stroke-dashoffset: 1;
  transition: stroke-dashoffset .55s ease;
}
.loader.play .ld { stroke-dashoffset: 0; }
.loader .ld:nth-child(2) { transition-delay: .15s; }
.loader .ld:nth-child(3) { transition-delay: .3s; }
.loader .ld:nth-child(4) { transition-delay: .45s; }
.loader .ld:nth-child(5) { transition-delay: .6s; }
.loader .ld:nth-child(6) { transition-delay: .75s; }
.loader .ld:nth-child(7) { transition-delay: .9s; }
.loader .ld:nth-child(8) { transition-delay: 1.02s; }

/* ロゴくり抜きリビール：ヒーローを長いステージ内でstickyにして、白レイヤーの穴をスクロールで拡大 */
.reveal-stage { position: relative; height: 260vh; }
.reveal-stage .hero { position: sticky; top: 0; height: 100svh; }
.logo-cutout { position: absolute; inset: 0; z-index: 60; pointer-events: none; }
.logo-cutout svg { display: block; width: 100%; height: 100%; }
.cutout-screen { fill: var(--white); }
.hero-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 4vw; padding: 14vh 6vw 12vh 7vw; flex: 1;
}
.hero-left { position: relative; z-index: 3; max-width: 60%; }
.hero-label {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--font-en); font-weight: 700; font-size: 14px;
  letter-spacing: .14em; text-transform: uppercase;
  opacity: 0; animation: rise .8s ease forwards .1s;
}
.label-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--black); }
.hero-est {
  border: 1.5px solid var(--black); border-radius: 999px;
  padding: 1px 14px; font-size: 12px; transform: rotate(-4deg);
}
.wordmark { margin: 2vh 0 1vh; line-height: .96; }
.wm-line { display: block; font-family: var(--font-en); font-weight: 800; }
.wm-solid {
  position: relative; display: inline-block;
  font-size: clamp(64px, 9.6vw, 168px); letter-spacing: -.02em;
  opacity: 0; animation: rise .9s cubic-bezier(.2,.7,.2,1) forwards .25s;
}
.wm-outline {
  position: relative;
  font-size: clamp(64px, 9.6vw, 168px); letter-spacing: -.01em;
  color: transparent; -webkit-text-stroke: 2.5px var(--black);
  margin-left: .9em;
  opacity: 0; animation: rise .9s cubic-bezier(.2,.7,.2,1) forwards .4s;
}
.wm-dot { font-style: normal; color: var(--black); -webkit-text-stroke: 0; }
.hero-catch {
  position: relative; display: inline-block;
  font-weight: 900; font-size: clamp(24px, 3vw, 44px); letter-spacing: .06em;
  margin-top: 3vh;
  opacity: 0; animation: rise .8s ease forwards .55s;
}
.catch-wavy { display: block; width: 100%; margin-top: 2px; }
.catch-wavy path {
  stroke-dasharray: 600; stroke-dashoffset: 600;
  animation: draw 1.4s ease forwards 1s;
}
@keyframes draw { to { stroke-dashoffset: 0; } }
.hero-lede {
  font-weight: 700; font-size: clamp(13px, 1.3vw, 17px); line-height: 2.2;
  margin-top: 2.6vh;
  opacity: 0; animation: rise .8s ease forwards .7s;
}
.hero-cta {
  display: inline-block; margin-top: 3.2vh;
  background: var(--black); color: var(--white);
  font-weight: 900; font-size: 16px; letter-spacing: .06em;
  border-radius: 999px; padding: 15px 34px;
  transition: transform .25s ease, box-shadow .25s ease;
  opacity: 0; animation: rise .8s ease forwards .85s;
}
.hero-cta:hover { transform: translateY(-3px) rotate(-1.5deg); box-shadow: 4px 6px 0 rgba(17,17,17,.22); }
.hero-cta--ghost {
  background: var(--white); color: var(--black);
  box-shadow: inset 0 0 0 2px var(--black);
  margin-left: 12px;
  animation: rise .8s ease forwards .95s;
}
.hero-cta--ghost:hover { transform: translateY(-3px) rotate(-1.5deg); box-shadow: inset 0 0 0 2px var(--black), 4px 6px 0 rgba(17,17,17,.22); }
@keyframes rise { from { opacity: 0; transform: translateY(34px); } to { opacity: 1; transform: none; } }

/* --- polaroid photos --- */
.hero-photos { position: relative; z-index: 2; width: 34vw; min-width: 340px; height: 62vh; }
.polaroid {
  position: absolute;
  background: #fdfcf8; padding: 10px 10px 34px;
  box-shadow: 0 14px 34px rgba(17,17,17,.16), 0 2px 6px rgba(17,17,17,.1);
  transform: rotate(var(--rot));
  will-change: transform;
  opacity: 0; animation: fadein 1.1s ease forwards var(--pd);
}
@keyframes fadein { to { opacity: 1; } }
.polaroid img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.94); }
.polaroid figcaption {
  position: absolute; left: 12px; bottom: 8px;
  font-family: var(--font-en); font-weight: 600; font-size: 12px;
  letter-spacing: .1em; color: #777;
}
.tape {
  position: absolute; top: -12px; left: 50%;
  width: 92px; height: 26px; transform: translateX(-50%) rotate(var(--tr, -3deg));
  background: rgba(240, 230, 200, .82);
  box-shadow: 0 1px 3px rgba(17,17,17,.12); z-index: 2;
}
.p1 { --rot: -7deg; --pd: .5s; --tr: -6deg; width: 62%; aspect-ratio: 3/2.4; top: 2%; left: -4%; }
.p2 { --rot: 4deg; --pd: .65s; --tr: 3deg; width: 68%; aspect-ratio: 3/2.4; top: 26%; right: -2%; z-index: 2; }
.p3 { --rot: -3deg; --pd: .8s; --tr: -2deg; width: 46%; aspect-ratio: 1/1; bottom: 0; left: 8%; z-index: 3; }

/* --- hero bottom marquee --- */
.hero-marquee {
  overflow: hidden; border-top: 1px solid var(--black);
  padding: 12px 0; position: relative; z-index: 3; background: var(--white);
}
.hero-marquee-track { display: flex; white-space: nowrap; animation: marquee 26s linear infinite; }
.hero-marquee-track span {
  font-family: var(--font-en); font-weight: 700; font-size: 15px;
  letter-spacing: .18em; text-transform: uppercase; padding-right: 18px;
}
.hero-marquee-track span .jp { font-family: var(--font-jp); font-weight: 900; letter-spacing: .1em; }

/* --- film grain overlay --- */
.grain {
  position: absolute; inset: 0; z-index: 4; pointer-events: none;
  opacity: .5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.10'/%3E%3C/svg%3E");
}

.scroll-badge {
  position: absolute; right: 40px; bottom: 84px;
  width: 118px; height: 118px; z-index: 5; display: block;
  animation: spin 14s linear infinite;
}
.badge-shape { width: 100%; height: 100%; }
.badge-text {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-en); font-weight: 700; font-size: 13px;
  transform: rotate(90deg); letter-spacing: .08em;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ================= statement ================= */
.statement, .about-wrap, .outline-marquee, .service, .plan, .another, .works, .footer {
  position: relative; z-index: 2; background: var(--white);
}
.statement {
  display: flex; gap: 6vw; align-items: flex-start;
  padding: 18vh 10vw 14vh 7vw;
}
.statement-cols {
  columns: 2; column-gap: 3.4em; max-width: 900px;
  font-size: 15px; font-weight: 500;
}
.statement-cols p { margin-bottom: 1.8em; break-inside: avoid; }
.statement-cols strong { font-weight: 900; }
.statement-huge {
  margin-left: auto; display: flex; gap: 12px; flex-direction: row-reverse;
  position: sticky; top: 10vh;
}
.v-text {
  writing-mode: vertical-rl; font-weight: 900;
  font-size: clamp(40px, 5.4vw, 84px); letter-spacing: .1em; line-height: 1.2;
}
.v-text.big { font-size: clamp(56px, 7.4vw, 120px); }

/* ================= about box ================= */
.about-wrap { padding: 8vh 6vw 16vh; display: grid; place-items: center; }
.about-box {
  border: 2px solid var(--black); background: var(--white);
  max-width: 760px; width: 100%; text-align: center;
  padding: 64px 7% 56px;
}
.about-title { font-family: var(--font-en); font-weight: 800; font-size: clamp(56px, 8vw, 110px); line-height: 1; }
.about-sub {
  display: inline-block; font-weight: 900; font-size: 16px;
  border-bottom: 2px solid var(--black); margin: 14px 0 34px; padding-bottom: 4px;
}
.about-body { font-weight: 700; font-size: clamp(15px, 1.6vw, 19px); text-align: left; }

/* ================= outline marquee ================= */
.outline-marquee { overflow: hidden; border-top: 1px solid var(--black); padding: 2vh 0; }
.outline-track { display: flex; white-space: nowrap; animation: marquee 22s linear infinite; }
.outline-track span {
  font-family: var(--font-en); font-weight: 800;
  font-size: clamp(80px, 13vw, 200px); line-height: 1.1;
  color: transparent; -webkit-text-stroke: 2px var(--black);
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ================= service ================= */
.service { padding-top: 10vh; }
.service-title {
  font-family: var(--font-en); font-weight: 800;
  font-size: clamp(72px, 12vw, 190px); text-align: center; line-height: 1;
  margin-bottom: 6vh;
}
.ticker { overflow: hidden; border-top: 1px solid var(--black); border-bottom: 1px solid var(--black); padding: 10px 0; }
.ticker-track { display: flex; white-space: nowrap; animation: marquee 30s linear infinite; }
.ticker-track b { font-weight: 900; font-size: 17px; padding-right: 42px; }

.card-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  border-left: 1px solid var(--black);
}
.card {
  position: relative; border-right: 1px solid var(--black); border-bottom: 1px solid var(--black);
  min-height: 480px; padding: 26px 28px 60px; overflow: hidden;
  background: var(--white);
}
.card-cream { background: var(--cream); }
.card-blue { background: var(--blue-gray); }
.card-salmon { background: var(--salmon); }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; }
.card-no { font-family: var(--font-en); font-weight: 600; font-size: 64px; line-height: 1; }
.card-place { font-family: var(--font-en); font-weight: 700; font-size: 14px; text-align: right; line-height: 1.5; }
.card-photo {
  position: absolute; top: 60px; left: 19%;
  width: 62%; height: 68%; overflow: hidden; z-index: 1;
  transition: top .55s cubic-bezier(.6,.05,.2,1), left .55s cubic-bezier(.6,.05,.2,1),
              width .55s cubic-bezier(.6,.05,.2,1), height .55s cubic-bezier(.6,.05,.2,1),
              border-radius .55s cubic-bezier(.6,.05,.2,1);
}
.card-photo.arch { border-radius: 999px 999px 0 0; }
.card-photo img {
  width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.08); transition: transform .8s ease;
}
.card-photo::after {
  content: ""; position: absolute; inset: 0;
  background: rgba(0,0,0,.24); opacity: 0; transition: opacity .5s ease;
}
.card-photo.placeholder { background: #e9e9e9; }
/* --- hover: 写真がカード全面に広がり文字が白反転 --- */
.card-hoverable { cursor: pointer; }
.card-hoverable:hover .card-photo {
  top: 0; left: 0; width: 100%; height: 100%; border-radius: 0;
}
.card-hoverable:hover .card-photo img { transform: scale(1); }
.card-hoverable:hover .card-photo:not(.placeholder)::after { opacity: 1; }
.card-hoverable .card-head, .card-hoverable .card-name,
.card-hoverable .card-vjp, .card-hoverable .card-role {
  z-index: 2; transition: color .45s ease;
}
.card-hoverable:hover .card-head,
.card-hoverable:hover .card-name,
.card-hoverable:hover .card-vjp,
.card-hoverable:hover .card-role { color: var(--white); }
.card-hoverable:hover .circles i { border-color: var(--white); background: transparent; }
@media (hover: none) { .card-hoverable .card-photo { transition: none; } }
.circles { position: absolute; right: -54px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 10px; }
.circles i { width: 34px; height: 34px; border: 2px solid var(--black); border-radius: 50%; display: block; background: var(--white); }
.card-name {
  position: absolute; left: 26px; bottom: 70px;
  font-family: var(--font-en); font-weight: 800;
  font-size: clamp(34px, 3.4vw, 56px); line-height: 1.05;
}
.card-name.light, .card-head.light, .card-vjp.light, .card-role.light { color: var(--white); }
.card-vjp {
  position: absolute; right: 24px; top: 140px;
  writing-mode: vertical-rl; font-weight: 900; font-size: 20px; letter-spacing: .12em;
}
.card-role { position: absolute; left: 26px; bottom: 24px; font-weight: 700; font-size: 13px; }
.card-photo-bg .card-bgimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-photo-bg::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.18); }
.card-photo-bg .card-head, .card-photo-bg .card-name, .card-photo-bg .card-vjp, .card-photo-bg .card-role { z-index: 2; }

.service-note { text-align: center; padding: 12vh 0 10vh; }
.note-year {
  display: inline-block; background: var(--black); color: var(--white);
  font-family: var(--font-en); font-weight: 800; font-size: 30px;
  border-radius: 999px; padding: 2px 30px; margin-right: 18px;
  transform: rotate(-6deg);
}
.note-arrow { font-family: var(--font-en); font-weight: 800; font-size: 44px; }
.wavy { display: block; width: 340px; margin: 14px auto; }
.note-copy { font-size: 26px; font-weight: 700; }
.note-copy strong { font-weight: 900; font-size: 38px; }

/* ================= plan（定額制テンプレートプラン） ================= */
.plan { padding: 12vh 6vw 12vh; border-top: 1px solid var(--black); }
.plan-title {
  font-family: var(--font-en); font-weight: 800;
  font-size: clamp(72px, 12vw, 190px); text-align: center; line-height: 1;
}
.plan-lead { text-align: center; font-weight: 900; font-size: clamp(20px, 2.8vw, 32px); margin-top: 1vh; }
.plan-lead strong { font-weight: 900; background: linear-gradient(transparent 60%, var(--salmon) 60%); }
.plan-lede { text-align: center; font-weight: 700; font-size: clamp(13px, 1.3vw, 16px); margin-top: 3.5vh; }

.plan-templates { max-width: 1060px; margin: 7vh auto 0; }
.tpl-group + .tpl-group { margin-top: 5vh; }
.tpl-cat {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  font-weight: 900; font-size: clamp(17px, 1.9vw, 22px);
}
.tpl-cat-en {
  font-family: var(--font-en); font-weight: 800; font-size: 11px;
  letter-spacing: .14em; text-transform: uppercase;
  border: 1px solid var(--black); border-radius: 999px; padding: 3px 14px;
}
.tpl-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin-top: 2.2vh;
}
.tpl-card {
  position: relative; display: flex; flex-direction: column;
  border: 1px solid var(--black); border-radius: 16px;
  background: var(--white); min-height: 128px; padding: 16px 18px 14px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.tpl-group--build .tpl-card { background: var(--cream); }
.tpl-group--care .tpl-card { background: #fbe9df; }
.tpl-group--factory .tpl-card { background: var(--blue-gray); }
.tpl-card:hover { transform: translateY(-4px) rotate(-.6deg); box-shadow: 4px 6px 0 rgba(17,17,17,.18); }
.tpl-no { font-family: var(--font-en); font-weight: 800; font-size: 12px; letter-spacing: .08em; color: var(--black); }
.tpl-name { font-weight: 900; font-size: clamp(17px, 1.8vw, 22px); line-height: 1.35; margin-top: 2px; }
.tpl-view {
  margin-top: auto; padding-top: 10px;
  font-weight: 700; font-size: 11.5px; color: #555;
}
.tpl-arrow {
  position: absolute; top: 12px; right: 15px;
  font-family: var(--font-en); font-weight: 800; font-size: 16px;
  transition: transform .25s ease;
}
.tpl-card:hover .tpl-arrow { transform: translate(3px, -3px); }
.tpl-note { text-align: center; font-weight: 700; font-size: 13px; margin-top: 4.5vh; }

/* --- テンプレートのホバープレビュー（ブラウザ窓風・hover環境のみJSが表示） --- */
.tpl-preview {
  position: fixed; z-index: 90; width: 460px;
  border: 1px solid var(--black); border-radius: 14px; background: var(--white);
  box-shadow: 8px 12px 0 rgba(17,17,17,.14), 0 18px 44px rgba(17,17,17,.2);
  overflow: hidden; pointer-events: none;
  opacity: 0; transform: translateY(12px) rotate(.5deg) scale(.96);
  visibility: hidden;
  transition: opacity .3s ease, transform .35s cubic-bezier(.2,.8,.25,1), visibility 0s linear .3s;
}
.tpl-preview.is-shown {
  opacity: 1; transform: none; visibility: visible;
  transition: opacity .3s ease, transform .35s cubic-bezier(.2,.8,.25,1);
}
.tpl-preview-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; border-bottom: 1px solid var(--black); background: var(--cream);
}
.tpl-preview-bar i { width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid var(--black); background: var(--white); }
.tpl-preview-bar i:nth-child(2) { background: var(--salmon); }
.tpl-preview-url {
  margin-left: 6px; font-family: var(--font-en); font-weight: 600; font-size: 11px;
  color: #555; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tpl-preview-body { position: relative; width: 458px; height: 288px; background: #fafaf7; overflow: hidden; }
.tpl-preview-loading {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--font-en); font-weight: 700; font-size: 12px; letter-spacing: .14em; color: #999;
}
.tpl-preview iframe {
  position: relative; width: 1280px; height: 806px; border: 0;
  transform: scale(0.3578); transform-origin: 0 0; /* 458/1280: デスクトップ幅の実サイトを縮小表示 */
  pointer-events: none; background: transparent;
  opacity: 0; transition: opacity .35s ease;
}
.tpl-preview.is-loaded iframe { opacity: 1; }

/* --- スタンバイメッセージ（30秒操作がないと浮かび上がる手書きメモ） --- */
@font-face {
  font-family: "RiiTF";
  src: url("../assets/fonts/riitf-standby.woff2") format("woff2"); /* メッセージの文字だけにサブセット済み（29KB） */
  font-display: swap;
}
.standby-pop {
  position: fixed; right: 26px; bottom: 26px; z-index: 95; /* メニュー(200)より下、コンテンツより上 */
  max-width: min(430px, calc(100vw - 32px));
  background: #fdfcf8;
  border: 1px solid var(--black); border-radius: 4px;
  box-shadow: 0 14px 34px rgba(17,17,17,.16), 0 2px 6px rgba(17,17,17,.1);
  padding: 26px 28px 20px;
  opacity: 0; transform: translateY(28px) rotate(-1.2deg);
  visibility: hidden; pointer-events: none;
  transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.25,1), visibility 0s linear .8s;
}
.standby-pop.is-shown {
  opacity: 1; transform: translateY(0) rotate(-1.2deg);
  visibility: visible; pointer-events: auto;
  transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.25,1);
}
.standby-text {
  font-family: "RiiTF", var(--font-jp);
  font-size: clamp(16px, 1.6vw, 21px);
  line-height: 2; color: var(--black);
}
.standby-text .sb-ch { opacity: 0; display: inline-block; }
.standby-text.is-written .sb-ch { opacity: 1; }
.standby-text.is-writing .sb-ch {
  animation: sb-write .38s ease forwards;
  animation-delay: calc(var(--i) * .082s);
}
@keyframes sb-write {
  0%   { opacity: 0; clip-path: inset(-10% 100% -10% 0); transform: translateY(3px) rotate(2deg); }
  55%  { opacity: 1; }
  100% { opacity: 1; clip-path: inset(-10% -12% -10% -6%); transform: none; }
}
.standby-sign { display: block; text-align: right; font-size: .62em; margin-top: .4em; }
.standby-mail {
  display: inline-block; margin-top: 10px;
  font-weight: 900; font-size: 13px;
  border-bottom: 2px solid var(--black);
}

.plan-price {
  max-width: 860px; margin: 8vh auto 0;
  border: 1px solid var(--black); border-radius: 20px; overflow: hidden;
}
.price-main { background: var(--cream); text-align: center; padding: 44px 28px 38px; }
.price-label { font-weight: 700; font-size: 14px; letter-spacing: .04em; }
.price-figures { margin-top: 6px; }
.price-strike {
  font-family: var(--font-en); font-weight: 700; font-size: clamp(22px, 3vw, 30px);
  color: #888; margin-right: 18px;
  text-decoration-thickness: 3px; text-decoration-color: var(--salmon);
}
.price-now {
  position: relative; display: inline-block;
  font-family: var(--font-en); font-weight: 800; font-size: clamp(46px, 6.4vw, 68px); line-height: 1.1;
}
.price-badge {
  position: absolute; top: -14px; left: -58px;
  background: var(--black); color: var(--white);
  font-family: var(--font-jp); font-weight: 900; font-size: 13px;
  border-radius: 999px; padding: 3px 14px; transform: rotate(-8deg);
}
.price-monthly { text-align: center; padding: 30px 28px; border-top: 1px solid var(--black); }
.price-monthly b { font-family: var(--font-en); font-weight: 800; font-size: clamp(38px, 5vw, 52px); line-height: 1.1; }
.price-unit { font-weight: 900; font-size: 18px; margin-left: 4px; }
.price-desc { font-weight: 700; font-size: 13.5px; margin-top: 8px; }
.price-options { list-style: none; border-top: 1px solid var(--black); padding: 24px 32px 26px; }
.price-options li { font-weight: 700; font-size: 14.5px; }
.price-options li + li { margin-top: 10px; }
.price-note { display: block; font-size: 12.5px; color: #666; font-weight: 500; }
.price-fine { font-size: 12.5px; color: #666; }

.plan-flow {
  list-style: none; display: flex; justify-content: center; align-items: flex-start;
  gap: clamp(14px, 3.4vw, 46px); margin-top: 8vh; flex-wrap: wrap;
}
.plan-flow li { position: relative; text-align: center; font-weight: 700; font-size: 14px; }
.plan-flow li span { display: block; font-family: var(--font-en); font-weight: 800; font-size: 36px; line-height: 1.2; }
.plan-flow li:not(:last-child)::after {
  content: "-->"; position: absolute; right: calc(-1 * clamp(14px, 3.4vw, 46px) + 4px); top: 12px;
  font-family: var(--font-en); font-weight: 800; font-size: 15px;
}
.plan-cta {
  display: table; margin: 7vh auto 0;
  background: var(--black); color: var(--white);
  font-weight: 900; font-size: 17px; letter-spacing: .06em;
  border-radius: 999px; padding: 17px 46px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.plan-cta:hover { transform: translateY(-3px) rotate(-1.5deg); box-shadow: 4px 6px 0 rgba(17,17,17,.22); }
.plan-cta-note { text-align: center; font-weight: 700; font-size: 13px; margin-top: 14px; }

/* ================= another / coffee break ================= */
.another { padding: 14vh 6vw 10vh; border-top: 1px solid var(--black); }
.another-title {
  font-family: var(--font-en); font-weight: 800;
  font-size: clamp(90px, 17vw, 260px); line-height: .95;
}
.another-sub { font-family: var(--font-jp); font-weight: 900; font-size: clamp(16px, 2vw, 26px); margin-left: 26px; }
.another-row { display: flex; align-items: flex-end; gap: 5vw; flex-wrap: wrap; }
.another-q { font-weight: 900; font-size: clamp(28px, 4vw, 54px); line-height: 1.6; margin-top: 5vh; }
.break-outline {
  font-family: var(--font-en); font-weight: 800;
  font-size: clamp(80px, 13vw, 210px); line-height: 1;
  color: transparent; -webkit-text-stroke: 2px var(--black);
}

.coffee-stage {
  display: flex; align-items: center; justify-content: center;
  gap: 5vw; flex-wrap: wrap; padding: 8vh 0 4vh;
}
/* --- 6コマ・パラパラ漫画スプライト --- */
.coffee-anim {
  width: min(380px, 70vw); aspect-ratio: 1/1;
  background-image: url("../assets/img/coffee-sprite.png");
  background-size: 300% 200%;
  animation: coffee-flip 2.8s step-end infinite;
}
.coffee-anim.small { width: 190px; }
@keyframes coffee-flip {
  0%     { background-position: 0% 0%; }     /* rest */
  12.5%  { background-position: 100% 100%; } /* hold */
  25%    { background-position: 50% 100%; }  /* hold2 */
  37.5%  { background-position: 50% 0%; }    /* raise */
  50%    { background-position: 100% 0%; }   /* sip */
  62.5%  { background-position: 0% 100%; }   /* sip deep */
  75%    { background-position: 100% 0%; }   /* sip */
  87.5%  { background-position: 50% 0%; }    /* lower */
  100%   { background-position: 0% 0%; }
}
.coffee-caption { font-weight: 900; font-size: clamp(18px, 2.2vw, 26px); line-height: 2.1; }
.coffee-small { font-weight: 700; font-size: 13px; color: #666; }

/* ================= ポーズ・パラパラ2コマ ================= */
.pose-anim {
  background-size: 200% 100%;
  background-repeat: no-repeat;
  animation: pose-flip 1.8s step-end infinite;
  pointer-events: none;
}
@keyframes pose-flip {
  0%, 100% { background-position: 0 0; }
  50%      { background-position: 100% 0; }
}
.pose-sit   { background-image: url("../assets/img/pose-sit.png");   width: 190px; aspect-ratio: 175 / 309; }
.pose-cross { background-image: url("../assets/img/pose-cross.png"); width: 130px; aspect-ratio: 100 / 292; }
.pose-read  { background-image: url("../assets/img/pose-read.png");  width: 150px; aspect-ratio: 138 / 291; }

/* 配置：ABOUTの枠線の切れ目に立って腕組み（白背景で縦線を途切れさせ、下線の上に立つ） */
.about-box { position: relative; }
.about-box .pose-cross {
  position: absolute; right: -65px; bottom: 0;
  background-color: var(--white);
}
/* Coffeeセクションの上枠線に腰かける */
.another { position: relative; }
.another .pose-sit {
  position: absolute; top: 0; right: 8vw; transform: translateY(-59%);
  /* 白はベンチ線（上から59%）にかぶる罫線を消す帯だけ。全面白だと直前の見出しが隠れる */
  background-image: url("../assets/img/pose-sit.png"), linear-gradient(var(--white), var(--white));
  background-size: 200% 100%, 100% 10px;
  background-position: 0 0, 0 59%;
  animation-name: pose-flip-sit;
}
@keyframes pose-flip-sit {
  0%, 100% { background-position: 0 0, 0 59%; }
  50%      { background-position: 100% 0, 0 59%; }
}
/* フッター見出し「比例するらしい」の文字の上に右向きで腰かけて読書 */
.powered-copy .indent { position: relative; }
.powered-copy .pose-read {
  position: absolute; right: -1.05em; bottom: -.12em; /* 「い」の先端の上に、裾もかからない高さで腰かける */
  width: 110px;
  transform: scaleX(-1); /* 右向きに反転 */
  /* カルプ文字と同じ右下方向の厚み＋接地影（scaleX反転後に右下になるようxは負） */
  filter:
    drop-shadow(-2px 2px 0 #cfccc6)
    drop-shadow(-2px 2px 0 #bdbab4)
    drop-shadow(-4px 6px 5px rgba(0, 0, 0, .18));
}

@media (max-width: 1280px) {
  .about-box .pose-cross { display: none; }
}

/* ================= works ================= */
.works { padding: 10vh 6vw 14vh; border-top: 1px solid var(--black); }
.works-title {
  font-family: var(--font-en); font-weight: 800;
  font-size: clamp(64px, 10vw, 160px); text-align: center; margin-bottom: 7vh; line-height: 1;
}
.works-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 440px)); gap: 40px; justify-content: center; }
.work-card {
  position: relative; border: 1px solid var(--black); background: var(--white);
  padding-bottom: 56px; transition: transform .3s ease, box-shadow .3s ease;
}
.work-card:hover { transform: translateY(-6px); box-shadow: 6px 8px 0 var(--black); }
.work-thumb { aspect-ratio: 16/10; overflow: hidden; border-bottom: 1px solid var(--black); }
.work-thumb img { width: 100%; height: 100%; object-fit: cover; }
.work-card h3 { font-weight: 900; font-size: 21px; padding: 18px 22px 6px; }
.work-card p { font-weight: 500; font-size: 14px; padding: 0 22px; }
.work-arrow {
  position: absolute; right: 18px; bottom: 14px;
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 2px solid var(--accent); color: var(--accent); border-radius: 50%;
  font-size: 18px; font-weight: 700;
}

/* ================= footer ================= */
.footer { position: relative; border-top: 1px solid var(--black); padding: 10vh 7vw 4vh; overflow: hidden; }
.powered-label { font-family: var(--font-en); font-weight: 600; font-size: 17px; }
.powered-copy {
  font-weight: 900; font-size: clamp(34px, 5.4vw, 72px); line-height: 1.5; margin: 10px 0 8vh;
  /* カルプ文字風の厚み（斜め右下への押し出し＋接地影） */
  text-shadow:
    1px 1px 0 #d2cfc9, 2px 2px 0 #cbc8c2, 3px 3px 0 #c4c1bb, 4px 4px 0 #bdbab4,
    5px 5px 0 #b5b2ac, 6px 6px 0 #aeaba5, 7px 7px 0 #a6a39d, 8px 8px 0 #9f9c96,
    9px 9px 0 #97948e, 10px 10px 0 #908d87,
    12px 14px 4px rgba(0, 0, 0, .16), 16px 22px 24px rgba(0, 0, 0, .13);
}
.powered-copy .indent { margin-left: 1.2em; }
.footer-meta { display: flex; gap: 60px; font-family: var(--font-en); font-weight: 600; font-size: 14px; line-height: 1.7; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: flex-end;
  margin-top: 12vh; border-top: 1px solid var(--black); padding-top: 18px;
}
.footer-brand { font-family: var(--font-en); font-weight: 800; font-size: 22px; }
.footer-copy { font-family: var(--font-en); font-weight: 500; font-size: 12px; color: #666; }
.footer-mail-label { font-family: var(--font-jp); font-size: 12.5px; font-weight: 700; }
.footer-mail { font-family: var(--font-en); font-weight: 700; border-bottom: 2px solid currentColor; }

/* ================= responsive ================= */
@media (max-width: 900px) {
  .site-header { padding: 16px 18px; align-items: center; }
  .site-title { font-size: 15px; white-space: nowrap; }
  .site-title .jp { font-size: 13px; }
  .site-logo { height: 16px; }
  .menu-btn { gap: 5px; }
  .mb-icon { width: 46px; height: 27px; }
  .mb-icon--x { width: 28px; height: 27px; }
  .mb-label { font-size: 10.5px; }
  .hero-label { flex-wrap: wrap; font-size: 12px; margin-bottom: 1.6em; padding-right: 18vw; }
  .pose-sit { width: 120px; }
  .service-note { padding-bottom: 140px; } /* 腰かけ(120px幅→線上125pxまで頭)と「6つのしごと」が重ならない高さ */
  .footer .pose-read { display: none; }
  /* SERVICEカード: スクロールで次のカードが下から重なっていくスタック */
  .card-grid { display: block; border-left: none; }
  .card {
    position: sticky; top: 0;
    border: 1px solid var(--black);
    box-shadow: 0 -14px 30px rgba(17, 17, 17, .12);
  }
  .statement { flex-direction: column; padding: 12vh 8vw; }
  .statement-cols { columns: 1; }
  .statement-huge { position: static; margin: 40px auto 0; }
  .works-grid { grid-template-columns: 1fr; }
  .scroll-badge { right: 18px; bottom: 70px; width: 90px; height: 90px; }
  .hero-inner { flex-direction: column; align-items: flex-start; padding: 14vh 8vw 6vh; gap: 7vh; }
  .hero-left { max-width: 100%; }
  .wm-outline { margin-left: .35em; }
  .hero-photos { width: 100%; min-width: 0; height: 74vw; align-self: center; }
  .footer-coffee { position: static; margin-top: 30px; }
  .tpl-grid { grid-template-columns: repeat(2, 1fr); }
  .plan-flow { flex-direction: column; align-items: center; gap: 18px; }
  .plan-flow li:not(:last-child)::after { content: none; }
  .price-badge { left: -30px; }
  .hero-cta--ghost { margin-left: 0; margin-top: 10px; display: table; }
  .footer-meta { flex-wrap: wrap; gap: 30px 40px; }
  .standby-pop { right: 16px; left: 16px; bottom: 16px; max-width: none; padding: 22px 20px 16px; }
  .standby-text { font-size: 16px; }
}
