/* =========================================================
   RAGHUKUL
   A street of painted Rajasthani gates on a turmeric wall.
   Haldi (wall), neel (ink), lime wash tinted with indigo (reading
   surface), and one door colour per home, set inline as --door.
   ========================================================= */

:root {
  --haldi: #E9AC1B;
  --neel: #171D59;
  --wash: #E3EAF2;
  --lime: #FBF8EC;
  --brass: #F2CF6B;
  --light: #FFF0BF;
  --door: #A8281E;
  --door-deep: #6E140D;
  --display: "Rozha One", "Times New Roman", serif;
  --body: "Mukta", system-ui, sans-serif;
  --gutter: clamp(16px, 4vw, 64px);
}

@property --lit { syntax: "<number>"; inherits: true; initial-value: 0; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-x: clip; /* stamped headings briefly scale past the edge */
  background: var(--wash);
  color: var(--neel);
  font: 400 1.125rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 400; line-height: 1.05; }
h2 { font-size: clamp(2.1rem, 4.4vw, 3.6rem); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
a { color: inherit; }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }

.skip { position: absolute; left: -999px; top: 0; z-index: 30; background: var(--neel); color: var(--lime); padding: 8px 14px; }
.skip:focus { left: 8px; top: 8px; }

/* ---------- Buttons: flat painted signboards ---------- */
.btn {
  display: inline-block; padding: 12px 24px;
  background: var(--haldi); color: var(--neel);
  border: 2px solid var(--haldi);
  font: 700 1.05rem/1.3 var(--body); text-decoration: none; cursor: pointer;
  position: relative; isolation: isolate; overflow: hidden;
  --fill: var(--lime);
  transition: color .25s, border-color .25s, transform .15s;
}
/* Two leaves of colour swing shut across the button on hover. */
.btn::before, .btn::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 51%; z-index: -1;
  background: var(--fill); transform: scaleX(0);
  transition: transform .28s cubic-bezier(.3, .7, .3, 1);
}
.btn::before { left: 0; transform-origin: left; }
.btn::after { right: 0; transform-origin: right; }
.btn:hover::before, .btn:hover::after, .btn:focus-visible::before, .btn:focus-visible::after { transform: none; }
.btn:hover { border-color: var(--fill); }
.btn:active { transform: scale(.97); }
.btn--ink { background: var(--neel); border-color: var(--neel); color: var(--lime); --fill: var(--door); }
.btn--line { background: transparent; border-color: currentColor; color: inherit; }
.btn--line:hover { color: var(--neel); }

/* ---------- Top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 20; transition: transform .35s cubic-bezier(.3, .7, .3, 1);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 32px;
  padding: 8px var(--gutter);
  background: var(--lime); color: var(--neel);
}
.top__logo { display: block; margin-left: -8px; }
.top__logo img { display: block; width: auto; height: 62px; }
.top__nav { display: flex; flex-wrap: wrap; gap: 4px 22px; font-weight: 500; }
.top--away { transform: translateY(-101%); }
.top__nav a {
  text-decoration: none; padding: 2px 0 4px;
  background: linear-gradient(var(--door), var(--door)) center bottom / 0 2px no-repeat;
  transition: background-size .25s;
}
.top__nav a:hover, .top__nav a[aria-current] { background-size: 100% 2px; }
.top__nav a:last-child { color: var(--door); font-weight: 700; }

/* ---------- The wall and the street of gates ---------- */
.wall {
  background: url("toran.svg") repeat-x center top / 120px 64px, url("butti.svg") 0 0 / 96px 96px, var(--haldi);
  padding-top: clamp(68px, 9vh, 84px);
}
.wall__head {
  display: grid; grid-template-columns: minmax(0, 2.5fr) minmax(0, 1fr); gap: 16px 48px; align-items: end;
  padding: 0 var(--gutter) clamp(22px, 4vh, 40px);
}
.wall__head h1, .rotor { font: 400 clamp(2.5rem, 5vw, 4.7rem)/1.02 var(--display); }
.rotor > h1 { font: inherit; }
.wall__head p { font-size: 1.2rem; font-weight: 500; line-height: 1.4; }

