/* ==========================================================================
   Obsession Stayz — The Obsession, Greater Noida West
   Palette and type rationale live in DESIGN.md.
   ========================================================================== */

:root {
  --ink:      #171a21;
  --ink-2:    #1f242d;
  --slate:    #262c36;
  --plaster:  #ede6db;
  --paper:    #f7f3ec;
  --sand:     #c3b29a;
  --sand-dim: #8e7f6c;
  --ember:    #d9873c;
  --ember-lo: #b76c28;
  --brass:    #8a5a1f;

  --rule-dark:  rgba(195, 178, 154, .20);
  --rule-light: rgba(23, 26, 33, .13);

  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans:  "Hanken Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

  --measure: 62ch;
  --gut: clamp(1.25rem, 4.5vw, 3.5rem);
  --maxw: 1360px;

  --t: 420ms cubic-bezier(.22, .61, .36, 1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 6rem; }
body {
  margin: 0;
  background: var(--plaster);
  color: var(--ink);
  font: 400 clamp(1rem, .96rem + .22vw, 1.1rem)/1.62 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, picture, svg { display: block; max-width: 100%; }
img { height: auto; background: var(--sand); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p, dl, dd, figure, ol, ul { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }

::selection { background: var(--ember); color: #fff; }

:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: fixed; top: .5rem; left: .5rem; z-index: 200;
  padding: .7rem 1.1rem; background: var(--ink); color: var(--plaster);
  text-decoration: none; transform: translateY(-160%);
}
.skip:focus { transform: none; }

/* ---------- shared ---------- */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }

.display {
  font: 400 clamp(2.5rem, 1.35rem + 4.6vw, 5.2rem)/1.02 var(--serif);
  letter-spacing: -.012em;
  text-wrap: balance;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem; padding: .78rem 1.45rem;
  font-weight: 600; font-size: .95rem; letter-spacing: .005em;
  text-decoration: none; white-space: nowrap;
  border: 1px solid transparent; border-radius: 999px;
  cursor: pointer;
  transition: background-color var(--t), border-color var(--t), color var(--t), transform 160ms ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn--lg { padding: 1rem 1.9rem; font-size: 1.02rem; }
.btn--full { width: 100%; padding-block: 1rem; }

.btn--ember { background: var(--ember); color: #1a1208; }
.btn--ember:hover { background: #e9995a; box-shadow: 0 14px 28px -14px rgba(217, 135, 60, .8); }

.btn--ghost { background: transparent; color: var(--plaster); border-color: rgba(237, 230, 219, .42); }
.btn--ghost:hover { background: rgba(237, 230, 219, .12); border-color: rgba(237, 230, 219, .75); }

.link {
  background: none; border: 0; padding: 0; cursor: pointer;
  font-weight: 600; color: var(--brass);
  border-bottom: 1px solid currentColor; line-height: 1.3;
}
.link:hover { color: var(--ink); }

/* ==========================================================================
   masthead
   ========================================================================== */
.masthead {
  position: fixed; inset: 0 0 auto; z-index: 100;
  transition: background-color var(--t), backdrop-filter var(--t), box-shadow var(--t);
}
.masthead__in {
  max-width: var(--maxw); margin-inline: auto;
  padding: 1.1rem var(--gut);
  display: flex; align-items: center; gap: 2rem;
  transition: padding var(--t);
}
.masthead.is-stuck {
  background: rgba(20, 23, 29, .95);
  backdrop-filter: blur(14px) saturate(130%);
  box-shadow: 0 1px 0 var(--rule-dark);
}
.masthead.is-stuck .masthead__in { padding-block: .7rem; }

.wordmark {
  display: flex; align-items: center; gap: .6rem;
  color: var(--plaster); text-decoration: none; margin-right: auto;
}
.wordmark__mark { color: var(--ember); display: grid; place-items: center; }
.wordmark__text {
  font: 400 1.32rem/1 var(--serif);
  letter-spacing: .005em;
}

.nav { display: flex; gap: 1.7rem; }
.nav a {
  color: rgba(237, 230, 219, .82); text-decoration: none;
  font-size: .92rem; font-weight: 500;
  padding-block: .35rem;
  border-bottom: 1px solid transparent;
  transition: color var(--t), border-color var(--t);
}
.nav a:hover, .nav a[aria-current] { color: #fff; border-bottom-color: var(--ember); }

.progress {
  position: absolute; inset: auto 0 0; height: 2px;
  background: var(--ember);
  transform: scaleX(0); transform-origin: 0 50%;
}

.burger {
  display: none; background: none; border: 0; cursor: pointer;
  width: 2.75rem; height: 2.75rem; padding: .7rem;
  flex-direction: column; justify-content: center; gap: .42rem;
}
.burger span {
  display: block; height: 1.5px; background: var(--plaster);
  transition: transform var(--t), opacity var(--t);
}
.burger[aria-expanded="true"] span:first-child { transform: translateY(2.9px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child  { transform: translateY(-2.9px) rotate(-45deg); }

.drawer {
  background: rgba(20, 23, 29, .97);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--rule-dark);
  padding: .5rem var(--gut) 1.4rem;
}
.drawer a {
  display: block; padding: .95rem 0;
  color: var(--plaster); text-decoration: none;
  font: 400 1.5rem/1.1 var(--serif);
  border-bottom: 1px solid var(--rule-dark);
}
.drawer a[aria-current] { padding-left: .9rem; box-shadow: inset 2px 0 0 var(--ember); }
.drawer a:last-child { color: var(--ember); border-bottom: 0; }

/* ==========================================================================
   hero
   ========================================================================== */
.hero {
  position: relative; isolation: isolate;
  min-height: 100svh;
  display: flex; align-items: flex-end;
  background: var(--ink);
  padding-block: 7rem 3.5rem;
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 55% 45%; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to top, rgba(14, 16, 21, .94) 0%, rgba(14, 16, 21, .72) 26%, rgba(14, 16, 21, .14) 58%, rgba(14, 16, 21, .46) 100%),
    linear-gradient(to right, rgba(14, 16, 21, .62) 0%, rgba(14, 16, 21, 0) 62%);
}

.hero__body {
  width: 100%; max-width: var(--maxw); margin-inline: auto;
  padding-inline: var(--gut);
  color: var(--plaster);
}
.hero__place {
  font-size: .92rem; font-weight: 500; color: var(--sand);
  margin-bottom: 1.15rem;
}
.hero__title {
  font: 400 clamp(2.45rem, 1.1rem + 6.2vw, 6.6rem)/.98 var(--serif);
  letter-spacing: -.018em;
  color: #fff;
  text-shadow: 0 2px 40px rgba(0, 0, 0, .35);
}
.hero__lede {
  max-width: 46ch; margin-top: 1.3rem;
  font-size: clamp(.98rem, .94rem + .3vw, 1.2rem);
  color: rgba(237, 230, 219, .9);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: clamp(1.5rem, 3vw, 2.2rem); }

.facts {
  display: flex; flex-wrap: wrap; gap: 0 2.6rem;
  margin-top: clamp(1.8rem, 4vw, 3rem); padding-top: 1.3rem;
  border-top: 1px solid rgba(237, 230, 219, .22);
}
.facts__i { padding-block: .35rem; }
.facts dt { font-size: .76rem; color: var(--sand); margin-bottom: .18rem; }
.facts dd { margin: 0; font-size: 1.05rem; font-weight: 500; color: #fff; }
.facts dd small { font-weight: 400; color: rgba(237, 230, 219, .66); font-size: .85rem; }
.star { color: var(--ember); }

/* ==========================================================================
   the view — the one place the page raises its voice
   ========================================================================== */
.view { background: var(--ink); color: var(--plaster); padding-block: clamp(4.5rem, 9vw, 8.5rem); }
.view__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "head head" "stage hours";
  gap: clamp(2rem, 4vw, 3.5rem) clamp(2rem, 5vw, 5rem);
  align-items: start;
}
.view__head { grid-area: head; max-width: 42rem; }
.view__head .display { color: #fff; }
.view__intro { margin-top: 1.1rem; color: var(--sand); max-width: 34ch; }

.view__stage { grid-area: stage; max-width: 58rem; }
.view__frame {
  position: relative; overflow: hidden;
  border-radius: 6px;
  background: var(--slate);
  aspect-ratio: 3 / 2;
  box-shadow: 0 0 0 1px rgba(195, 178, 154, .14), 0 50px 90px -50px rgba(0, 0, 0, .9), 0 30px 80px -40px rgba(217, 135, 60, .28);
}
.view__img { width: 100%; height: 100%; object-fit: cover; }
.view__caption {
  margin-top: 1.1rem; max-width: 52ch;
  color: rgba(237, 230, 219, .8); font-size: 1.02rem;
}

.hours {
  grid-area: hours;
  display: flex; flex-direction: column;
  align-self: center;
  text-align: right;
  min-width: 11rem;
}
.hours li + li { border-top: 1px solid var(--rule-dark); }
.hours button {
  width: 100%; background: none; border: 0; cursor: pointer;
  padding: .95rem 0;
  text-align: right;
  font: 400 clamp(1.5rem, 1.1rem + 1vw, 2.1rem)/1.1 var(--serif);
  color: rgba(237, 230, 219, .5);
  transition: color var(--t);
}
.hours button:hover { color: var(--plaster); }
.hours button.is-on { color: var(--ember); }
.hours button.is-on::before {
  content: ""; display: inline-block; vertical-align: middle;
  width: 2.2rem; height: 1px; margin-right: .8rem;
  background: var(--ember);
}

/* ==========================================================================
   inside
   ========================================================================== */
.inside { background: var(--plaster); padding-block: clamp(4.5rem, 9vw, 8.5rem); }
.inside__top {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.inside__tall img { width: 100%; border-radius: 3px; }
.inside__text p { max-width: var(--measure); margin-top: 1.35rem; }
.inside__text p:first-of-type { margin-top: 1.9rem; }

.pills { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 2rem; }
.pills li {
  padding: .42rem .95rem;
  font-size: .89rem; font-weight: 500;
  border: 1px solid var(--rule-light); border-radius: 999px;
  background: rgba(255, 255, 255, .5);
}

.inside__ragged {
  display: grid; grid-template-columns: repeat(12, 1fr);
  gap: clamp(1rem, 2.4vw, 2rem);
  margin-top: clamp(3rem, 6vw, 6rem);
}
.rag img { width: 100%; border-radius: 3px; }
.rag figcaption {
  margin-top: .75rem; font-size: .88rem; color: var(--sand-dim);
}
.rag--a { grid-column: 1 / 6; }
.rag--b { grid-column: 6 / 10; align-self: end; }
.rag--c { grid-column: 10 / 13; align-self: end; }

.inside__more { margin-top: clamp(2.5rem, 4vw, 3.5rem); }

/* ==========================================================================
   inventory
   ========================================================================== */
.provisions { background: var(--paper); padding-block: clamp(4.5rem, 9vw, 8.5rem); }
.provisions__head {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: clamp(1.4rem, 4vw, 4rem);
  align-items: end;
}
.provisions__head p { max-width: 42ch; color: #4a4740; }

.inv {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2.5rem clamp(1.5rem, 3vw, 3rem);
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: 2.5rem;
  border-top: 1px solid var(--rule-light);
}
.inv__g h3 {
  font: 400 1.35rem/1.2 var(--serif);
  padding-bottom: .55rem; margin-bottom: .55rem;
  border-bottom: 1px solid var(--rule-light);
}
.inv__g li {
  padding: .33rem 0;
  font-size: .96rem;
  color: #3d3a34;
}
.inv__g--not h3, .inv__g--not li { color: var(--sand-dim); }
.inv__g--not li::before { content: "\2014\00a0\00a0"; color: var(--sand); }

.inv__strip {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(11rem, 1fr);
  gap: .75rem; margin-top: clamp(2.5rem, 5vw, 4rem);
  overflow-x: auto; scroll-snap-type: x mandatory;
  padding-bottom: .5rem;
  scrollbar-width: thin;
}
.inv__strip img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
  border-radius: 3px; scroll-snap-align: start;
}

/* JS wraps every openable photograph so it can be reached with a keyboard. */
.shot {
  display: block; width: 100%; padding: 0;
  background: var(--sand); border: 0; cursor: zoom-in;
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(23, 26, 33, .1), 0 18px 34px -20px rgba(23, 26, 33, .5);
}
.inv__strip .shot { scroll-snap-align: start; }

/* ==========================================================================
   downstairs
   ========================================================================== */
.downstairs { background: var(--plaster); padding-bottom: clamp(4.5rem, 9vw, 8.5rem); }
.downstairs__hero img {
  width: 100%; height: clamp(18rem, 52vh, 34rem); object-fit: cover;
}
.downstairs__body { padding-top: clamp(3rem, 6vw, 5.5rem); }
.downstairs__cols {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  gap: 1.4rem clamp(2rem, 5vw, 4.5rem);
  margin-top: 1.8rem;
  max-width: 56rem;
}

.near { margin-top: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid var(--rule-light); }
.near li {
  display: grid; grid-template-columns: 11rem minmax(0, 1fr);
  gap: 1rem; align-items: baseline;
  padding: .95rem 0; border-bottom: 1px solid var(--rule-light);
}
.near span { font-weight: 600; color: var(--brass); font-size: .93rem; }

.downstairs__strip {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: clamp(.6rem, 1.4vw, 1rem);
  margin-top: clamp(2.5rem, 5vw, 4rem);
}
.downstairs__strip img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 3px;
}

/* ==========================================================================
   staying
   ========================================================================== */
.staying { background: var(--paper); padding-block: clamp(4.5rem, 9vw, 8.5rem); }
.staying__grid {
  display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: start;
}
.staying__cols {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: clamp(1.8rem, 3.5vw, 3rem);
}
.stay__b h3 {
  font: 400 1.4rem/1.2 var(--serif);
  padding-bottom: .5rem; margin-bottom: .8rem;
  border-bottom: 1px solid var(--rule-light);
}
.stay__b p { color: #45423b; font-size: .99rem; }
.rules li {
  padding: .3rem 0 .3rem 1.1rem; position: relative;
  font-size: .96rem; color: #45423b;
}
.rules li::before {
  content: ""; position: absolute; left: 0; top: .92em;
  width: .42rem; height: 1px; background: var(--brass);
}

/* ==========================================================================
   book
   ========================================================================== */
.book { background: var(--ink); color: var(--plaster); padding-block: clamp(4.5rem, 9vw, 8.5rem); }
.book__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 26rem);
  gap: clamp(2.5rem, 5vw, 5.5rem);
  align-items: start;
}
.book__pitch .display { color: #fff; }
.book__pitch > p { margin-top: 1.4rem; max-width: 42ch; color: rgba(237, 230, 219, .82); }

.rate {
  margin-top: 2.2rem; padding: 1.4rem 0;
  border-top: 1px solid var(--rule-dark); border-bottom: 1px solid var(--rule-dark);
}
.rate__num { font: 400 clamp(2.2rem, 1.6rem + 2vw, 3.1rem)/1 var(--serif); color: #fff; }
.rate__unit { font-size: .9rem; font-family: var(--sans); color: var(--sand); }
.rate__note { margin-top: .6rem; font-size: .9rem; color: var(--sand); }

.book__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.book__alt { margin-top: 1.6rem; font-size: .92rem; color: var(--sand); }
.book__alt a { color: var(--ember); text-decoration-thickness: 1px; text-underline-offset: 3px; }

.enq {
  background: linear-gradient(160deg, #262c36 0%, var(--ink-2) 55%);
  border: 1px solid var(--rule-dark); border-radius: 10px;
  padding: clamp(1.4rem, 3vw, 2rem);
  box-shadow: 0 50px 80px -50px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.enq h3 { font: 400 1.6rem/1.15 var(--serif); color: #fff; }
.enq__req { margin: .35rem 0 1.2rem; font-size: .8rem; color: var(--sand-dim); }
.req { color: var(--ember); font-weight: 600; }
.field { margin-bottom: 1rem; }
.field--half { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.enq label {
  display: block; margin-bottom: .38rem;
  font-size: .82rem; font-weight: 500; color: var(--sand);
}
.opt { font-weight: 400; color: var(--sand-dim); }
.enq input, .enq select, .enq textarea {
  width: 100%; padding: .72rem .85rem;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--rule-dark); border-radius: 3px;
  color: #fff; font-size: .97rem;
  transition: border-color var(--t), background-color var(--t);
}
.enq textarea { resize: vertical; min-height: 5rem; }
.enq input:focus, .enq select:focus, .enq textarea:focus {
  border-color: var(--ember); background: rgba(255, 255, 255, .08);
}
.enq input::placeholder, .enq textarea::placeholder { color: rgba(237, 230, 219, .35); }
.enq input[aria-invalid="true"], .enq select[aria-invalid="true"] { border-color: #e2705c; background: rgba(226, 112, 92, .08); }
.enq input[type="date"] { color-scheme: dark; }
.field__err { margin-top: .35rem; font-size: .8rem; line-height: 1.35; color: #f0907e; }
.enq__sum {
  margin-bottom: 1rem; padding: .8rem .95rem;
  border: 1px solid rgba(217, 135, 60, .4); border-radius: 6px;
  background: rgba(217, 135, 60, .09);
}
.enq__sum strong { display: block; font: 400 1.3rem/1.2 var(--serif); color: #fff; }
.enq__sum span { display: block; margin-top: .2rem; font-size: .8rem; color: var(--sand); }
.enq .btn { margin-top: .6rem; }
.enq__hint { margin-top: .9rem; font-size: .83rem; color: var(--sand-dim); text-align: center; }
.enq__hint.is-bad { color: #e2705c; }

/* ==========================================================================
   footer + sticky bar
   ========================================================================== */
.foot { background: #12151b; color: rgba(237, 230, 219, .68); padding-block: clamp(3rem, 6vw, 4.5rem) 6rem; }
.foot__in { display: grid; gap: 2rem; }
.foot__brand .wordmark__text { color: #fff; margin-bottom: .7rem; }
.foot__brand p { font-size: .92rem; line-height: 1.7; }
.social {
  display: inline-flex; align-items: center; gap: .55rem;
  margin-top: 1.1rem; padding: .5rem .95rem .5rem .8rem;
  font-size: .9rem; font-weight: 500; text-decoration: none;
  color: var(--plaster);
  border: 1px solid var(--rule-dark); border-radius: 999px;
  transition: border-color var(--t), color var(--t), background-color var(--t);
}
.social svg { color: var(--ember); flex: none; }
.social:hover { color: #fff; border-color: var(--ember); background: rgba(217, 135, 60, .1); }
.foot__nav { display: flex; flex-wrap: wrap; gap: .5rem 1.6rem; }
.foot__nav a { font-size: .91rem; text-decoration: none; }
.foot__nav a:hover { color: var(--ember); }
.foot__legal {
  font-size: .82rem; color: rgba(237, 230, 219, .42);
  padding-top: 1.6rem; border-top: 1px solid var(--rule-dark);
}

.bookbar {
  position: fixed; inset: auto 0 0; z-index: 90;
  display: none; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .7rem var(--gut) calc(.7rem + env(safe-area-inset-bottom));
  background: rgba(20, 23, 29, .95);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--rule-dark);
  transform: translateY(110%);
  transition: transform var(--t);
}
.bookbar.is-up { transform: none; }
.bookbar__price { color: #fff; font: 400 1.35rem/1 var(--serif); }
.bookbar__price small { font-family: var(--sans); font-size: .8rem; color: var(--sand); }

/* ==========================================================================
   lightbox
   ========================================================================== */
.lb {
  width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh;
  padding: 0; border: 0; background: #0e1015; color: var(--plaster);
}
.lb::backdrop { background: #0e1015; }
.lb__fig {
  height: 100%;
  display: grid; grid-template-rows: minmax(0, 1fr) auto;
  gap: 1rem; padding: clamp(2.8rem, 6vw, 3.5rem) clamp(1rem, 6vw, 5rem) 1.6rem;
}
.lb__fig img {
  width: 100%; height: 100%; object-fit: contain;
  background: none;
}
.lb__fig figcaption {
  display: flex; flex-wrap: wrap; gap: .4rem 1rem; justify-content: center;
  font-size: .9rem; color: rgba(237, 230, 219, .72); text-align: center;
}
.lb__count { color: var(--sand-dim); }
.lb__x, .lb__nav {
  position: absolute; z-index: 2;
  background: rgba(255, 255, 255, .07); border: 1px solid var(--rule-dark);
  color: var(--plaster); cursor: pointer; border-radius: 999px;
  display: grid; place-items: center;
  transition: background-color var(--t);
}
.lb__x:hover, .lb__nav:hover { background: rgba(255, 255, 255, .17); }
.lb__x { top: 1rem; right: 1rem; width: 2.6rem; height: 2.6rem; font-size: 1.6rem; line-height: 1; }
.lb__nav { top: 50%; transform: translateY(-50%); width: 3rem; height: 3rem; font-size: 2rem; line-height: 1; padding-bottom: .22rem; }
.lb__nav--prev { left: clamp(.5rem, 2vw, 1.4rem); }
.lb__nav--next { right: clamp(.5rem, 2vw, 1.4rem); }

/* ==========================================================================
   depth — everything below only applies once main.js has added .js-3d, which it
   does not do for visitors who ask for reduced motion. Without it the page is
   the flat one above.
   ========================================================================== */

/* photographs sharpen in rather than popping */
main img { transition: opacity 600ms ease, filter 800ms ease; }
main img.is-loading { opacity: 0; filter: blur(16px); }

/* hero: photograph, headline and copy sit at three depths */
.js-3d .hero { overflow: hidden; }
.js-3d .hero__media {
  transform: translate3d(0, calc(var(--sy, 0) * 16%), 0) scale(calc(1.1 - var(--sy, 0) * .06));
  translate: calc(var(--mx, 0) * -18px) calc(var(--my, 0) * -12px);
  transition: translate 700ms cubic-bezier(.2, .7, .2, 1);
  will-change: transform;
}
.js-3d .hero__body {
  transform: perspective(900px) translate3d(0, calc(var(--sy, 0) * -40px), 0) rotateX(calc(var(--sy, 0) * 12deg));
  transform-origin: 50% 100%;
  opacity: calc(1 - var(--sy, 0) * 1.4);
}
.js-3d .hero__title, .js-3d .hero__place {
  translate: calc(var(--mx, 0) * 14px) calc(var(--my, 0) * 9px);
  transition: translate 700ms cubic-bezier(.2, .7, .2, 1);
}

/* sections rotate up into place */
.js-3d .reveal {
  opacity: 0;
  transform: perspective(1400px) translateY(2.6rem) rotateX(16deg);
  transform-origin: 50% 100%;
  transition: opacity 700ms ease, transform 900ms cubic-bezier(.2, .7, .2, 1);
  transition-delay: calc(var(--i, 0) * 80ms);
}
.js-3d .reveal.is-in { opacity: 1; transform: none; }

/* photographs lean toward the cursor */
:where(.tilt) {
  position: relative;
  transform: perspective(1100px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 600ms cubic-bezier(.2, .7, .2, 1), box-shadow var(--t);
}
.tilt.is-live { transition-duration: 120ms, 420ms; }
.shot.tilt.is-live { box-shadow: 0 2px 4px rgba(23, 26, 33, .12), 0 40px 60px -28px rgba(23, 26, 33, .6); }
.tilt::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .2), transparent 55%);
  opacity: 0; transition: opacity 300ms ease;
}
.tilt.is-live::after { opacity: 1; }

/* the view turns over to the next hour instead of fading */
.js-3d .view__frame {
  transform: perspective(2600px) rotateX(var(--rx, 0deg)) rotateY(calc(var(--ry, 0deg) + var(--flip, 0deg)));
  transition: transform 420ms cubic-bezier(.2, .7, .2, 1);
}
.js-3d .view__frame.is-flip-out { --flip: 90deg; transition: transform 260ms ease-in; }
.js-3d .view__frame.is-flip-in { --flip: -90deg; transition: none; }

/* the three room photographs drift at different depths */
.js-3d .rag { translate: 0 calc(var(--p, 0) * var(--depth, 0px)); }
.rag--a { --depth: 14px; }
.rag--b { --depth: -30px; }
.rag--c { --depth: -56px; }

.js-3d .downstairs__hero { overflow: hidden; }
.js-3d .downstairs__hero img { scale: 1.18; translate: 0 calc(var(--p, 0) * -7%); }

/* photo strips bend into a curved wall you can drag */
.car { position: relative; margin-top: clamp(2.5rem, 5vw, 4rem); }
.car .is-carousel {
  --cw: clamp(12rem, 22vw, 18rem);
  position: relative;
  display: grid; grid-auto-flow: column; grid-auto-columns: var(--cw); grid-template-columns: none;
  gap: clamp(.75rem, 1.6vw, 1.25rem);
  margin-top: 0; padding: 2.2rem calc(50% - var(--cw) / 2);
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  cursor: grab; user-select: none;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 9%, #000 91%, transparent);
}
.car .is-carousel::-webkit-scrollbar { display: none; }
.car .is-carousel.is-dragging { scroll-snap-type: none; cursor: grabbing; }
.car .is-carousel > * {
  scroll-snap-align: center;
  transform: perspective(1100px) translateZ(calc(var(--a, 0) * -110px)) rotateY(calc(var(--o, 0) * -38deg));
  transition: scale var(--t), box-shadow var(--t);
}
.car .is-carousel > *:hover { scale: 1.04; }
.car .is-carousel .shot { cursor: inherit; }
.car .is-carousel img { -webkit-user-drag: none; pointer-events: none; }

.car__nav {
  position: absolute; top: 50%; z-index: 2; translate: 0 -50%;
  width: 2.9rem; height: 2.9rem; padding-bottom: .2rem;
  display: grid; place-items: center;
  font-size: 1.9rem; line-height: 1; color: var(--plaster);
  background: rgba(23, 26, 33, .82); border: 1px solid var(--rule-dark); border-radius: 999px;
  cursor: pointer; backdrop-filter: blur(8px);
  transition: background-color var(--t), scale var(--t);
}
.car__nav:hover { background: var(--ink); scale: 1.08; }
.car__nav--prev { left: 0; }
.car__nav--next { right: 0; }

/* the enquiry form rests at an angle and squares up when you reach for it */
@media (min-width: 1081px) {
  .js-3d .enq { transition: transform 600ms cubic-bezier(.2, .7, .2, 1), opacity 700ms ease; }
  .js-3d .enq.is-in { transform: perspective(1400px) rotateY(-5deg) rotateX(1.5deg); }
  .js-3d .enq.is-in:hover, .js-3d .enq.is-in:focus-within { transform: none; }
}

@media (max-width: 860px) {
  .car .is-carousel { --cw: clamp(11rem, 56vw, 16rem); }
  .car__nav { display: none; }
  .rag--a { --depth: 8px; }
  .rag--b { --depth: -14px; }
  .rag--c { --depth: -26px; }
}

/* ==========================================================================
   responsive
   ========================================================================== */
@media (max-width: 1080px) {
  .provisions__head { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .inside__top { grid-template-columns: minmax(0, 1fr); }
  .inside__tall { max-width: 30rem; }
  .staying__grid { grid-template-columns: minmax(0, 1fr); }
  .book__grid { grid-template-columns: minmax(0, 1fr); }
  .enq { max-width: 34rem; }
}

@media (max-width: 860px) {
  .inv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inv__strip { grid-auto-columns: 42vw; }
  .nav, .masthead__cta { display: none; }
  .burger { display: flex; }
  .masthead:has(.drawer:not([hidden])) { background: rgba(20, 23, 29, .97); backdrop-filter: blur(14px); }

  .view__grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "hours" "stage"; }
  .hours { flex-direction: row; flex-wrap: wrap; text-align: left; min-width: 0; gap: 0 .4rem; }
  .hours li { flex: 1 1 auto; }
  .hours li + li { border-top: 0; }
  .hours button {
    text-align: center; font-size: 1.05rem; font-family: var(--sans); font-weight: 500;
    padding: .6rem .9rem;
    border: 1px solid var(--rule-dark); border-radius: 999px;
  }
  .hours button.is-on { border-color: var(--ember); }
  .hours button.is-on::before { display: none; }

  .inside__ragged { grid-template-columns: repeat(2, 1fr); }
  .rag--a { grid-column: 1 / 3; }
  .rag--b { grid-column: 1 / 2; }
  .rag--c { grid-column: 2 / 3; }

  .downstairs__strip { grid-template-columns: repeat(2, 1fr); }
  .near li { grid-template-columns: minmax(0, 1fr); gap: .15rem; }

  .bookbar { display: flex; }
  .foot { padding-bottom: 7rem; }
}

@media (max-width: 560px) {
  .inv { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 480px) {
  /* The sun sits left of centre, so a portrait crop has to favour that side. */
  .hero { padding-block: 5.5rem 2rem; }
  .hero__media img { object-position: 38% 52%; }
  .hero__actions .btn { flex: 1 1 100%; }
  .hero__lede { max-width: 38ch; }
  .facts { gap: 0 1.8rem; }
  .facts dd { font-size: .98rem; }
  .field--half { grid-template-columns: 1fr; }
  .lb__nav { width: 2.6rem; height: 2.6rem; font-size: 1.6rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important;
  }
}
