/* 030 YOHAKU 建築設計室 ― 色はここだけ触れば差し替わる */
:root {
  --c-bg: #f4f4f2;
  --c-paper: #ffffff;
  --c-ink: #161616;
  --c-gray: #dededa;
  --c-line: #9a9a95;
  --c-accent-text: #161616;
  --c-text: #374151;
  --c-sub: #4b5563;
  --font: "IBM Plex Sans JP", sans-serif;
  --font-mincho: "Shippori Mincho", serif;
  --font-en: "Space Grotesk", sans-serif;
  --header-h: 64px;
  --gut: 20px;
}
@media (min-width: 1080px) { :root { --header-h: 80px; --gut: 56px; } }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 2; color: var(--c-text); background: var(--c-bg); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, dd, li { word-break: auto-phrase; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.head { margin-bottom: 40px; }
.head__en { font-family: var(--font-en); font-weight: 500; font-size: clamp(34px, 6vw, 80px); line-height: 1; letter-spacing: .04em; color: var(--c-ink); white-space: nowrap; }
.head__ja { font-family: var(--font-mincho); font-weight: 700; font-size: 18px; color: var(--c-ink); margin-top: 14px; display: flex; align-items: center; gap: 14px; }
.head__ja::after { content: ""; flex: 0 1 120px; height: 1px; background: var(--c-line); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 28px; font-family: var(--font); font-weight: 500; text-decoration: none; white-space: nowrap; flex: none; border: 1px solid; transition: background-color .3s, color .3s; }
.btn--ink { background: var(--c-ink); color: #fff; border-color: var(--c-ink); }
.btn--ink:hover, .btn--ink:focus-visible { background: transparent; color: var(--c-ink); }
.btn--white { background: #fff; color: var(--c-ink); border-color: #fff; }
.btn--white:hover, .btn--white:focus-visible { background: transparent; color: #fff; }

/* ===== ヘッダー ===== */
.header { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: rgba(244, 244, 242, .9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--c-gray); }
.header__inner { display: flex; align-items: center; gap: 12px; height: var(--header-h); padding: 0 var(--gut); }
.logo { display: flex; align-items: baseline; gap: 10px; min-height: 44px; padding-top: 10px; font-family: var(--font-en); font-weight: 700; font-size: 22px; letter-spacing: .14em; color: var(--c-ink); text-decoration: none; white-space: nowrap; flex: none; }
.logo span { font-family: var(--font-mincho); font-weight: 500; font-size: 15px; letter-spacing: .1em; }
.gnav { display: none; }
.header__btn { margin-left: auto; min-height: 44px; padding: 0 18px; font-size: 15px; }
.spmenu { flex: none; }
.spmenu summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; color: var(--c-ink); }
.spmenu summary::-webkit-details-marker { display: none; }
.spmenu__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.spmenu__bar, .spmenu__bar::before, .spmenu__bar::after { display: block; width: 24px; height: 1.5px; background: currentColor; position: relative; }
.spmenu__bar::before, .spmenu__bar::after { content: ""; position: absolute; left: 0; }
.spmenu__bar::before { top: -7px; } .spmenu__bar::after { top: 7px; }
.spmenu[open] .spmenu__bar { background: transparent; }
.spmenu[open] .spmenu__bar::before { top: 0; transform: rotate(45deg); }
.spmenu[open] .spmenu__bar::after { top: 0; transform: rotate(-45deg); }
.spmenu__nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--c-paper); padding: 8px 20px 24px; display: flex; flex-direction: column; border-bottom: 1px solid var(--c-ink); }
.spmenu__nav a { display: flex; align-items: center; min-height: 56px; color: var(--c-ink); text-decoration: none; font-size: 17px; border-bottom: 1px solid var(--c-gray); }
@media (max-width: 380px) { .logo span { display: none; } }
@media (min-width: 1080px) {
  .gnav { display: flex; gap: 36px; margin-left: auto; }
  .gnav a { display: flex; align-items: center; min-height: 44px; font-family: var(--font-en); font-size: 15px; letter-spacing: .08em; text-decoration: none; color: var(--c-ink); }
  .gnav a:hover { text-decoration: underline; text-underline-offset: 6px; }
  .header__btn { margin-left: 0; }
  .spmenu { display: none; }
}

/* ===== 演出①：線画の家（F07） ===== */
.hero__stage { position: relative; height: 100vh; height: 100svh; min-height: 620px; overflow: hidden;
  background-color: var(--c-bg);
  background-image: linear-gradient(var(--c-gray) 1px, transparent 1px), linear-gradient(90deg, var(--c-gray) 1px, transparent 1px);
  background-size: 48px 48px; }
.hero__photo { display: none; }
.hero__still { position: absolute; left: 50%; top: 44%; width: min(92vw, 760px); transform: translate(-50%, -50%); }
.hero__canvas { display: none; }
.hero__copy { position: absolute; left: var(--gut); right: var(--gut); bottom: 40px; }
.hero__en { font-family: var(--font-en); font-size: 15px; letter-spacing: .3em; color: var(--c-ink); margin-bottom: 10px; }
.hero__title { font-family: var(--font-mincho); font-weight: 500; font-size: clamp(34px, 5.2vw, 72px); line-height: 1.4; color: var(--c-ink); }
.hero__lead { margin-top: 10px; color: var(--c-text); }
.hero__coord { position: absolute; right: var(--gut); top: calc(var(--header-h) + 20px); font-family: var(--font-en); font-size: 15px; color: var(--c-sub); letter-spacing: .1em; }
@media (min-width: 1080px) {
  .hero__still { left: 58%; top: 50%; width: min(60vw, 860px); }
  .hero__copy { bottom: 64px; max-width: 520px; }
}
/* 動く版：Canvas の線画を見せ、最後に写真が透ける */
.is-motion .hero__still { display: none; }
.is-motion .hero__canvas { display: block; position: absolute; inset: 0; width: 100%; height: 100%; }
.is-motion .hero__photo { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.is-motion .hero__copy { background: rgba(244, 244, 242, .88); padding: 20px 22px; margin-left: -22px; }

/* ===== 考え方 ===== */
.philosophy { padding: 112px var(--gut); max-width: 1320px; margin: 0 auto; }
.philo { display: grid; gap: 0; border-top: 1px solid var(--c-ink); }
.philo li { padding: 28px 0; border-bottom: 1px solid var(--c-gray); display: grid; gap: 6px; }
.philo__no { font-family: var(--font-en); font-size: 15px; color: var(--c-sub); letter-spacing: .1em; }
.philo h3 { font-family: var(--font-mincho); font-weight: 700; font-size: clamp(20px, 2.2vw, 26px); color: var(--c-ink); line-height: 1.6; }
.philosophy__photo { margin-top: 56px; position: relative; }
.philosophy__photo img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--c-gray); }
.philosophy__photo::after { content: "1 : 50"; position: absolute; right: 0; bottom: -32px; font-family: var(--font-en); font-size: 15px; color: var(--c-sub); }
@media (min-width: 1080px) {
  .philosophy { padding: 180px var(--gut); }
  .philo li { grid-template-columns: 80px 380px 1fr; align-items: baseline; gap: 32px; }
}

