/* L'Hermitage homepage
   Sections: tokens, base, header, hero, quick access, community,
   amenities, life (doors), neighborhood, contact, footer, motion */

:root {
  --navy: #0b2540;
  --navy-2: #102f52;
  --night: #07182b;
  --ink: #16263d;
  --body: #33455e;
  --muted: #45566e;
  --blue: #1f4fa8;
  --gold: #f0c44c;
  --gold-soft: #f3d27a;
  --gold-deep: #8a6a12;
  --line: #dfe6ef;
  --rule: #2b4a72;
  --mist: #eef3f9;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --sans: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --wrap: 1320px;
  --gutter: 40px;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--sans); font-size: 18px; line-height: 1.6;
  color: var(--ink); background: #fff; -webkit-font-smoothing: antialiased; overflow-x: clip;
}
h1, h2, h3, p, ul, dl, dd, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img, video { display: block; max-width: 100%; }
a { color: var(--blue); }
a:hover { color: var(--navy); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -9999px; top: 0; z-index: 100; background: #fff; color: var(--navy); padding: 12px 18px; }
.skip:focus { left: 12px; top: 12px; }

.kicker {
  display: flex; align-items: center; gap: 16px;
  font-size: 14px; font-weight: 700; letter-spacing: .26em; text-transform: uppercase; color: var(--gold-deep);
}
.kicker::before { content: ""; flex: none; width: 56px; height: 2px; background: #c79a1e; transform-origin: left; }
.dark .kicker, .hero .kicker { color: var(--gold-soft); }
.dark .kicker::before, .hero .kicker::before { background: var(--gold-soft); }

h2 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 4.4vw, 64px);
  line-height: 1.08; letter-spacing: -.01em; color: var(--navy);
}
h2 em { font-style: italic; color: var(--blue); }
.dark h2 { color: #fff; }
.dark h2 em { color: var(--gold-soft); }
.body-lg { max-width: 600px; font-size: 20px; line-height: 1.7; color: var(--body); }

/* buttons: colour wipes up from the bottom on hover */
.btn {
  position: relative; isolation: isolate; overflow: hidden;
  display: inline-flex; align-items: center; gap: 14px;
  font: 700 18px var(--sans); padding: 16px 30px; border: 2px solid transparent; border-radius: 2px;
  text-decoration: none; cursor: pointer; transition: color .35s ease, border-color .35s ease;
}
.btn::before {
  content: ""; position: absolute; inset: -1px; z-index: -1;
  transform: translateY(102%); transition: transform .4s var(--ease);
}
.btn:hover::before { transform: none; }
.btn svg { flex: none; transition: transform .3s ease; }
.btn:hover svg { transform: translateX(6px); }
.btn-gold { background: var(--gold); color: var(--navy); }
.btn-gold::before { background: #fff; }
.btn-gold:hover { color: var(--navy); }
.btn-navy { background: var(--navy); color: #fff; }
.btn-navy::before { background: var(--blue); }
.btn-navy:hover { color: #fff; }
.btn-ghost { border-color: #fff; color: #fff; }
.btn-ghost::before { background: #fff; }
.btn-ghost:hover { color: var(--navy); }
.textlink { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; padding: 12px 0; }
.textlink svg { transition: transform .3s ease; }
.textlink:hover svg { transform: translateX(6px); }

/* ---------- scroll progress ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 70; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--gold); transform: scaleX(0); transform-origin: left; }

/* ---------- header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 60; padding: 16px 0;
  border-bottom: 1px solid transparent;
  transition: background .4s ease, padding .4s ease, border-color .4s ease, transform .4s ease;
}
.site-header.solid {
  background: rgba(11, 37, 64, .94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  padding: 6px 0; border-bottom-color: var(--rule);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 14px 32px; }
.brand { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 48px; color: #fff; text-decoration: none; }
.brand:hover { color: #fff; }
.brand b { font-family: var(--serif); font-weight: 400; font-size: 30px; letter-spacing: .04em; line-height: 1; }
.brand span { font-size: 12px; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--gold-soft); }
.nav { display: flex; align-items: center; gap: 6px 34px; font-size: 17px; font-weight: 600; }
.nav a:not(.btn) { position: relative; color: #fff; text-decoration: none; padding: 12px 0; }
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 50%; right: 50%; bottom: 6px; height: 2px; background: var(--gold);
  transition: left .3s ease, right .3s ease;
}
.nav a:not(.btn):hover::after, .nav a.current::after { left: 0; right: 0; }
.nav .btn { padding: 10px 22px; font-size: 17px; background: #fff; color: var(--navy); }
.nav .btn::before { background: var(--gold); }
.menu-btn {
  display: none; min-height: 46px; padding: 10px 16px; background: none; border: 2px solid #fff; border-radius: 2px;
  color: #fff; font: 700 16px var(--sans); cursor: pointer;
}
@media (max-width: 1060px) {
  .menu-btn { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--navy); padding: 8px var(--gutter) 26px; border-bottom: 1px solid var(--rule);
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 16px 0; border-bottom: 1px solid var(--rule); font-size: 19px; }
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { margin-top: 18px; justify-content: center; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; min-height: max(600px, 100vh); min-height: max(600px, 100svh);
  display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; background: var(--night);
}
.hero-media { position: absolute; inset: 0; }
.hero-media video, .hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* The poster is the film's exact first frame. It drifts slowly while the film
   buffers so the hero never looks frozen, then the film fades in over it.
   At the end of each loop the film fades back out to the same frame. */
.hero-media img { transform-origin: 50% 62%; animation: poster-drift 12s ease-out both; }
.hero-media.live img { animation: none; }
@keyframes poster-drift { from { transform: scale(1); } to { transform: scale(1.09); } }
.hero-media video { opacity: 0; transition: opacity .7s ease; }
.hero-media video.playing { opacity: 1; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(180deg, rgba(7, 22, 44, .72) 0%, rgba(7, 22, 44, .18) 24%, rgba(7, 22, 44, .30) 52%, rgba(7, 22, 44, .92) 100%),
    linear-gradient(90deg, rgba(7, 22, 44, .45) 0%, rgba(7, 22, 44, 0) 60%);
}
.hero .wrap { position: relative; z-index: 2; padding-top: 150px; padding-bottom: 92px; display: flex; flex-direction: column; gap: 22px; }
.hero .kicker { font-size: 15px; text-shadow: 0 1px 14px rgba(7, 22, 44, .85); }
.hero h1, .hero .lead { text-shadow: 0 2px 30px rgba(7, 22, 44, .45); }
.hero h1 {
  font-family: var(--serif); font-weight: 400; font-size: clamp(54px, 9.4vw, 148px);
  line-height: .98; letter-spacing: -.015em; color: #fff;
}
.hero h1 em { font-style: italic; color: var(--gold-soft); }
.hero .lead { max-width: 620px; font-size: 22px; line-height: 1.5; color: #fff; }

/* ---------- quick access ----------
   A dark band directly under the film, so it reads as the foot of the hero. */
.quick { position: relative; background: var(--night); }
.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); border-left: 1px solid var(--rule); }
.quick a {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; gap: 8px; padding: 46px 34px 50px;
  color: #fff; text-decoration: none; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule);
}
.quick a::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0;
  background: linear-gradient(180deg, rgba(31, 79, 168, .38) 0%, rgba(31, 79, 168, 0) 100%);
  transition: opacity .45s ease;
}
.quick a::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--gold);
  transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease);
}
.quick a:hover::before, .quick a:focus-visible::before { opacity: 1; }
.quick a:hover::after, .quick a:focus-visible::after { transform: none; }
.q-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 26px; }
.q-ico {
  display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%;
  border: 1px solid rgba(243, 210, 122, .65); color: var(--gold-soft);
  transition: background .35s ease, color .35s ease, border-color .35s ease, transform .45s var(--ease);
}
.quick a:hover .q-ico { background: var(--gold); border-color: var(--gold); color: var(--navy); transform: scale(1.06); }
.q-go { color: #7f97b8; transition: color .35s ease, transform .45s var(--ease); }
.q-go svg { display: block; }
.quick a:hover .q-go { color: var(--gold-soft); transform: translateX(8px); }
.quick small { font-size: 13px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-soft); }
.quick b { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.15; color: #fff; }
.q-desc { margin-top: 4px; font-size: 17px; line-height: 1.5; color: #c6d3e4; }

/* ---------- community ---------- */
.pad { padding: 140px 0 130px; }
.split { display: flex; flex-wrap: wrap; align-items: center; gap: 72px; }
.split > .col-text { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 28px; }
.split > .col-media { flex: 1 1 420px; min-width: 0; position: relative; padding: 0 0 44px 44px; }
.col-media::before { content: ""; position: absolute; left: 0; bottom: 0; width: 72%; height: 72%; background: #eaf0f8; }
.photo-frame { position: relative; height: 620px; overflow: hidden; box-shadow: 0 30px 60px rgba(11, 37, 64, .22); }
.photo-frame img { height: 116%; top: -8%; bottom: auto; will-change: transform; }
.photo-frame::after { content: ""; position: absolute; inset: 14px; border: 1px solid rgba(255, 255, 255, .6); pointer-events: none; }
.stats {
  width: 100%; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(130px, 100%), 1fr)); gap: 28px;
  margin-top: 12px; padding-top: 32px; border-top: 1px solid var(--line);
}
.stats b { display: block; font-family: var(--serif); font-weight: 400; font-size: 64px; line-height: 1; color: var(--navy); font-variant-numeric: tabular-nums; }
.stats span { display: block; margin-top: 6px; font-size: 16px; line-height: 1.35; color: var(--muted); }

/* ---------- amenities ---------- */
.dark { background: var(--navy); color: #fff; }
.amen-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 48px; margin-bottom: 60px; }
.amen-head > div { display: flex; flex-direction: column; gap: 22px; }
.amen { display: flex; flex-wrap: wrap; align-items: stretch; gap: 48px 64px; }
.amen-list { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; }
.amen-list button {
  position: relative; display: flex; align-items: baseline; gap: 22px; width: 100%; min-height: 78px; padding: 18px 0;
  background: none; border: 0; border-bottom: 1px solid var(--rule); text-align: left; cursor: pointer;
  font-family: var(--serif); font-size: 32px; line-height: 1.15; color: #9fb4d1;
  transition: color .3s ease, padding .35s var(--ease);
}
.amen-list button i { font: 700 14px var(--sans); letter-spacing: .14em; color: #9fb4d1; transition: color .3s ease; }
.amen-list button:hover { color: #fff; padding-left: 10px; }
.amen-list button[aria-selected="true"] { color: #fff; padding-left: 10px; }
.amen-list button[aria-selected="true"] i { color: var(--gold-soft); }
.amen-list button::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--gold);
  transform: scaleX(0); transform-origin: left;
}
.amen-list button[aria-selected="true"]::after { transform: scaleX(1); }
.amen.auto .amen-list button[aria-selected="true"]::after { animation: tab-fill var(--tab-ms, 7000ms) linear both; }
@keyframes tab-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.amen-panel { flex: 2 1 520px; min-width: 0; display: flex; flex-direction: column; background: var(--navy-2); }
.amen-photos { position: relative; height: 500px; overflow: hidden; }
.amen-photos picture { position: absolute; inset: 0; opacity: 0; transform: scale(1.07); transition: opacity .9s ease, transform 1.8s ease; }
.amen-photos picture.on { opacity: 1; transform: none; }
.amen-photos::after { content: ""; position: absolute; inset: 14px; border: 1px solid rgba(255, 255, 255, .55); pointer-events: none; }
.amen-count {
  position: absolute; z-index: 2; right: 34px; bottom: 26px;
  font-family: var(--serif); font-size: 22px; letter-spacing: .12em; color: #fff; text-shadow: 0 2px 12px rgba(7, 22, 44, .7);
}
.amen-info { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 48px; padding: 32px 36px 36px; }
.amen-info p { flex: 1 1 380px; min-width: 0; font-size: 19px; line-height: 1.6; color: #e6edf7; }
.amen-info aside { display: flex; flex-direction: column; gap: 6px; min-width: 190px; }
.amen-info small { font-size: 13px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-soft); }
.amen-info strong { font-weight: 400; font-size: 19px; line-height: 1.4; color: #fff; }
.amen-info a { color: #fff; font-size: 17px; font-weight: 700; padding: 10px 0; }
.amen-info a:hover { color: var(--gold-soft); }
.swap { animation: swap .55s ease both; }
@keyframes swap { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- life: expanding doors ---------- */
.life-head { display: flex; flex-direction: column; gap: 22px; max-width: 820px; margin-bottom: 56px; }
.doors { display: flex; gap: 16px; height: 600px; }
.door {
  position: relative; flex: 1 1 0; min-width: 0; overflow: hidden; background: var(--navy);
  color: #fff; text-decoration: none; transition: flex-grow .7s var(--ease);
}
.door:hover, .door:focus-visible { flex-grow: 2.1; color: #fff; }
.door img { transition: transform 1.4s ease, filter .7s ease; filter: saturate(.8) brightness(.85); }
.door:hover img, .door:focus-visible img { transform: scale(1.05); filter: none; }
.door::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(7, 22, 44, .92) 0%, rgba(7, 22, 44, 0) 58%); }
.door .t { position: absolute; z-index: 1; left: 36px; right: 36px; bottom: 36px; display: flex; flex-direction: column; gap: 10px; }
.door small { font-size: 13px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-soft); }
.door b { font-family: var(--serif); font-weight: 400; font-size: 38px; line-height: 1.1; }
.door .t > span { max-height: 0; opacity: 0; overflow: hidden; font-size: 18px; line-height: 1.5; transition: max-height .6s ease, opacity .6s ease; }
.door:hover .t > span, .door:focus-visible .t > span { max-height: 120px; opacity: 1; }
.note { margin-top: 36px; font-size: 18px; color: var(--muted); }
@media (max-width: 900px), (hover: none) {
  .doors { flex-direction: column; height: auto; }
  .door { flex: none; height: 360px; }
  .door .t > span { max-height: none; opacity: 1; }
  .door img { filter: none; }
}

/* ---------- neighborhood ---------- */
.mist { background: var(--mist); }
.band { position: relative; height: 460px; overflow: hidden; background: var(--navy); }
.band img { height: 130%; top: -15%; bottom: auto; will-change: transform; }
.hood { display: flex; flex-wrap: wrap; gap: 56px 80px; padding-block: 100px 120px; }
.hood > .col-text { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.places { flex: 2 1 560px; min-width: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 40px 48px; }
.places h3 { padding-bottom: 14px; border-bottom: 2px solid var(--navy); font-family: var(--serif); font-weight: 500; font-size: 25px; color: var(--navy); }
.places ul { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.places li { font-size: 18px; line-height: 1.4; color: var(--body); }

/* ---------- contact ---------- */
.contact-sec { background: radial-gradient(90% 90% at 0% 100%, #143a66 0%, var(--navy) 62%); }
.contact { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 64px 80px; padding-block: 130px; }
.contact > div:first-child { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.phone {
  font-family: var(--serif); font-size: clamp(42px, 5vw, 72px); line-height: 1.1; color: #fff; text-decoration: none;
  padding-bottom: 6px; background: linear-gradient(var(--gold), var(--gold)) left bottom / 100% 2px no-repeat;
  transition: color .3s ease, letter-spacing .5s ease;
}
.phone:hover { color: var(--gold-soft); letter-spacing: .02em; }
.addr { font-size: 19px; line-height: 1.6; color: #d5e0f0; }
.offices { display: flex; flex-wrap: wrap; gap: 8px 36px; font-size: 18px; color: #d5e0f0; }
.offices a { color: #fff; font-weight: 700; white-space: nowrap; }
.people { flex: 1 1 420px; min-width: 0; }
.person { display: flex; flex-direction: column; gap: 4px; padding: 28px 0; border-bottom: 1px solid #34527a; }
.person:first-child { padding-top: 0; }
.person b { font-family: var(--serif); font-weight: 400; font-size: 30px; color: #fff; }
.person span { font-size: 17px; color: #d5e0f0; }
.person a { color: var(--gold-soft); font-size: 19px; padding: 10px 0; overflow-wrap: anywhere; }
.person a:hover { color: #fff; }
.cta-row { display: flex; flex-wrap: wrap; gap: 16px; padding-top: 32px; }

/* ---------- footer ---------- */
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 48px; padding-top: 44px; padding-bottom: 40px; }
.site-footer .logo { width: 250px; height: auto; margin-left: -6px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 30px; font-size: 17px; font-weight: 600; }
.site-footer nav a { color: var(--ink); text-decoration: none; padding: 10px 0; }
.site-footer nav a:hover { color: var(--blue); text-decoration: underline; }
.site-footer p { width: 100%; padding-top: 24px; border-top: 1px solid var(--line); font-size: 16px; color: var(--muted); }

/* ---------- 404 ---------- */
.lost { min-height: 100vh; display: flex; align-items: center; background: var(--navy); color: #fff; }
.lost .wrap { display: flex; flex-direction: column; align-items: flex-start; gap: 26px; }
.lost h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 7vw, 96px); line-height: 1.02; }
.lost h1 em { font-style: italic; color: var(--gold-soft); }
.lost p { font-size: 21px; color: #d5e0f0; max-width: 560px; }

/* ---------- motion ----------
   Hidden-until-revealed states only apply when JS is running (html.js),
   so the page is fully readable without it. */
.js .reveal { opacity: 0; transform: translateY(44px); transition: opacity 1s ease, transform 1s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.kicker { transform: none; }
.js .reveal.kicker::before { transform: scaleX(0); transition: transform .9s var(--ease) .2s; }
.js .reveal.kicker.in::before { transform: none; }
.r2 { transition-delay: .12s !important; }
.r3 { transition-delay: .24s !important; }
.r4 { transition-delay: .36s !important; }
/* headings rise out of a mask, one line at a time */
.line { display: block; overflow: hidden; padding-bottom: .12em; margin-bottom: -.12em; }
.line > span { display: block; }
.js .lines .line > span { transform: translateY(108%); transition: transform 1.1s var(--ease); }
.js .lines .line:nth-child(2) > span { transition-delay: .12s; }
.js .lines.in .line > span { transform: none; }
.js .hero .lines .line > span { transition-duration: 1.3s; transition-delay: .35s; }
.js .hero .lines .line:nth-child(2) > span { transition-delay: .5s; }
.js .hero .fade { opacity: 0; transform: translateY(20px); transition: opacity 1s ease .9s, transform 1s var(--ease) .9s; }
.js .hero .fade.first { transition-delay: .15s; }
.js .hero.ready .fade { opacity: 1; transform: none; }
.js .hero.ready .lines .line > span { transform: none; }

@media (max-width: 640px) {
  :root { --gutter: 22px; }
  .pad { padding: 96px 0 84px; }
  .photo-frame { height: 440px; }
  .amen-photos { height: 300px; }
  .amen-list button { font-size: 26px; min-height: 68px; }
  .amen-info { padding: 26px 24px 30px; }
  .hero .wrap { padding-bottom: 64px; }
  .quick a { padding: 36px 26px 38px; }
  .band { height: 300px; }
  .hood { padding-block: 72px 88px; }
  .contact { padding-block: 92px; }
  .stats b { font-size: 52px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal, .js .hero .fade { opacity: 1; transform: none; }
  .js .lines .line > span { transform: none; }
  .js .reveal.kicker::before { transform: none; }
}

@media print {
  .site-header, .progress, .hero-media video { display: none; }
  .js .reveal { opacity: 1; transform: none; }
}
