/* The Lone Haus: one page per estate (estates/<slug>/index.html).
   Loads after styles.css and reuses its tokens, nav, buttons, labels,
   form fields, footer and reveal. Pages are written by
   scripts/build_estate.py. */

.estate { overflow-x: clip; }
.estate picture { display: block; }
.estate .lede { font-size: clamp(19px, 1.6vw, 23px); line-height: 1.55; }

/* ---- Hero: the house under its name ---- */
.e-hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 620px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
  padding: clamp(104px, 14vh, 168px) var(--gutter) clamp(48px, 7vh, 80px);
  overflow: hidden;
  background: #2b3a4f;
}
.e-hero-photo, .e-hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; }
.e-hero-photo img { object-fit: cover; object-position: 50% 100%; transform-origin: 50% 72%; animation: e-settle 2.8s cubic-bezier(.2, .7, .2, 1) both; }
.e-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(16, 20, 30, 0.62) 0%, rgba(16, 20, 30, 0.22) 34%, rgba(16, 20, 30, 0) 52%),
    linear-gradient(0deg, rgba(20, 19, 17, 0.78) 0%, rgba(20, 19, 17, 0) 34%);
}
.e-hero-top, .e-hero-foot { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.e-hero-top { gap: clamp(14px, 2vh, 22px); }
.e-hero .label { color: var(--limestone); text-shadow: 0 1px 14px rgba(10, 14, 24, 0.55); }
.e-hero h1 { font-size: clamp(50px, 9.4vw, 150px); line-height: 0.98; letter-spacing: -0.022em; text-shadow: 0 2px 40px rgba(10, 14, 24, 0.45); }
.e-hero-foot { gap: 30px; }
.e-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.button-ghost { border-color: rgba(233, 226, 211, 0.7); color: var(--limestone); background: rgba(28, 27, 25, 0.18); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.button-ghost:hover { background: var(--limestone); color: var(--iron-black); border-color: var(--limestone); }
.e-scroll { width: 1px; height: 46px; background: rgba(233, 226, 211, 0.8); transform-origin: top; animation: drop 2.6s ease-in-out infinite; }
.e-hero-top > *, .e-hero-foot > * { animation: e-rise 1.2s cubic-bezier(.2, .7, .2, 1) both; }
.e-hero-top > :nth-child(1) { animation-delay: 0.35s; }
.e-hero-top > :nth-child(2) { animation-delay: 0.5s; }
.e-hero-foot > :nth-child(1) { animation-delay: 1s; }
@keyframes e-settle { from { transform: scale(1.09); } to { transform: none; } }
@keyframes e-rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---- The home: statement, a paragraph, four figures ---- */
.e-intro { padding: clamp(84px, 12vw, 176px) var(--gutter) clamp(72px, 10vw, 144px); }
.e-intro-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: clamp(36px, 6vw, 110px); align-items: end; }
.e-intro h2 { margin-top: 26px; max-width: 13em; font-size: clamp(32px, 4.6vw, 66px); }
.e-intro .lede { max-width: 30em; color: var(--muted-light); }
.e-figures { list-style: none; margin: clamp(56px, 8vw, 112px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--iron-black); }
.e-figures li { padding: 30px 20px 0 0; }
.e-figures li + li { padding-left: clamp(16px, 2.4vw, 40px); border-left: 1px solid var(--hairline-light); }
.e-figures b { display: block; font-weight: 400; font-size: clamp(44px, 6.2vw, 104px); line-height: 0.95; letter-spacing: -0.03em; }
.e-figures .label { margin-top: 16px; }
.e-credit { margin-top: clamp(36px, 5vw, 64px); color: var(--muted-light); }
.e-credit strong { font-weight: 400; color: var(--iron-black); }

/* ---- The film ---- */
.e-film { background: #151412; padding: clamp(84px, 12vw, 176px) var(--gutter); display: flex; flex-direction: column; align-items: center; gap: clamp(36px, 5vw, 64px); }
.e-film-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 22px; }
.e-stage { width: 100%; max-width: 1360px; margin: 0; }
.e-player { position: relative; aspect-ratio: 16 / 9; background: #0c0b0a; overflow: hidden; box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55); }
.e-player picture, .e-player img, .e-player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.e-player img { object-fit: cover; object-position: var(--focus, 50% 50%); transition: transform 1.6s cubic-bezier(.2, .7, .2, 1); }
.e-player:hover img { transform: scale(1.025); }
.e-play { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; margin: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; color: var(--limestone); font-family: var(--display); background: linear-gradient(180deg, rgba(20, 19, 17, 0.18) 0%, rgba(20, 19, 17, 0.5) 100%); }
.e-play i { width: clamp(72px, 8vw, 108px); height: clamp(72px, 8vw, 108px); border: 1px solid var(--limestone); border-radius: 9999px; display: flex; align-items: center; justify-content: center; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: background 0.3s, transform 0.3s; }
.e-play i::after { content: ''; width: 0; height: 0; margin-left: 6px; border-style: solid; border-width: 12px 0 12px 21px; border-color: transparent transparent transparent var(--limestone); }
.e-play:hover i { background: rgba(233, 226, 211, 0.2); transform: scale(1.05); }
.e-play .label { color: var(--limestone); }
.e-play { text-decoration: none; }
.e-soon { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; color: var(--limestone); background: rgba(20, 19, 17, 0.62); }
.e-soon .label { color: var(--limestone); }
.e-soon strong { font-family: var(--display); font-weight: 400; font-size: clamp(30px, 4.4vw, 60px); line-height: 1.1; }
.e-cuts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 36px); margin-top: clamp(24px, 3vw, 40px); }
.e-cut { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 22px 0 6px; margin: 0; border: 0; border-top: 1px solid var(--hairline-dark); background: none; color: var(--muted-dark); font: inherit; text-align: left; cursor: pointer; transition: color 0.25s, border-color 0.25s; }
.e-cut-name { font-family: var(--display); font-size: clamp(24px, 2.4vw, 34px); line-height: 1.15; color: var(--limestone); opacity: 0.62; transition: opacity 0.25s; }
.e-cut-what { font-size: 16px; line-height: 24px; }
.e-cut .label { margin-top: 4px; }
.e-cut:hover .e-cut-name, .e-cut[aria-selected="true"] .e-cut-name { opacity: 1; }
.e-cut[aria-selected="true"] { border-top-color: var(--limestone); }
.e-cut[aria-selected="true"] .label { color: var(--limestone); }
.e-cut:focus-visible { outline: 1px solid var(--limestone); outline-offset: 6px; }
@media (max-width: 760px) { .e-cuts { grid-template-columns: 1fr; gap: 0; } .e-cut { padding: 18px 0; } }
.e-stage figcaption { margin-top: 20px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; color: var(--muted-dark); font-size: 16px; line-height: 24px; }
.e-stage figcaption a { border-bottom: 1px solid var(--hairline-dark); transition: color 0.2s, border-color 0.2s; }
.e-stage figcaption a:hover { color: var(--limestone); border-color: var(--limestone); }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .e-stage { animation: e-grow linear both; animation-timeline: view(); animation-range: entry 5% cover 42%; }
  }
}
@keyframes e-grow { from { transform: scale(0.86); opacity: 0.55; } to { transform: none; opacity: 1; } }