/* ===== 演出②：雑誌の見開き（C05）＝動かない版は指で横に送る ===== */
.works { padding: 96px 0; background: #e9e9e6; }
.works__head { padding: 0 var(--gut); }
.works__track { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 var(--gut) 20px; }
.spread { flex: 0 0 86%; scroll-snap-align: center; display: grid; background: var(--c-paper); border: 1px solid var(--c-gray); position: relative; }
.spread--gray { background: var(--c-gray); }
.spread__photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--c-gray); }
.spread__text { position: relative; padding: 28px 22px 48px; display: grid; grid-template-columns: auto 1fr; gap: 0 20px; align-items: start; }
.spread__run { grid-column: 1 / -1; font-family: var(--font-en); font-size: 15px; letter-spacing: .14em; color: var(--c-sub); margin-bottom: 18px; }
.spread__title { writing-mode: vertical-rl; font-family: var(--font-mincho); font-weight: 700; font-size: 28px; line-height: 1.3; letter-spacing: .18em; color: var(--c-ink); grid-row: 2 / span 2; }
.spread__body { writing-mode: horizontal-tb; color: var(--c-text); }
.spread__data { margin-top: 16px; font-size: 15px; }
.spread__data div { display: flex; gap: 12px; border-top: 1px solid var(--c-line); padding: 4px 0; }
.spread__data dt { color: var(--c-ink); min-width: 3.5em; }
.spread__data dd { color: var(--c-sub); }
.spread__page { position: absolute; right: 22px; bottom: 14px; font-family: var(--font-en); font-size: 15px; color: var(--c-sub); }
@media (min-width: 768px) {
  .spread { flex-basis: 80%; grid-template-columns: 1fr 1fr; }
  .spread::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 40px; margin-left: -20px; background: linear-gradient(90deg, transparent, rgba(0, 0, 0, .07) 50%, transparent); pointer-events: none; }
  .spread__photo { padding: 32px; }
  .spread__photo img { height: 100%; aspect-ratio: auto; min-height: 380px; }
  .spread__text { padding: 48px 40px 56px; }
  /* 見開きの右ページは縦書きで組む */
  .spread__text { display: flex; flex-direction: row-reverse; gap: 28px; }
  .spread__run { position: absolute; top: 20px; left: 40px; margin: 0; }
  .spread__title { font-size: 34px; margin-top: 32px; }
  .spread__body, .spread__data { writing-mode: vertical-rl; margin-top: 32px; }
  .spread__body { max-height: 330px; line-height: 2.1; }
  .spread__data { max-height: 330px; }
  .spread__data div { border-top: 0; border-right: 1px solid var(--c-line); padding: 0 4px; }
}
/* 動く版（PC）：画面を止めて、見開きを横に送る */
.is-motion-pc .works { padding: 0; }
.is-motion-pc .works__pin { height: 100vh; padding-top: calc(var(--header-h) + 24px); display: flex; flex-direction: column; overflow: hidden; }
.is-motion-pc .works__head { margin-bottom: 20px; }
.is-motion-pc .works__track { overflow: visible; width: max-content; gap: 0; padding: 0 var(--gut); flex: 1; min-height: 0; padding-bottom: 32px; }
.is-motion-pc .spread { flex: 0 0 auto; width: min(1180px, 82vw); height: 100%; border: 0; box-shadow: 0 30px 60px rgba(0, 0, 0, .08); }
.is-motion-pc .spread + .spread { margin-left: 4vw; }
.is-motion-pc .spread__photo img { min-height: 0; }

