/* Dar Zellij (a fictional riad, a Repliwave demo). Night indigo, terracotta, zellige teal, saffron; Instrument Serif for display, Geist for reading.
   Logical properties everywhere so Arabic (right to left) mirrors by itself. */
:root {
  --indigo: #08101f; --ink: #101a33; --ivory: #f4ead7; --cream: #fbf5e8; --terra: #b4532a; --teal: #0f6b6b; --saff: #e3a736;
  --night-text: #f6ecd8; --dark-text: #2a1c14; --muted: rgba(246, 236, 216, .72);
  --display: 'Instrument Serif', 'Times New Roman', serif;
  --sans: 'Geist', system-ui, sans-serif;
  --ar: 'Noto Naskh Arabic', 'Segoe UI', Tahoma, sans-serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --gut: clamp(1.25rem, 6vw, 6rem);
  --zel: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='24' viewBox='0 0 48 24'%3E%3Crect width='48' height='24' fill='%23f4ead7'/%3E%3Crect x='6' y='2' width='20' height='20' fill='%23b4532a'/%3E%3Crect x='6' y='2' width='20' height='20' fill='%230f6b6b' transform='rotate(45 16 12)'/%3E%3Ccircle cx='16' cy='12' r='3.2' fill='%23e3a736'/%3E%3Crect x='30' y='8' width='8' height='8' fill='%23101a33' transform='rotate(45 34 12)'/%3E%3C/svg%3E");
}
* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; -webkit-text-size-adjust: 100%; }
body { background: var(--indigo); color: var(--night-text); font: 300 1rem/1.7 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: clip; }
[dir='rtl'] body, [dir='rtl'] input, [dir='rtl'] textarea, [dir='rtl'] button { font-family: var(--ar); }
a { color: inherit; }
::selection { background: var(--saff); color: var(--indigo); }
:focus-visible { outline: 2px solid var(--saff); outline-offset: 3px; border-radius: 3px; }
.skip { position: absolute; inset-inline-start: -999px; top: .5rem; z-index: 50; background: var(--saff); color: var(--indigo); padding: .5rem .9rem; }
.skip:focus { inset-inline-start: .5rem; }

#scene { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; background: var(--indigo); }
.veil { position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 40%, transparent 48%, rgba(4, 8, 20, .5) 100%), linear-gradient(180deg, rgba(4, 8, 20, .42), transparent 20%, transparent 55%, rgba(4, 8, 20, .62)); }

