:root {
  --bg: #f3f0ea;
  --bg-deep: #e7e1d6;
  --card: #fbfaf7;
  --stage: #ede8df;
  --ink: #1d1d1f;
  --muted: #6d6a64;
  --line: rgba(29, 29, 31, .12);
  --accent: #b07d4f;
  --shadow-soft: 0 1px 2px rgba(40, 32, 20, .05), 0 8px 24px rgba(40, 32, 20, .07);
  --shadow-lift: 0 2px 4px rgba(40, 32, 20, .06), 0 24px 60px rgba(40, 32, 20, .16);
  --ease: cubic-bezier(.22, .8, .22, 1);
  --serif: Fraunces, Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--ink); font-family: var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  background: radial-gradient(120% 60% at 50% 0%, #f8f6f1 0%, var(--bg) 70%) no-repeat, var(--bg);   /* fades into --bg: no hard edge, works on iOS (no background-attachment: fixed) */
}
a { color: inherit; text-decoration: none; }

/* top bar */
.top { display: flex; justify-content: space-between; align-items: center; padding: 22px clamp(16px, 4vw, 48px); }
.brand { font-family: var(--serif); font-size: 20px; display: flex; align-items: baseline; }
.brand-mark { font-family: var(--sans); font-weight: 600; font-size: 13px; letter-spacing: .28em; }
.brand-sep { margin: 0 10px; color: var(--muted); }
.place { font-size: 13px; color: var(--muted); letter-spacing: .02em; }

main { max-width: 1320px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px); }

/* hero */
.hero { padding: clamp(28px, 6vw, 72px) 0 clamp(28px, 4vw, 48px); max-width: 760px; }
.eyebrow { margin: 0 0 14px; font-size: 12px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); }
.hero h1 { margin: 0; font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 6.4vw, 84px); line-height: 1.02; letter-spacing: -.02em; }
.hero h1 em { font-style: italic; color: var(--muted); }
.lede { margin: 22px 0 0; max-width: 520px; font-size: clamp(16px, 1.6vw, 18px); line-height: 1.55; color: var(--muted); }

/* cards */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.2vw, 28px); }
.card {
  position: relative; display: flex; flex-direction: column; border-radius: 26px; background: var(--card);
  box-shadow: var(--shadow-soft); overflow: hidden; outline: none;
  opacity: 0; transform: translateY(18px);
  transition: box-shadow .5s var(--ease), transform .5s var(--ease);
  animation: rise .9s var(--ease) forwards; animation-delay: calc(var(--i) * 110ms + 120ms);
}
@keyframes rise { to { opacity: 1; transform: none; } }
.stage {
  position: relative; aspect-ratio: 4 / 3; margin: 10px 10px 0; border-radius: 18px; overflow: hidden;
  background: radial-gradient(90% 80% at 50% 38%, #f6f3ee 0%, var(--stage) 100%);
}
.stage img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain;
  transform: translateY(0) scale(1); transition: transform .8s var(--ease), filter .8s var(--ease);
}
.num { position: absolute; top: 14px; left: 16px; z-index: 1; font-family: var(--serif); font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
.meta { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.meta h2 { margin: 0; font-family: var(--serif); font-weight: 500; font-size: clamp(26px, 2.4vw, 32px); letter-spacing: -.01em; }
.meta h2 em { font-style: italic; font-weight: 400; color: var(--muted); }
.meta p { margin: 8px 0 16px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.specs { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.specs li { font-size: 12.5px; font-weight: 500; padding: 6px 11px; border-radius: 999px; background: #f1ede6; color: #4a4741; }
.go {
  margin-top: auto; align-self: flex-start; display: inline-flex; align-items: center; gap: 10px;
  padding: 12px 18px 12px 20px; border-radius: 999px; background: var(--ink); color: #f8f6f2; font-size: 14px; font-weight: 600;
  transition: background .3s var(--ease), gap .4s var(--ease);
}
.go svg { width: 16px; height: 16px; transition: transform .4s var(--ease); }

@media (hover: hover) {
  .card:hover { box-shadow: var(--shadow-lift); transform: translateY(-4px); }
  .card:hover .stage img { transform: translateY(-8px) scale(1.035); }
  .card:hover .go { background: var(--accent); gap: 14px; }
  .card:hover .go svg { transform: translateX(3px); }
}
.card:focus-visible { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--accent), var(--shadow-lift); }
.card:active { transform: translateY(-1px) scale(.995); }

/* "more coming" line */
.more { display: flex; align-items: center; gap: 18px; margin: clamp(36px, 5vw, 64px) 0 0; color: var(--muted); }
.more p { margin: 0; font-family: var(--serif); font-style: italic; font-size: 17px; white-space: nowrap; }
.more-line { flex: 1; height: 1px; background: var(--line); }

.foot { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; max-width: 1320px; margin: 0 auto; padding: 36px clamp(16px, 4vw, 48px) 32px; font-size: 12.5px; color: var(--muted); }

/* page-leave transition: the chosen house grows, the rest fades, then the viewer loads */
.veil { position: fixed; inset: 0; background: var(--bg); opacity: 0; pointer-events: none; transition: opacity .45s var(--ease) .15s; z-index: 10; }
body.leaving .veil { opacity: 1; }
body.leaving .card:not(.chosen) { opacity: .25 !important; transition: opacity .35s var(--ease); }
body.leaving .card.chosen .stage img { transform: scale(1.12); }

/* tablet */
@media (max-width: 1080px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* phone */
@media (max-width: 680px) {
  .top { padding-top: 16px; padding-bottom: 8px; }
  .place { display: none; }
  .hero { padding-top: 18px; }
  .grid { grid-template-columns: 1fr; gap: 16px; }
  .card { border-radius: 22px; }
  .stage { margin: 8px 8px 0; border-radius: 16px; }
  .meta { padding: 16px 18px 18px; }
  .go { width: 100%; justify-content: center; }
  .more p { font-size: 15px; white-space: normal; text-align: center; }
  .foot { flex-direction: column; gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .card { animation: none; opacity: 1; transform: none; }
  .stage img, .card, .go, .veil { transition: none; }
}
