/* ==========================================================
   KANADE 建築設計工房 — 制作サンプル
   ========================================================== */

/* ---------- 変数 / リセット ---------- */
:root {
  --bg: #111315;
  --ink: #E9E6E1;
  --accent: #C9A46A;
  --paper: #F2EFEA;
  --paper-ink: #1B1D1F;
  --line: rgba(233, 230, 225, 0.18);
  --line-paper: rgba(27, 29, 31, 0.2);
  --gutter: clamp(20px, 5vw, 80px);
  --slope: 6vw;
  --pad-y: clamp(96px, 12vw, 168px);
  --ja: "Zen Kaku Gothic New", "Hiragino Sans", "Yu Gothic", sans-serif;
  --en: "Jost", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ja);
  font-weight: 300;
  font-size: 15px;
  line-height: 2.1;
  letter-spacing: 0.06em;
  overflow-x: hidden;
}
@media (min-width: 768px) { body { font-size: 16px; } }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
/* 見出しの最後の1文字だけが次の行へ落ちないようにする */
h1, h2, h3 { text-wrap: balance; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }

.skip {
  position: fixed; left: 8px; top: -60px; z-index: 300;
  background: var(--accent); color: #111; padding: 8px 14px; font-size: 13px;
}
.skip:focus { top: 8px; }

.wrap { padding-inline: var(--gutter); max-width: 1680px; margin-inline: auto; }

/* ---------- 共通の見出し部品 ---------- */
.head { position: relative; margin-bottom: clamp(40px, 6vw, 80px); }
.label {
  font-family: var(--en);
  font-weight: 300;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
  position: relative; z-index: 1;
}
h2 {
  font-weight: 300;
  font-size: clamp(26px, 3.6vw, 46px);
  line-height: 1.55;
  letter-spacing: 0.14em;
  position: relative; z-index: 1;
}
h3 { font-weight: 400; letter-spacing: 0.12em; }

