:root {
  --paper: #f1eee5;
  --ink: #161714;
  --red: #8d352b;
  --olive: #63704a;
  --line: rgba(22, 23, 20, .8);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Helvetica Neue", "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
}
a { color: inherit; }
img { display: block; max-width: 100%; }

.site-header {
  height: 88px;
  padding: 0 3vw;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}
.site-name { text-decoration: none; font-size: 14px; font-weight: 700; letter-spacing: .08em; }
.site-name span { display: inline-block; margin-right: 18px; color: var(--red); font-size: 12px; letter-spacing: .2em; }
.site-header nav { display: flex; gap: 30px; font-size: 12px; letter-spacing: .12em; }
.site-header nav a { text-decoration: none; }

.hero {
  min-height: calc(100vh - 88px);
  padding: 5vw 3vw 3vw;
  display: grid;
  grid-template-columns: 1.08fr .72fr .52fr;
  grid-template-rows: 1fr .52fr;
  gap: 14px;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.hero-title { grid-row: 1 / 3; align-self: stretch; display: flex; flex-direction: column; }
.eyebrow { margin: 0 0 4vh; color: var(--red); font: 700 12px/1 sans-serif; letter-spacing: .2em; }
h1 {
  margin: 0;
  font-family: "Hiragino Mincho ProN", "Yu Mincho", serif;
  font-size: clamp(46px, 5.4vw, 96px);
  font-weight: 600;
  line-height: .98;
  letter-spacing: -.06em;
}
h1 span { display: block; white-space: nowrap; }
.hero-date { margin: auto 0 0; font-size: 11px; line-height: 1.7; letter-spacing: .16em; }
.hero-image { overflow: hidden; background: #ccc; }
.hero-image img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.7) contrast(1.05); }
.hero-image-main { grid-row: 1 / 3; }
.hero-image-sub { border-radius: 50% 50% 0 0; }
.hero-index { align-self: end; margin: 0; padding: 22px; background: var(--red); color: var(--paper); font: 500 clamp(26px, 4vw, 68px)/1 serif; }

.about,
.floor-plan {
  margin: 0 3vw;
  padding: 9vw 0;
  display: grid;
  grid-template-columns: .65fr 2fr .7fr;
  gap: 5vw;
  border-bottom: 1px solid var(--line);
}
.section-label { display: flex; align-items: flex-start; gap: 14px; }
.section-label span { color: var(--paper); background: var(--red); padding: 9px 10px 8px; font: 500 20px/1 serif; }
.section-label p { margin: 7px 0 0; font-size: 11px; font-weight: 700; letter-spacing: .15em; }
.about-copy { max-width: 770px; font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; }
.about-copy p { margin: 0 0 1.5em; font-size: clamp(16px, 1.35vw, 22px); line-height: 2; }
.about aside { border-left: 1px solid var(--line); padding-left: 24px; font-size: 11px; line-height: 1.8; letter-spacing: .06em; }
.about aside p { margin: 0 0 24px; }

.gallery-section { padding: 9vw 3vw; border-bottom: 1px solid var(--line); }
.section-heading { display: grid; grid-template-columns: .65fr 2.75fr; gap: 5vw; margin-bottom: 5vw; }
.section-heading h2,
.floor-plan h2 { margin: 0; font-family: "Hiragino Mincho ProN", "Yu Mincho", serif; font-size: clamp(34px, 4vw, 70px); line-height: 1.18; letter-spacing: -.04em; }
.gallery { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--ink); border: 1px solid var(--ink); }
.gallery-item { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #d8d4ca; }
.gallery-item:nth-child(8n+2), .gallery-item:nth-child(8n+5) { aspect-ratio: auto; grid-row: span 2; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .45s ease, filter .45s ease; }
.gallery-item span { position: absolute; left: 8px; bottom: 7px; padding: 3px 5px; background: rgba(241,238,229,.85); font: 700 9px/1 sans-serif; letter-spacing: .12em; }
.gallery-item:hover img { transform: scale(1.035); filter: saturate(.5); }

.floor-plan { grid-template-columns: .65fr 1.5fr .75fr; align-items: end; }
.floor-plan p { font-size: 13px; line-height: 1.8; }
.button { display: flex; justify-content: space-between; padding: 18px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); text-decoration: none; font-weight: 700; font-size: 13px; }
.button span { color: var(--red); }

footer { padding: 36px 3vw 50px; display: grid; grid-template-columns: 1fr auto auto; gap: 3vw; font-size: 10px; letter-spacing: .05em; }
footer p { margin: 0; }

.viewer { width: min(94vw, 1200px); height: min(92vh, 900px); padding: 0; border: 0; color: #fff; background: #111; }
.viewer::backdrop { background: rgba(0,0,0,.85); }
.viewer figure { width: 100%; height: 100%; margin: 0; display: grid; place-items: center; padding: 55px 70px; }
.viewer figure img { max-width: 100%; max-height: 100%; width: auto; height: auto; image-rendering: auto; }
.viewer figcaption { position: absolute; left: 22px; bottom: 18px; font-size: 10px; letter-spacing: .16em; }
.viewer button { position: absolute; z-index: 2; border: 0; color: #fff; background: transparent; cursor: pointer; font-size: 24px; }
.viewer-close { top: 13px; right: 18px; }
.viewer-prev { left: 18px; top: 50%; }
.viewer-next { right: 18px; top: 50%; }

.photo-page { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; background: #111; color: #eee; }
.photo-header, .photo-nav { padding: 18px 3vw; display: flex; justify-content: space-between; font-size: 11px; letter-spacing: .1em; }
.photo-header { border-bottom: 1px solid #444; }
.photo-header p { margin: 0; }
.photo-header a, .photo-nav a { text-decoration: none; }
.photo-main { min-height: 0; padding: 24px; display: grid; place-items: center; }
.photo-main img { width: auto; height: auto; max-width: 100%; max-height: calc(100vh - 150px); }
.photo-nav { border-top: 1px solid #444; }

@media (max-width: 820px) {
  .site-header { height: 72px; }
  .site-name span { display: block; margin-bottom: 4px; }
  .site-header nav { gap: 13px; }
  .hero { min-height: auto; grid-template-columns: 1.2fr .8fr; grid-template-rows: auto 45vw; padding-top: 40px; }
  .hero-title { grid-column: 1 / 3; grid-row: auto; }
  .hero-date { margin-top: 28px; }
  .hero-image-main { grid-row: auto; }
  .hero-image-sub { grid-row: auto; }
  .hero-index { display: none; }
  .about, .floor-plan { grid-template-columns: 1fr; padding: 70px 0; }
  .about aside { border-left: 0; border-top: 1px solid var(--line); padding: 20px 0 0; display: flex; gap: 25px; }
  .section-heading { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .floor-plan { align-items: stretch; }
  footer { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .site-header nav a:first-child { display: none; }
  h1 { font-size: 14vw; }
  .hero { grid-template-rows: auto 58vw; }
  .about-copy p { line-height: 1.85; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .gallery-item:nth-child(8n+2), .gallery-item:nth-child(8n+5) { aspect-ratio: 4 / 3; grid-row: auto; }
  .viewer figure { padding: 45px 38px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .gallery-item img { transition: none; }
}
