/* ============================================
   CONSTRUCTION SEKKEI TEMPLATE
   設計事務所寄りの注文住宅 — 白 × 墨 × 温かいグレー、余白に小さな写真を一枚
============================================ */

:root {
  --white: #fbfbf9; /* 地 */
  --paper: #f3f2ee; /* 少し沈んだ面 */
  --ink: #1a1a1a; /* 墨（文字・線） */
  --gray: #9a948a; /* 温かいグレー（補助文字・細い線） */
  --line: rgba(26, 26, 26, 0.14);
  --font: "Shippori Mincho", "Hiragino Mincho ProN", serif;
  --font-en: "EB Garamond", "Shippori Mincho", serif;
  --container: 1120px;
  --header-h: 76px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* ---------- Reset ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: 0;
}

table {
  border-collapse: collapse;
  width: 100%;
}

[hidden] {
  display: none !important;
}

/* 見出しを意味の切れ目で改行する */
.kw {
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.br-sp {
  display: none;
}

.nw {
  white-space: nowrap;
}

@media (max-width: 600px) {
  .br-sp {
    display: inline;
  }
  .br-pc {
    display: none;
  }
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  padding: 10px 16px;
  background: #000;
  color: #fff;
  font-size: 14px;
}

.skip-link:focus {
  top: 12px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

/* ---------- スクロールで出る（JSが動いたときだけ隠す） ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

.js .reveal--d1 {
  transition-delay: 0.08s;
}
.js .reveal--d2 {
  transition-delay: 0.16s;
}
.js .reveal--d3 {
  transition-delay: 0.24s;
}

/* ---------- アコーディオン（grid-rows で開閉） ---------- */
.acc-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.acc-panel.is-open {
  grid-template-rows: 1fr;
}

.acc-panel > div {
  overflow: hidden;
  min-height: 0;
}

/* ---------- 表をスマホで横スクロール枠に ---------- */
.scroll-x {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.scroll-x table {
  min-width: 640px;
}

.scroll-hint {
  display: none;
  font-size: 13px;
  margin-top: 8px;
  opacity: 0.7;
}

@media (max-width: 700px) {
  .scroll-hint {
    display: block;
  }
}

.form-msg {
  margin-top: 16px;
  font-size: 15px;
  line-height: 1.7;
}

/* アニメが止まる環境の保険：2.5秒後には開幕のアニメを外して通常の表示に */
.anim-done body * {
  animation: none !important;
}

/* ---------- 動きを減らす設定 ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .js .reveal {
    opacity: 1;
    transform: none;
  }
}

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  font-size: 16px;
  line-height: 2.05;
  letter-spacing: 0.06em;
  font-feature-settings: "palt";
}

.container {
  width: min(100% - 48px, var(--container));
  margin-inline: auto;
}

/* ---------- 共通 ---------- */
/* 欧文の斜体＋小さな和文。英語見出しの機械的な二段重ねではなく、横に並べて小さく */
.sec-title {
  display: flex;
  align-items: baseline;
  gap: 16px;
  font-weight: 400;
  margin-bottom: 48px;
}

.sec-title i {
  font-family: var(--font-en);
  font-size: clamp(30px, 3.4vw, 40px);
  letter-spacing: 0.02em;
}

.sec-title span {
  font-size: 14px;
  color: var(--gray);
  letter-spacing: 0.14em;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 10px 36px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  font-size: 15px;
  letter-spacing: 0.14em;
  transition:
    background-color 0.3s var(--ease),
    color 0.3s var(--ease);
}

.btn:hover {
  background: transparent;
  color: var(--ink);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
}

.btn--ghost:hover {
  background: var(--ink);
  color: var(--white);
}

/* ---------- ヘッダー ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 251, 249, 0.96);
}

.header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 32px;
}

.logo {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.16em;
}

.logo span {
  font-family: var(--font-en);
  font-style: italic;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--gray);
  margin-left: 14px;
}

.nav__list {
  display: flex;
  gap: 26px;
  font-size: 14px;
}

.nav__list a {
  position: relative;
}

.nav__list a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.nav__list a:hover::after {
  transform: scaleX(1);
}

.nav-toggle {
  display: none;
  width: 48px;
  height: 48px;
  position: relative;
}

.nav-toggle span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 1px;
  background: var(--ink);
  transition: transform 0.3s var(--ease);
}

.nav-toggle span:first-child {
  top: 20px;
}
.nav-toggle span:last-child {
  top: 28px;
}

.nav-toggle.is-open span:first-child {
  transform: translateY(4px) rotate(30deg);
}
.nav-toggle.is-open span:last-child {
  transform: translateY(-4px) rotate(-30deg);
}

@media (max-width: 960px) {
  :root {
    --header-h: 64px;
  }
  .header__inner {
    padding-inline: 20px 8px;
  }
  .logo span {
    display: none;
  }
  .nav-toggle {
    display: block;
  }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 0;
    background: var(--white);
    padding: 24px 32px 40px;
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-16px);
    transition:
      opacity 0.35s var(--ease),
      transform 0.35s var(--ease),
      visibility 0.35s;
  }
  .nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
  .nav__list {
    flex-direction: column;
    gap: 0;
    font-size: 18px;
  }
  .nav__list a {
    display: block;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }
  .nav__list a::after {
    display: none;
  }
}

/* ---------- ヒーロー（余白＋小さな写真） ---------- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: 1fr auto;
  min-height: calc(100svh - var(--header-h));
  max-height: 960px;
  padding: 6vh 32px 64px;
}

.hero__ph {
  grid-column: 7 / 10;
  grid-row: 1;
  align-self: start;
  margin-top: 4vh;
}

.hero__ph img {
  width: 100%;
  aspect-ratio: 9 / 11;
  object-fit: cover;
}

.hero__ph figcaption {
  font-size: 13px;
  color: var(--gray);
  margin-top: 10px;
  letter-spacing: 0.06em;
}

.hero__ph i {
  font-family: var(--font-en);
  font-size: 15px;
  color: var(--ink);
}

.hero__copy {
  grid-column: 2 / 7;
  grid-row: 2;
  align-self: end;
}

.hero__title {
  font-weight: 500;
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.9;
  letter-spacing: 0.16em;
  margin-bottom: 18px;
}

.hero__text {
  font-size: 15px;
  color: #4a4844;
}

.hero__scroll {
  position: absolute;
  right: 32px;
  bottom: 64px;
  font-family: var(--font-en);
  font-style: italic;
  font-size: 15px;
  color: var(--gray);
  writing-mode: vertical-rl;
}

/* 写真はごくゆっくり、文字は短く順に */
.js .hero__ph img {
  animation: settle 2s var(--ease) both;
}

.js .hero__copy > * {
  animation: heroIn 0.9s var(--ease) both;
  animation-delay: 0.3s;
}

.js .hero__copy > :nth-child(2) {
  animation-delay: 0.45s;
}

@keyframes settle {
  from {
    transform: scale(1.04);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes heroIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hero__ph {
  overflow: hidden;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: repeat(6, 1fr);
    min-height: 0;
    padding: 32px 24px 56px;
    row-gap: 48px;
  }
  .hero__ph {
    grid-column: 3 / 7;
    margin-top: 0;
  }
  .hero__copy {
    grid-column: 1 / 7;
  }
  .hero__scroll {
    display: none;
  }
}

/* ---------- お知らせ ---------- */
.news {
  padding: 24px 0 96px;
}

.news__inner {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.news__title i {
  font-family: var(--font-en);
  font-weight: 400;
  font-size: 22px;
}

.news__list li {
  display: flex;
  gap: 24px;
  padding: 4px 0;
  font-size: 15px;
}

.news__list time {
  font-family: var(--font-en);
  color: var(--gray);
  flex-shrink: 0;
  font-size: 16px;
}

.news__list a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

@media (max-width: 700px) {
  .news {
    padding-bottom: 64px;
  }
  .news__inner {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .news__list li {
    flex-direction: column;
    gap: 0;
    padding: 8px 0;
  }
}

/* ---------- 作品 ---------- */
.works {
  padding: 40px 0 140px;
}

.works__list {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  row-gap: 96px;
}

.work--a {
  grid-column: 1 / 6;
}
.work--b {
  grid-column: 7 / 13;
  margin-top: 180px;
}
.work--c {
  grid-column: 2 / 6;
}
.work--d {
  grid-column: 8 / 12;
  margin-top: 120px;
}

.work__btn {
  display: block;
  width: 100%;
  text-align: left;
}

.work__btn img {
  width: 100%;
  object-fit: cover;
  transition: opacity 0.4s var(--ease);
}

.work--a img {
  aspect-ratio: 9 / 11;
}
.work--b img {
  aspect-ratio: 11 / 8;
}
.work--c img {
  aspect-ratio: 1;
}
.work--d img {
  aspect-ratio: 9 / 7;
}

.work__btn:hover img {
  opacity: 0.86;
}

.work__name {
  display: block;
  font-size: 18px;
  margin-top: 14px;
  letter-spacing: 0.12em;
}

.work__meta {
  display: block;
  font-size: 13px;
  color: var(--gray);
}

@media (max-width: 760px) {
  .works {
    padding: 24px 0 88px;
  }
  .works__list {
    grid-template-columns: repeat(6, 1fr);
    row-gap: 56px;
  }
  .work--a {
    grid-column: 1 / 6;
  }
  .work--b {
    grid-column: 1 / 7;
    margin-top: 0;
  }
  .work--c {
    grid-column: 2 / 7;
  }
  .work--d {
    grid-column: 1 / 6;
    margin-top: 0;
  }
}

/* ---------- 考え方 ---------- */
.thought {
  padding: 120px 0;
  background: var(--paper);
}

.thought__inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
}

.thought__lead {
  font-size: clamp(22px, 2.4vw, 28px);
  letter-spacing: 0.16em;
  margin-bottom: 24px;
}

.thought__body p + p {
  margin-top: 16px;
}

.thought__body p:not(.thought__lead) {
  max-width: 34em;
}

@media (max-width: 760px) {
  .thought {
    padding: 72px 0;
  }
  .thought__inner {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* ---------- 進め方 ---------- */
.process {
  padding: 120px 0;
}

.process__list {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-top: 1px solid var(--ink);
}

.process__list li {
  padding: 20px 14px 0 0;
  border-right: 1px solid var(--line);
  padding-left: 14px;
}

.process__list li:first-child {
  padding-left: 0;
}

.process__list li:last-child {
  border-right: 0;
}

.process__time {
  font-size: 13px;
  color: var(--gray);
}

.process__list h3 {
  font-weight: 500;
  font-size: 16px;
  line-height: 1.6;
  margin: 4px 0 8px;
}

.process__list p {
  font-size: 14px;
  line-height: 1.85;
}

@media (max-width: 960px) {
  .process__list {
    grid-template-columns: 1fr;
  }
  .process__list li,
  .process__list li:first-child {
    display: grid;
    grid-template-columns: 90px 1fr;
    column-gap: 16px;
    padding: 16px 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .process__time {
    grid-row: span 2;
    padding-top: 4px;
  }
  .process__list h3 {
    margin-top: 0;
  }
}

@media (max-width: 760px) {
  .process {
    padding: 72px 0;
  }
}

/* ---------- 費用 ---------- */
.cost {
  padding: 0 0 120px;
}

.cost__inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
}

.cost__table {
  margin: 24px 0 16px;
  border-top: 1px solid var(--ink);
}

.cost__table th,
.cost__table td {
  text-align: left;
  vertical-align: top;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.cost__table th {
  width: 130px;
  font-weight: 400;
  color: var(--gray);
}

.cost__table b {
  font-family: var(--font-en);
  font-weight: 500;
  font-size: 24px;
}

.cost__note {
  font-size: 14px;
  color: #4a4844;
}

@media (max-width: 760px) {
  .cost {
    padding-bottom: 72px;
  }
  .cost__inner {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .cost__table th,
  .cost__table td {
    display: block;
    width: auto;
    padding: 0;
    border: 0;
  }
  .cost__table th {
    padding-top: 14px;
    font-size: 13px;
  }
  .cost__table td {
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
  }
}

/* ---------- 人 ---------- */
.people {
  padding: 120px 0;
  border-top: 1px solid var(--line);
}

.people__inner {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
}

.people__inner .sec-title {
  grid-column: 1 / 13;
}

.people__list {
  grid-column: 1 / 8;
  display: grid;
  gap: 36px;
}

.person__role {
  font-size: 13px;
  color: var(--gray);
}

.person__name {
  font-size: 22px;
  letter-spacing: 0.24em;
  margin-bottom: 6px;
}

.person p:last-child {
  font-size: 15px;
  max-width: 32em;
}

.people__ph {
  grid-column: 9 / 13;
  align-self: end;
}

.people__ph img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

@media (max-width: 760px) {
  .people {
    padding: 72px 0;
  }
  .people__list,
  .people__ph {
    grid-column: 1 / 13;
  }
  .people__ph {
    margin-top: 40px;
    width: 70%;
    justify-self: end;
  }
}

/* ---------- 見学会 ---------- */
.openhouse {
  padding: 0 0 120px;
}

.openhouse__inner {
  border: 1px solid var(--ink);
  padding: 48px;
}

.openhouse__title {
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 28px);
  letter-spacing: 0.16em;
  margin-bottom: 20px;
}

.openhouse__title i {
  display: block;
  font-family: var(--font-en);
  font-size: 16px;
  color: var(--gray);
  letter-spacing: 0.04em;
}

.openhouse__info > div {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 16px;
  padding: 8px 0;
  font-size: 15px;
}

.openhouse__info dt {
  color: var(--gray);
}

.openhouse__btns {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

@media (max-width: 760px) {
  .openhouse {
    padding-bottom: 72px;
  }
  .openhouse__inner {
    padding: 28px 20px;
  }
  .openhouse__info > div {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .openhouse__btns .btn {
    flex: 1 1 100%;
  }
}

/* ---------- 事務所 ---------- */
.office {
  padding: 120px 0;
  background: var(--paper);
}

.office__inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
}

.office__list > div {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
}

.office__list dt {
  color: var(--gray);
}

.office__map {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
  margin-top: 32px;
  filter: grayscale(1) contrast(0.9);
}

@media (max-width: 760px) {
  .office {
    padding: 72px 0;
  }
  .office__inner {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .office__list > div {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .office__map {
    aspect-ratio: 4 / 3;
  }
}

/* ---------- お問い合わせ ---------- */
.contact {
  padding: 120px 0;
}

.contact__inner {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 48px;
}

.form {
  display: flex;
  flex-direction: column;
  max-width: 600px;
}

.form__lead {
  font-size: 15px;
  margin-bottom: 8px;
}

.form label {
  font-size: 14px;
  margin: 20px 0 4px;
  color: #4a4844;
}

.form input,
.form select,
.form textarea {
  min-height: 48px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  font-size: 16px;
}

.form textarea {
  border: 1px solid var(--line);
  padding: 10px 12px;
}

.form select {
  appearance: none;
  background: linear-gradient(45deg, transparent 50%, var(--ink) 50%) right 14px center / 6px 6px no-repeat,
    linear-gradient(-45deg, transparent 50%, var(--ink) 50%) right 8px center / 6px 6px no-repeat;
  padding-right: 32px;
}

.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: 1px solid var(--ink);
  outline-offset: 2px;
}

.form .btn {
  margin-top: 32px;
  align-self: flex-start;
}

@media (max-width: 760px) {
  .contact {
    padding: 72px 0;
  }
  .contact__inner {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .form .btn {
    align-self: stretch;
  }
}

/* ---------- フッター ---------- */
.footer {
  padding: 40px 0 48px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.footer__copy {
  font-family: var(--font-en);
  color: var(--gray);
}

/* ---------- 作品の詳細モーダル ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  transition: opacity 0.3s var(--ease);
}

.modal[hidden] {
  display: none !important;
}

.modal.is-open {
  opacity: 1;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(251, 251, 249, 0.94);
}

.modal__panel {
  position: relative;
  width: min(100%, 880px);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  background: var(--white);
  border: 1px solid var(--line);
  padding: 48px;
  transform: scale(0.98);
  transition: transform 0.3s var(--ease);
}

.modal.is-open .modal__panel {
  transform: none;
}

.modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 44px;
  height: 44px;
}

.modal__close span {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 21px;
  height: 1px;
  background: var(--ink);
  transform: rotate(45deg);
}

.modal__close span + span {
  transform: rotate(-45deg);
}

.modal__body img {
  background: var(--paper);
  width: 100%;
  aspect-ratio: 12 / 7.6;
  object-fit: cover;
  margin-bottom: 24px;
}

.modal__body h3 {
  font-weight: 500;
  font-size: 22px;
  letter-spacing: 0.16em;
  margin-bottom: 8px;
}

.modal__body p {
  font-size: 15px;
  margin-bottom: 20px;
}

.modal__body dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 32px;
  border-top: 1px solid var(--ink);
}

.modal__body dl > div {
  display: grid;
  grid-template-columns: 90px 1fr;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.modal__body dt {
  color: var(--gray);
}

@media (max-width: 600px) {
  .modal {
    padding: 12px;
  }
  .modal__panel {
    padding: 52px 18px 24px;
  }
  .modal__body dl {
    grid-template-columns: 1fr;
  }
}
