:root {
  --ink: #111;
  --muted: #c0c0c0;
  --line: #c0c0c0;
  --accent: #f00;
  --header: 98px;
  --gutter: clamp(16px, 3vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: #fff;
  color: var(--ink);
  font-family: "M PLUS 1", "Hiragino Sans", "Yu Gothic", Meiryo, sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* ヘッダー */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .94);
}

.header-inner {
  display: flex;
  align-items: center;
  width: min(1403px, 100% - 2 * var(--gutter));
  height: var(--header);
  margin: 0 auto;
}

.logo { flex: none; font-size: inherit; font-weight: inherit; }
.logo a { display: flex; align-items: center; gap: 18px; }
.logo-mark { width: 50px; height: 50px; }
.logo-text { width: 223px; height: 50px; }

.nav {
  display: flex;
  gap: clamp(4px, 1.05vw, 20px);
  margin-left: auto;
  letter-spacing: 3px;
}

.nav-link {
  padding: 6px 10px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-weight: 300;
  line-height: 1;
  letter-spacing: inherit;
  transition: color .2s;
}

.nav-link:hover, .nav-link.is-current { color: var(--accent); }

.sns { display: flex; gap: 21px; margin-left: clamp(16px, 2.2vw, 35px); }
.sns img { width: 30px; height: 30px; }

.menu-button {
  display: none;
  flex: none;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  width: 44px;
  height: 44px;
  margin-left: auto;
  margin-right: -7px;
  padding: 7px;
}

.menu-button span { display: block; height: 2px; background: var(--ink); }

/* トップ写真 */
.hero { height: 1470px; overflow: hidden; }
.hero img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

/* 理念 */
.philosophy {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  padding: 90px 0 229px;
}

.philosophy-image img { width: min(540px, 100% - 2 * var(--gutter)); margin: 0 auto; aspect-ratio: 540 / 752; object-fit: cover; }
.philosophy-text { text-align: center; line-height: 2.56; }
.philosophy-text h2 { margin-bottom: 52px; font-size: 30px; font-weight: 200; line-height: 1.2; }
.philosophy-text p + p { margin-top: 41px; }
.wrap-sp { display: none; }

/* 会社概要 */
.company {
  display: grid;
  grid-template-columns: minmax(0, 430fr) minmax(0, 759fr);
  gap: clamp(32px, 6vw, 114px);
  width: min(1304px, 100% - 2 * var(--gutter));
  margin: 0 auto;
  padding: 30px 0 68px;
  font-size: 14px;
  line-height: 2.25;
}

.company-table { display: grid; grid-template-columns: 42px minmax(0, 1fr); gap: 0 69px; align-self: start; padding-top: 20px; }
.company-table dt { text-align: right; white-space: nowrap; }
.people { display: grid; gap: 142px; }
.person { display: grid; grid-template-columns: 225px minmax(0, 1fr); gap: clamp(24px, 4.6vw, 88px); align-items: start; }
.person > img { width: 225px; height: 225px; object-fit: cover; }
.person-role { font-size: 20px; line-height: 1.6; }
.person-name { margin-bottom: 18px; font-size: 24px; line-height: 1.6; }
.person-name small { font-size: 14px; }
.career { display: grid; grid-template-columns: 112px minmax(0, 1fr); }

/* 見出し */
.section-title {
  display: inline-block;
  border-bottom: 1px solid #777;
  font-size: 30px;
  font-weight: 200;
  line-height: 1.1;
}

/* WORKS */
.works { padding: 44px 0 58px; text-align: center; }
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 41px 59px;
  width: min(1340px, 100% - 2 * var(--gutter));
  margin: 29px auto 0;
  text-align: left;
}

.work-card { display: block; }
.work-card img { width: 100%; aspect-ratio: 407 / 278; object-fit: cover; transition: opacity .25s; }
.work-card:hover img { opacity: .8; }
.work-card h3 { font-size: 16px; font-weight: 300; line-height: 1.2; margin-top: 4px; }
.more {
  width: min(1340px, 100% - 2 * var(--gutter));
  margin: 40px auto 0;
  font-size: 14px;
  text-align: right;
}
.works-page { padding-bottom: 96px; }

/* FLOW */
.flow { padding: 60px var(--gutter) 40px; text-align: center; }
.flow-steps { max-width: 1120px; margin: 11px auto 0; text-align: left; }
.flow-steps h3 { font-size: 20px; font-weight: 300; line-height: 45px; }
.flow-body {
  margin: 10px 0 28px 12px;
  padding: 0 0 0 27px;
  border-left: 4px solid var(--line);
  line-height: 1.74;
}
.flow-body p + p { margin-top: 1.74em; }
.flow-body:last-child { margin-bottom: 0; }

