:root {
  --paper: #e8e5dc;
  --paper-2: #f3f1eb;
  --ink: #1c2821;
  --muted: #6c746c;
  --line: rgba(28, 40, 33, 0.18);
  --serif: "Cormorant Garamond", "Iowan Old Style", Palatino, "Times New Roman", serif;
  --sans: Outfit, "DM Sans", "Avenir Next", sans-serif;
  --shadow: 0 18px 70px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
body.locked { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid #8ea18a; outline-offset: 3px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  height: 72px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 28px;
  align-items: center;
  padding: 0 4.4vw;
  background: rgba(232, 229, 220, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.wordmark {
  font-size: 12px;
  letter-spacing: 0.22em;
  font-weight: 500;
  line-height: 1.15;
}
.wordmark small {
  display: block;
  margin-top: 4px;
  font-size: 8px;
  letter-spacing: 0.28em;
  font-weight: 400;
  opacity: 0.7;
}
.topnav { display: flex; gap: 22px; }
.topnav a {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.55;
}
.topnav a:hover, .topnav a[aria-current="page"] { opacity: 1; }
.edition, .leave {
  justify-self: end;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.72;
}
.leave { border-bottom: 1px solid transparent; }
.leave:hover { border-bottom-color: var(--ink); opacity: 1; }

.hero {
  position: relative;
  min-height: 720px;
  height: min(100svh, 980px);
  overflow: hidden;
  background: #243028;
  color: #f6f3ec;
}
.hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 46%;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 14, 11, 0.55), rgba(8, 14, 11, 0.05) 62%),
    linear-gradient(0deg, rgba(8, 14, 11, 0.35), transparent 46%);
}
.hero-copy {
  position: absolute;
  z-index: 1;
  left: 10vw;
  bottom: 13%;
  max-width: 720px;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.eyebrow::before {
  content: "";
  width: 32px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}
h1 {
  margin: 18px 0 16px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(72px, 10vw, 148px);
  line-height: 0.82;
  letter-spacing: -0.045em;
}
.lede {
  max-width: 380px;
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(246, 243, 236, 0.86);
}
.hero-action {
  margin-top: 28px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.arrow {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background 0.2s, color 0.2s;
}
.hero-action:hover .arrow { background: #fff; color: var(--ink); }
.hero-index {
  position: absolute;
  z-index: 1;
  right: 4.4vw;
  bottom: 8%;
  writing-mode: vertical-rl;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.8;
}

.intro {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 8vw;
  align-items: end;
  padding: 108px 10vw 88px;
}
.intro h2 {
  margin: 18px 0 0;
  max-width: 640px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 5vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.03em;
}
.intro p {
  margin: 0;
  padding-left: 26px;
  border-left: 1px solid var(--line);
  color: #545c54;
  font-size: 15px;
  line-height: 1.75;
}
.kicker {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.catalogue { border-top: 1px solid var(--line); }
.plate {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  min-height: 460px;
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.plate:hover { background: var(--paper-2); }
.plate-meta {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 10px;
  padding: 48px 7vw 52px;
}
.plate-no { font-size: 11px; letter-spacing: 0.18em; color: var(--muted); }
.plate h2 {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(56px, 6vw, 92px);
  line-height: 0.86;
  letter-spacing: -0.04em;
}
.plate .who {
  margin: 6px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
}
.plate .more {
  margin-top: 18px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--ink);
  align-self: flex-start;
  padding-bottom: 3px;
}
.plate-fig { overflow: hidden; background: #cfcabf; min-height: 320px; }
.plate-fig img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.plate:hover img { transform: scale(1.035); }
.plate:nth-child(even) { grid-template-columns: 1.1fr 0.9fr; }
.plate:nth-child(even) .plate-fig { order: -1; }

.villa {
  padding: 72px 8vw 110px;
}
.villa-head {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 6vw;
  align-items: end;
  margin-bottom: 36px;
}
.villa-num {
  margin: 14px 0 0;
  padding-bottom: 0.22em;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(72px, 9vw, 128px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}
.subtitle {
  margin: 0.15em 0 0;
  color: var(--muted);
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1.35;
}
.architect {
  padding-left: 22px;
  border-left: 1px solid var(--line);
}
.architect h2 {
  margin: 12px 0 14px;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(32px, 3vw, 44px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.architect p {
  margin: 0;
  max-width: 460px;
  color: #5c655d;
  font-size: 14px;
  line-height: 1.75;
}

.wall-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 8px 0 16px;
  border-top: 1px solid var(--line);
}
.wall-bar span {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 22px;
}
.slideshow {
  appearance: none;
  border: 0;
  background: var(--ink);
  color: #f4f1ea;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1;
}
.slideshow::before {
  content: "▶";
  display: inline-block;
  margin-right: 8px;
  font-size: 9px;
  transform: translateY(-1px);
}
.slideshow:hover { background: #314038; }

.wall {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 14px;
}
@media (min-width: 1180px) {
  .wall.dense { grid-template-columns: 1fr 1fr 1fr; }
}
.shot { margin: 0; }
.shot button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: #d9d4c9;
  cursor: zoom-in;
  overflow: hidden;
}
.shot img {
  width: 100%;
  height: auto;
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.shot button:hover img { transform: scale(1.025); }
.shot figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 4.4vw 36px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.footer strong { color: var(--ink); font-weight: 500; letter-spacing: 0.2em; }
.topbar.homebar { grid-template-columns: 1fr auto; }
.footer .legal {
  color: var(--ink);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: none;
}

/* Login */
.gate {
  min-height: 100svh;
  background: #101612;
  color: #f4f1ea;
  overflow: hidden;
}
.gate-photo {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  transform: scale(1.08);
  animation: drift 32s ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: scale(1.08) translate3d(0, 0, 0); }
  to { transform: scale(1.14) translate3d(-1.6%, -1%, 0); }
}
.gate-shade {
  position: fixed;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8, 12, 10, 0.45), transparent 30%),
    linear-gradient(0deg, rgba(8, 12, 10, 0.78), rgba(8, 12, 10, 0.12) 48%);
}
.gate-wrap {
  position: relative;
  z-index: 1;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 28px 5vw 40px;
}
.gate-top, .gate-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.82;
}
.gate-foot .legal {
  text-transform: none;
  letter-spacing: 0.04em;
  font-size: 13px;
}
.gate-main { margin-top: auto; max-width: 760px; }
.gate h1 { margin: 16px 0 28px; }
.gate-form {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  max-width: 520px;
  border-bottom: 1px solid rgba(244, 241, 234, 0.55);
}
.gate-form label {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.75;
}
.gate-form input {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 16px 0;
  font-size: 18px;
  letter-spacing: 0.22em;
  outline: none;
}
.gate-form input::placeholder { color: rgba(244, 241, 234, 0.35); }
.gate-form button {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(244, 241, 234, 0.65);
  background: transparent;
  color: #f4f1ea;
  cursor: pointer;
  font-size: 18px;
}
.gate-form button:hover { background: #f4f1ea; color: #101612; }
.gate-error {
  min-height: 1.4em;
  margin: 14px 0 0;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: #f0d2b0;
}
.gate.is-wrong .gate-form { animation: deny 0.42s ease; }
@keyframes deny {
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

/* Slideshow */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  background: #101412;
  color: #f4f1ea;
}
.lightbox[hidden] { display: none; }
.lb-top, .lb-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 0 22px;
  flex: none;
}
.lb-top { height: 58px; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.lb-title { font-family: var(--serif); font-size: 22px; }
.lb-title span { opacity: 0.45; padding: 0 8px; }
.lb-tools { display: flex; align-items: center; gap: 14px; }
.lb-count { font-size: 11px; letter-spacing: 0.14em; color: rgba(244, 241, 234, 0.65); }
.icon, .lb-close, .lb-nav {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.icon {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 13px;
}
.icon:hover, .lb-nav:hover { background: #f4f1ea; color: #101412; }
.lb-close {
  border: 0;
  background: none;
  font-size: 28px;
  line-height: 1;
  padding: 0 4px;
}
.lb-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: grid;
  place-items: center;
}
.lb-img {
  max-width: min(100% - 120px, 1600px);
  max-height: calc(100% - 16px);
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: var(--shadow);
  transition: opacity 0.35s ease;
}
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 22px;
  background: rgba(16, 20, 18, 0.35);
}
.lb-prev { left: 18px; }
.lb-next { right: 18px; }
.lb-bottom { padding-bottom: 8px; padding-top: 8px; }
.lb-caption, .lb-hint {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(244, 241, 234, 0.7);
}
.lb-hint { letter-spacing: 0.08em; text-transform: none; color: rgba(244, 241, 234, 0.42); }
.lb-thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 8px 18px 16px;
  background: #161b18;
  scroll-behavior: smooth;
}
.lb-thumbs::-webkit-scrollbar { height: 6px; }
.lb-thumbs::-webkit-scrollbar-thumb { background: #3a403c; border-radius: 3px; }
.lb-thumbs button {
  flex: none;
  width: 86px;
  height: 58px;
  padding: 0;
  border: 1px solid transparent;
  background: #000;
  opacity: 0.45;
  cursor: pointer;
}
.lb-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.lb-thumbs button.on, .lb-thumbs button:hover { opacity: 1; border-color: #f4f1ea; }

@media (max-width: 800px) {
  .topbar { height: 62px; grid-template-columns: 1fr auto; padding: 0 5vw; }
  .topnav { display: none; }
  .top-actions { gap: 12px; }
  .slideshow { padding: 10px 12px; letter-spacing: 0.12em; }
  .hero { min-height: 86svh; }
  .hero-copy { left: 6vw; right: 6vw; bottom: 12%; }
  h1 { font-size: clamp(64px, 18vw, 96px); }
  .intro, .villa { padding-left: 6vw; padding-right: 6vw; }
  .intro { grid-template-columns: 1fr; gap: 22px; padding-top: 64px; }
  .intro p { padding-left: 0; border-left: 0; }
  .plate, .plate:nth-child(even) { grid-template-columns: 1fr; }
  .plate:nth-child(even) .plate-fig { order: 0; }
  .plate-fig { height: 240px; }
  .villa-head { grid-template-columns: 1fr; gap: 28px; }
  .architect { padding-left: 0; border-left: 0; }
  .wall, .wall.dense { grid-template-columns: 1fr; }
  .lb-img { max-width: calc(100% - 16px); }
  .lb-nav { width: 40px; height: 40px; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
  .lb-hint { display: none; }
  .footer { flex-direction: column; }
  .gate h1 { font-size: clamp(64px, 18vw, 96px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
