@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&family=Noto+Sans+JP:wght@400;500;600;700&display=swap');

:root {
  --paper: #f4f5f2;
  --ink: #26332e;
  --ink-soft: #52605a;
  --line: #c8d5d3;
  --cool: #e4eceb;
  --amber: #c8843f;
  --cedar: #a87552;
  --white: #ffffff;
  --max: 1180px;
  --gutter: clamp(20px, 4vw, 56px);
  --serif: 'Noto Sans JP', sans-serif;
  --sans: 'DM Sans', 'Noto Sans JP', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--serif); font-size: 16px; line-height: 1.75; }
img { display: block; width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.container { width: min(var(--max), calc(100% - var(--gutter) * 2)); margin: 0 auto; }
.section { padding: clamp(76px, 10vw, 148px) 0; }
.section-tight { padding: clamp(54px, 7vw, 96px) 0; }
.eyebrow { margin: 0 0 13px; color: var(--ink-soft); font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; }
.section-title { margin: 0; max-width: 16ch; font-size: clamp(28px, 3.7vw, 51px); font-weight: 600; line-height: 1.32; letter-spacing: 0; }
.lead { margin: 0; color: var(--ink-soft); font-size: clamp(15px, 1.3vw, 18px); }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 22px; border: 1px solid var(--ink); border-radius: 4px; background: var(--ink); color: var(--white); font-size: 14px; font-weight: 600; transition: background .2s ease, color .2s ease, transform .2s ease; }
.button:hover { background: var(--amber); border-color: var(--amber); transform: translateY(-2px); }
.button.is-light { background: transparent; color: var(--ink); }
.button.is-light:hover { color: var(--white); }
.text-link { display: inline-flex; align-items: center; gap: 10px; border-bottom: 1px solid currentColor; padding-bottom: 4px; font-size: 14px; font-weight: 600; }
.text-link::after { content: '→'; font-family: var(--sans); }

.site-header { position: fixed; z-index: 50; inset: 0 0 auto; height: 78px; border-bottom: 1px solid transparent; transition: background .25s ease, border-color .25s ease; }
.site-header.is-solid, .site-header.is-inner { background: rgba(244, 245, 242, .96); border-color: rgba(38, 51, 46, .15); backdrop-filter: blur(12px); }
.nav-shell { width: min(1320px, calc(100% - var(--gutter) * 2)); height: 100%; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; line-height: 1.15; letter-spacing: .04em; }
.brand-mark { width: 18px; height: 18px; border: 1.5px solid var(--ink); position: relative; }
.brand-mark::before, .brand-mark::after { content: ''; position: absolute; background: var(--amber); }
.brand-mark::before { width: 5px; height: 5px; right: -3px; bottom: -3px; }
.brand-mark::after { width: 1px; height: 24px; left: 50%; top: -4px; transform: rotate(45deg); transform-origin: center; background: var(--ink); }
.brand small { display: block; margin-top: 2px; color: var(--ink-soft); font-family: var(--sans); font-size: 8px; font-weight: 600; letter-spacing: .15em; }
.site-nav { display: flex; align-items: center; gap: clamp(15px, 2vw, 30px); font-size: 13px; font-weight: 600; }
.site-nav a { position: relative; padding: 7px 0; }
.site-nav a::after { content: ''; position: absolute; right: 0; bottom: 2px; left: 0; height: 1px; background: var(--amber); transform: scaleX(0); transform-origin: left; transition: transform .2s ease; }
.site-nav a:hover::after, .site-nav a[aria-current='page']::after { transform: scaleX(1); }
.menu-toggle { display: none; width: 42px; height: 42px; padding: 0; border: 0; background: transparent; }
.menu-toggle span { display: block; width: 23px; height: 1px; margin: 5px auto; background: var(--ink); transition: transform .2s ease, opacity .2s ease; }

