/* 色の指定は index.html の :root に一本化 */

header { height: 80px; border: 0; padding: 0 3%; }
.brand { font-size: 32px; letter-spacing: -1.5px; }
.brand small { font-weight: 800; font-size: 23px; letter-spacing: 2px; }
.navcta { border-radius: 0; }

.puzzle-section { padding: 0 8px; }
.photo-strip {
  --slant: clamp(17px, 3.8vw, 63px);
  --photo-gap: 6px;
  display: flex;
  height: clamp(145px, 21vw, 320px);
  overflow: hidden;
}
.puzzle-piece {
  position: relative;
  flex: 1;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #e7e6dd;
  perspective: 750px;
  clip-path: polygon(var(--slant) 0, 100% 0, calc(100% - var(--slant)) 100%, 0 100%);
}
.puzzle-piece + .puzzle-piece { margin-left: calc(var(--photo-gap) - var(--slant)); }
.puzzle-piece:first-child {
  flex: .85;
  clip-path: polygon(0 0, 100% 0, calc(100% - var(--slant)) 100%, 0 100%);
}
.puzzle-piece:last-child {
  flex: .85;
  clip-path: polygon(var(--slant) 0, 100% 0, 100% 100%, 0 100%);
}
.puzzle-piece img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.puzzle-piece:hover img { transform: scale(1.04); }
.puzzle-piece:focus-visible img { filter: brightness(.72); }
.piece-label { display: none; }

.puzzle-message {
  display: grid;
  justify-items: center;
  text-align: center;
  padding: clamp(26px, 3.3vw, 56px) 10px;
}
.hero-kicker {
  font-size: clamp(10px, 1.05vw, 17px);
  font-weight: 700;
  letter-spacing: .045em;
  margin-bottom: 9px;
}
.puzzle-message h1 {
  font-family: 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', sans-serif;
  font-weight: 900;
  font-size: clamp(26px, 4.1vw, 63px);
  letter-spacing: -.06em;
  line-height: 1.28;
  margin: 0;
}
.hero-sub {
  margin: 12px 0 0;
  font-weight: 700;
  font-size: clamp(11px, 1.3vw, 19px);
  letter-spacing: .06em;
}
.hero-location { display: none; }
.puzzle-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 22px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
}
#motion-toggle { border: 0; background: transparent; font-size: 11px; color: #444; padding: 8px; }

