/* ------------------------------------------------------------------
   Anugraha Homestay, Munnar
   Forest green and cream — hill country, not beach resort.

   Three states, set on <html> by the script in the page head:
     (none)    no JavaScript — a plain, complete page
     .js       JavaScript, but the visitor asked for reduced motion
     .motion   the full animated page
   Nothing is hidden in CSS waiting for a script to reveal it, so a
   failed script can never leave the page blank.
------------------------------------------------------------------- */
:root {
  --forest: #13301f;
  --forest-deep: #0c2015;
  --forest-soft: #27503a;
  --cream: #f8f4ec;
  --cream-deep: #efe7d8;
  --ink: #1d2a22;
  --ink-soft: #55665c;
  --ink-faint: #8b9a90;
  --brass: #b98a3e;
  --line: #e2d9c8;
  --whatsapp: #25d366;
  --whatsapp-deep: #1da851;

  --shell: 1180px;
  --display: "Fraunces", ui-serif, Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
html.motion { scroll-behavior: auto; }

/* Lenis */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { display: block; max-width: 100%; }
a { color: inherit; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 20px;
}

.display {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0.3em 0 0.7em;
  font-size: clamp(1.9rem, 4.6vw, 3.1rem);
}

.eyebrow {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.66);
}
.eyebrow-dark { color: var(--ink-faint); }

.prose p, .prose-p { margin: 0 0 1.1em; color: var(--ink-soft); }
.prose p:last-child { margin-bottom: 0; }
.prose-p { margin: 0; }
.small { font-size: 0.86rem; color: var(--ink-faint); }

/* Split text: every word sits in a mask and rises out of it. */
.w { display: inline-block; vertical-align: top; }
.w-mask { overflow: hidden; padding-bottom: 0.14em; margin-bottom: -0.14em; }
.wi { display: inline-block; will-change: transform; }

/* ------------------------------ preloader ----------------------------- */
.loader { display: none; }
.motion .loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background: var(--forest-deep);
  color: var(--cream);
  clip-path: inset(0% 0% 0% 0%);
}
.loader-inner { text-align: center; }
.loader-word {
  margin: 0;
  overflow: hidden;
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(3rem, 11vw, 7.5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  padding-bottom: 0.08em;
}
.loader-word span { display: inline-block; will-change: transform; }
.loader-sub {
  margin: 10px 0 0;
  font-size: 0.7rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--brass);
}
.loader-bar {
  width: min(220px, 50vw);
  height: 1px;
  margin: 30px auto 0;
  background: rgba(248, 244, 236, 0.18);
  overflow: hidden;
}
.loader-bar i {
  display: block;
  height: 100%;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left;
}

/* ---------------------- progress bar and cursor ----------------------- */
.progress { display: none; }
.motion .progress {
  display: block;
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  z-index: 50;
  pointer-events: none;
}
.progress i {
  display: block;
  height: 100%;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left;
}

.cursor { display: none; }
.cursor.is-on {
  display: block;
  position: fixed;
  top: 0; left: 0;
  width: 38px; height: 38px;
  margin: -19px 0 0 -19px;
  border: 1px solid #fff;
  border-radius: 50%;
  mix-blend-mode: difference;
  pointer-events: none;
  z-index: 90;
  opacity: 0;
  transition: width .35s var(--ease), height .35s var(--ease), margin .35s var(--ease), background-color .35s;
}
.cursor.is-link { width: 66px; height: 66px; margin: -33px 0 0 -33px; background: rgba(255, 255, 255, 0.14); }
.cursor.is-photo { width: 96px; height: 96px; margin: -48px 0 0 -48px; }

