/* RIWAQ · the house is the picture; the page is a few ivory cards laid over it, like notes left on a table.
   Ivory paper, ink the brown of cedar, one accent: the green of the glazed roof tiles.
   Aref Ruqaa (the ruq'ah hand) for Arabic titles, IBM Plex Sans Arabic to read; Cormorant Garamond and Inter in English. */
:root {
  --paper: #f3ecdd; --ink: #2b1d12; --soft: rgba(43,29,18,.68); --line: rgba(43,29,18,.18); --green: #1f6b4f;
  --show: 'Aref Ruqaa', serif; --read: 'IBM Plex Sans Arabic', sans-serif;
  --gut: clamp(16px, 3.4vw, 54px); --ease: cubic-bezier(.2,.7,.2,1);
}
html[lang="en"] { --show: 'Cormorant Garamond', serif; --read: 'Inter', sans-serif; }
* { box-sizing: border-box; margin: 0; }
html { background: #1a1410; color: var(--ink); -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
body { font-family: var(--read); font-size: 16px; line-height: 1.75; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
html[lang="en"] body { line-height: 1.6; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

#riad { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100lvh; z-index: 0; }
main { position: relative; z-index: 1; }

.loader { position: fixed; inset: 0; z-index: 90; background: var(--paper); display: grid; place-content: center; justify-items: center; gap: 10px; transition: opacity 1s ease .2s, visibility 0s 1.3s; }
.loader b { font: 700 72px 'Aref Ruqaa', serif; line-height: 1.3; color: var(--green); }
.loader span { font-size: 14px; color: var(--soft); }
.loader i { width: 150px; height: 1px; margin-top: 8px; background: var(--line); position: relative; overflow: hidden; }
.loader i::after { content: ''; position: absolute; inset: 0; background: var(--green); animation: load 1.4s var(--ease) infinite; }
@keyframes load { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
.loader.done { opacity: 0; visibility: hidden; }
.loader.failed i { display: none; }

/* the bar, and the steps of the walk down the far edge */
.bar { position: fixed; inset: 0 0 auto; z-index: 40; display: flex; align-items: center; justify-content: space-between; padding: 14px var(--gut); color: #fff; background: linear-gradient(rgba(20,14,8,.55), transparent); }
.logo { font: 700 30px 'Aref Ruqaa', serif; line-height: 1.2; }
.bar-r { display: flex; align-items: center; gap: 26px; font-size: 15px; }
.ln { opacity: .88; transition: opacity .25s; } .ln:hover { opacity: 1; }
.lang { font: 500 13px 'Inter', sans-serif; opacity: .88; } html[lang="en"] .lang { font: 500 17px 'IBM Plex Sans Arabic', sans-serif; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 13px 28px; border-radius: 3px; background: var(--green); color: #fff; border: 1px solid var(--green); font: 500 15.5px var(--read); transition: background .25s, color .25s, border-color .25s, transform .3s var(--ease); }
.btn:hover { background: #17533d; border-color: #17533d; transform: translateY(-1px); }
.btn.ghost { background: transparent; color: inherit; border-color: currentColor; } .btn.ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.sm { padding: 8px 18px; font-size: 14px; }
.steps { position: fixed; z-index: 30; top: 50%; inset-inline-end: 18px; translate: 0 -50%; display: grid; gap: 11px; justify-items: end; color: #fff; font-size: 12.5px; text-shadow: 0 1px 8px rgba(0,0,0,.6); }
.steps a { display: flex; align-items: center; gap: 10px; opacity: .62; transition: opacity .3s; }
.steps a::after { content: ''; width: 7px; height: 7px; border: 1px solid #fff; transform: rotate(45deg); transition: background .3s; }
.steps a:hover, .steps a.on { opacity: 1; } .steps a.on::after { background: #fff; }
/* the house can be looked round: a hint, until the visitor has done it once */
main { cursor: grab; } html.dragging main { cursor: grabbing; } .card, .hero { cursor: auto; }
.look { position: fixed; z-index: 30; bottom: 20px; left: 50%; translate: -50% 0; display: flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 30px; background: rgba(20,14,8,.5); color: #fff; font-size: 12.5px; pointer-events: none; opacity: 0; transition: opacity .6s; }
.look i { font-style: normal; }
html.ready:not(.looked):not([data-at="gate"]):not([data-at="book"]) .look { opacity: 1; }

/* hot spots: a ring on a thing in the house; a door's says what it does */
.spots { position: fixed; inset: 0; z-index: 3; pointer-events: none; overflow: hidden; }
.spot { position: absolute; left: 0; top: 0; margin: -17px; height: 34px; min-width: 34px; display: none; align-items: center; gap: 8px; padding: 0; border-radius: 30px; pointer-events: auto; color: #fff; font-size: 13.5px; cursor: pointer; }
.spot.on { display: flex; }
.spot i { width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid #fff; background: rgba(20,14,8,.35); position: relative; flex: none; animation: ring 2.4s ease-out infinite; }
.spot i::after { content: ''; position: absolute; inset: 11px; border-radius: 50%; background: #fff; }
.spot:hover i { background: var(--green); border-color: var(--green); }
.spot.opens { background: rgba(20,14,8,.6); padding-inline-end: 14px; } .spot.opens i { border-color: transparent; background: var(--green); }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(255,255,255,.6); } 100% { box-shadow: 0 0 0 14px rgba(255,255,255,0); } }
.tip { position: fixed; z-index: 45; width: 300px; padding: 16px 18px 18px; background: var(--paper); border: 1px solid rgba(43,29,18,.3); box-shadow: 0 24px 50px -22px rgba(20,12,4,.8); display: grid; gap: 6px; }
.tip[hidden] { display: none; }
.tip b { font: 700 22px/1.5 var(--show); color: var(--green); } html[lang="en"] .tip b { font-weight: 600; font-size: 24px; line-height: 1.2; }
.tip p { font-size: 14.5px; color: var(--soft); }

/* the visitor's tools: the plan, and three buttons under it */
.tools { position: fixed; z-index: 35; bottom: 18px; inset-inline-start: 18px; display: grid; gap: 8px; width: 168px; direction: ltr; }
.map { width: 100%; background: rgba(243,236,221,.9); border: 1px solid rgba(43,29,18,.35); }
.map .hall { fill: #e4d9c3; stroke: var(--ink); stroke-width: .25; } .map .court { fill: #f6f0e2; stroke: rgba(43,29,18,.4); stroke-width: .15; }
.map .room { fill: #e4d9c3; stroke: var(--ink); stroke-width: .25; } .map .basin { fill: #7fc4bd; stroke: #1f6b4f; stroke-width: .2; } .map .col { fill: var(--ink); }
.map .hit { fill: transparent; } .map .stop { fill: #fff; stroke: var(--ink); stroke-width: .2; } .map .stop.on { fill: var(--green); } .map a:hover .stop { fill: var(--green); }
.map .me { fill: #c2452d; stroke: #fff; stroke-width: .25; } .map .sight { fill: rgba(194,69,45,.3); }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.keys button { display: grid; justify-items: center; gap: 1px; padding: 6px 2px 5px; background: rgba(243,236,221,.92); border: 1px solid rgba(43,29,18,.35); font-size: 11px; color: var(--ink); line-height: 1.3; transition: background .25s, color .25s; }
.keys button i { font-style: normal; font-size: 16px; line-height: 1.1; }
.keys button:hover { background: #fff; } .keys button[aria-pressed="true"] { background: var(--green); color: #fff; border-color: var(--green); }
.free-help { position: fixed; z-index: 30; top: 70px; left: 50%; translate: -50% 0; padding: 8px 16px; border-radius: 30px; background: rgba(20,14,8,.6); color: #fff; font-size: 13px; white-space: nowrap; pointer-events: none; opacity: 0; transition: opacity .5s; }
html.free .free-help { opacity: 1; }
/* walking freely: the page's cards and the walk's hints step aside */
html.free .card, html.free .hero, html.free .cue, html.free .steps, html.free .look { opacity: 0 !important; visibility: hidden !important; pointer-events: none !important; }
html.free, html.free body { overflow: hidden; }

/* a section holds the screen while the camera walks */
.s { position: relative; height: 300vh; } .s.long { height: 400vh; }
#gate { height: 220vh; } #book { height: 240vh; }
.pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: flex; align-items: center; padding: 80px var(--gut) 40px; pointer-events: none; }
.kind { display: inline-flex; align-items: center; gap: 10px; font-size: 14px; color: var(--green); }
.kind::before { content: ''; width: 8px; height: 8px; background: currentColor; transform: rotate(45deg); }
.title { font: 700 clamp(30px, 3.5vw, 54px) / 1.45 var(--show); text-wrap: balance; }
html[lang="en"] .title { font-weight: 600; line-height: 1.08; letter-spacing: -.01em; font-size: clamp(32px, 3.9vw, 60px); }
.text { color: var(--soft); max-width: 34em; }

/* the gate: the name, in the dark of the passage */
.hero { width: min(42vw, 600px); display: grid; gap: 8px; justify-items: center; text-align: center; color: #fff; text-shadow: 0 2px 30px rgba(0,0,0,.75); pointer-events: auto; transition: opacity .6s, transform .8s var(--ease); }
.hero .kind { color: #e9dcc0; }
.word { font: 700 clamp(96px, 13.5vw, 220px) / 1.25 'Aref Ruqaa', serif; margin-top: -.12em; }
.line { font: 400 clamp(22px, 2.4vw, 38px) / 1.5 var(--show); margin-top: -.6em; }
html[lang="en"] .line { font-style: italic; font-weight: 500; margin-top: -.1em; }
.acts { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 22px; text-shadow: none; }
.hero .btn.ghost:hover { background: #fff; color: var(--ink); border-color: #fff; }
.cue { position: absolute; bottom: 22px; left: 50%; translate: -50% 0; display: grid; justify-items: center; gap: 8px; color: #fff; font-size: 13px; text-shadow: 0 1px 8px rgba(0,0,0,.7); transition: opacity .5s; }
.cue i { width: 1px; height: 30px; background: linear-gradient(#fff, transparent); animation: drip 1.8s ease-in-out infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
.s:not(.on) .hero, .s:not(.on) .cue { opacity: 0; transform: translateY(-20px); pointer-events: none; }
html:not(.ready) .hero { opacity: 0; transform: translateY(20px); }

/* a card of ivory paper, on the side the reading starts from */
.card { width: min(440px, 100%); display: grid; gap: 16px; justify-items: start; padding: 30px 32px 34px; background: var(--paper); border: 1px solid rgba(43,29,18,.25); outline: 1px solid rgba(43,29,18,.25); outline-offset: -7px; box-shadow: 0 30px 70px -30px rgba(20,12,4,.7); pointer-events: auto;
  opacity: 0; transform: translateY(30px); transition: opacity .5s, transform .7s var(--ease), visibility 0s .5s; visibility: hidden; }
.s.on .card { opacity: 1; transform: none; visibility: visible; transition: opacity .7s, transform .9s var(--ease), visibility 0s; }
.card.wide { width: min(520px, 100%); }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); width: 100%; border-top: 1px solid var(--line); padding-top: 16px; }
.facts li { display: grid; } .facts li + li { border-inline-start: 1px solid var(--line); padding-inline-start: 16px; }
.facts b { font: 700 34px/1.3 var(--show); color: var(--green); } html[lang="en"] .facts b { font-weight: 600; font-size: 38px; line-height: 1.1; }
.facts span { font-size: 13.5px; color: var(--soft); }
.suites { width: 100%; border-top: 1px solid var(--line); }
.suites li { display: grid; gap: 2px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.suites b { font: 700 22px/1.5 var(--show); } html[lang="en"] .suites b { font-weight: 600; font-size: 24px; line-height: 1.2; }
.suites p { font-size: 14.5px; color: var(--soft); } .suites .spec { font-size: 13px; }
.price { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; color: var(--ink) !important; }
.price span { font: 500 19px 'Inter', sans-serif; direction: ltr; } .price i { font: 400 13px var(--read); color: var(--soft); }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs button { padding: 6px 12px; border: 1px solid var(--line); font-size: 13.5px; transition: background .25s, color .25s, border-color .25s; }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ticks { width: 100%; border-top: 1px solid var(--line); }
.ticks li { display: flex; gap: 12px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 15px; color: var(--soft); }
.ticks li::before { content: ''; flex: none; width: 7px; height: 7px; background: var(--green); transform: rotate(45deg) translateY(-2px); }
.day { width: 100%; border-top: 1px solid var(--line); }
.day li { display: grid; grid-template-columns: 76px 1fr; gap: 14px; padding: 13px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
.day b { font: 700 19px/1.5 var(--show); color: var(--green); } html[lang="en"] .day b { font-weight: 600; font-size: 21px; }
.day p { font-size: 14.5px; color: var(--soft); }

/* the booking: over the roofs, in the middle */
#book .pin { justify-content: center; }
.book { width: min(520px, 100%); }
.pick { display: grid; gap: 8px; width: 100%; }
.pick button { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border: 1px solid var(--line); text-align: start; transition: border-color .25s, background .25s; }
.pick b { font: 700 19px/1.5 var(--show); } html[lang="en"] .pick b { font-weight: 600; font-size: 21px; }
.pick span { font: 500 15px 'Inter', sans-serif; color: var(--soft); }
.pick button[aria-checked="true"] { border-color: var(--green); background: rgba(31,107,79,.09); box-shadow: inset 0 0 0 1px var(--green); }
.dates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%; }
.dates label { display: grid; gap: 4px; font-size: 13px; color: var(--soft); }
.dates input { width: 100%; padding: 10px 12px; border: 1px solid var(--line); background: #fbf7ee; font: 500 15px 'Inter', sans-serif; color: var(--ink); direction: ltr; }
.dates input:focus { outline: 2px solid var(--green); outline-offset: -1px; }
.total { display: flex; align-items: center; gap: 14px; width: 100%; padding-top: 14px; border-top: 1px solid var(--line); }
.total span { margin-inline-end: auto; color: var(--soft); } .total b { font: 500 28px 'Inter', sans-serif; direction: ltr; }
.btn.off { background: #9aa39d; border-color: #9aa39d; cursor: not-allowed; transform: none; }
.book .btn { width: 100%; }
.note { font-size: 12px; color: var(--soft); line-height: 1.6; }

/* tall screens: the house above, the card below */
@media (max-aspect-ratio: 1/1) {
  .ln, .steps { display: none; } .bar-r { gap: 14px; } .look { bottom: auto; top: 64px; font-size: 11.5px; }
  .ticks li { padding: 8px 0; font-size: 14px; }
  .tools { width: 96px; bottom: auto; top: 62px; inset-inline-start: 10px; gap: 5px; } .keys { grid-template-columns: 1fr; gap: 4px; } .keys button { grid-auto-flow: column; justify-content: center; gap: 6px; padding: 5px; }
  .free-help { top: auto; bottom: 16px; font-size: 11.5px; white-space: normal; width: 86vw; text-align: center; } .tip { width: 270px; }
  .look { inset-inline-start: auto; left: auto; right: 10px; translate: none; }
  .pin { align-items: flex-end; padding: 70px 12px 14px; }
  #gate .pin { align-items: flex-end; padding-bottom: 12vh; } .hero { width: 100%; }
  .card, .card.wide, .book { width: 100%; padding: 20px 20px 22px; gap: 10px; }
  .title { font-size: 26px; } html[lang="en"] .title { font-size: 28px; }
  .text { font-size: 14.5px; line-height: 1.65; } .facts b { font-size: 26px; }
  .suites li { padding: 9px 0; } .suites .spec { display: none; } .suites b { font-size: 19px; } .price { margin-top: 3px; }
  .day li { grid-template-columns: 62px 1fr; padding: 9px 0; }
  .pick button { padding: 9px 12px; } .note { font-size: 11px; }
  .word { font-size: 34vw; }
}
@media (prefers-reduced-motion: reduce) { .cue i, .loader i::after { animation: none; } .card, .hero { transition-duration: .01s; } }
