:root {
  --basalt: #2B2420;     /* volcanic rock of Harrat Uwayrid: text + dark sections */
  --basalt-2: #3A302A;
  --sandstone: #A9472A;  /* Hegra rock face: the one accent */
  --sandstone-deep: #8C3A22;
  --dune: #EFE2CC;       /* wind-blown sand: page */
  --sand: #E6D2B0;       /* compacted sand: raised surfaces */
  --sand-line: #C9B08A;
  --palm: #4F5A36;       /* oasis: success */
  --ink: #2B2420;
  --ink-soft: #5E4F44;
  --gutter: clamp(16px, 4vw, 48px);
  --ridge-h: clamp(36px, 6vw, 88px);
  --display: "Reem Kufi", "Readex Pro", system-ui, sans-serif;
  --text: "Readex Pro", system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--dune);
  color: var(--ink);
  font: 400 1.0625rem/1.8 var(--text);
  -webkit-font-smoothing: antialiased;
}
html[dir="ltr"] body { line-height: 1.6; }
img { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; }
h2 { font-size: clamp(2.1rem, 4.2vw, 3.2rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--sandstone); outline-offset: 3px; border-radius: 2px; }
.wrap { max-width: 1200px; margin-inline: auto; padding-inline: var(--gutter); }
.lead { font-size: 1.15rem; color: var(--ink-soft); max-width: 56ch; }
.muted { color: var(--ink-soft); }
[hidden] { display: none !important; }

.skip { position: absolute; inset-inline-start: 16px; top: -60px; z-index: 10; background: var(--basalt); color: var(--dune); padding: 8px 14px; }
.skip:focus { top: 12px; }

/* Ridge: an eroded mesa skyline that becomes the edge between two sections */
.ridge { display: block; position: absolute; inset-inline: 0; width: 100%; height: var(--ridge-h); fill: currentColor; pointer-events: none; z-index: 3; }
.ridge-dune { bottom: -1px; color: var(--dune); }
.ridge-top { top: 1px; transform: translateY(-100%); color: var(--basalt); }

/* Hero */
.hero { position: relative; min-height: 100svh; display: flex; flex-direction: column; color: var(--dune); overflow: hidden; background: var(--basalt); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
/* RTL: mirror the photo so the Arabic name sits over open cliffs, not over the tomb */
html[dir="rtl"] .hero-img { transform: scaleX(-1); }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(43,36,32,.78) 0%, rgba(43,36,32,.25) 45%, rgba(43,36,32,0) 65%), linear-gradient(to bottom, rgba(43,36,32,.45), rgba(43,36,32,0) 22%); }
.top { position: relative; z-index: 2; display: flex; align-items: center; gap: 28px; padding: 22px var(--gutter); }
.top ul { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; margin-inline-end: auto; }
.top a { text-decoration: none; font-size: .95rem; }
.top a:hover { text-decoration: underline; text-underline-offset: 6px; }
.brand { font-family: var(--display); font-size: 1.6rem; font-weight: 700; margin: 0; text-decoration: none; }
.nav-account { font-weight: 500; }
.lang { font: 500 .85rem var(--text); color: inherit; background: none; border: 1px solid currentColor; border-radius: 3px; padding: 4px 12px; cursor: pointer; }
.lang:hover { background: rgba(239,226,204,.12); }

.hero-copy { position: relative; z-index: 2; margin-top: auto; padding: 0 var(--gutter) calc(var(--ridge-h) + clamp(32px, 6vw, 72px)); max-width: 1200px; width: 100%; margin-inline: auto; }
.name { font-size: clamp(6rem, 21vw, 17rem); font-weight: 700; line-height: .9; margin: 0 0 .12em; letter-spacing: -.01em; }
html[dir="ltr"] .name { letter-spacing: -.03em; }
.tagline { font-size: clamp(1.15rem, 2vw, 1.5rem); max-width: 34ch; margin-bottom: 1.4em; font-weight: 300; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin: 0; }
.link-light { color: var(--dune); text-underline-offset: 6px; }

/* the one orchestrated moment: the name rises out of the rock on load */
@media (prefers-reduced-motion: no-preference) {
  .name, .tagline, .hero-actions { animation: rise 1.1s cubic-bezier(.2,.7,.1,1) both; }
  .tagline { animation-delay: .25s; }
  .hero-actions { animation-delay: .4s; }
  @keyframes rise { from { opacity: 0; transform: translateY(40px); } }
}