/* ------------------------------- header ------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(248, 244, 236, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}
.js .site-header {
  position: fixed;
  inset: 0 0 auto 0;
  background: transparent;
  backdrop-filter: none;
  border-bottom-color: transparent;
  color: var(--cream);
  transition: transform .55s var(--ease), background-color .35s, color .35s, border-color .35s;
}
.js .site-header.is-solid {
  background: rgba(248, 244, 236, 0.92);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
  color: var(--ink);
}
.motion .site-header { transform: translateY(-101%); }
.motion.is-loaded .site-header { transform: none; }
.motion.is-loaded .site-header.is-hidden { transform: translateY(-101%); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 70px;
}
.wordmark {
  font-family: var(--display);
  font-size: 1.22rem;
  line-height: 1.1;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark span {
  display: block;
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass);
  margin-top: 3px;
}
.nav {
  display: flex;
  gap: 26px;
  margin-left: auto;
  font-size: 0.94rem;
}
.nav a {
  position: relative;
  text-decoration: none;
  opacity: 0.78;
  transition: opacity .25s;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -5px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .45s var(--ease);
}
.nav a:hover { opacity: 1; }
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }

/* ------------------------------ buttons ------------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color .25s, color .25s, border-color .25s;
  will-change: transform;
}
.btn-wa { background: var(--whatsapp); color: #fff; }
.btn-wa:hover { background: var(--whatsapp-deep); }
.btn-light { background: var(--cream); color: var(--forest); }
.btn-light:hover { background: #fff; }
.btn-dark { background: var(--forest); color: var(--cream); }
.btn-dark:hover { background: var(--forest-soft); }
.btn-ghost {
  border-color: color-mix(in srgb, currentColor 34%, transparent);
  color: inherit;
  min-height: 44px;
  font-size: 0.94rem;
  padding: 0 20px;
}
.btn-ghost:hover { border-color: var(--brass); color: var(--brass); }
.btn-big { min-height: 60px; padding: 0 34px; font-size: 1.06rem; margin-top: 34px; }
.wa-glyph { width: 1.35em; height: 1.35em; fill: currentColor; flex: none; }

.motion .btn-pulse::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid var(--whatsapp);
  animation: ring 2.6s ease-out infinite;
  pointer-events: none;
}
@keyframes ring {
  0% { transform: scale(1); opacity: 0.7; }
  70%, 100% { transform: scale(1.22, 1.6); opacity: 0; }
}

/* -------------------------------- hero -------------------------------- */
.hero {
  position: relative;
  min-height: 86svh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--forest-deep);
}
.js .hero { min-height: 100svh; }
.hero-media { position: absolute; inset: 0; overflow: hidden; }
/* Taller than its frame, so it can drift on scroll without showing an edge. */
.hero-img {
  position: absolute;
  left: 0;
  top: -10%;
  width: 100%;
  height: 120%;
  object-fit: cover;
  will-change: transform;
}
/* Dark where the words are — the left, and the foot — and clear over the house. */
.hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(9, 24, 15, .8) 0%, rgba(9, 24, 15, .52) 36%, rgba(9, 24, 15, 0) 70%),
    linear-gradient(to top, rgba(9, 24, 15, .82) 0%, rgba(9, 24, 15, .18) 46%, rgba(9, 24, 15, .44) 100%);
}
.hero-shade { position: absolute; inset: 0; background: var(--forest-deep); opacity: 0; }

/* Mist. Two soft bands drifting across the valley. */
.mist {
  position: absolute;
  inset: -10% -35%;
  pointer-events: none;
  background:
    radial-gradient(ellipse 34% 22% at 28% 62%, rgba(255, 255, 255, .17), transparent 72%),
    radial-gradient(ellipse 30% 18% at 72% 38%, rgba(255, 255, 255, .12), transparent 72%);
}
.mist-b { opacity: 0.75; transform: scaleX(-1); }
.motion .mist-a { animation: drift-a 44s ease-in-out infinite alternate; }
.motion .mist-b { animation: drift-b 62s ease-in-out infinite alternate; }
@keyframes drift-a {
  from { transform: translate3d(-9%, 1%, 0); }
  to   { transform: translate3d(9%, -3%, 0); }
}
@keyframes drift-b {
  from { transform: scaleX(-1) translate3d(-7%, -2%, 0); }
  to   { transform: scaleX(-1) translate3d(8%, 3%, 0); }
}

.hero-inner { position: relative; padding-block: 120px 84px; color: var(--cream); }
.hero h1 {
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(2.2rem, 6.4vw, 4.6rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  margin: 0.35em 0 0.45em;
}
.lede {
  max-width: 44ch;
  margin: 0 0 2rem;
  font-size: clamp(1rem, 1.6vw, 1.14rem);
  color: rgba(248, 244, 236, 0.84);
}
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.scroll-cue { display: none; }
.motion .scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 26px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-left: -20px;
  width: 40px;
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(248, 244, 236, 0.7);
}
.scroll-cue i {
  position: relative;
  display: block;
  width: 1px;
  height: 46px;
  background: rgba(248, 244, 236, 0.25);
  overflow: hidden;
}
.scroll-cue i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--cream);
  animation: cue 2s var(--ease) infinite;
}
@keyframes cue {
  0% { transform: translateY(-100%); }
  60%, 100% { transform: translateY(100%); }
}
@media (max-width: 720px) {
  .motion .scroll-cue { display: none; }
}