/* header */
.bar { position: fixed; inset-inline: 0; top: 0; z-index: 20; display: flex; align-items: center; gap: 1.5rem; padding: max(1rem, env(safe-area-inset-top)) var(--gut) 1rem; transition: background-color .5s var(--ease), box-shadow .5s var(--ease); }
body.on-paper .bar { background: rgba(8, 16, 31, .86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 rgba(227, 167, 54, .35); }
.brand { font: 400 1.9rem/1 var(--display); color: #fff; text-decoration: none; letter-spacing: .01em; }
[dir='rtl'] .brand { font-family: var(--ar); font-weight: 700; font-size: 1.5rem; }
.menu { display: flex; gap: 2rem; margin-inline-start: auto; }
.menu a { font-size: .9rem; letter-spacing: .03em; text-decoration: none; color: var(--muted); padding: .4rem 0; transition: color .3s; }
.menu a:hover { color: #fff; }
.tools { display: flex; align-items: center; gap: 1rem; }
.langs { display: flex; gap: .15rem; }
.langs button { background: none; border: 0; color: var(--muted); font: 400 .8rem/1 var(--sans); letter-spacing: .08em; padding: .55rem .6rem; cursor: pointer; min-width: 2.4rem; min-height: 2.4rem; border-radius: 99px; }
.langs button[aria-pressed='true'] { color: var(--indigo); background: var(--saff); }
.badge { font-size: .72rem; letter-spacing: .08em; text-decoration: none; border: 1px solid rgba(246, 236, 216, .35); border-radius: 99px; padding: .45rem .9rem; color: var(--muted); white-space: nowrap; transition: color .3s, border-color .3s; }
.badge:hover { color: #fff; border-color: var(--saff); }

/* the story: the camera walks through the courtyard while you scroll */
.story { position: relative; height: 540vh; z-index: 2; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.hero { position: absolute; inset-inline: 0; bottom: 11svh; padding-inline: var(--gut); max-width: 62rem; opacity: var(--hero, 1); transform: translateY(calc((1 - var(--hero, 1)) * -34px)); }
.kicker { font: 400 .78rem/1.4 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--saff); margin-bottom: 1rem; }
[dir='rtl'] .kicker { letter-spacing: 0; text-transform: none; font-size: .95rem; }
.hero h1 { font: 400 clamp(4rem, 13vw, 10rem)/.9 var(--display); letter-spacing: -.02em; color: #fff; text-shadow: 0 4px 60px rgba(0, 0, 0, .55); text-wrap: balance; }
[dir='rtl'] .hero h1 { font-family: var(--ar); font-weight: 700; letter-spacing: 0; line-height: 1.15; }
.sub { font: 300 clamp(1.1rem, 2vw, 1.5rem)/1.5 var(--sans); color: rgba(246, 236, 216, .92); max-width: 30ch; margin-top: 1.1rem; text-shadow: 0 2px 24px rgba(0, 0, 0, .6); text-wrap: balance; }
.ctas { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.cta { display: inline-flex; align-items: center; justify-content: center; gap: .6rem; font: 500 .95rem/1 var(--sans); letter-spacing: .03em; text-decoration: none; color: #fff; background: rgba(8, 16, 31, .35); border: 1px solid rgba(246, 236, 216, .55); border-radius: 99px; padding: 1rem 1.7rem; min-height: 3rem; cursor: pointer; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: background-color .4s var(--ease), color .4s var(--ease), transform .4s var(--ease), border-color .4s; }
.cta:hover { background: #fff; color: var(--indigo); transform: translateY(-2px); }
.cta.primary { background: var(--terra); border-color: var(--terra); color: #fff; backdrop-filter: none; }
.cta.primary:hover { background: var(--saff); border-color: var(--saff); color: var(--indigo); }
.cta.gold { background: var(--saff); border-color: var(--saff); color: var(--indigo); backdrop-filter: none; }
.cta.gold:hover { background: #fff; border-color: #fff; }
.caps { position: absolute; inset-inline: 0; bottom: 14svh; padding-inline: var(--gut); height: 12rem; pointer-events: none; }
.cap { position: absolute; inset-inline-start: var(--gut); bottom: 0; max-width: 18ch; font: 400 clamp(2rem, 5.2vw, 4.4rem)/1.04 var(--display); color: #fff; text-shadow: 0 4px 50px rgba(0, 0, 0, .65); opacity: 0; transform: translateY(24px); filter: blur(5px); transition: opacity 1s var(--ease), transform 1.2s var(--ease), filter 1s var(--ease); text-wrap: balance; }
[dir='rtl'] .cap { font-family: var(--ar); font-weight: 700; line-height: 1.3; font-size: clamp(1.7rem, 4.4vw, 3.6rem); }
.cap.on { opacity: 1; transform: none; filter: none; }
.cue { position: absolute; inset-inline-start: 50%; transform: translateX(-50%); bottom: max(1.2rem, env(safe-area-inset-bottom)); display: grid; justify-items: center; gap: .5rem; font: 400 .7rem/1 var(--sans); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); text-decoration: none; opacity: var(--hero, 1); }
[dir='rtl'] .cue { transform: translateX(50%); letter-spacing: 0; text-transform: none; }
.cue i { width: 1px; height: 2.4rem; background: linear-gradient(var(--saff), transparent); animation: cue 2.2s ease-in-out infinite; }
@keyframes cue { 0%, 100% { transform: scaleY(.4); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } }

/* after the walk: paper */
.paper { position: relative; z-index: 3; background: var(--ivory); color: var(--dark-text); }
.paper::before { content: ''; position: absolute; inset-inline: 0; top: -1.5rem; height: 1.5rem; background: var(--zel) repeat-x 0 0 / 48px 24px; }
.wrap { max-width: 78rem; margin-inline: auto; padding-inline: var(--gut); }
.narrow { max-width: 52rem; }
.sec { padding-block: clamp(4.5rem, 10vw, 9rem) 0; }
.sec:last-of-type { padding-bottom: clamp(4.5rem, 10vw, 9rem); }
h2 { font: 400 clamp(2.6rem, 6.4vw, 5rem)/.98 var(--display); letter-spacing: -.015em; color: var(--ink); max-width: 16ch; text-wrap: balance; }
[dir='rtl'] h2 { font-family: var(--ar); font-weight: 700; letter-spacing: 0; line-height: 1.25; }
.lead { font-size: clamp(1.05rem, 1.5vw, 1.25rem); line-height: 1.7; color: rgba(42, 28, 20, .78); max-width: 52ch; margin-top: 1.4rem; text-wrap: pretty; }

.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(21rem, 100%), 1fr)); gap: 1.6rem; margin-top: 3rem; }
.room { background: var(--cream); border: 1px solid rgba(42, 28, 20, .12); border-radius: .35rem; overflow: hidden; display: grid; grid-template-rows: auto 1fr; transition: transform .6s var(--ease), box-shadow .6s var(--ease); }
.room:hover { transform: translateY(-6px); box-shadow: 0 26px 50px -24px rgba(16, 26, 51, .45); }
.art { height: 9.5rem; display: block; width: 100%; }
.rb { padding: 1.3rem 1.4rem 1.5rem; display: grid; gap: .35rem; align-content: start; }
.rb h3 { font: 400 2.1rem/1.05 var(--display); color: var(--ink); }
[dir='rtl'] .rb h3 { font-family: var(--ar); font-weight: 700; font-size: 1.6rem; }
.meta { font-size: .88rem; color: rgba(42, 28, 20, .66); }
.price { font: 500 1.05rem/1.4 var(--sans); color: var(--terra); margin-top: .4rem; }
.link { justify-self: start; margin-top: .7rem; background: none; border: 0; padding: .3rem 0; font: 500 .9rem/1.3 var(--sans); color: var(--ink); cursor: pointer; text-decoration: underline; text-decoration-color: var(--saff); text-decoration-thickness: 2px; text-underline-offset: .35em; transition: color .3s, text-underline-offset .4s var(--ease); }
.link:hover { color: var(--terra); text-underline-offset: .55em; }

.sec-day { background: var(--cream); margin-top: clamp(4.5rem, 10vw, 9rem); padding-block: clamp(4rem, 8vw, 7rem); }
.day { list-style: none; padding: 0; margin-top: 3rem; border-top: 1px solid rgba(42, 28, 20, .2); }
.day li { display: grid; grid-template-columns: minmax(4.5rem, 7rem) minmax(11rem, 18rem) 1fr; gap: 1rem 2rem; align-items: baseline; padding: 1.5rem 0; border-bottom: 1px solid rgba(42, 28, 20, .12); }
.day time { font: 400 1.05rem/1 'Geist Mono', ui-monospace, monospace; color: var(--teal); letter-spacing: .06em; }
.day h3 { font: 400 1.9rem/1.1 var(--display); color: var(--ink); }
[dir='rtl'] .day h3 { font-family: var(--ar); font-weight: 700; font-size: 1.45rem; }
.day p { color: rgba(42, 28, 20, .74); max-width: 44ch; }

.sec-ask { background: linear-gradient(140deg, #0a2f3a, var(--teal)); color: var(--night-text); margin-top: 0; padding-block: clamp(4.5rem, 9vw, 8rem); }
.sec-ask h2 { color: #fff; }
.sec-ask .lead { color: rgba(246, 236, 216, .85); }
.chips { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 2.4rem; }
.chips button { background: rgba(255, 255, 255, .08); color: #fff; border: 1px solid rgba(246, 236, 216, .45); border-radius: 99px; padding: .85rem 1.3rem; min-height: 2.9rem; font: 400 .98rem/1.2 var(--sans); cursor: pointer; transition: background-color .35s, color .35s, transform .35s var(--ease); }
.chips button:hover { background: var(--saff); border-color: var(--saff); color: var(--indigo); transform: translateY(-2px); }

.form { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem 2rem; margin-top: 2.6rem; }
.form label { display: grid; gap: .3rem; font-size: .82rem; letter-spacing: .04em; color: rgba(42, 28, 20, .7); }
.form .wide, .form .note, .form button { grid-column: 1 / -1; }
.form input, .form textarea { font: 400 1.25rem/1.4 var(--display); color: var(--ink); background: none; border: 0; border-bottom: 1px solid rgba(42, 28, 20, .4); border-radius: 0; padding: .55rem 0 .6rem; outline: 0; width: 100%; resize: vertical; }
[dir='rtl'] .form input, [dir='rtl'] .form textarea { font-family: var(--ar); font-size: 1.05rem; }
.form input:focus, .form textarea:focus { border-color: var(--terra); }
.form button { justify-self: start; }
.form .cta { color: #fff; }
.note { font-size: .88rem; color: rgba(42, 28, 20, .66); }
.note.ok { color: var(--teal); font-weight: 500; }

.foot { background: var(--ink); color: rgba(246, 236, 216, .78); padding-block: 3rem calc(3rem + env(safe-area-inset-bottom)); }
.foot .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.4rem; }
.foot-note { font-size: .9rem; max-width: 46ch; }

/* no WebGL, or reduced motion: a still evening instead of the walk */
body.nogl .story { height: auto; }
body.nogl .stage { position: relative; height: auto; min-height: 100svh; padding-block: 8rem 6rem; display: grid; align-content: end; gap: 2rem; }
body.nogl .hero, body.nogl .caps { position: static; opacity: 1; transform: none; height: auto; }
body.nogl .cap { position: static; opacity: 1; transform: none; filter: none; margin-top: .8rem; }
body.nogl .cue { display: none; }

@media (max-width: 860px) {
  .menu { display: none; }
  .tools { margin-inline-start: auto; }
  .badge { display: none; }
  .day li { grid-template-columns: 4.5rem 1fr; }
  .day p { grid-column: 2; }
  .form { grid-template-columns: 1fr; }
  .cap { max-width: 14ch; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cap { transition: none; }
  .cue i { animation: none; }
  .room:hover, .chips button:hover, .cta:hover { transform: none; }
}