.kibi-hero { position: relative; min-height: 100svh; display: grid; place-items: end center; overflow: hidden; background: #d9dfde url('../images/hero-drafting-table.webp') center / cover no-repeat; }
.kibi-hero::after { content: ''; position: absolute; inset: 0; background: rgba(244, 245, 242, .08); pointer-events: none; }
#house-line { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.hero-copy { position: relative; z-index: 2; width: min(760px, calc(100% - 40px)); padding: 0 0 clamp(46px, 8vw, 98px); text-align: center; opacity: 0; transform: translateY(12px); transition: opacity .7s ease, transform .7s ease; }
.hero-copy.is-ready { opacity: 1; transform: translateY(0); }
.hero-copy .eyebrow { margin-bottom: 18px; color: var(--ink); font-size: 10px; }
.hero-copy h1 { margin: 0; font-size: clamp(34px, 5.1vw, 68px); font-weight: 600; line-height: 1.25; letter-spacing: 0; }
.hero-copy p:last-child { margin: 16px 0 0; font-family: var(--sans); font-size: 10px; font-weight: 600; letter-spacing: .14em; }
.scroll-mark { position: absolute; z-index: 2; right: clamp(20px, 4vw, 56px); bottom: 30px; display: flex; align-items: center; gap: 9px; color: var(--ink-soft); font-family: var(--sans); font-size: 10px; letter-spacing: .12em; }
.scroll-mark::after { content: ''; display: block; width: 28px; height: 1px; background: currentColor; }

.warmth-intro { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(42px, 9vw, 140px); align-items: end; }
.warmth-intro .lead { max-width: 44ch; }
.thermal-line { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: clamp(56px, 8vw, 100px); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line); }
.thermal-line article { min-height: 175px; padding: 23px 24px 26px 0; border-right: 1px solid var(--line); }
.thermal-line article + article { padding-left: 24px; }
.thermal-line article:last-child { border-right: 0; }
.thermal-line span { display: block; margin-bottom: 20px; color: var(--amber); font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .1em; }
.thermal-line h3 { margin: 0 0 8px; font-size: 18px; line-height: 1.45; }
.thermal-line p { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.75; }
.wide-image { position: relative; height: min(62vw, 720px); min-height: 390px; overflow: hidden; }
.wide-image img { height: 100%; object-fit: cover; }
.wide-image figcaption { position: absolute; right: var(--gutter); bottom: 22px; padding: 9px 12px; background: var(--paper); font-family: var(--sans); font-size: 10px; letter-spacing: .1em; }

.principle-grid { display: grid; grid-template-columns: .7fr 1.3fr; gap: clamp(38px, 7vw, 100px); }
.principle-list { border-top: 1px solid var(--ink); }
.principle { display: grid; grid-template-columns: 66px 1fr; gap: 16px; padding: 25px 0; border-bottom: 1px solid var(--line); }
.principle .number { color: var(--amber); font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .1em; }
.principle h3 { margin: 0 0 8px; font-size: 22px; font-weight: 600; }
.principle p { margin: 0; color: var(--ink-soft); font-size: 14px; }