/* ------------------------------ marquee ------------------------------- */
.marquee {
  overflow: hidden;
  background: var(--cream-deep);
  border-block: 1px solid var(--line);
  padding-block: clamp(18px, 3vw, 30px);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: clamp(22px, 3.4vw, 48px);
  width: max-content;
  white-space: nowrap;
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.5rem, 4.2vw, 3rem);
  line-height: 1;
  color: var(--forest);
  will-change: transform;
}
.marquee-track em { font-style: italic; color: var(--forest-soft); }
.marquee-track b { font-weight: 400; font-size: 0.5em; color: var(--brass); }

/* ------------------------------ sections ------------------------------ */
.section { position: relative; padding-block: clamp(72px, 11vw, 136px); }
.section-dark { background: var(--forest); color: var(--cream); }
.section-dark .display { color: var(--cream); }

.two-col {
  display: grid;
  gap: clamp(28px, 5vw, 64px);
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 820px) {
  .two-col { grid-template-columns: 1.25fr 1fr; }
}

/* The paragraph that lights up word by word as it is read. */
.lit {
  max-width: 24em;
  margin: 0;
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(1.35rem, 3vw, 2.15rem);
  line-height: 1.32;
  letter-spacing: -0.005em;
  color: var(--ink);
}

.stats {
  display: grid;
  gap: 0 clamp(24px, 4vw, 56px);
  grid-template-columns: 1fr;
  margin-top: clamp(48px, 8vw, 96px);
}
@media (min-width: 760px) { .stats { grid-template-columns: repeat(3, 1fr); } }
.stat { position: relative; padding: 22px 0 26px; }
.rule {
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: var(--forest);
  transform-origin: left;
}
.stat-num {
  margin: 0;
  font-family: var(--display);
  font-weight: 300;
  font-size: clamp(3.4rem, 8vw, 6rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--forest);
  font-variant-numeric: tabular-nums;
}
.stat-label { margin: 10px 0 0; font-size: 1.02rem; color: var(--ink); }
.stat-label span { display: block; font-size: 0.9rem; color: var(--ink-soft); }


/* ------------------ surroundings: the sideways gallery ----------------- */
.hscroll { background: var(--forest-deep); color: var(--cream); overflow: hidden; }
.hscroll-pin { position: relative; padding-block: clamp(72px, 11vw, 120px); }
.hscroll-track {
  display: grid;
  gap: 44px;
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 20px;
}
.hpanel { margin: 0; }
.hpanel .display { color: var(--cream); }
.hpanel-note { margin: 0; max-width: 34ch; color: rgba(248, 244, 236, 0.72); }
.hpanel-hint { display: none; }
.hphoto {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  aspect-ratio: 4 / 5;
  background: var(--forest);
}
.hphoto img { width: 100%; height: 100%; object-fit: cover; will-change: transform; }
.hpanel-photo figcaption {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin-top: 14px;
  font-size: 0.95rem;
  color: rgba(248, 244, 236, 0.8);
}
.hpanel-photo figcaption b {
  font-family: var(--display);
  font-weight: 300;
  font-size: 1.5rem;
  color: var(--brass);
}
.hpanel-outro .btn { margin-top: 26px; }
.hscroll-progress { display: none; }

/* Wide screens with motion: the section pins and the photographs travel sideways. */
.hscroll.is-horizontal .hscroll-pin {
  height: 100vh;
  padding-block: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hscroll.is-horizontal .hscroll-track {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6vw;
  width: max-content;
  max-width: none;
  margin: 0;
  padding-inline: 8vw 12vw;
  will-change: transform;
}
.hscroll.is-horizontal .hpanel { flex: none; }
.hscroll.is-horizontal .hpanel-intro { width: 36vw; }
.hscroll.is-horizontal .hpanel-photo { width: clamp(300px, 30vw, 520px); }
.hscroll.is-horizontal .hpanel-photo:nth-of-type(even) { margin-top: 9vh; }
.hscroll.is-horizontal .hphoto { aspect-ratio: auto; height: 66vh; }
.hscroll.is-horizontal .hpanel-outro { width: 38vw; }
.hscroll.is-horizontal .hpanel-hint {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 34px 0 0;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--brass);
}
.hpanel-hint i { display: block; width: 64px; height: 1px; background: var(--brass); animation: hint 1.8s var(--ease) infinite; transform-origin: left; }
@keyframes hint {
  0% { transform: scaleX(0); }
  60% { transform: scaleX(1); }
  100% { transform: scaleX(1); opacity: 0; }
}
.hscroll.is-horizontal .hscroll-progress {
  display: block;
  position: absolute;
  left: 8vw; right: 8vw; bottom: 5vh;
  height: 1px;
  background: rgba(248, 244, 236, 0.16);
}
.hscroll-progress i {
  display: block;
  height: 100%;
  background: var(--brass);
  transform: scaleX(0);
  transform-origin: left;
}