/* 区切り技法2：巨大な節番号（細い輪郭線は縮小表示でガタつくので、塗りの文字で薄く置く） */
.bignum {
  position: absolute;
  left: -0.04em; top: -0.62em;
  font-family: var(--en);
  font-weight: 400;
  font-size: clamp(150px, 20vw, 280px);
  line-height: 1;
  letter-spacing: 0;
  color: var(--accent);
  opacity: 0.2;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

/* 区切り技法3：画面を横切る罫線と座標 */
.rule {
  position: absolute; left: 0; right: 0; top: 0;
  height: 1px; background: var(--line);
  z-index: 2;
}
.rule-label {
  position: absolute; left: var(--gutter); top: 14px;
  font-family: var(--en);
  font-size: 10px; line-height: 1.7;
  letter-spacing: 0.2em;
  color: rgba(233, 230, 225, 0.55);
  white-space: nowrap;
}
/* 直前の節が斜めに切れているところでは横線を引かない（座標の文字だけ残す） */
.rule--no-line { background: none; }
.sec, .works { position: relative; }
.sec { padding-block: var(--pad-y); }
.sec > .rule + .wrap { padding-top: 0; }

/* ---------- ヘッダー ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 28px var(--gutter);
  transition: background-color .4s, padding .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.site-header.is-scrolled {
  padding-block: 14px;
  background: rgba(10, 11, 12, 0.94);
  border-bottom-color: var(--line);
}
body.menu-open .site-header { background: transparent; border-bottom-color: transparent; padding-block: 28px; }
.logo { display: flex; align-items: baseline; gap: 12px; }
.logo-mark { font-family: var(--en); font-weight: 400; font-size: 20px; letter-spacing: 0.3em; }
.logo-sub { font-size: 11px; letter-spacing: 0.3em; opacity: .8; }
.menu-btn { display: flex; align-items: center; gap: 16px; min-height: 44px; }
.menu-btn-label { font-family: var(--en); font-size: 12px; letter-spacing: 0.25em; }
.menu-btn-lines { position: relative; width: 32px; height: 10px; display: block; }
.menu-btn-lines i {
  position: absolute; left: 0; width: 100%; height: 1px; background: var(--ink);
  transition: transform .4s, top .4s;
}
.menu-btn-lines i:nth-child(1) { top: 0; }
.menu-btn-lines i:nth-child(2) { top: 9px; }
.menu-btn[aria-expanded="true"] .menu-btn-lines i:nth-child(1) { top: 4px; transform: rotate(20deg); }
.menu-btn[aria-expanded="true"] .menu-btn-lines i:nth-child(2) { top: 4px; transform: rotate(-20deg); }

/* ---------- 全画面メニュー ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 90;
  background: #0a0b0c;
  opacity: 0; visibility: hidden;
  transition: opacity .5s, visibility 0s .5s;
}
.overlay.is-open { opacity: 1; visibility: visible; transition: opacity .5s; }
.overlay-inner { display: grid; grid-template-columns: 1fr 1fr; height: 100%; }
.overlay-nav {
  display: flex; flex-direction: column; justify-content: center;
  padding: 96px var(--gutter) 48px;
  overflow-y: auto;
}
.overlay-nav li + li { border-top: 1px solid var(--line); }
.overlay-nav a {
  display: flex; align-items: baseline; gap: clamp(14px, 2vw, 28px);
  padding: clamp(10px, 1.8vh, 20px) 0;
  transition: color .3s, padding-left .3s;
}
.ov-num { font-family: var(--en); font-size: 12px; letter-spacing: 0.2em; color: var(--accent); min-width: 2em; }
.ov-text {
  font-family: var(--en); font-weight: 200;
  font-size: clamp(34px, 5.4vw, 84px);
  letter-spacing: 0.16em; line-height: 1.2;
}
.ov-ja { font-size: 12px; letter-spacing: 0.2em; opacity: .55; margin-left: auto; }
.overlay-nav a:hover, .overlay-nav a:focus-visible { color: var(--accent); padding-left: 12px; }
.overlay-note { margin-top: 36px; font-size: 12px; line-height: 2; letter-spacing: 0.14em; opacity: .6; }
.overlay-visual { position: relative; overflow: hidden; }
.overlay-visual img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0; transform: scale(1.04);
  transition: opacity .6s, transform 1.2s;
}
.overlay-visual img.is-active { opacity: 1; transform: scale(1); }
.overlay-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, #0a0b0c 0%, rgba(10,11,12,0) 30%); }
body.menu-open { overflow: hidden; }

/* ---------- HERO（斜めの切り口） ---------- */
.hero {
  position: relative;
  height: min(100svh, 960px); min-height: 560px;
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--slope)), 0 100%);
}
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(10,11,12,.82) 0%, rgba(10,11,12,.45) 45%, rgba(10,11,12,0) 80%),
    linear-gradient(0deg, rgba(10,11,12,.4) 0%, rgba(10,11,12,0) 40%);
}
.hero-copy {
  position: absolute; left: var(--gutter); right: var(--gutter);
  bottom: calc(var(--slope) + clamp(40px, 7vw, 96px));
}
.eyebrow {
  font-family: var(--en); font-size: 12px; letter-spacing: 0.3em;
  color: var(--accent); margin-bottom: 20px;
}
h1 {
  margin: 0; font-weight: 300;
  font-size: clamp(34px, 6.4vw, 92px);
  line-height: 1.35; letter-spacing: 0.16em;
}
.hero-scroll {
  position: absolute; right: var(--gutter);
  bottom: calc(var(--slope) + clamp(40px, 7vw, 96px));
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  font-family: var(--en); font-size: 11px; letter-spacing: 0.3em;
  writing-mode: vertical-rl;
}
.hero-scroll i { display: block; width: 1px; height: 64px; background: var(--ink); transform-origin: top; animation: scrollline 2.4s ease-in-out infinite; }
@keyframes scrollline { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- CONCEPT ---------- */
.concept { padding-top: calc(var(--pad-y) + 2vw); }
.concept-grid {
  display: grid; grid-template-columns: 1fr; gap: 56px;
  align-items: start;
}
.concept-text { padding-top: 6vw; max-width: 40em; }
.concept-text p + p { margin-top: 1.6em; }
.concept-text .head { margin-bottom: 48px; }
.concept-photo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.figures {
  display: grid; grid-template-columns: repeat(3, 1fr);
  margin-top: clamp(72px, 9vw, 140px);
  border-top: 1px solid var(--line);
}
.figures li {
  padding: 36px 12px 0 0;
  display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: baseline;
}
.figures li + li { padding-left: clamp(12px, 3vw, 40px); border-left: 1px solid var(--line); }
.fig-num { font-family: var(--en); font-weight: 200; font-size: clamp(56px, 9vw, 132px); line-height: 1; letter-spacing: 0; }
.fig-unit { font-size: clamp(12px, 1.4vw, 16px); letter-spacing: 0.2em; color: var(--accent); }
.fig-note { grid-column: 1 / -1; margin-top: 10px; font-size: 12px; line-height: 1.8; opacity: .7; letter-spacing: 0.1em; }
@media (min-width: 900px) {
  .concept-grid { grid-template-columns: 6fr 5fr; gap: clamp(48px, 8vw, 140px); }
  .concept-photo { margin-top: 10vw; margin-right: calc(var(--gutter) * -1); }
}

/* ---------- WORKS ---------- */
.works { padding-top: 0; }
.work-dark { padding-top: var(--pad-y); }
.works-head { margin-bottom: clamp(56px, 8vw, 110px); }
.work-item {
  display: grid; grid-template-columns: 1fr;
  gap: 32px; align-items: end;
}
.work-photo img { width: 100%; aspect-ratio: 8 / 5; object-fit: cover; }
.work-body { padding: 0 var(--gutter); }
.work-count { font-family: var(--en); font-weight: 200; font-size: 56px; line-height: 1; letter-spacing: 0.04em; color: var(--accent); }
.work-count span { font-size: 16px; letter-spacing: 0.2em; opacity: .7; }
.work-body h3 { font-size: clamp(22px, 2.4vw, 32px); margin: 18px 0 6px; line-height: 1.5; }
.work-meta { font-size: 12px; letter-spacing: 0.16em; opacity: .65; margin-bottom: 18px; line-height: 1.9; }
.work-body > p:last-child { max-width: 28em; }

@media (min-width: 900px) {
  .work-item { grid-template-columns: 8fr 4fr; gap: 0; }
  .work-item.is-reverse { grid-template-columns: 4fr 8fr; }
  .work-item.is-reverse .work-photo { order: 2; }
  .work-item.is-reverse .work-body { order: 1; }
  .work-body { padding: 0 clamp(28px, 4vw, 72px) clamp(8px, 2vw, 32px); }
}

/* 区切り技法1：明るい面を斜めに切る */
.work-light {
  position: relative;
  margin-top: calc(var(--pad-y) - var(--slope));
  padding-block: calc(var(--slope) + clamp(72px, 9vw, 140px));
  background: var(--paper);
  color: var(--paper-ink);
  clip-path: polygon(0 var(--slope), 100% 0, 100% calc(100% - var(--slope)), 0 100%);
  display: grid; gap: clamp(72px, 10vw, 160px);
}
.work-light .work-count { color: #8a6a35; }
.work-light .work-meta { opacity: .7; }

/* ---------- PROCESS ---------- */
.process .head { margin-bottom: clamp(56px, 8vw, 110px); }
.steps { display: grid; grid-template-columns: repeat(6, 1fr); }
.steps li { position: relative; padding: 44px 24px 0 0; border-top: 1px solid rgba(201, 164, 106, .55); }
.steps li::after {
  content: ""; position: absolute; left: 0; top: -5px;
  width: 9px; height: 9px; border-radius: 50%; background: var(--accent);
}
.step-no { font-family: var(--en); font-weight: 200; font-size: 36px; line-height: 1; letter-spacing: 0.04em; display: block; margin-bottom: 14px; }
.steps h3 { font-size: 16px; line-height: 1.6; }
.step-month { font-family: var(--en); font-size: 12px; letter-spacing: 0.16em; color: var(--accent); margin: 4px 0 12px; line-height: 1.8; }
.steps li > p:last-child { font-size: 13px; line-height: 1.95; opacity: .75; letter-spacing: 0.05em; }
@media (max-width: 1100px) {
  .steps { grid-template-columns: repeat(3, 1fr); row-gap: 64px; }
}
@media (max-width: 640px) {
  .steps { grid-template-columns: 1fr; row-gap: 0; border-left: 1px solid rgba(201, 164, 106, .55); margin-left: 4px; }
  .steps li { border-top: 0; padding: 0 0 44px 32px; }
  .steps li::after { left: -5px; top: 8px; }
  .steps li:last-child { padding-bottom: 0; }
}

/* ---------- MATERIAL ---------- */
.material { position: relative; height: 70vh; min-height: 440px; overflow: hidden; }
.material img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.material-shade { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(10,11,12,.85) 0%, rgba(10,11,12,.25) 55%, rgba(10,11,12,.1) 100%); }
.material-copy { position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(32px, 6vw, 84px); max-width: 36em; }
.material-copy h2 { font-size: clamp(30px, 5vw, 64px); margin-bottom: 18px; }
.material-copy p { font-size: 14px; line-height: 2; opacity: .85; }

/* ---------- COMPANY ---------- */
.company-grid { display: grid; grid-template-columns: 1fr; gap: 56px; align-items: center; }
.profile { border-top: 1px solid var(--line); }
.profile > div { display: grid; grid-template-columns: 7em 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); line-height: 1.9; }
.profile dt { font-size: 12px; letter-spacing: 0.2em; color: var(--accent); padding-top: 2px; }
.profile dd { font-size: 14px; }
.company-photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
@media (min-width: 900px) {
  .company-grid { grid-template-columns: 6fr 5fr; gap: clamp(48px, 7vw, 120px); }
  .company-photo { margin-right: calc(var(--gutter) * -1); }
}