.works-section { background: var(--cool); }
.works-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 38px; }
.works-heading .section-title { max-width: 14ch; }
.works-mosaic { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; }
.work-feature { grid-row: span 2; }
.work-tile { position: relative; min-height: 250px; overflow: hidden; background: var(--ink); }
.work-feature { min-height: 540px; }
.work-tile img { height: 100%; object-fit: cover; transition: transform .55s ease; }
.work-tile:hover img { transform: scale(1.035); }
.work-label { position: absolute; right: 0; bottom: 0; left: 0; padding: 22px; color: var(--white); background: rgba(38, 51, 46, .82); }
.work-label span { display: block; margin-bottom: 3px; color: #e8cfb2; font-family: var(--sans); font-size: 10px; font-weight: 600; letter-spacing: .12em; }
.work-label h3 { margin: 0; font-size: 20px; font-weight: 500; }

.process-band { overflow: hidden; background: var(--ink); color: var(--white); }
.process-head { display: flex; justify-content: space-between; align-items: end; gap: 30px; }
.process-head .eyebrow { color: #b8c9c5; }
.process-head .section-title { max-width: 15ch; }
.process-track { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 70px; border-top: 1px solid rgba(255,255,255,.45); }
.process-item { position: relative; padding: 28px 25px 0 0; min-height: 190px; border-right: 1px solid rgba(255,255,255,.25); }
.process-item + .process-item { padding-left: 25px; }
.process-item:last-child { border-right: 0; }
.process-item::before { content: ''; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; background: var(--amber); border-radius: 50%; }
.process-item span { color: #e8cfb2; font-family: var(--sans); font-size: 11px; letter-spacing: .1em; }
.process-item h3 { margin: 10px 0 7px; font-size: 20px; font-weight: 500; }
.process-item p { margin: 0; color: #c5d0cd; font-size: 14px; }

.consult-band { background: var(--amber); }
.consult-inner { display: flex; justify-content: space-between; align-items: center; gap: 30px; }
.consult-inner h2 { max-width: 16ch; margin: 0; font-size: clamp(27px, 3.5vw, 45px); line-height: 1.35; }
.consult-inner p { max-width: 42ch; margin: 9px 0 0; }
.consult-band .button { flex: 0 0 auto; border-color: var(--ink); }

.page-intro { padding: 165px 0 86px; border-bottom: 1px solid var(--line); }
.page-intro-inner { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 32px; align-items: end; }
.page-intro-index { color: var(--amber); font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .12em; }
.page-intro h1 { max-width: 22ch; margin: 0; font-size: clamp(37px, 5vw, 68px); font-weight: 600; line-height: 1.25; }
.page-intro p { max-width: 48ch; margin: 18px 0 0; color: var(--ink-soft); }
.image-caption { margin-top: 12px; color: var(--ink-soft); font-family: var(--sans); font-size: 11px; letter-spacing: .08em; }

.story-layout { display: grid; grid-template-columns: .88fr 1.12fr; gap: clamp(40px, 8vw, 110px); align-items: start; }
.story-layout figure { margin: 0; }
.story-layout figure img { aspect-ratio: 4 / 5; object-fit: cover; }
.story-body { padding-top: 35px; }
.story-body p { max-width: 42ch; color: var(--ink-soft); }
.story-body .section-title { margin-bottom: 27px; }
.story-values { margin-top: 55px; border-top: 1px solid var(--ink); }
.story-values div { display: grid; grid-template-columns: 122px 1fr; gap: 20px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.story-values b { font-size: 14px; }
.story-values p { margin: 0; font-size: 14px; }
.flow-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--ink); }
.flow-list article { padding: 25px 22px 0 0; min-height: 185px; border-right: 1px solid var(--line); }
.flow-list article + article { padding-left: 22px; }
.flow-list article:last-child { border-right: 0; }
.flow-list span { color: var(--amber); font-family: var(--sans); font-size: 11px; font-weight: 600; }
.flow-list h3 { margin: 11px 0 7px; font-size: 20px; }
.flow-list p { margin: 0; color: var(--ink-soft); font-size: 14px; }

.projects { display: grid; gap: clamp(64px, 10vw, 130px); }
.project { display: grid; grid-template-columns: minmax(0, 1.28fr) minmax(280px, .72fr); gap: clamp(28px, 5vw, 70px); align-items: end; }
.project:nth-child(even) { grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr); }
.project:nth-child(even) .project-image { order: 2; }
.project-image { margin: 0; }
.project-image img { aspect-ratio: 16 / 10; object-fit: cover; }
.project-info .eyebrow { color: var(--amber); }
.project-info h2 { margin: 0; font-size: clamp(29px, 3.5vw, 44px); line-height: 1.3; }
.project-info > p { color: var(--ink-soft); }
.project-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 25px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.project-meta div { padding: 12px 0; }
.project-meta small { display: block; color: var(--ink-soft); font-family: var(--sans); font-size: 9px; letter-spacing: .09em; }
.project-meta b { font-size: 13px; }
.project-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 17px; }
.project-detail img { aspect-ratio: 4 / 3; object-fit: cover; }

.performance-intro { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(35px, 8vw, 115px); align-items: center; }
.performance-intro figure { margin: 0; }
.performance-intro img { aspect-ratio: 4 / 3; object-fit: cover; }
.comfort-scale { margin-top: 55px; border-top: 1px solid var(--ink); }
.comfort-scale article { display: grid; grid-template-columns: 110px 1fr minmax(170px, .75fr); gap: 28px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--line); }
.comfort-scale span { color: var(--amber); font-family: var(--sans); font-size: 11px; font-weight: 600; }
.comfort-scale h3 { margin: 0; font-size: 21px; }
.comfort-scale p { margin: 0; color: var(--ink-soft); font-size: 14px; }
.material-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(35px, 7vw, 100px); align-items: center; }
.material-layout figure { margin: 0; }
.material-layout img { aspect-ratio: 4 / 3; object-fit: cover; }