/* CONTACT */
.contact {
  display: grid;
  grid-template-columns: minmax(0, 586fr) minmax(0, 566fr);
  gap: clamp(32px, 3.7vw, 70px);
  width: min(1222px, 100% - 2 * var(--gutter));
  margin: 0 auto;
  padding: 90px 0 330px;
}

.contact-text { font-size: 14px; line-height: 2.25; }
.contact-text .section-title { margin-bottom: 40px; }
.contact-text p + p { margin-top: 2.25em; }
.contact-form { display: grid; gap: 34px; font-size: 16px; }
.contact-form label { display: block; font-size: 15px; font-weight: 300; line-height: 1.4; }
.contact-form input, .contact-form textarea {
  display: block;
  width: 100%;
  min-height: 47px;
  margin-top: 2px;
  padding: 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: #000;
  font: inherit;
  font-size: 16px;
  font-weight: 200;
}
.contact-form textarea { min-height: 72px; resize: vertical; }
.contact-form ::placeholder { color: #aaa; }
.contact-form button {
  justify-self: start;
  width: 139px;
  height: 46px;
  border-radius: 10px;
  background: #000;
  color: #fff;
  font-weight: 400;
  letter-spacing: 4px;
}
.contact-form button:disabled { opacity: .5; cursor: wait; }
.form-trap { position: absolute; left: -9999px; }
.form-status:empty { display: none; }
.form-status { font-size: 14px; }
.form-status.is-error { color: #c00; }

/* フッター */
.site-footer { padding: 49px 16px; background: #333; color: #fff; font-size: 14px; line-height: 22px; text-align: center; }

/* 物件ページ */
.article {
  --photo-h: min(707px, calc(100svh - var(--header) - 60px));
  display: grid;
  grid-template-columns: minmax(0, 390fr) minmax(0, 897fr);
  grid-template-rows: auto 1fr auto;
  grid-template-areas: "title gallery" "info gallery" "copy more";
  column-gap: clamp(64px, 8.5vw, 162px);
  width: min(1449px, 100% - 2 * var(--gutter) - 128px);
  margin: 0 auto;
  padding: 30px 0 62px;
}

.article-title { grid-area: title; margin-bottom: 40px; font-size: 20px; font-weight: 300; line-height: 1.2; }
.article-info { grid-area: info; font-size: 14px; line-height: 2.25; }
.article-text { margin-bottom: 40px; }
.article-info h2 { padding-bottom: 1px; border-bottom: 1px solid #777; font-size: 14px; font-weight: 300; margin-bottom: 14px; }
.article-info dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 0 8px; }
.article-info dd::before { content: "：  "; }
.article-copy { grid-area: copy; align-self: end; font-size: 14px; line-height: 2.25; }
.article-more { grid-area: more; align-self: end; margin-top: 30px; font-size: 20px; line-height: 1.4; text-align: right; }
.article-more a { color: #478ac9; }

.gallery { grid-area: gallery; position: relative; align-self: start; }
.gallery-track {
  display: flex;
  height: var(--photo-h);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.gallery-track::-webkit-scrollbar { display: none; }
.gallery-item { flex: 0 0 100%; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-item.is-plan img { object-fit: contain; }
.gallery-nav {
  position: absolute;
  top: 50%;
  width: 56px;
  height: 73px;
  transform: translateY(-50%);
}
.gallery-nav::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  border-top: 1.5px solid #222;
  border-left: 1.5px solid #222;
}
.gallery-nav.is-prev { left: -60px; }
.gallery-nav.is-prev::before { transform: translate(-30%, -50%) rotate(-45deg); }
.gallery-nav.is-next { right: -60px; }
.gallery-nav.is-next::before { transform: translate(-70%, -50%) rotate(135deg); }
.gallery-nav:disabled { opacity: .2; cursor: default; }
.gallery-count { display: none; }

/* ダイアログ */
dialog::backdrop { background: rgba(0, 0, 0, .7); }
.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
}
.dialog-close::before, .dialog-close::after {
  content: "";
  position: absolute;
  top: 21px;
  left: 10px;
  width: 24px;
  height: 2px;
  background: currentColor;
}
.dialog-close::before { transform: rotate(45deg); }
.dialog-close::after { transform: rotate(-45deg); }

.news {
  width: min(487px, calc(100vw - 32px));
  min-height: min(570px, calc(100dvh - 32px));
  max-height: calc(100dvh - 32px);
  padding: 50px 35px 30px;
  border: 3px solid #404040;
  border-radius: 19px;
  color: var(--ink);
  font-weight: 300;
}
.news .dialog-close { color: #777; }
.news h2 { padding-bottom: 2px; border-bottom: 1px solid #777; font-size: 3rem; font-weight: 400; line-height: 1.2; text-align: center; }
.news article { padding: 20px 0; border-bottom: 3px double #999; font-size: 14px; line-height: 2.25; }
.news h3 { font-size: 16px; font-weight: 300; }
.news-date { font-size: 12px; margin-bottom: 8px; color: #666; }
.news-empty { margin-top: 24px; font-size: 14px; }

.drawer {
  position: fixed;
  inset: 0 auto 0 0;
  width: min(320px, 84vw);
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 72px 24px 32px;
  border: 0;
  background: #000;
  color: #fff;
  overflow-y: auto;
}
.drawer nav { display: grid; }
.drawer nav a, .drawer nav button {
  display: block;
  width: 100%;
  padding: 12px 0;
  font-weight: 300;
  letter-spacing: 3px;
  text-align: center;
}
.drawer-sns { display: flex; justify-content: center; gap: 24px; margin-top: 24px; font-size: 14px; }
.drawer-sns a { padding: 12px 0; }

/* 高さの低い画面：写真を画面内に収め、ヘッダーも低くする */
@media (max-height: 799px) and (min-width: 576px) {
  :root { --header: 72px; }
  .logo-mark { width: 40px; height: 40px; }
  .logo-text { width: 178px; height: 40px; }
  .logo a { gap: 14px; }
  .hero { height: calc(100svh - var(--header)); }
}

@media (max-width: 1199px) {
  .hero { height: min(77vw, calc(100svh - var(--header))); }
  .philosophy { padding-bottom: 96px; }
}

/* タブレット横まで：メニューをボタンにまとめる */
@media (max-width: 1040px) {
  :root { --header: 72px; }
  .logo-mark { width: 40px; height: 40px; }
  .logo-text { width: 178px; height: 40px; }
  .logo a { gap: 14px; }
  .nav, .sns { display: none; }
  .menu-button { display: flex; }
  .company { grid-template-columns: minmax(0, 1fr); }
  .company-table { max-width: 640px; }
  .people { gap: 56px; }
  .contact { padding-bottom: 96px; }
}

/* タブレット縦以下：1列にする */
@media (max-width: 900px) {
  .philosophy { grid-template-columns: minmax(0, 1fr); gap: 56px; padding-top: 64px; padding-inline: var(--gutter); }
  .philosophy-image { order: 2; }
  .philosophy-image img { width: min(420px, 100%); }
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; }
  .contact { grid-template-columns: minmax(0, 1fr); gap: 48px; padding-top: 64px; }

  .article {
    --photo-h: min(75vw, calc(100svh - var(--header) - 24px));
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
    grid-template-areas: "title" "gallery" "info" "more" "copy";
    width: 100%;
    padding-top: 0;
  }
  .article-title, .article-info, .article-copy, .article-more { padding-inline: var(--gutter); }
  .article-title { padding-top: 20px; margin-bottom: 16px; }
  .article-info { margin-top: 24px; }
  .article-copy { margin-top: 24px; }
  .gallery-nav.is-prev { left: 0; }
  .gallery-nav.is-next { right: 0; }
  .gallery-nav::before { border-color: #fff; filter: drop-shadow(0 0 3px rgba(0, 0, 0, .7)); }
  .gallery-count {
    display: block;
    margin-top: 6px;
    padding-inline: var(--gutter);
    font-size: 13px;
    text-align: right;
  }
}

/* スマホ */
@media (max-width: 575px) {
  :root { --header: 64px; }
  .logo-mark { width: 34px; height: 34px; }
  .logo-text { width: 151px; height: 34px; }
  .logo a { gap: 10px; }
  .hero { height: 100vw; }
  .philosophy { padding-top: 48px; padding-bottom: 72px; }
  .philosophy-text { font-size: 15px; line-height: 2.3; }
  .philosophy-text h2 { margin-bottom: 24px; }
  .philosophy-text p + p { margin-top: 24px; }
  .wrap-sp { display: block; }
  .company-table { grid-template-columns: 42px minmax(0, 1fr); gap: 0 16px; }
  .person { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .person > img { width: 160px; height: 160px; }
  .career { grid-template-columns: 96px minmax(0, 1fr); }
  .work-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .flow-steps h3 { font-size: 18px; line-height: 1.5; }
  .flow-body { margin: 8px 0 24px 2px; padding-left: 14px; font-size: 15px; }
  .contact { padding-top: 48px; padding-bottom: 72px; }
  .news { padding: 40px 20px 24px; }
  .news h2 { font-size: 1.875rem; }
}

/* スマホの横向きなど、ごく低い画面 */
@media (max-height: 480px) and (min-width: 576px) {
  :root { --header: 56px; }
  .logo-mark { width: 30px; height: 30px; }
  .logo-text { width: 134px; height: 30px; }
  .logo a { gap: 10px; }
  .hero { height: calc(100svh - var(--header)); }
  .article { --photo-h: calc(100svh - var(--header) - 16px); }
}

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

.nowrap { white-space: nowrap; }