/* ---------- CONTACT（明るい面・上端を斜めに） ---------- */
.contact {
  position: relative;
  background: var(--paper); color: var(--paper-ink);
  clip-path: polygon(0 var(--slope), 100% 0, 100% 100%, 0 100%);
  padding-top: calc(var(--slope) + var(--pad-y));
  padding-bottom: var(--pad-y);
}
.contact .label { color: #8a6a35; }
.contact .bignum { color: #8a6a35; opacity: .16; }
.contact h2 { font-size: clamp(30px, 5vw, 64px); }
.contact-lead { max-width: 34em; margin-bottom: 44px; }
.contact-btns { display: flex; flex-wrap: wrap; gap: 16px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 60px; padding: 0 40px;
  font-size: 14px; letter-spacing: 0.18em;
  border: 1px solid var(--paper-ink); border-radius: 0;
  transition: background-color .3s, color .3s, border-color .3s;
}
.btn-line:hover { background: var(--paper-ink); color: var(--paper); }
.btn-fill { background: var(--accent); border-color: var(--accent); color: #1B1D1F; }
.btn-fill:hover { background: var(--paper-ink); border-color: var(--paper-ink); color: var(--accent); }
.contact .btn:focus-visible { outline-color: var(--paper-ink); }
.contact-tel { margin-top: 36px; font-family: var(--en); font-size: 12px; letter-spacing: 0.2em; opacity: .7; }
@media (max-width: 520px) { .btn { width: 100%; padding: 0 16px; } }

/* ---------- FOOTER ---------- */
.site-footer { background: var(--bg); padding: 72px 0 48px; }
.footer-inner { display: grid; gap: 10px; }
.footer-logo { margin-bottom: 14px; }
.footer-logo .logo-mark { font-size: 22px; }
.footer-addr { font-size: 12px; opacity: .65; line-height: 1.9; }
.footer-note { font-size: 11px; opacity: .6; line-height: 1.9; margin-top: 18px; }
.footer-back { font-size: 12px; opacity: .85; }
.footer-back a { color: var(--accent); border-bottom: 1px solid currentColor; }

/* ---------- 出現の動き ---------- */
html.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
html.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- スマホ ---------- */
@media (max-width: 899px) {
  :root { --slope: 9vw; }
  .overlay-inner { grid-template-columns: 1fr; }
  .overlay-visual { display: none; }
  .overlay-nav { justify-content: flex-start; padding-top: 110px; }
  .ov-ja { display: none; }
  .logo-sub { display: none; }
  .hero-scroll { display: none; }
  .figures li { padding-top: 24px; }
  .bignum { top: -0.5em; }
  .profile > div { grid-template-columns: 6em 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
  html.js .reveal { opacity: 1; transform: none; }
}