.contact-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(44px, 9vw, 130px); align-items: start; }
.contact-guide { padding-top: 18px; }
.contact-guide .section-title { margin-bottom: 20px; }
.contact-guide p { color: var(--ink-soft); }
.contact-photo { margin-top: 37px; }
.contact-photo img { aspect-ratio: 3 / 2; object-fit: cover; }
.consult-options { margin-top: 32px; border-top: 1px solid var(--ink); }
.consult-options div { padding: 17px 0; border-bottom: 1px solid var(--line); }
.consult-options b { display: block; font-size: 15px; }
.consult-options span { color: var(--ink-soft); font-size: 13px; }
.contact-form { padding: clamp(26px, 4vw, 48px); border: 1px solid var(--line); background: var(--white); }
.contact-form h2 { margin: 0 0 24px; font-size: 26px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 7px; margin-bottom: 18px; }
.field label { font-size: 13px; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #aebcb8; border-radius: 2px; background: #fff; padding: 12px; color: var(--ink); }
.field textarea { min-height: 150px; resize: vertical; }
.form-note { margin: 15px 0 0; color: var(--ink-soft); font-size: 12px; }
.form-status { min-height: 1.75em; margin: 13px 0 0; color: var(--ink); font-size: 13px; font-weight: 600; }
.office-info { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 70px; border-top: 1px solid var(--ink); }
.office-info article { padding: 23px 23px 0 0; min-height: 170px; border-right: 1px solid var(--line); }
.office-info article + article { padding-left: 23px; }
.office-info article:last-child { border-right: 0; }
.office-info h3 { margin: 0 0 8px; font-size: 16px; }
.office-info p { margin: 0; color: var(--ink-soft); font-size: 14px; }

.site-footer { padding: 45px 0 30px; background: var(--ink); color: var(--white); }
.footer-top { display: flex; justify-content: space-between; align-items: start; gap: 30px; padding-bottom: 36px; border-bottom: 1px solid rgba(255,255,255,.24); }
.footer-top .brand small { color: #bdc9c5; }
.footer-nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 24px; color: #d9e1de; font-size: 13px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 20px; color: #aebdb8; font-family: var(--sans); font-size: 10px; letter-spacing: .08em; }

.reveal { opacity: 0; transform: translateY(20px); transition: opacity .65s ease, transform .65s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 800px) {
  .site-header, .site-header.is-solid, .site-header.is-inner { height: 68px; background: rgba(244, 245, 242, .96); border-color: rgba(38, 51, 46, .12); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .nav-shell { gap: 10px; }
  .site-nav { position: fixed; inset: 68px 0 auto; display: grid; gap: 0; padding: 13px var(--gutter) 20px; background: var(--paper); border-bottom: 1px solid var(--line); transform: translateY(-120%); transition: transform .24s ease; }
  .site-nav.is-open { transform: translateY(0); }
  .site-nav a { padding: 13px 0; border-bottom: 1px solid var(--line); }
  .menu-toggle { display: block; }
  .menu-toggle.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .menu-toggle.is-open span:nth-child(2) { opacity: 0; }
  .menu-toggle.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .kibi-hero { background-position: 18% center; }
  .hero-copy { padding-bottom: clamp(110px, 16svh, 136px); }
  .scroll-mark { right: 20px; bottom: max(36px, env(safe-area-inset-bottom)); }
  .warmth-intro, .principle-grid, .story-layout, .performance-intro, .material-layout, .contact-grid { grid-template-columns: 1fr; }
  .thermal-line { grid-template-columns: 1fr; }
  .thermal-line article, .thermal-line article + article { min-height: 0; padding: 20px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .thermal-line article:last-child { border-bottom: 0; }
  .wide-image { height: 88vw; min-height: 330px; }
  .works-heading, .consult-inner, .process-head { display: block; }
  .works-heading .text-link { margin-top: 20px; }
  .works-mosaic { grid-template-columns: 1fr; }
  .work-feature { min-height: 390px; }
  .work-tile { min-height: 280px; }
  .process-track, .flow-list { grid-template-columns: 1fr; }
  .process-item, .process-item + .process-item, .flow-list article, .flow-list article + article { min-height: 0; padding: 20px 0 20px 24px; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.25); }
  .flow-list article, .flow-list article + article { padding-left: 0; border-bottom-color: var(--line); }
  .process-item:last-child, .flow-list article:last-child { border-bottom: 0; }
  .consult-band .button { margin-top: 23px; }
  .page-intro { padding: 125px 0 62px; }
  .page-intro-inner { grid-template-columns: 1fr; gap: 18px; }
  .page-intro h1 { font-size: 33px; line-height: 1.34; word-break: keep-all; }
  .story-body { padding-top: 0; }
  .story-layout figure img { aspect-ratio: 4 / 3; }
  .story-values div { grid-template-columns: 1fr; gap: 4px; }
  .project, .project:nth-child(even) { grid-template-columns: 1fr; }
  .project:nth-child(even) .project-image { order: 0; }
  .project-meta { grid-template-columns: 1fr 1fr; }
  .comfort-scale article { grid-template-columns: 1fr; gap: 7px; }
  .form-row, .office-info { grid-template-columns: 1fr; }
  .office-info article, .office-info article + article { min-height: 0; padding: 18px 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .footer-top, .footer-bottom { display: block; }
  .footer-nav { justify-content: flex-start; margin-top: 26px; }
  .footer-bottom p + p { margin-top: 9px; }
}

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