/* SIA SPA — local redesign. One immersive mountain entrance, then quiet sand and deep green. */

@font-face { font-family: "Thmanyah Display"; src: url("/assets/fonts/Thmanyah-Display-Light.woff2") format("woff2"), url("/assets/fonts/Thmanyah-Display-Light.otf") format("opentype"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Thmanyah Display"; src: url("/assets/fonts/Thmanyah-Display-Regular.woff2") format("woff2"), url("/assets/fonts/Thmanyah-Display-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Year of the Camel"; src: url("/assets/fonts/Year-of-the-Camel-Regular.woff2") format("woff2"), url("/assets/fonts/Year-of-the-Camel-Regular.otf") format("opentype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Raconteur"; src: url("/assets/fonts/Raconteur.otf") format("opentype"); font-weight: 400; font-display: swap; }

:root {
  --green: #356852;
  --green-deep: #24473a;
  --green-night: #1c392e;
  --ink: #1f3a2f;
  --sand: #ecd9ba;
  --sand-light: #f6eddd;
  --gold: #d8b384;
  --hero-base: #2f5a48;

  --display: "Thmanyah Display", "Noto Naskh Arabic", "Geeza Pro", serif;
  --text: "Year of the Camel", "Noto Sans Arabic", "Geeza Pro", sans-serif;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --header-h: 4.5rem;
  --ridge-h: clamp(36px, 6vw, 96px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0;
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--ink);
  background: var(--green-night);
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, address { margin: 0; }
address { font-style: normal; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; z-index: 30; inset-inline-start: 1rem; top: -4rem;
  padding: .75rem 1.25rem; background: var(--sand); color: var(--ink); text-decoration: none;
}
.skip-link:focus { top: 1rem; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
.services :focus-visible, .questions :focus-visible, .reading :focus-visible, .article-wrap :focus-visible { outline-color: var(--green-deep); }
/* Over the photograph and the transparent header the ring must hold against pale sky and deep green alike. */
.hero :focus-visible, .site-header :focus-visible { outline-color: #fbf5ea; box-shadow: 0 0 0 6px rgba(20, 44, 35, .75); }

.wrap { width: min(100% - 2 * var(--gutter), 72rem); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  position: absolute; z-index: 20; top: 0; inset-inline: 0;
  color: var(--sand-light);
}
.js .site-header { position: fixed; }
.header-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
  width: min(100% - 2 * var(--gutter), 72rem); min-height: var(--header-h); margin-inline: auto;
}
.wordmark {
  font-family: "Raconteur", var(--display);
  font-size: 1.75rem; line-height: 1; letter-spacing: .02em;
  color: var(--sand); text-decoration: none; direction: ltr;
  padding-block: .5rem;
  opacity: 0; visibility: hidden;
}
.site-header.is-solid {
  background: rgba(28, 57, 46, .96);
  box-shadow: 0 1px 0 rgba(216, 179, 132, .22);
}
.site-header.is-solid .wordmark { opacity: 1; visibility: visible; }

.site-nav ul { display: flex; gap: clamp(.75rem, 3vw, 2.25rem); margin: 0; padding: 0; list-style: none; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 1rem; text-decoration: none; color: var(--sand-light);
  text-shadow: 0 1px 12px rgba(20, 44, 35, .45);
}
.site-nav a:hover { text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: .45em; }

.menu-toggle {
  display: inline-flex; align-items: center; gap: .6rem; min-height: 44px; padding: .25rem .25rem;
  border: 0; background: none; color: var(--sand-light); font: inherit; font-size: 1rem; cursor: pointer;
}
.menu-toggle[hidden] { display: none; }
@media (min-width: 720px) { .menu-toggle { display: none; } }
.menu-icon, .menu-icon::before, .menu-icon::after {
  display: block; width: 22px; height: 1.5px; background: currentColor; content: "";
}
.menu-icon { position: relative; }
.menu-icon::before { position: absolute; top: -7px; }
.menu-icon::after { position: absolute; top: 7px; }
.site-header.is-open .menu-icon { background: transparent; }
.site-header.is-open .menu-icon::before { top: 0; transform: rotate(45deg); }
.site-header.is-open .menu-icon::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 719px) {
  .js .site-nav {
    position: absolute; top: 100%; inset-inline: 0;
    display: none; padding: .5rem var(--gutter) 1.75rem;
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100svh - var(--header-h)); overflow-y: auto;
    background: var(--green-night);
    box-shadow: 0 1px 0 rgba(216, 179, 132, .22);
  }
  .js .site-header.is-open { background: var(--green-night); }
  .js .site-header.is-open .site-nav { display: block; }
  .js .site-nav ul { flex-direction: column; gap: 0; }
  .js .site-nav li + li { border-top: 1px solid rgba(236, 217, 186, .14); }
  .js .site-nav a { scroll-margin-block: 8px; width: 100%; min-height: 56px; font-family: var(--display); font-size: 1.375rem; text-shadow: none; }
}

/* ---------- Hero: the mountains and their embedded mark are the entrance ---------- */
.hero {
  --img-min: 240vw;
  --shift: -0.15;
  --img-w: max(var(--img-min), 150svh);
  --img-h: calc(var(--img-w) / 1.5);
  position: relative; isolation: isolate; overflow: hidden;
  min-height: 100svh;
  /* Column flex: the words fill the space between the mark and the ridge, so the ridge sits whole at the bottom of the first view instead of peeking in as a sliver. */
  display: flex; flex-direction: column;
  background: var(--hero-base);
  color: var(--sand-light);
}
.hero::before { /* keeps the navigation legible over the pale sky */
  content: ""; position: absolute; z-index: 0; inset: 0 0 auto; height: 10rem;
  background: linear-gradient(rgba(20, 43, 34, .90), rgba(28, 57, 46, 0));
}
.hero-media {
  position: absolute; z-index: -1; left: 50%;
  top: calc(var(--img-h) * var(--shift));
  width: var(--img-w);
  transform: translateX(-50%);
}
.hero-brand-fallback { position: absolute; inset-inline: 0; top: 44%; z-index: 0; text-align: center; color: var(--sand-light); font: clamp(2rem, 5vw, 4rem)/1 "Raconteur", serif; direction: ltr; }
.hero-media img { position: relative; z-index: 1; width: 100%; height: auto; }
.hero-media::after {
  content: ""; position: absolute; z-index: 2; inset: 0;
  background: linear-gradient(to bottom, rgba(47, 90, 72, 0) 60%, var(--hero-base) 99%);
}
.hero-content {
  /* Minimum breathing room; any extra height is shared above and below the words. */
  --gap-top: clamp(1.5rem, 4vh, 4.5rem);
  --gap-bottom: clamp(1rem, 3vh, 3rem);
  position: relative; z-index: 1;
  flex: 1 0 auto; width: 100%;
  display: flex; flex-direction: column; justify-content: center;
  max-width: 40rem; margin-inline: auto; text-align: center;
  /* 0.594 = bottom edge of the logo frame inside the photograph */
  padding: calc(var(--img-h) * (0.594 + var(--shift)) + var(--gap-top)) var(--gutter) calc(var(--ridge-h) + var(--gap-bottom));
}
.hero-content::before { /* a soft shade behind the words only: starts below the logo frame, never dims the mark */
  content: ""; position: absolute; z-index: -1; inset-inline: -10%;
  top: calc(var(--img-h) * (0.594 + var(--shift)) + 1rem); bottom: calc(var(--ridge-h) + 1rem);
  background: radial-gradient(closest-side, rgba(24, 50, 40, .35), rgba(24, 50, 40, 0));
}
.hero h1 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2.25rem, 1.55rem + 2.6vw, 3.75rem);
  line-height: 1.3; color: #fbf5ea;
  text-wrap: balance;
}
.hero-lead {
  max-width: 33rem; margin: 1.1rem auto 0;
  font-size: clamp(1.0625rem, 1rem + .3vw, 1.1875rem); line-height: 1.95;
  color: #fbf5ea;
  text-wrap: pretty;
}
.hero-feel {
  display: block; margin-bottom: .35rem;
  font-family: var(--display); font-weight: 300;
  font-size: clamp(1.45rem, 1.25rem + .8vw, 1.9rem); line-height: 1.5;
}
.hero-actions {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 1rem 2rem; margin-top: 2rem;
}

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: .7rem 1.9rem;
  font-size: 1.0625rem; text-decoration: none;
  border-radius: 2px;
  background: var(--sand); color: var(--ink);
  border: 1px solid var(--sand);
}
.btn:hover { background: #f6ead4; }
.text-link {
  display: inline-flex; align-items: center; min-height: 44px;
  color: inherit; text-decoration: underline; text-decoration-thickness: 1px;
  text-decoration-color: var(--gold); text-underline-offset: .5em;
}
.text-link:hover { text-decoration-thickness: 2px; }

.ridge { position: absolute; inset-inline: 0; width: 100%; height: var(--ridge-h); pointer-events: none; }
.ridge-bottom { bottom: -1px; fill: var(--sand); z-index: 1; }
.ridge-top { top: -1px; fill: var(--sand-light); }

@media (min-width: 600px) { .hero { --img-min: 150vw; --shift: -0.1; } }
@media (min-width: 1024px) { .hero { --img-min: 100vw; --shift: -0.17; } .hero-content { max-width: 50rem; } }
/* Wide, short screens (laptops at 16:9 and wider, phones in landscape): lift the photo so the call to action stays in view. */
@media (min-aspect-ratio: 16/9) { .hero { --img-min: 100vw; --shift: -0.22; } }
/* Short laptop screens (768–800px displays inside a browser): the button ends the first view and the ridge waits fully below it. */
@media (min-aspect-ratio: 16/9) and (max-height: 720px) { .hero-content { --gap-bottom: clamp(3rem, 8vh, 5rem); } }
@media (min-aspect-ratio: 2/1) {
  .hero { --shift: -0.27; }
  /* The mark sits close to the top here: a shorter, denser scrim keeps the nav legible without dimming the mark. */
  .hero::before { height: var(--header-h); background: linear-gradient(rgba(28, 57, 46, .8), rgba(28, 57, 46, .55) 70%, rgba(28, 57, 46, 0)); }
  .hero-content { padding-top: calc(var(--img-h) * (0.594 + var(--shift)) + 1.5rem); }
}
@supports not (height: 1svh) {
  .hero { --img-w: max(var(--img-min), 150vh); min-height: 100vh; }
}

/* ---------- Sections ---------- */
.section-head { max-width: 38rem; margin-bottom: clamp(2rem, 5vw, 3.5rem); }
.section-head h2 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2.25rem, 1.6rem + 2.6vw, 3.75rem); line-height: 1.25;
  color: var(--green-deep);
}
.section-head p { margin-top: .75rem; font-size: 1.125rem; }

