:root {
  --bg: #ECEBE8;
  --bg-2: #E3E2DE;
  --ink: #161616;
  --muted: #55534F;
  --line: #BDBBB6;
  --green: #1F4A3C;
  --green-ink: #ECEBE8;
  --u: min(1vw, 1.44vh);
  --pad: clamp(20px, 5vw, 80px);
  --edge: max(var(--pad), calc((100vw - 1280px) / 2 + var(--pad)));   /* ナビ・ヒーロー・各セクションの左端を揃える */
  --jp: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  --en: "Jost", "Helvetica Neue", Arial, sans-serif;
}

html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--jp);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.04em;
  word-break: auto-phrase;
  font-feature-settings: "palt";
}
a { color: inherit; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 var(--pad); }
.sp { display: none; }
.nw { display: inline-block; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--bg); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }

/* ナビ：細く常時固定。舞台を抜けたら地色を敷く */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 84px; padding: 0 var(--edge);
  transition: background-color .4s, height .4s, border-color .4s;
  border-bottom: 1px solid transparent;
}
.nav.solid { background: var(--bg); height: 68px; border-bottom-color: rgba(22, 22, 22, .08); }
.brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1.25; }
.brand-en { font-family: var(--en); font-weight: 500; letter-spacing: .22em; font-size: 19px; }
.brand-ja { font-size: 11.5px; letter-spacing: .14em; margin-top: 2px; }
.nav-links { display: flex; align-items: center; gap: clamp(16px, 3vw, 44px); font-size: 14px; font-weight: 500; letter-spacing: .1em; }
.nav-links a { text-decoration: none; position: relative; }
.nav-links a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s; }
.nav-links a:not(.btn):hover::after { transform: scaleX(1); }
.btn { background: var(--green); color: var(--green-ink); padding: 10px 26px; transition: background-color .3s; }
.btn:hover { background: #163A2E; }

/* ヒーロー：スクロールで窓の光が朝から夕方へ動く */
.hero { height: 230vh; }
.hero .view { height: 100vh; height: 100svh; min-height: 560px; overflow: hidden; }
html:not(.fx) .hero .view { position: relative; }
.room, .room img, .room-tint, .light-wall, .light-floor { position: absolute; inset: 0; width: 100%; height: 100%; }
/* 光は壁と床で別の層。床の線（--floor、JSが画像の位置から計算）で切り、床では短く強く傾ける */
.light-wall, .light-floor { mix-blend-mode: screen; }   /* 合成は入れ物で。中の img で合成すると黒が出る */
.light-wall { clip-path: inset(0 0 calc(100% - var(--floor, 66%)) 0); }
.light-floor { clip-path: inset(var(--floor, 66%) 0 0 0); }
.light-floor .room-light { transform-origin: 0 var(--floor, 66%); transform: translate(calc(var(--lx, 0) * 1% + var(--fx, 0) * 1%), calc(var(--ly, 0) * .4%)) skewX(calc(var(--lk, 0) * 1.6deg - 10deg)) scale(1.15, .6); opacity: .5; }
.room-img { object-fit: cover; object-position: 50% 50%; filter: brightness(.93); }
.room-light {
  object-fit: cover; opacity: .8; filter: blur(2.5px);
  transform-origin: 0 0;
  transform: translate(calc(var(--lx, 0) * 1%), calc(var(--ly, 0) * 1%)) skewX(calc(var(--lk, 0) * 1deg)) scale(1.15);
  will-change: transform;
}
.room-tint { background: linear-gradient(180deg, rgba(255, 196, 140, .0), rgba(255, 176, 110, .18)); opacity: var(--warm, 0); mix-blend-mode: multiply; }
.hero-copy { position: absolute; left: var(--edge); right: var(--edge); top: 30%; }
.hero h1 {
  margin: 0; font-weight: 400; letter-spacing: .02em; line-height: 1.25;
  font-size: clamp(40px, calc(var(--u) * 8), 128px);
}
.hero-sub { margin: clamp(20px, 3.4vh, 40px) 0 0; display: flex; flex-direction: column; line-height: 1.6; font-size: 16px; letter-spacing: .12em; }
.hero-sub .en { font-family: var(--en); font-weight: 500; letter-spacing: .14em; font-size: 18px; }
.hero-lead {
  margin: clamp(16px, 2.6vh, 32px) 0 0; max-width: 34em; color: #3A3835; font-size: 15px; line-height: 2;
  opacity: var(--lead, 1); transform: translateY(calc((1 - var(--lead, 1)) * 14px));
}
.scroll-cue { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); text-decoration: none; font-family: var(--en); font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; opacity: var(--cue, 1); }
.scroll-cue::after { content: ""; width: 1px; height: 44px; background: linear-gradient(var(--muted), transparent); animation: cue 2.2s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* 見出し */
.sec-head { margin-bottom: clamp(36px, 6vw, 72px); }
.sec-en { margin: 0 0 6px; font-family: var(--en); font-weight: 500; font-size: 12px; letter-spacing: .32em; text-transform: uppercase; color: var(--green); }
.sec-head h2, .sec-head h1 { margin: 0; font-weight: 400; font-size: clamp(26px, 2.6vw, 36px); letter-spacing: .08em; line-height: 1.4; }

/* 事業内容 */
.business { padding: clamp(96px, 12vw, 168px) 0 clamp(80px, 10vw, 140px); background: var(--bg); position: relative; }
.biz { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; column-gap: clamp(32px, 6vw, 96px); }
.biz-item {
  position: relative; display: grid; grid-template-columns: auto 1fr; gap: clamp(20px, 3vw, 44px); align-items: start;
  padding: clamp(28px, 3.4vw, 44px) 0; border-bottom: 1px solid var(--line);
}
.biz-item::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%; background: var(--green); transform: scaleX(0); transform-origin: left; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.biz-item:hover::after { transform: scaleX(1); }
.biz-no { font-family: var(--en); font-weight: 200; font-size: clamp(56px, 6.2vw, 96px); line-height: .9; letter-spacing: 0; min-width: 1.3em; }
.biz-item h3 { margin: 6px 0 10px; font-weight: 500; font-size: clamp(19px, 1.7vw, 24px); letter-spacing: .08em; line-height: 1.5; }
.biz-item p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.95; }