/* ---- Photographs: rows whose photos share one height ---- */
.e-photos { padding: clamp(84px, 12vw, 176px) var(--gutter); }
.e-photos-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: clamp(24px, 5vw, 96px); align-items: end; margin-bottom: clamp(40px, 6vw, 80px); }
.e-photos-head h2 { margin-top: 24px; max-width: 12em; }
.e-photos-head .lede { max-width: 30em; color: var(--muted-dark); }
.on-light .e-photos-head .lede { color: var(--muted-light); }
.e-rows { display: flex; flex-direction: column; gap: clamp(8px, 1.1vw, 16px); }
.e-row { display: flex; gap: clamp(8px, 1.1vw, 16px); }
.e-shot { flex: var(--ar) 1 0; min-width: 0; margin: 0; padding: 0; border: 0; background: var(--raised-dark); overflow: hidden; cursor: zoom-in; display: block; }
.on-light .e-shot { background: var(--hairline-light); }
.e-shot img { width: 100%; height: auto; transition: transform 1.4s cubic-bezier(.2, .7, .2, 1); }
.e-shot:hover img, .e-shot:focus-visible img { transform: scale(1.035); }
.e-shot:focus-visible { outline: 2px solid var(--rust-on-dark); outline-offset: 3px; }
.e-facts { list-style: none; margin: clamp(36px, 5vw, 64px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); border-top: 1px solid var(--iron-black); }
.e-facts li { padding: 24px 20px 0 0; }
.e-facts b { display: block; font-weight: 400; font-size: clamp(28px, 3vw, 44px); line-height: 1.1; letter-spacing: -0.015em; }
.e-facts .label { margin-top: 10px; }