.services { background: var(--sand); padding-block: clamp(3.5rem, 8vw, 7rem) clamp(4rem, 9vw, 8rem); }
.service { padding-block: clamp(1.75rem, 4vw, 2.75rem); border-top: 1px solid rgba(53, 104, 82, .3); }
.service:last-child { border-bottom: 1px solid rgba(53, 104, 82, .3); }
.service h3 {
  font-family: var(--display); font-weight: 300;
  font-size: clamp(1.75rem, 1.4rem + 1.5vw, 2.6rem); line-height: 1.3;
  color: var(--green);
  margin-bottom: .6rem;
}
.service-body p { max-width: 36rem; font-size: 1.125rem; line-height: 1.85; text-wrap: pretty; }
.ask-link {
  display: inline-flex; align-items: center; min-height: 44px; margin-top: .5rem;
  color: var(--green-deep); text-decoration: underline; text-decoration-thickness: 1px;
  text-decoration-color: var(--green); text-underline-offset: .5em;
}
.ask-link:hover { text-decoration-thickness: 2px; }
@media (min-width: 900px) {
  .service { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 3rem; align-items: baseline; }
  .service h3 { margin-bottom: 0; }
}

.questions { background: var(--sand-light); padding-block: clamp(3.5rem, 8vw, 7rem) calc(var(--ridge-h) + clamp(2rem, 5vw, 3.5rem)); }
.qa-list { display: grid; gap: 2.25rem; }
.qa h3 { font-family: var(--display); font-weight: 400; font-size: clamp(1.3rem, 1.15rem + .6vw, 1.6rem); line-height: 1.45; color: var(--green-deep); margin-bottom: .4rem; }
.qa p { max-width: 34rem; }
.qa a { color: var(--green-deep); text-decoration-color: var(--green); text-underline-offset: .35em; }
@media (min-width: 900px) { .qa-list { grid-template-columns: 1fr 1fr; gap: 3rem 4.5rem; } }