/* Hero lines that change by themselves: all stacked in one cell, so the page never jumps */
.rotor, .rotor-sub { display: grid; }
.rotor__line, .rotor__sub { grid-area: 1 / 1; display: block; visibility: hidden; }
.rotor__line.is-on, .rotor__sub.is-on, .rotor__line.is-out, .rotor__sub.is-out { visibility: visible; }
.wall--more .wall__head { display: block; }

.street {
  --plate: 122px;
  display: flex; justify-content: center; gap: clamp(10px, 3.4vw, 56px);
  padding: 0 var(--gutter);
  background: linear-gradient(transparent calc(100% - var(--plate)), var(--neel) 0);
}
.street > li { width: min(21vw, 31vh, 300px); min-width: 150px; }

.gate { display: block; color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.gate__arch {
  display: block; position: relative; aspect-ratio: 300 / 440; container-type: inline-size;
  transition: transform .35s cubic-bezier(.2, .8, .2, 1), filter .35s;
}
.gate__way {
  position: absolute; left: 9.33%; top: 13.64%; width: 81.34%; height: 86.36%;
  overflow: hidden; perspective: 900px; background: var(--door-deep);
}
.gate__inside, .gate__photo { position: absolute; inset: 0; width: 100%; height: 100%; display: block; object-fit: cover; }
.gate__leaf {
  position: absolute; top: 0; bottom: 0; width: 50%; display: block;
  transition: transform .45s cubic-bezier(.3, .7, .3, 1);
}
.gate__leaf svg { display: block; width: 100%; height: 100%; }
.gate__leaf--l { left: 0; transform-origin: left center; }
.gate__leaf--r { right: 0; transform-origin: right center; }
.gate__leaf--r svg { transform: scaleX(-1); }
.gate__frame { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.gate__flame {
  fill: #FF8A1F; opacity: calc(.55 + .45 * var(--lit));
  transform-box: fill-box; transform-origin: 50% 100%;
  animation: flicker 1.7s ease-in-out infinite alternate;
}
.gate__plaque {
  position: absolute; left: 50%; top: 2.3%; transform: translateX(-50%);
  padding: .1em .8em .16em; white-space: nowrap;
  background: var(--door); color: var(--lime);
  font: 400 8.2cqw/1.2 var(--display);
}
/* A home that is not open yet: doors stay shut, with a board hung across them */
.gate__board {
  position: absolute; left: 50%; top: 47%; z-index: 1; white-space: nowrap;
  padding: .28em .7em .36em;
  background: var(--haldi); color: var(--neel); border: .5cqw solid var(--neel);
  font: 400 8.4cqw/1 var(--display);
  transform: translateX(-50%) rotate(-4deg); transform-origin: 50% -40%;
}
.gate__board::before, .gate__board::after {
  content: ""; position: absolute; bottom: 100%; width: .6cqw; height: 13cqw; background: var(--brass);
}
.gate__board::before { left: 18%; transform: rotate(14deg); transform-origin: bottom; }
.gate__board::after { right: 18%; transform: rotate(-14deg); transform-origin: bottom; }
.gate.gate--soon .gate__leaf { transform: none !important; animation: none !important; }
@media (hover: hover) {
  .gate--soon:hover .gate__board { animation: board-sway 1.1s ease-in-out; }
}
@keyframes board-sway {
  25% { transform: translateX(-50%) rotate(3deg); }
  55% { transform: translateX(-50%) rotate(-7deg); }
  80% { transform: translateX(-50%) rotate(-2deg); }
}

.gate__plate {
  display: flex; flex-direction: column; justify-content: center;
  height: var(--plate); padding: 8px 2px;
  background: var(--neel); color: var(--lime);
  font-size: 1rem; line-height: 1.3;
}
.gate__plate strong { font: 400 1.25rem/1.15 var(--display); margin-bottom: 3px; transition: color .2s; }
.gate__price { font-weight: 700; color: var(--haldi); }

/* Hover or keyboard focus: the lamps light, the doors part, the rest of the street steps back. */
.gate:focus-visible { outline: none; }
.gate:focus-visible .gate__plate strong { text-decoration: underline; }
.gate:focus-visible,
.gate.is-open { --lit: 1; }
.gate:focus-visible .gate__arch { transform: translateY(-8px); filter: drop-shadow(0 0 20px var(--light)) brightness(1.06); }
.gate:focus-visible .gate__leaf--l { transform: rotateY(24deg); }
.gate:focus-visible .gate__leaf--r { transform: rotateY(-24deg); }
.gate:focus-visible .gate__plate strong { color: var(--haldi); }
@media (hover: hover) {
  .gate { transition: --lit .25s; }
  .gate:hover { --lit: 1; }
  .gate:hover .gate__arch { transform: translateY(-8px); filter: drop-shadow(0 0 20px var(--light)) brightness(1.06); }
  .gate:hover .gate__leaf--l { transform: rotateY(24deg); }
  .gate:hover .gate__leaf--r { transform: rotateY(-24deg); }
  .gate:hover .gate__plate strong { color: var(--haldi); }
  .street:has(.gate:hover) .gate:not(:hover) .gate__arch { filter: saturate(.55) brightness(.86); }
}

/* Clicked: full swing. The camera move itself is in site.js. */
.gate.is-open .gate__leaf { transition-duration: .6s; }
.gate.is-open .gate__leaf--l, .gate--open .gate__leaf--l { transform: rotateY(82deg); }
.gate.is-open .gate__leaf--r, .gate--open .gate__leaf--r { transform: rotateY(-82deg); }
.gate--open { --lit: 1; }

.gate-walk { position: fixed; inset: 0; z-index: 50; overflow: hidden; }
.gate-walk__street { position: absolute; margin: 0; will-change: transform; }
.gate-walk__veil { position: absolute; inset: 0; background: var(--light); opacity: 0; }
html.gate-arrive::before {
  content: ""; position: fixed; inset: 0; z-index: 50; pointer-events: none;
  background: var(--light);
  animation: gate-arrive .8s ease-out forwards;
}
@keyframes gate-arrive { to { opacity: 0; visibility: hidden; } }

/* ---------- Where a gate leads ---------- */
.inside {
  display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(220px, 1fr); gap: 32px clamp(32px, 6vw, 96px); align-items: end;
  padding: clamp(24px, 4vw, 48px) var(--gutter) 0;
  background: url("jaali.svg") 0 0 / 64px 64px, var(--door); color: var(--lime);
}
.inside__text { padding-bottom: clamp(32px, 5vw, 64px); align-self: center; }
.inside h1 { font-size: clamp(2.8rem, 7vw, 6.4rem); line-height: .98; margin-top: 18px; }
.inside__tag { margin-top: 16px; font-size: clamp(1.2rem, 2vw, 1.5rem); line-height: 1.35; max-width: 34ch; }
.inside address { margin-top: 16px; font-style: normal; max-width: 52ch; line-height: 1.4; }
.inside__facts { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-top: 14px; font-weight: 700; color: var(--brass); }
.inside__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.inside .gate { width: min(100%, 400px); justify-self: end; }
.inside .gate__plaque { background: var(--door-deep); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; font-size: 1rem; }
.crumbs li + li::before { content: "/"; margin-right: 8px; opacity: .6; }

/* ---------- Reading sections: heading beside content ---------- */
.band {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 24px clamp(32px, 5vw, 80px);
  padding: clamp(48px, 7vw, 96px) var(--gutter);
  position: relative;
}
/* Each section is dyed its own colour. --accent is the highlight that reads on that colour. */
.band { --accent: var(--door); background-color: var(--wash); }
.band--peach { background: url("butti.svg") 0 0 / 96px 96px, #F6C9A0; --accent: #8E1F16; }
.band--peacock { background: url("jaali.svg") 0 0 / 64px 64px, #0B6B60; color: var(--lime); --accent: var(--brass); }
.band--haldi { background: url("butti.svg") 0 0 / 96px 96px, #F8DC8C; --accent: #8E1F16; }
.band--mint { background: url("butti.svg") 0 0 / 96px 96px, #BFE3D8; --accent: #0B5A50; }
.band--sky { background: url("butti.svg") 0 0 / 96px 96px, #CFE0F2; --accent: #232C7A; }
.band__head { position: sticky; top: 24px; align-self: start; }
.art { display: block; width: min(100%, 280px); height: auto; margin-top: 28px; overflow: visible; }

.board table { width: 100%; border-collapse: collapse; }
.board th, .board td { padding: 14px 12px 14px 0; text-align: left; border-bottom: 2px solid currentColor; vertical-align: baseline; }
.board thead th { font-weight: 500; font-size: 1rem; }
.board tbody th { font: 400 clamp(1.25rem, 2.2vw, 1.7rem)/1.15 var(--display); }
.board tbody th a { text-decoration-thickness: 2px; text-underline-offset: 4px; }
.board tbody th small { display: block; margin-top: 4px; font: 400 1rem/1.35 var(--body); }
.board td { font-size: clamp(1.1rem, 1.8vw, 1.35rem); font-weight: 500; white-space: nowrap; }
.board td.board__rent { font: 400 clamp(1.5rem, 3vw, 2.3rem)/1 var(--display); color: var(--accent); }
.board .none { font-size: 1rem; font-weight: 400; opacity: .55; }
.board td.board__soon { font: 400 clamp(1.25rem, 2.2vw, 1.7rem)/1.15 var(--display); color: var(--accent); }
.board__note { margin-top: 18px; max-width: 62ch; }

.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 0 32px; font-size: clamp(1.1rem, 1.6vw, 1.3rem); font-weight: 500; line-height: 1.25; }
.facts__ic { flex: none; width: 38px; height: 38px; color: var(--accent); transition: transform .25s cubic-bezier(.3, 1.4, .5, 1); }
.facts li {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0; border-bottom: 2px solid rgba(251, 248, 236, .3);
  transition: padding-left .2s, border-color .2s;
}
.facts li:hover { padding-left: 8px; border-color: var(--accent); }
.facts li:hover .facts__ic { transform: scale(1.18) rotate(-6deg); }
.board tbody tr > * { transition: padding-left .2s; }
.board tbody tr:hover > th { padding-left: 10px; }

.steps { counter-reset: step; font-size: clamp(1.15rem, 1.7vw, 1.35rem); max-width: 40em; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 62px 1fr; gap: 6px; align-items: center; padding: 10px 0; }
/* Each number sits in a small painted arch */
.steps li::before {
  content: counter(step); display: grid; place-items: center; width: 46px; height: 58px; padding-top: 6px;
  border-radius: 23px 23px 3px 3px; background: var(--door); color: var(--lime);
  font: 400 1.5rem/1 var(--display);
}

.faq details { border-bottom: 2px solid currentColor; }
.faq { interpolate-size: allow-keywords; }
.faq summary {
  display: flex; justify-content: space-between; gap: 16px; list-style: none;
  padding: 14px 0; font-weight: 700; font-size: 1.2rem; line-height: 1.35; cursor: pointer;
  transition: color .2s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
.faq summary::after { content: "+"; flex: none; font: 400 1.6rem/1 var(--display); transition: transform .3s; }
.faq details[open] summary::after { transform: rotate(135deg); }
.faq details::details-content {
  height: 0; overflow: hidden;
  transition: height .35s cubic-bezier(.3, .7, .3, 1), content-visibility .35s allow-discrete;
}
.faq details[open]::details-content { height: auto; }
.faq details p { padding-bottom: 18px; max-width: 62ch; }

.study {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 24px clamp(32px, 5vw, 80px);
  padding: clamp(48px, 7vw, 96px) var(--gutter);
  background: url("jaali.svg") 0 0 / 64px 64px, var(--door); color: var(--lime);
}
.study p { max-width: 58ch; }
.plans { display: flex; flex-wrap: wrap; gap: 8px 40px; margin: 22px 0 26px; font: 400 clamp(1.3rem, 2.4vw, 1.8rem)/1.2 var(--display); color: var(--brass); }
.plans b { font: 500 1rem/1 var(--body); display: block; color: var(--lime); margin-bottom: 4px; }
.study .btn { margin-top: 20px; }
.plans + .btn { margin-top: 0; }

.where { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 32px; align-items: start; }
.where__rows { margin: 0 0 22px; }
.where__rows dt { font-weight: 700; }
.where__rows dd { margin: 0 0 14px; line-height: 1.4; }
.where__map { width: 100%; aspect-ratio: 4 / 3; border: 3px solid var(--neel); border-radius: 50% 50% 0 0 / 22% 22% 0 0; display: block; }

.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.shots img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

.wall--more { padding-top: clamp(40px, 6vw, 72px); }
.wall--lost { padding-bottom: 0; }

/* ---------- Visit ---------- */
.visit { padding: clamp(48px, 7vw, 96px) var(--gutter); background: url("jaali.svg") 0 0 / 64px 64px, var(--neel); color: var(--lime); }
.visit h2 { font-size: clamp(2.6rem, 6vw, 5rem); margin-bottom: 32px; color: var(--haldi); }
.visit__cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px clamp(32px, 6vw, 96px); }
.visit__form { display: grid; gap: 16px; max-width: 480px; align-content: start; }
.visit__form label span { display: block; font-weight: 500; margin-bottom: 4px; }
.visit__form input, .visit__form select {
  width: 100%; padding: 11px 12px;
  background: var(--lime); color: var(--neel);
  border: 2px solid var(--lime); border-radius: 0;
  font: 500 1.05rem/1.3 var(--body);
  transition: border-color .2s, box-shadow .2s;
}
.visit__form input:focus, .visit__form select:focus { border-color: var(--haldi); box-shadow: 0 0 0 3px var(--haldi); }
.visit__form input:focus-visible, .visit__form select:focus-visible { outline: 3px solid var(--haldi); outline-offset: 2px; }
.visit__form .btn { justify-self: start; }
.visit__status { min-height: 1.6em; color: var(--brass); font-weight: 500; }
.visit__side h3 { font-size: 1.5rem; margin: 0 0 8px; color: var(--haldi); }
.visit__side ul + h3 { margin-top: 28px; }
.visit__side li { padding: 3px 0; }
.visit__locs li { padding: 7px 0; line-height: 1.4; }
.visit__locs b { display: block; }
.visit__locs a { display: inline-block; margin-left: 2px; color: var(--brass); }

/* ---------- Footer, with a block-printed border ---------- */
.foot { background: url("butti.svg") 0 0 / 96px 96px, var(--haldi); padding: 0 var(--gutter) 24px; position: relative; }
.foot::before {
  content: ""; display: block; height: 40px; margin: 0 calc(var(--gutter) * -1);
  background: url("band.svg") repeat-x left center / 80px 40px;
  background-position-x: var(--band, 0);
}
.foot__hindi { font: 400 clamp(5rem, 21vw, 18rem)/1.3 var(--display); text-align: center; }
.foot__cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px 48px; padding-top: 22px; border-top: 3px solid var(--neel); }
.foot__cols p { max-width: 36ch; }
.foot h2 { font-size: 1.4rem; margin-bottom: 8px; }
.foot li { padding: 2px 0; }
.foot__copy { margin-top: 28px; font-size: 1rem; }

.callbar { display: none; }

/* ---------- Narrow screens ---------- */
@media (max-width: 860px) {
  .wall__head, .band, .study, .where, .visit__cols, .inside { grid-template-columns: minmax(0, 1fr); }
  .street { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 0; background: none; padding: 0; }
  .street[data-count="3"] > li:last-child { grid-column: 1 / -1; justify-self: center; }
  .street > li { width: 100%; min-width: 0; background: var(--neel); }
  .street[data-count="3"] > li:last-child { width: 50%; }
  .street .gate__arch { width: 86%; margin: 0 auto; background: var(--haldi); }
  .street > li { background: linear-gradient(var(--haldi) calc(100% - var(--plate)), var(--neel) 0); }
  .gate__plate { justify-content: flex-start; padding: 12px 10px 8px; font-size: .95rem; }
  .gate__plate strong { font-size: 1.08rem; }
  .street { --plate: 128px; }
  .inside .gate { width: 62%; justify-self: center; }
  .top__logo img { height: 52px; }
  .inside__text { padding-bottom: 0; }
  .band__head { position: static; display: grid; grid-template-columns: minmax(0, 1fr) 112px; gap: 12px; align-items: center; }
  .art { width: 112px; margin-top: 0; }
  .wall { padding-top: 66px; }
  .board th, .board td { padding-right: 8px; }
  .board td { white-space: normal; }
  .foot__cols { grid-template-columns: 1fr; }
  body { padding-bottom: 54px; }
  .callbar {
    display: grid; grid-template-columns: 1fr 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: var(--neel); color: var(--lime); font-weight: 700; text-align: center;
  }
  .callbar a { padding: 13px 8px; text-decoration: none; }
  .callbar a + a { background: var(--haldi); color: var(--neel); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Motion. Everything here needs html.js, which is left off for reduced-motion visitors. ---------- */
@keyframes flicker {
  0% { transform: scale(1, 1); }
  40% { transform: scale(.92, 1.08); }
  70% { transform: scale(1.05, .95); }
  100% { transform: scale(.96, 1.12); }
}
@keyframes word-up { from { transform: translateY(110%); } to { transform: none; } }
@keyframes settle { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes gate-stand { from { opacity: 0; transform: translateY(46px); } to { opacity: 1; transform: none; } }
@keyframes wave-l { 50% { transform: rotateY(30deg); } }
@keyframes wave-r { 50% { transform: rotateY(-30deg); } }
@keyframes swing-l { from { transform: rotateY(0); } }
@keyframes swing-r { from { transform: rotateY(0); } }
@keyframes breathe { 50% { opacity: .78; } }
@keyframes stamp {
  0% { opacity: 0; transform: scale(1.16) rotate(-1.2deg); }
  65% { opacity: 1; transform: scale(.985); }
  100% { opacity: 1; transform: none; }
}

/* Headings rise out of a mask, word by word */
.w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .16em; margin-bottom: -.16em; }
.w > span { display: inline-block; }
.js .w > span { animation: word-up .75s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--intro, 0s) + .1s + var(--i) * 70ms); }
.js .wall__head p { animation: settle .7s calc(var(--intro, 0s) + .55s) ease-out backwards; }
.js .inside__text > :not(h1) { animation: settle .7s calc(var(--intro, 0s) + .6s) ease-out backwards; }
.js .inside__text > .crumbs { animation-delay: calc(var(--intro, 0s) + .05s); }
.js .inside__cta { animation-delay: calc(var(--intro, 0s) + .8s); }

/* The street: gates stand up one by one, then a wave of doors opens and closes */
.street > li:nth-child(1) { --n: 0; }
.street > li:nth-child(2) { --n: 1; }
.street > li:nth-child(3) { --n: 2; }
.street > li:nth-child(4) { --n: 3; }
.js .wall:not(.wall--more) .street .gate__arch, .street.is-in .gate__arch { animation: gate-stand .7s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--intro, 0s) + .3s + var(--n) * 110ms); }
.js .wall:not(.wall--more) .street .gate__leaf--l, .street.is-in .gate__leaf--l { animation: wave-l 1.15s ease-in-out backwards; animation-delay: calc(var(--intro, 0s) + 1.05s + var(--n) * 170ms); }
.js .wall:not(.wall--more) .street .gate__leaf--r, .street.is-in .gate__leaf--r { animation: wave-r 1.15s ease-in-out backwards; animation-delay: calc(var(--intro, 0s) + 1.05s + var(--n) * 170ms); }
.street.is-pending .gate__arch { opacity: 0; }

/* The copy used for the walk-through must not replay any of that */
.gate-walk__street .gate__arch, .gate-walk__street .gate__leaf { animation: none !important; }

/* On a page reached directly, its gate swings open. Walked through it? It is already open. */
.js:not(.gate-arrive) .gate--open .gate__leaf--l { animation: swing-l 1.3s calc(var(--intro, 0s) + .45s) cubic-bezier(.45, .05, .2, 1) backwards; }
.js:not(.gate-arrive) .gate--open .gate__leaf--r { animation: swing-r 1.3s calc(var(--intro, 0s) + .45s) cubic-bezier(.45, .05, .2, 1) backwards; }
.js .gate--open .gate__light { animation: breathe 4s ease-in-out infinite; }
.inside .gate { transform: translateY(var(--drift, 0)); }

/* Scroll reveals: tagged by site.js, so nothing stays hidden if the script fails */
.r--stamp { opacity: 0; }
.r--stamp.is-in { opacity: 1; animation: stamp .55s cubic-bezier(.3, .7, .3, 1) backwards; }
.r--rise { opacity: 0; transform: translateY(22px); }
.r--rise.is-in {
  opacity: 1; transform: none;
  transition: opacity .55s ease-out, transform .55s cubic-bezier(.2, .8, .2, 1);
  transition-delay: calc(var(--i, 0) * 60ms);
}
/* Starts as a sliver, not zero width: a fully clipped element never reports as on screen. */
.r--part { clip-path: inset(0 47%); }
.r--part.is-in { clip-path: inset(0 0); transition: clip-path .95s cubic-bezier(.65, 0, .25, 1); }

/* Moving between pages: two doors close, then open on the next page */
.wipe { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
.wipe::before, .wipe::after, html.wipe-arrive::before, html.wipe-arrive::after {
  content: ""; position: fixed; top: 0; bottom: 0; width: 50.5%; z-index: 60; pointer-events: none;
  background: var(--neel);
}
.wipe::before, html.wipe-arrive::before { left: 0; border-right: 3px solid var(--haldi); }
.wipe::after, html.wipe-arrive::after { right: 0; border-left: 3px solid var(--haldi); }
.wipe::before { animation: wipe-shut-l .34s cubic-bezier(.65, 0, .35, 1) both; }
.wipe::after { animation: wipe-shut-r .34s cubic-bezier(.65, 0, .35, 1) both; }
html.wipe-arrive::before { animation: wipe-open-l .6s .05s cubic-bezier(.65, 0, .35, 1) both; }
html.wipe-arrive::after { animation: wipe-open-r .6s .05s cubic-bezier(.65, 0, .35, 1) both; }
@keyframes wipe-shut-l { from { transform: translateX(-101%); } }
@keyframes wipe-shut-r { from { transform: translateX(101%); } }
@keyframes wipe-open-l { to { transform: translateX(-101%); visibility: hidden; } }
@keyframes wipe-open-r { to { transform: translateX(101%); visibility: hidden; } }

/* Changing hero lines */
@keyframes word-up-again { from { transform: translateY(110%); } to { transform: none; } }
@keyframes word-away { to { transform: translateY(-110%); } }
@keyframes settle-again { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes fade-away { to { opacity: 0; } }
.js .rotor__line.is-next .w > span { animation: word-up-again .7s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(.12s + var(--i) * 55ms); }
.js .rotor__line.is-out .w > span { animation: word-away .45s cubic-bezier(.6, 0, .8, .3) forwards; animation-delay: calc(var(--i) * 25ms); }
.js .rotor__sub.is-next { animation: settle-again .6s .25s ease-out backwards; }
.js .rotor__sub.is-out { animation: fade-away .3s ease-in forwards; }

/* Loading screen, first page of a visit only: the logo on two big doors, which swing open.
   It is all CSS, so it always finishes by itself, even if a script fails. */
.intro { display: none; }
html.intro-on { --intro: .75s; }
html.intro-on .intro {
  display: block; position: fixed; inset: 0; z-index: 70; perspective: 1500px;
  animation: intro-gone .01s 1.4s forwards;
}
.intro__leaf {
  position: absolute; top: 0; bottom: 0; width: 50.2%;
  background:
    radial-gradient(circle, var(--brass) 4px, transparent 4.6px) 0 0 / 92px 92px,
    linear-gradient(90deg, #6E140D 0 8px, transparent 8px calc(100% - 8px), #6E140D calc(100% - 8px)),
    #A8281E;
}
.intro__leaf--l { left: 0; transform-origin: left center; animation: intro-swing-l .75s .6s cubic-bezier(.55, 0, .3, 1) forwards; }
.intro__leaf--r { right: 0; transform-origin: right center; animation: intro-swing-r .75s .6s cubic-bezier(.55, 0, .3, 1) forwards; }
.intro__logo {
  position: absolute; left: 50%; top: 50%; width: min(64vw, 340px); padding: 26px 22px 12px;
  background: var(--lime); border: 3px solid var(--neel); border-radius: 170px 170px 0 0;
  transform: translate(-50%, -50%);
  animation: intro-logo-in .4s cubic-bezier(.3, .7, .3, 1) backwards, intro-logo-out .25s .52s ease-in forwards;
}
.intro__logo img { display: block; width: 100%; height: auto; }
@keyframes intro-swing-l { to { transform: rotateY(88deg); } }
@keyframes intro-swing-r { to { transform: rotateY(-88deg); } }
@keyframes intro-logo-in { from { opacity: 0; transform: translate(-50%, -50%) scale(1.14) rotate(-1deg); } }
@keyframes intro-logo-out { to { opacity: 0; transform: translate(-50%, -50%) scale(.94); } }
@keyframes intro-gone { to { visibility: hidden; } }

.thanks__cta { padding: 0 var(--gutter) clamp(22px, 4vh, 40px); }