/* ===== 設計の進め方 ===== */
.process { padding: 112px var(--gut); max-width: 1320px; margin: 0 auto; }
.process__inner { display: grid; gap: 40px; }
.process__photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--c-gray); }
.steps { position: relative; padding-left: 28px; }
.steps::before { content: ""; position: absolute; left: 6px; top: 10px; bottom: 10px; width: 1px; background: var(--c-ink); }
.steps li { position: relative; padding: 0 0 26px; }
.steps li::before { content: ""; position: absolute; left: -28px; top: 10px; width: 13px; height: 1px; background: var(--c-ink); }
.steps span { font-family: var(--font-en); font-size: 15px; color: var(--c-sub); }
.steps h3 { font-family: var(--font-mincho); font-weight: 700; font-size: 20px; color: var(--c-ink); line-height: 1.5; }
@media (min-width: 1080px) { .process { padding: 180px var(--gut); } .process__inner { grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; } .process__photo { position: sticky; top: 120px; } }

/* ===== ご相談 ===== */
.contact { background: var(--c-ink); color: #e5e7eb; padding: 120px var(--gut); }
.contact__en { font-family: var(--font-en); font-weight: 500; font-size: clamp(48px, 10vw, 150px); line-height: 1; color: #fff; letter-spacing: .04em; white-space: nowrap; }
.contact__title { font-family: var(--font-mincho); font-weight: 500; font-size: clamp(24px, 3vw, 38px); line-height: 1.6; color: #fff; margin: 28px 0 14px; }
.contact .btn { margin-top: 32px; }
.contact__tel { margin-top: 18px; font-size: 15px; color: #d1d5db; }

/* ===== フッター ===== */
.footer { padding: 64px var(--gut) 28px; font-size: 15px; }
.footer__inner { display: grid; gap: 20px; }
.footer__logo { font-family: var(--font-en); font-weight: 700; font-size: 32px; letter-spacing: .14em; color: var(--c-ink); }
.footer__nav { display: flex; flex-wrap: wrap; gap: 0 24px; }
.footer__nav a { display: flex; align-items: center; min-height: 44px; text-decoration: none; color: var(--c-ink); }
.footer__fiction { margin-top: 32px; text-align: center; color: var(--c-sub); }
@media (min-width: 900px) { .footer__inner { grid-template-columns: auto 1fr auto; align-items: end; gap: 48px; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