.visit {
  position: relative;
  background: var(--green-deep); color: var(--sand-light);
  padding-block: calc(var(--ridge-h) + clamp(3rem, 7vw, 5.5rem)) clamp(4rem, 9vw, 7rem);
}
.visit h2 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2rem, 1.5rem + 2vw, 3rem); line-height: 1.3; color: var(--sand);
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.visit-grid { display: grid; gap: 2.5rem; }
.visit-item h3 { font-size: 1rem; font-weight: 400; color: var(--gold); margin-bottom: .5rem; }
.visit-item address, .visit-item > p:not(.phone-line) {
  font-family: var(--display); font-size: clamp(1.3rem, 1.15rem + .5vw, 1.55rem); line-height: 1.65; color: #fbf5ea;
}
.visit-item .text-link { margin-top: .5rem; }
.visit-book .btn { margin-top: .35rem; }
.phone-line { margin-top: 1rem; }
.phone-link { display: inline-flex; align-items: center; min-height: 44px; text-decoration-color: var(--gold); text-underline-offset: .35em; }
@media (min-width: 820px) { .visit-grid { grid-template-columns: 1.15fr 1fr 1fr; gap: 3rem; } }

.site-footer { background: var(--green-night); color: rgba(246, 237, 221, .85); font-size: 1rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; padding-block: 1.75rem; }