/* ----------------------------- finding us ----------------------------- */
.section-finding { overflow: hidden; padding-bottom: clamp(40px, 6vw, 72px); }
.section-finding .shell { position: relative; }
.contours {
  position: absolute;
  right: -8%;
  top: 50%;
  width: min(760px, 78vw);
  height: auto;
  transform: translateY(-50%);
  pointer-events: none;
}
.contours path { fill: none; stroke: #d6cab2; stroke-width: 1.3; }
.motion .contours path { stroke-dasharray: 1; stroke-dashoffset: 1; }

.map-card {
  padding: 28px;
  background: rgba(239, 231, 216, 0.86);
  border: 1px solid var(--line);
  border-radius: 6px;
  backdrop-filter: blur(4px);
}
.map-card .small { margin: 14px 0 0; }

/* Three ridgelines, each moving at its own pace, closing into the dark section. */
.ridge { position: relative; margin-bottom: -1px; line-height: 0; overflow: hidden; }
.ridge svg { display: block; width: 100%; height: clamp(120px, 22vw, 300px); }
.ridge-far { fill: #b4c5b8; }
.ridge-mid { fill: #5f8370; }
.ridge-near { fill: var(--forest); }

/* ------------------------------ contact ------------------------------- */
.contact-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
  margin-top: 8px;
  perspective: 900px;
}
@media (min-width: 720px) {
  .contact-grid { grid-template-columns: repeat(3, 1fr); }
}
.contact-card {
  display: block;
  padding: 24px 26px;
  border: 1px solid rgba(248, 244, 236, 0.22);
  border-radius: 6px;
  text-decoration: none;
  transition: border-color .25s, background-color .25s;
  will-change: transform;
}
.contact-card:hover {
  border-color: rgba(248, 244, 236, 0.55);
  background: rgba(248, 244, 236, 0.06);
}
.contact-card span {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(248, 244, 236, 0.55);
  margin-bottom: 8px;
}
.contact-card strong {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.18rem;
  overflow-wrap: anywhere;
}

/* ------------------------------- footer ------------------------------- */
.site-footer {
  background: var(--forest-deep);
  color: rgba(248, 244, 236, 0.7);
  padding-block: clamp(36px, 6vw, 72px) 30px;
  overflow: hidden;
}
.giant {
  margin: 0;
  overflow: hidden;
  font-family: var(--display);
  font-weight: 300;
  /* Sized so the eight letters run the full width of the page. */
  font-size: min(calc((100vw - 40px) / 3.4), 335px);   /* script.js then fits it exactly */
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: var(--cream);
  white-space: nowrap;
  padding-bottom: 0.1em;
}
.giant .gl { display: inline-block; will-change: transform; }
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: center;
  justify-content: space-between;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(248, 244, 236, 0.14);
}
.site-footer .small { color: rgba(248, 244, 236, 0.55); margin: 0; }

/* ------------------------- floating WhatsApp -------------------------- */
.wa-fab {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 40;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--whatsapp);
  box-shadow: 0 10px 28px -6px rgba(0, 0, 0, .4);
  transition: transform .6s cubic-bezier(.34, 1.56, .64, 1), background-color .25s;
}
.wa-fab:hover { background: var(--whatsapp-deep); transform: scale(1.07); }
.wa-fab svg { width: 32px; height: 32px; fill: #fff; }
.motion .wa-fab { transform: scale(0); }
.motion .wa-fab.is-in { transform: scale(1); }
.motion .wa-fab.is-in:hover { transform: scale(1.07); }
.motion .wa-fab.is-in::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--whatsapp);
  animation: fab-ring 2.8s ease-out infinite;
  pointer-events: none;
}
@keyframes fab-ring {
  0% { transform: scale(1); opacity: 0.75; }
  75%, 100% { transform: scale(1.85); opacity: 0; }
}
@media (min-width: 820px) {
  .wa-fab { right: 28px; bottom: 28px; width: 68px; height: 68px; }
  .wa-fab svg { width: 35px; height: 35px; }
}