.btn { display: inline-block; font: 500 1rem var(--text); color: #fff; background: var(--sandstone); border: 0; border-radius: 3px; padding: 13px 26px; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--sandstone-deep); }
.btn:disabled { opacity: .6; cursor: progress; }

/* Work */
.work { padding: clamp(56px, 8vw, 104px) 0 calc(var(--ridge-h) + clamp(56px, 8vw, 104px)); }
.work .lead { margin-bottom: 2.2em; }
.gallery { columns: 3 300px; column-gap: 22px; }
.shot { break-inside: avoid; margin: 0 0 30px; }
.shot button { display: block; width: 100%; padding: 0; border: 0; background: var(--sand); cursor: zoom-in; border-radius: 3px; overflow: hidden; }
.shot img { width: 100%; height: auto; transition: transform .6s ease; }
.shot button:hover img { transform: scale(1.025); }
.shot figcaption { font-size: .92rem; color: var(--ink-soft); padding-top: 10px; }

/* About */
.about { position: relative; background: var(--basalt); color: var(--dune); padding: clamp(40px, 6vw, 80px) 0 calc(var(--ridge-h) + clamp(56px, 8vw, 104px)); }
.about-grid { display: grid; grid-template-columns: 5fr 7fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.about-img { width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 3px; }
.about p { max-width: 58ch; color: #E2D3BA; font-size: 1.1rem; }
.about h2 { color: var(--dune); }

/* Booking */
.book { padding: clamp(56px, 8vw, 104px) 0 clamp(72px, 9vw, 120px); }
.book-grid { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.panel { background: var(--sand); border: 1px solid var(--sand-line); border-radius: 4px; padding: clamp(20px, 3vw, 36px); }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--sand-line); margin-bottom: 22px; }
.tabs button { font: 500 1rem var(--text); color: var(--ink-soft); background: none; border: 0; border-bottom: 3px solid transparent; padding: 8px 14px 10px; margin-bottom: -1px; cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--sandstone); }
form { display: grid; gap: 18px; }
label, legend { display: grid; gap: 6px; font-weight: 500; font-size: .95rem; }
label small { font-weight: 400; color: var(--ink-soft); font-size: .85rem; }
input, select, textarea { font: 400 1rem var(--text); color: var(--ink); background: var(--dune); border: 1px solid var(--sand-line); border-radius: 3px; padding: 11px 14px; width: 100%; }
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid var(--sandstone); outline-offset: 0; border-color: transparent; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 6px; }
.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.slots .hint { grid-column: 1 / -1; margin: 0; color: var(--ink-soft); font-size: .95rem; }
.slot { position: relative; display: block; }
.slot input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.slot span { display: grid; gap: 0; text-align: center; padding: 10px 6px; border: 1px solid var(--sand-line); border-radius: 3px; background: var(--dune); cursor: pointer; font-weight: 400; line-height: 1.4; }
.slot b { font-weight: 600; font-size: 1.05rem; }
.slot small { font-size: .8rem; color: var(--ink-soft); }
.slot input:checked + span { background: var(--sandstone); border-color: var(--sandstone); color: #fff; }
.slot input:checked + span small { color: #F6E3D8; }
.slot input:focus-visible + span { outline: 3px solid var(--sandstone); outline-offset: 2px; }
.slot input:disabled + span { cursor: not-allowed; background: transparent; color: #9A8A79; border-style: dashed; }
.slot input:disabled + span b { text-decoration: line-through; }
.msg { margin: 0; min-height: 0; font-size: .95rem; color: #9B2F14; }
.msg:empty { display: none; }
.msg.ok { color: var(--palm); }
.hello { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.hello p { margin: 0; font-family: var(--display); font-size: 1.35rem; }
.link { font: 400 .95rem var(--text); color: var(--ink-soft); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }

.mine { margin-top: 36px; }
.mine ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--sand-line); }
.mine li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--sand-line); }
.mine li b { font-weight: 600; }
.mine li span { color: var(--ink-soft); }
.mine li.fresh { animation: settle 1.4s ease; }
@keyframes settle { from { background: rgba(169,71,42,.14); } }

/* Footer */
.foot { position: relative; background: var(--basalt); color: var(--dune); padding: 28px 0 36px; margin-top: var(--ridge-h); }
.foot-row { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 12px; }
.foot .muted { color: #BFAE95; margin: 0; }

/* Viewer */
dialog { border: 0; padding: 0; background: transparent; max-width: min(92vw, 1400px); color: var(--dune); }
dialog::backdrop { background: rgba(30,25,22,.9); }
dialog img { max-height: 84vh; width: auto; margin: 0 auto; border-radius: 3px; }
.viewer-cap { text-align: center; margin: 12px 0 0; }
.close { position: fixed; top: 14px; inset-inline-end: 18px; font-size: 2rem; line-height: 1; color: var(--dune); background: none; border: 0; cursor: pointer; padding: 6px 10px; }

@media (max-width: 900px) {
  .about-grid, .book-grid { grid-template-columns: 1fr; }
  .about-img { max-width: 420px; }
}
@media (max-width: 640px) {
  .top { gap: 16px; }
  .top ul { display: none; }
  .nav-account { margin-inline-start: auto; }
  .slots { grid-template-columns: repeat(2, 1fr); }
  .hero-img { object-position: 78% 60%; }
  .about-img { aspect-ratio: 4 / 5; }
  .mine li { flex-direction: column; gap: 2px; }
}