/* 404 reuses the hero entrance; no header and no ridge there. */
.hero-404 .hero-content { padding-bottom: clamp(3rem, 8vh, 5rem); }

/* ---------- One orchestrated entrance; motion only when welcome ---------- */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .hero-content > * { animation: rise 1.1s cubic-bezier(.2, .7, .2, 1) both; }
  .hero-content > :nth-child(2) { animation-delay: .15s; }
  .hero-content > :nth-child(3) { animation-delay: .3s; }
  .site-header { transition: background-color .35s ease, box-shadow .35s ease; }
  .wordmark { transition: opacity .35s ease, visibility .35s; }
  .menu-icon, .menu-icon::before, .menu-icon::after { transition: transform .2s ease, top .2s ease, background-color .2s; }
}
@keyframes rise { from { transform: translateY(10px); } }
/* Short landscape screens: keep the same content and contact action within the first view. */
@media (orientation: landscape) and (max-height: 500px) and (min-aspect-ratio: 16/9) {
  .hero { --img-min: 100vw; --shift: -0.27; }
  .hero::before { height: var(--header-h); background: linear-gradient(rgba(28, 57, 46, .8), rgba(28, 57, 46, .55) 70%, rgba(28, 57, 46, 0)); }
  /* Too short for the ridge and the call to action together: keep the ridge fully below the fold, never a sliver. */
  .hero-content { padding-top: calc(var(--img-h) * (0.594 + var(--shift)) + .5rem); padding-bottom: calc(var(--ridge-h) + clamp(3rem, 8vh, 5rem)); }
  .hero-label { margin: 0; line-height: 1.3; }
  .hero h1 { font-size: 2rem; line-height: 1.2; }
  .hero-lead { margin-top: .2rem; font-size: 1rem; line-height: 1.35; }
  .hero-feel { font-size: 1.2rem; line-height: 1.3; margin-bottom: 0; }
  .hero-actions { margin-top: .4rem; gap: .5rem 1.5rem; }
  .hero-actions .btn { min-height: 44px; padding-block: .45rem; }
}