.section h2 { font-family: sans-serif; font-weight: 700; letter-spacing: -.03em; }
.services { background: var(--brand); }
.services .label, .service-row .num { color: var(--accent); }
.service-row p { color: #fff1f0; }

.gallery { grid-template-columns: repeat(3, 1fr); }
.filters button { border-radius: 0; }

@media (max-width: 1050px) {
  nav { gap: 18px; }
}
@media (max-width: 800px) {
  header { height: 70px; padding: 0 5%; }
  .brand { font-size: 25px; }
  .brand small { font-size: 17px; margin-left: 7px; }
  nav { top: 70px; }
  .puzzle-section { padding: 0 5px; }
  .photo-strip {
    --photo-gap: 4px;
    height: clamp(106px, 32vw, 215px);
  }
  .puzzle-message { padding: 24px 10px 26px; }
  .puzzle-message h1 { font-size: clamp(24px, 7vw, 48px); }
  .hero-kicker { font-size: clamp(9px, 2.7vw, 14px); letter-spacing: 0; }
  .hero-sub { font-size: clamp(10px, 2.8vw, 15px); letter-spacing: 0; }
  .puzzle-bottom { padding: 0 8px; font-size: 8px; letter-spacing: .5px; }
  .puzzle-bottom > span { display: none; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .puzzle-piece img { transition: none; }
}

/* ---- 流れる写真の帯（上は左へ、下は右へ） ---- */
.photo-strip { --h: clamp(145px, 21vw, 320px); height: var(--h); position: relative; }
.strip-track { display: flex; width: max-content; height: 100%; will-change: transform; }
.strip-track .puzzle-piece,
.strip-track .puzzle-piece:first-child,
.strip-track .puzzle-piece:last-child {
  flex: none;
  width: calc(var(--h) * 1.3);
  margin-left: calc(var(--photo-gap) - var(--slant));
  clip-path: polygon(var(--slant) 0, 100% 0, calc(100% - var(--slant)) 100%, 0 100%);
}
.strip-track.to-left { animation: strip-left 70s linear infinite; }
.strip-track.to-right { animation: strip-right 70s linear infinite; }
@keyframes strip-left { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes strip-right { from { transform: translateX(-50%); } to { transform: translateX(0); } }
.photo-strip:hover .strip-track,
.motion-paused .strip-track { animation-play-state: paused; }
@media (max-width: 800px) {
  .photo-strip { --h: clamp(106px, 32vw, 215px); }
  .strip-track.to-left, .strip-track.to-right { animation-duration: 50s; }
}
@media (prefers-reduced-motion: reduce) {
  .strip-track { animation: none !important; }
}

/* ===== v12：参考デザインのトップ ===== */
header { border-bottom: 0; }
.puzzle-section {
  position: relative; overflow: hidden; padding: 6px 0 0;
  background: #fff;
}
.puzzle .photo-strip { width: 112%; margin-left: -6%; transform: rotate(-4deg); }
.puzzle .photo-strip:first-child { margin-top: 10px; }
.puzzle-message { padding: clamp(36px, 3.6vw, 60px) 6% clamp(44px, 4.4vw, 70px); }
.photo-strip { --h: clamp(140px, 17vw, 270px); }
.hero-copy { display: inline-block; text-align: left; }
.hero-kicker { display: flex; align-items: center; gap: 14px; margin: 0 0 14px; font-size: clamp(16px, 1.8vw, 26px); font-weight: 900; letter-spacing: .02em; color: #1d1f23; font-style: italic; }
.hero-kicker i { width: 3px; height: 1.3em; background: var(--brand); transform: skewX(-28deg); display: inline-block; }
.puzzle-message h1 {
  font-size: clamp(30px, 4.4vw, 68px); letter-spacing: -.02em; line-height: 1.25;
  transform: skewX(-8deg); transform-origin: left bottom; color: #111;
}
.hero-en { font-family: 'Poppins', 'Helvetica Neue', Arial, sans-serif; font-weight: 700; font-style: italic; font-size: 1.42em; letter-spacing: -.03em; display: inline-block; transform: skewX(4deg); margin-right: .04em; }
.hero-cta {
  display: inline-flex; align-items: center; justify-content: center; gap: 1.6em;
  margin: clamp(28px, 3vw, 44px) 0 0 4%; padding: 0 2.6em; height: clamp(58px, 5vw, 76px); min-width: min(78vw, 420px);
  background: linear-gradient(100deg, #f02a1d, #c30f07); color: #fff;
  font-size: clamp(17px, 1.6vw, 22px); font-weight: 900; letter-spacing: .3em; white-space: nowrap;
  clip-path: polygon(6% 0, 100% 0, 94% 100%, 0 100%);
  box-shadow: 0 14px 30px -12px rgba(195,15,7,.6); transition: filter .3s;
}
.hero-cta span { letter-spacing: 0; font-weight: 400; font-size: 1.2em; }
.hero-cta:hover { filter: brightness(1.08); }
.puzzle-bottom { position: relative; z-index: 2; margin-top: 18px; background: transparent; }
/* ハンバーガー */
.menu span { display: block; width: 30px; height: 2px; background: #1d1f23; margin: 7px 0; }
@media (max-width: 800px) {
  .puzzle-section { padding-top: 0; }
  .photo-strip { --h: clamp(120px, 36vw, 240px); }
  .puzzle .photo-strip { transform: rotate(-5deg); width: 118%; margin-left: -9%; }
  .puzzle-message { padding: 40px 7% 46px; }
  .hero-copy { display: block; }
  .puzzle-message h1 { font-size: clamp(26px, 8.6vw, 44px); }
  .hero-kicker { font-size: clamp(14px, 4.3vw, 22px); gap: 10px; white-space: nowrap; }
  .hero-cta { margin-left: 4%; min-width: 0; width: 86%; letter-spacing: .18em; gap: 1em; padding: 0 1.4em; }
  .puzzle-message h1 { font-size: clamp(27px, 9vw, 46px); }
  .menu { padding: 6px 0; }
}

/* 下の帯のあとは余白なしで次のセクションへ */
.puzzle-section { padding-bottom: 6px; }
.puzzle .photo-strip:last-child { margin-bottom: 10px; }

/* 「ShowShin」がシャキーンと光る */
.hero-en {
  background: linear-gradient(105deg, #111 0%, #111 42%, #fff 48%, #ffd9d6 50%, #fff 52%, #111 58%, #111 100%);
  background-size: 300% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  padding: 0 .14em 0 .04em; margin: 0 -.06em 0 -.04em;
  animation: shakiin 4.2s cubic-bezier(.5,0,.3,1) infinite;
}
@keyframes shakiin {
  0%   { background-position: 100% 0; }
  14%  { background-position: 0% 0; }
  15%  { background-position: 100% 0; }
  29%  { background-position: 0% 0; }
  100% { background-position: 0% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-en { animation: none; background: none; color: #111; -webkit-text-fill-color: #111; }
}
/* ---- 無料見積もりボタン：電動ドリルで四隅をビス留め ---- */
.cta-wrap { position: relative; display: inline-block; margin: clamp(28px, 3vw, 44px) 0 0 4%; }
.cta-wrap .hero-cta { margin: 0; }
.screw { position: absolute; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #f4f5f7, #9aa0a8 70%); box-shadow: 0 1px 2px rgba(0,0,0,.45); pointer-events: none; }
.screw::before, .screw::after { content: ''; position: absolute; left: 50%; top: 50%; width: 7px; height: 1.6px; margin: -.8px 0 0 -3.5px; background: #555a62; border-radius: 1px; }
.screw::after { transform: rotate(90deg); }
.sc1 { left: 10%; top: 22%; } .sc2 { left: 92.5%; top: 22%; } .sc3 { left: 89.5%; top: 78%; } .sc4 { left: 7.5%; top: 78%; }
.drill { position: absolute; left: 10%; top: 22%; width: 0; height: 0; pointer-events: none; opacity: 0; z-index: 2; }
.drill svg { position: absolute; left: 0; top: -21.5px; width: 60px; height: 64px; transform-origin: 0 21.5px; transform: rotate(-38deg); }
@media (prefers-reduced-motion: no-preference) {
  .drill { animation: drill-move 3.4s ease-in-out .7s forwards; }
  .drill svg { animation: drill-buzz .07s linear infinite; }
  .screw { transform: scale(0); animation: screw-in .35s cubic-bezier(.3,1.6,.6,1) forwards; }
  .sc1 { animation-delay: 1.30s; } .sc2 { animation-delay: 2.10s; } .sc3 { animation-delay: 2.90s; } .sc4 { animation-delay: 3.65s; }
}
@keyframes drill-move {
  0% { left: 10%; top: 22%; opacity: 0; } 5% { opacity: 1; }
  20% { left: 10%; top: 22%; } 27% { left: 92.5%; top: 22%; }
  44% { left: 92.5%; top: 22%; } 51% { left: 89.5%; top: 78%; }
  68% { left: 89.5%; top: 78%; } 75% { left: 7.5%; top: 78%; }
  90% { left: 7.5%; top: 78%; opacity: 1; } 100% { left: 2%; top: 60%; opacity: 0; }
}
@keyframes drill-buzz { 0% { transform: rotate(-38deg) translate(0,0); } 50% { transform: rotate(-37deg) translate(.6px,-.6px); } 100% { transform: rotate(-38deg) translate(0,0); } }
@keyframes screw-in { 0% { transform: scale(0) rotate(-200deg); } 100% { transform: scale(1) rotate(0); } }
@media (max-width: 800px) {
  .cta-wrap { display: block; margin-left: 4%; width: 86%; }
  .cta-wrap .hero-cta { width: 100%; }
  .drill svg { width: 48px; height: 51px; top: -17px; transform-origin: 0 17px; }
  .screw { width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px; }
}

/* ===== ハンバーガー → 開いたら×、メニューは白の全画面 ===== */
.menu span { transition: transform .3s ease, opacity .2s ease; }
.menu[aria-expanded="true"] span:nth-child(1) { transform: translateY(9px) rotate(45deg); }
.menu[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu[aria-expanded="true"] span:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
@media (max-width: 800px) {
  nav.open { position: fixed; top: 70px; left: 0; right: 0; background: #fff; padding: 26px 25px 32px; border-top: 1px solid var(--line2); box-shadow: 0 14px 24px -10px rgba(0,0,0,.25); z-index: 20; }
  html.menu-open body::after { content: ''; position: fixed; inset: 70px 0 0; background: rgba(0,0,0,.35); z-index: 9; }
}