/* ---- Inquire ---- */
.e-inquire { position: relative; padding: clamp(84px, 12vw, 176px) var(--gutter); display: grid; grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr)); gap: clamp(40px, 7vw, 120px); align-items: center; overflow: hidden; background: #151412; }
.e-inquire-photo, .e-inquire-photo img { position: absolute; inset: 0; width: 100%; height: 100%; }
.e-inquire-photo img { object-fit: cover; object-position: 50% 55%; }
.e-inquire::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20, 19, 17, 0.9) 0%, rgba(20, 19, 17, 0.72) 55%, rgba(20, 19, 17, 0.6) 100%); }
.e-inquire > :not(picture) { position: relative; z-index: 1; }
.e-inquire-copy { display: flex; flex-direction: column; gap: 26px; }
.e-inquire-copy .label { color: var(--limestone); }
.e-inquire-copy .lede { max-width: 28em; color: #d9d2c3; }
.e-agent { margin-top: 10px; padding-top: 24px; border-top: 1px solid rgba(233, 226, 211, 0.28); display: flex; flex-direction: column; gap: 4px; max-width: 28em; }
.e-agent b { font-weight: 400; font-size: 24px; line-height: 32px; }
.e-agent span { color: var(--muted-dark); font-size: 16px; line-height: 24px; }
.e-form { background: var(--limestone); color: var(--iron-black); padding: clamp(26px, 4vw, 56px); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; box-shadow: 0 40px 120px rgba(0, 0, 0, 0.45); }
.e-form .wide { grid-column: 1 / -1; }
.e-form .field textarea { height: auto; min-height: 96px; padding: 10px 0; line-height: 28px; resize: vertical; }
.e-form .field.has-error textarea { border-color: var(--rust); }
.e-form select:invalid { color: var(--muted-light); }
.e-form .form-foot { margin-top: 4px; }
.e-form .button { flex: none; }
.e-form .fine { grid-column: 1 / -1; font-size: 14px; line-height: 22px; color: var(--muted-light); }
.e-form.is-done .field, .e-form.is-done .button, .e-form.is-done .fine { display: none; }
.e-form.is-done .form-status { font-size: 28px; line-height: 36px; color: var(--iron-black); }

/* ---- Footer notes ---- */
.estate-footer .footer-legal + .footer-legal { margin-top: -16px; }

/* ---- Full-screen viewer ---- */
.e-lightbox { position: fixed; inset: 0; z-index: 50; background: #0c0b0a; display: none; opacity: 0; transition: opacity 0.35s ease; touch-action: pan-y; }
.e-lightbox.is-open { display: block; }
.e-lightbox.is-shown { opacity: 1; }
.e-lightbox figure { position: absolute; inset: clamp(56px, 8vh, 88px) clamp(8px, 6vw, 96px); margin: 0; display: flex; align-items: center; justify-content: center; }
.e-lightbox img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; transition: opacity 0.3s ease; }
.e-lightbox img.is-swapping { opacity: 0; }
.e-lb-bar { position: absolute; inset: 0 0 auto 0; height: clamp(56px, 8vh, 88px); padding: 0 var(--gutter); display: flex; align-items: center; justify-content: space-between; color: var(--limestone); }
.e-lb-count { font-weight: 700; font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted-dark); }
.e-lb-btn { appearance: none; -webkit-appearance: none; background: none; border: 0; padding: 0; margin: 0; color: var(--limestone); cursor: pointer; font-family: var(--display); }
.e-lb-close { font-weight: 700; font-size: 12px; letter-spacing: 0.3em; text-transform: uppercase; padding: 14px 0 14px 20px; }
.e-lb-nav { position: absolute; top: 50%; width: 56px; height: 56px; margin-top: -28px; border: 1px solid rgba(233, 226, 211, 0.4); border-radius: 9999px; display: flex; align-items: center; justify-content: center; transition: background 0.25s, border-color 0.25s; }
.e-lb-nav:hover { background: rgba(233, 226, 211, 0.14); border-color: var(--limestone); }
.e-lb-nav::after { content: ''; width: 11px; height: 11px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; }
.e-lb-prev { left: clamp(10px, 2vw, 28px); }
.e-lb-prev::after { transform: translateX(3px) rotate(-135deg); }
.e-lb-next { right: clamp(10px, 2vw, 28px); }
.e-lb-next::after { transform: translateX(-3px) rotate(45deg); }
.e-lb-btn:focus-visible { outline: 2px solid var(--limestone); outline-offset: 4px; }
body.is-viewing { overflow: hidden; }

@media (max-width: 760px) {
  .e-hero h1 { font-size: clamp(46px, 13.5vw, 84px); }
  .e-figures { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 34px; }
  .e-figures li:nth-child(3) { padding-left: 0; border-left: 0; }
  .e-figures li:nth-child(n+3) { border-top: 1px solid var(--hairline-light); }
  .e-row { flex-direction: column; }
  .e-shot { flex: none; }
  .e-form { grid-template-columns: minmax(0, 1fr); }
  .e-lightbox figure { inset: 56px 0 72px; }
  .e-lb-nav { top: auto; bottom: 12px; margin-top: 0; width: 48px; height: 48px; }
  .e-lb-prev { left: calc(50% - 60px); }
  .e-lb-next { right: calc(50% - 60px); }
  .e-inquire::after { background: rgba(20, 19, 17, 0.84); }
}
@media (prefers-reduced-motion: reduce) {
  .e-hero-photo img, .e-hero-top > *, .e-hero-foot > *, .e-scroll { animation: none; }
  .e-shot img, .e-player img { transition: none; }
}

[hidden] { display: none !important; }