/* Separate contact links keep reading lines regular and touch targets generous. */
.qa-contact { display: flex; flex-wrap: wrap; gap: 0 1.5rem; }
.qa-contact a { display: inline-flex; align-items: center; min-width: 44px; min-height: 44px; }

/* Keep the decorative ridge below the first view on short screens; content may scroll. */
@media (max-height: 700px) {
  .hero:not(.hero-404) { min-height: calc(100svh + var(--ridge-h) + 1px); }
  .hero:not(.hero-404) .hero-content { --gap-top: .75rem; }
  .hero:not(.hero-404) .hero-lead { margin-top: .4rem; line-height: 1.5; }
  .hero:not(.hero-404) .hero-feel { margin-bottom: .15rem; line-height: 1.3; }
  .hero:not(.hero-404) .hero-actions { margin-top: .65rem; }
}
@media (min-width: 600px) and (max-width: 1023px) and (max-height: 700px) {
  .hero:not(.hero-404) { --img-min: 100vw; --shift: -0.17; }
}
@media (min-width: 1280px) and (max-height: 760px) {
  .hero:not(.hero-404) { --shift: -0.35; }
}
@media (min-aspect-ratio: 16/9) and (max-height: 850px) {
  .hero:not(.hero-404) { min-height: calc(100svh + var(--ridge-h) + 1px); }
}
@media (min-width: 1280px) and (max-height: 760px) {
  .hero:not(.hero-404) h1 { font-size: 2.4rem; line-height: 1.2; }
  .hero:not(.hero-404) .hero-lead { font-size: 1rem; line-height: 1.35; }
  .hero:not(.hero-404) .hero-feel { font-size: 1.2rem; }
  .hero:not(.hero-404) .hero-actions .btn { min-height: 44px; padding-block: .45rem; }
}

@media (min-width: 600px) and (max-height: 850px) {
  .hero:not(.hero-404) { min-height: calc(100svh + var(--ridge-h) + 1px); }
}
/* Preserve the compact landscape layout when the viewport is extremely short. */
@media (max-height: 500px) and (min-aspect-ratio: 16/9) {
  .hero:not(.hero-404) { min-height: 100svh; }
}
@media (orientation: landscape) and (max-height: 500px) {
  .hero:not(.hero-404) { --img-min: 100vw; --shift: -0.27; min-height: 100svh; }
  .hero:not(.hero-404) .ridge-bottom { visibility: hidden; }
  .hero:not(.hero-404) .hero-content { padding-top: calc(var(--img-h) * (0.594 + var(--shift)) + .5rem); padding-bottom: calc(var(--ridge-h) + clamp(3rem, 8vh, 5rem)); }
  .hero:not(.hero-404) .hero-label { margin: 0; line-height: 1.3; }
  .hero:not(.hero-404) h1 { font-size: 2rem; line-height: 1.2; }
  .hero:not(.hero-404) .hero-lead { margin-top: .2rem; font-size: 1rem; line-height: 1.35; }
  .hero:not(.hero-404) .hero-feel { font-size: 1.2rem; line-height: 1.3; margin-bottom: 0; }
  .hero:not(.hero-404) .hero-actions { margin-top: .4rem; gap: .5rem 1.5rem; }
  .hero:not(.hero-404) .hero-actions .btn { min-height: 44px; padding-block: .45rem; }
}

.section-head h2 { text-wrap: balance; }
/* Separate adjacent contact and detail links in each service card. */
.service-body > .ask-link { margin-inline-end: 1.25rem; }

/* claude-final-review: the booking heading is a sentence, so it reads as the heading and the line under it as body text. */
.visit-book h3{font-family:var(--display);font-size:clamp(1.3rem,1.15rem + .5vw,1.55rem);line-height:1.6;color:#fbf5ea;margin-bottom:.4rem}
.visit-book > p:not(.phone-line){font-family:var(--text);font-size:1.0625rem;line-height:1.85;color:rgba(246,237,221,.88)}

/* Booking-answer links remain inline with generous touch areas. */
.booking-answer a { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }

/* Continue the guide's sand background through its transition into the visit section. */
.reading + .visit > .ridge-top { fill: var(--sand); }