/* --------------------------- small screens ---------------------------- */
@media (max-width: 860px) {
  .nav { display: none; }
  .header-call { margin-left: auto; }
  .contours { opacity: 0.6; right: -30%; width: 120vw; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}

/* ====================================================================
   Photographs
   Every picture is a <picture> offering several sizes; the browser takes
   the smallest that is sharp on the screen in front of it. Three of them
   also change picture on a narrow or upright screen — the hero, the
   feature beside the opening paragraph, and the ridge.
==================================================================== */
picture { display: contents; }
figure { margin: 0; }

.frame {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background: var(--cream-deep);
}
.frame img,
.frame video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}
.feature figcaption,
.room figcaption,
.firstlight figcaption {
  margin-top: 12px;
  font-size: 0.86rem;
  color: var(--ink-faint);
}
.section-tint { background: var(--cream-deep); }
.section-tint .frame { background: var(--cream); }

/* ---- the house: the opening words beside the view from the air ---- */
.house-top {
  display: grid;
  gap: clamp(30px, 5vw, 72px);
  grid-template-columns: 1fr;
  align-items: center;
}
.feature .frame { aspect-ratio: 16 / 10; }

/* ---- rooms ---- */
.rooms {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 1fr;
  margin-top: clamp(48px, 8vw, 96px);
}
.room-wide { grid-column: 1 / -1; }
.room .frame { aspect-ratio: 4 / 5; }
.room-wide .frame { aspect-ratio: 4 / 3; }
.rooms-note { max-width: 46ch; margin-top: clamp(28px, 4vw, 44px); }
@media (min-width: 760px) {
  .rooms { grid-template-columns: 2fr 1fr 1fr; gap: 16px; }
  .room-wide { grid-column: auto; }
  .room .frame,
  .room-wide .frame { aspect-ratio: auto; height: clamp(300px, 36vw, 470px); }
}

/* ---- first light: the film, the ridge, the sun ---- */
.fl-grid {
  display: grid;
  gap: clamp(36px, 6vw, 84px);
  grid-template-columns: 1fr;
  align-items: center;
}
.fl-side { order: -1; }                      /* words first on a phone */
.fl-copy { max-width: 44ch; }
.fl-film .frame { aspect-ratio: 4 / 5; }
.fl-collage { position: relative; display: grid; gap: 16px; margin-top: clamp(30px, 5vw, 56px); }
.fl-ridge .frame { aspect-ratio: 4 / 5; }
.fl-sun { width: 72%; margin-left: auto; }
.fl-sun .frame { aspect-ratio: 4 / 3; box-shadow: 0 0 0 6px var(--cream-deep); }

/* ---- the sideways gallery: a wider panel for landscape pictures ---- */
.hpanel-photo.is-wide .hphoto { aspect-ratio: 16 / 10; }
.hscroll.is-horizontal .hpanel-photo.is-wide { width: clamp(440px, 44vw, 760px); }
.hscroll.is-horizontal .hpanel-photo.is-wide .hphoto { aspect-ratio: auto; height: 56vh; }

/* ---- wide screens ---- */
@media (min-width: 900px) and (min-aspect-ratio: 4/5) {
  .house-top { grid-template-columns: 1.15fr 0.85fr; }
  .feature .frame { aspect-ratio: 3 / 4; }

  .fl-grid { grid-template-columns: 0.7fr 1.3fr; }
  .fl-side { order: 0; }
  .fl-film .frame { aspect-ratio: 9 / 16; max-height: 84vh; }
  .fl-collage { display: block; padding-bottom: 9%; }
  .fl-ridge { width: 84%; margin-left: auto; }
  .fl-ridge .frame { aspect-ratio: 4 / 3; }
  .fl-ridge figcaption { text-align: right; }
  .fl-sun { position: absolute; left: 0; bottom: 0; width: 40%; margin: 0; z-index: 1; }
}

/* ---- narrow or upright screens: the photograph on top, the words beneath ---- */
@media (max-width: 899px), (max-aspect-ratio: 4/5) {
  .hero,
  .js .hero { display: block; min-height: 0; }
  .hero-media { position: relative; inset: auto; height: 58svh; min-height: 330px; }
  .hero-veil {
    background: linear-gradient(to bottom,
      rgba(9, 24, 15, .62) 0%, rgba(9, 24, 15, 0) 26%,
      rgba(9, 24, 15, 0) 54%, #0c2015 100%);
  }
  .hero-inner { margin-top: -74px; padding-block: 0 48px; }
}