/* 会社概要 */
.company { padding: clamp(80px, 10vw, 140px) 0; background: var(--bg-2); }
.company-grid { display: grid; grid-template-columns: minmax(200px, 1fr) 2.2fr; gap: clamp(24px, 6vw, 96px); }
.profile { margin: 0; border-top: 1px solid var(--line); }
.profile > div { display: grid; grid-template-columns: 8.5em 1fr; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.profile dt { font-weight: 500; font-size: 14px; letter-spacing: .1em; color: var(--muted); }
.profile dd { margin: 0; font-size: 15px; }
.profile a { text-decoration: none; border-bottom: 1px solid var(--line); }
.profile a:hover { border-bottom-color: var(--ink); }
.purpose { margin: 0; padding-left: 1.5em; }
.purpose li + li { margin-top: 2px; }

/* お問い合わせ */
.contact { padding: clamp(88px, 11vw, 150px) 0; background: var(--green); color: var(--green-ink); }
.contact .sec-en { color: #A9C2B6; }
.contact-grid { display: grid; grid-template-columns: minmax(200px, 1fr) 2.2fr; gap: clamp(24px, 6vw, 96px); align-items: start; }
.contact-note { margin: 18px 0 0; color: #C9D6CF; font-size: 14.5px; }
.contact-links { border-top: 1px solid rgba(236, 235, 232, .28); }
.contact-row { display: grid; grid-template-columns: 5em 1fr auto; align-items: center; gap: 16px; padding: clamp(22px, 3vw, 36px) 0; border-bottom: 1px solid rgba(236, 235, 232, .28); text-decoration: none; }
.contact-label { font-family: var(--en); font-weight: 500; font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: #A9C2B6; }
.contact-value { font-family: var(--en); font-weight: 200; font-size: clamp(26px, 3.6vw, 52px); letter-spacing: .02em; line-height: 1.2; overflow-wrap: anywhere; }
.arrow { font-family: var(--en); font-size: 26px; transition: transform .35s; }
.contact-row:hover .arrow { transform: translateX(8px); }

/* フッター */
.foot { padding: 36px 0 44px; font-size: 13px; color: var(--muted); }
.foot-in { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.foot .brand-en { font-size: 14px; color: var(--ink); margin-right: auto; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--ink); }

/* 本文ページ */
.page .nav { position: sticky; }
.doc { padding: clamp(64px, 9vw, 120px) 0 clamp(80px, 10vw, 140px); }
.doc-in { display: grid; grid-template-columns: 1fr; max-width: 920px; }
.doc-body { max-width: 44em; }
.doc-body h2 { font-size: 17px; font-weight: 500; letter-spacing: .08em; margin: 40px 0 10px; }
.doc-body p, .doc-body li { font-size: 15px; }
.doc-body ul { padding-left: 1.4em; }
.doc-date { margin-top: 48px; color: var(--muted); font-size: 14px; }

/* 出てくる動き（JSが動いたときだけ） */
.fx .rv { opacity: 0; transform: translateY(18px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1); }
.fx .rv.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .biz { grid-template-columns: 1fr; }
  .company-grid, .contact-grid, .doc-in { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 640px) {
  .sp { display: inline; }
  .pc { display: none; }
  .nav { height: 64px; }
  .nav.solid { height: 58px; }
  .brand-en { font-size: 15px; letter-spacing: .18em; }
  .brand-ja { font-size: 10px; }
  .nav-links a:not(.btn):not(.keep) { display: none; }
  .nav-links { gap: 14px; }
  .nav-links .keep { font-size: 12.5px; letter-spacing: .06em; }
  .btn { padding: 8px 16px; font-size: 13px; }
  .hero { height: 170vh; }
  .room-img { object-position: 58% 50%; }
  .hero-copy { top: 20%; }
  .hero h1 { font-size: clamp(44px, 14.5vw, 72px); line-height: 1.18; }
  .hero-lead { font-size: 14px; line-height: 1.9; }
  .biz-item { grid-template-columns: 1fr; gap: 8px; }
  .biz-no { font-size: 56px; }
  .profile > div { grid-template-columns: 1fr; gap: 2px; padding: 16px 0; }
  .contact-row { grid-template-columns: 1fr auto; }
  .contact-label { grid-column: 1 / -1; }
  .foot-in { gap: 12px 20px; }
}

@media (max-width: 360px) {
  .nav-links .keep { display: none; }
}
.brand-en, .btn { white-space: nowrap; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero { height: auto; }
  .hero .view { height: 100svh; }
}
