/* Sandhouse.ly — Bayt Al-Rimal. Layout: cream pages, navy hero and footer bands, wave edges taken from the logo. */
:root {
  --navy: #0B3547; --navy-d: #061F2B; --blue: #18597C;
  --cream: #F6F1DF; --cream-2: #ECE4CC; --paper: #FBF8EC;
  --sand: #A68E68; --sand-l: #BDA57C; --sand-d: #6F5B38;
  --muted: #3F5A66; --line: #D6CBAB;
  --display: "Cabin Condensed", "Arial Narrow", Arial, sans-serif;
  --body: "Fira Sans", "Helvetica Neue", Arial, sans-serif;
  --maxw: 1200px; --gutter: max(16px, 4vw); --r: 4px;
  --dir: to right;
  color-scheme: light;
}
html[lang="ar"] { --display: "Cairo", "Tajawal", sans-serif; --body: "Tajawal", "Cairo", sans-serif; }
html[dir="rtl"] { --dir: to left; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0; background: var(--cream); color: var(--navy);
  font-family: var(--body); font-size: 1.0625rem; line-height: 1.7; -webkit-text-size-adjust: 100%;
}
html[lang="ar"] body { font-size: 1.125rem; line-height: 1.9; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
:focus-visible { outline: 3px solid var(--sand); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; inset-inline-start: 1rem; top: -4rem; z-index: 100; background: var(--navy); color: var(--cream); padding: 0.6rem 1rem; border-radius: var(--r); }
.skip:focus { top: 0.75rem; }
.container { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* Type */
h1, h2, h3 { font-family: var(--display); line-height: 1.12; text-wrap: balance; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { line-height: 1.35; }
html:not([lang="ar"]) h1, html:not([lang="ar"]) h2 { text-transform: uppercase; letter-spacing: 0.01em; }
h1 { font-size: clamp(2.4rem, 6.2vw, 4.6rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 4.2vw, 3rem); font-weight: 700; }
h3 { font-size: 1.35rem; font-weight: 700; }
.eyebrow { font-family: var(--body); font-size: 0.8rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sand-d); }
html[lang="ar"] .eyebrow { letter-spacing: 0; text-transform: none; font-size: 1rem; font-weight: 700; }
.on-dark .eyebrow, .eyebrow.on-dark { color: var(--sand-l); }
.lede { font-size: clamp(1.1rem, 2vw, 1.3rem); max-width: 40rem; }
.muted { color: var(--muted); }
.prose { max-width: 42rem; display: grid; gap: 1.1rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem; font: inherit; font-weight: 600; line-height: 1.2;
  padding: 0.9rem 1.6rem; border-radius: 3px; border: 1.5px solid transparent; text-decoration: none; cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn-primary { background: var(--navy); color: var(--cream); border-color: var(--navy); }
.btn-primary:hover { background: var(--blue); border-color: var(--blue); }
.btn-outline { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--cream); }
.btn-light { background: var(--cream); color: var(--navy); border-color: var(--cream); }
.btn-light:hover { background: var(--cream-2); border-color: var(--cream-2); }
.btn-outline-light { background: transparent; color: var(--cream); border-color: var(--cream); }
.btn-outline-light:hover { background: var(--cream); color: var(--navy); }
.btn-sm { padding: 0.6rem 1.1rem; font-size: 0.95rem; }
.btn-arrow::after { content: "→"; }
html[dir="rtl"] .btn-arrow::after { content: "←"; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Header */
.site-header { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; background: var(--cream); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.5rem; }
.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; flex-shrink: 0; }
.brand .b-icon { width: 2.1rem; height: auto; aspect-ratio: 836 / 971; }
.brand .b-word { width: 7.6rem; height: auto; aspect-ratio: 917 / 197; }
.nav { display: flex; align-items: center; gap: 0.25rem; }
.nav a { text-decoration: none; padding: 0.5rem 0.8rem; font-weight: 500; font-size: 1rem; border-bottom: 2px solid transparent; color: var(--navy); }
.nav a:hover { border-bottom-color: var(--sand); }
.nav a[aria-current="page"] { border-bottom-color: var(--navy); font-weight: 700; }
.nav .nav-cta { display: none; }
.actions { display: flex; align-items: center; gap: 0.6rem; }
.lang { font: inherit; font-weight: 600; font-size: 0.95rem; color: var(--navy); background: transparent; border: 1.5px solid var(--line); border-radius: 999px; padding: 0.4rem 0.95rem; cursor: pointer; }
.lang:hover { border-color: var(--navy); }
.burger { display: none; width: 2.75rem; height: 2.75rem; padding: 0; border: 1.5px solid var(--line); border-radius: var(--r); background: transparent; color: var(--navy); cursor: pointer; align-items: center; justify-content: center; }
.burger span, .burger span::before, .burger span::after { display: block; width: 1.25rem; height: 2px; background: currentColor; position: relative; content: ""; }
.burger span::before { position: absolute; top: -6px; inset-inline-start: 0; }
.burger span::after { position: absolute; top: 6px; inset-inline-start: 0; }
@media (max-width: 960px) {
  .burger { display: inline-flex; }
  .actions .btn { display: none; }
  .nav { position: absolute; inset-inline: 0; top: 100%; background: var(--cream); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem var(--gutter) 1rem; display: none; box-shadow: 0 12px 24px rgba(6, 31, 43, 0.12); }
  .nav.open { display: flex; }
  .nav a { padding: 0.9rem 0.25rem; border-bottom: 1px solid var(--line); }
  .nav .nav-cta { display: inline-flex; margin-top: 0.9rem; border-bottom: 1.5px solid var(--navy); padding: 0.9rem 1.6rem; color: var(--cream); background: var(--navy); }
}
@media (max-width: 420px) { .brand .b-word { width: 6.4rem; } }

/* Hero */
.hero { position: relative; isolation: isolate; overflow: hidden; background: var(--navy-d); color: var(--cream); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; max-width: none; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(var(--dir), rgba(6, 31, 43, 0.95) 0%, rgba(6, 31, 43, 0.8) 42%, rgba(6, 31, 43, 0.3) 100%); }
@media (max-width: 760px) { .hero::before { background: rgba(6, 31, 43, 0.82); } }
.hero-in { padding-block: clamp(4rem, 10vw, 8rem) clamp(6rem, 12vw, 10rem); display: grid; gap: 1.4rem; justify-items: start; }
.hero h1 { max-width: 14ch; }
.hero .lede { color: #E4DFCC; }
.chips { display: flex; flex-wrap: wrap; gap: 0.75rem; list-style: none; padding: 0; margin-top: 0.75rem; }
.chips li { display: flex; flex-direction: column; gap: 0.1rem; padding: 0.7rem 1.1rem; border: 1px solid rgba(246, 241, 223, 0.35); border-radius: var(--r); background: rgba(6, 31, 43, 0.5); }
.chips .k { font-size: 0.8rem; color: var(--sand-l); font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
html[lang="ar"] .chips .k { letter-spacing: 0; text-transform: none; font-size: 0.9rem; }
.chips b { font-weight: 600; }
.wave { position: absolute; inset-inline: 0; bottom: -1px; width: 100%; height: clamp(30px, 6vw, 64px); display: block; }
.wave path { fill: var(--cream); }

.page-hero { position: relative; overflow: hidden; background: var(--navy); color: var(--cream); isolation: isolate; }
.page-hero::after { content: ""; position: absolute; z-index: -1; inset-inline-end: var(--gutter); bottom: 0; width: clamp(120px, 20vw, 240px); aspect-ratio: 836 / 971; background: url("brand/icon-cream.svg") center / contain no-repeat; opacity: 0.07; }
.page-hero .container { padding-block: clamp(3rem, 7vw, 5.5rem) clamp(5rem, 9vw, 7.5rem); display: grid; gap: 0.9rem; }
.page-hero p.sub { font-size: clamp(1.05rem, 2vw, 1.25rem); color: #E4DFCC; }

/* Sections */
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section.tint { background: var(--cream-2); }
.section.navy { background: var(--navy); color: var(--cream); }
.sec-head { display: grid; gap: 0.7rem; margin-bottom: clamp(1.75rem, 4vw, 3rem); max-width: 46rem; }
.split { display: grid; gap: clamp(1.5rem, 4vw, 4rem); grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } .split.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.split > * { min-width: 0; }
.text-link { font-weight: 600; text-decoration: none; border-bottom: 2px solid var(--sand); padding-bottom: 2px; width: fit-content; }
.text-link:hover { border-bottom-color: var(--navy); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 1.5rem; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.card img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.card-b { padding: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; flex: 1; }
.card-b .btn { margin-top: auto; align-self: flex-start; }
.card-b p { color: var(--muted); }
.card.plain { padding: 1.75rem; gap: 0.6rem; }
.card.plain p { color: var(--muted); }
.card.plain .mark { width: 2.5rem; height: 0.35rem; background: var(--sand); margin-bottom: 0.6rem; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: 1.5rem; list-style: none; padding: 0; }
.steps li { display: grid; gap: 0.7rem; align-content: start; }
.steps .bar-s { display: block; height: 6px; border-radius: 3px; background: var(--line); }
.steps .done .bar-s { background: var(--blue); }
.steps .now .bar-s { background: linear-gradient(var(--dir), var(--blue) 50%, var(--line) 50%); }
.steps h3 { font-size: 1.15rem; }
.chip { display: inline-block; width: fit-content; padding: 0.15rem 0.75rem; border-radius: 999px; font-size: 0.85rem; font-weight: 600; line-height: 1.6; }
.chip-done { background: var(--navy); color: var(--cream); }
.chip-now { background: var(--sand); color: var(--navy-d); }
.section.navy .steps .bar-s { background: rgba(246, 241, 223, 0.25); }
.section.navy .steps .done .bar-s { background: var(--sand-l); }
.section.navy .steps .now .bar-s { background: linear-gradient(var(--dir), var(--sand-l) 50%, rgba(246, 241, 223, 0.25) 50%); }
.section.navy .chip-done { background: var(--cream); color: var(--navy); }

.mosaic { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.mosaic a { display: block; overflow: hidden; border-radius: 3px; aspect-ratio: 16 / 10; background: var(--cream-2); }
.mosaic a.big { grid-column: span 2; }
@media (min-width: 860px) { .mosaic { grid-template-columns: repeat(4, minmax(0, 1fr)); } .mosaic a.big { grid-row: span 2; aspect-ratio: auto; } }
.mosaic img, .grid-g img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.mosaic a:hover img, .grid-g a:hover img { transform: scale(1.04); }
.note { font-size: 0.9rem; color: var(--muted); margin-top: 1rem; }

.cta-band { background: var(--navy); color: var(--cream); }
.cta-band .container { padding-block: clamp(3rem, 7vw, 5rem); display: grid; gap: 1.5rem; justify-items: start; }
.cta-band h2 { max-width: 22ch; }
.cta-band p { color: #E4DFCC; }

/* Footer */
.site-footer { background: var(--navy-d); color: #E4DFCC; }
.site-footer .container { padding-block: clamp(2.5rem, 6vw, 4rem) 1.5rem; display: grid; gap: 2.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.f-brand { display: grid; gap: 1rem; align-content: start; }
.f-brand .row { display: flex; align-items: center; gap: 0.9rem; }
.f-brand .i { width: 3rem; height: auto; aspect-ratio: 836 / 971; }
.f-brand .w { width: 9rem; height: auto; aspect-ratio: 917 / 197; }
.f-brand .t { width: 11rem; height: auto; aspect-ratio: 889 / 78; }
.site-footer h3 { font-size: 1rem; color: var(--sand-l); margin-bottom: 0.8rem; font-family: var(--body); text-transform: none; letter-spacing: 0; }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: 0.5rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.f-bottom { grid-column: 1 / -1; border-top: 1px solid rgba(246, 241, 223, 0.18); padding-top: 1.25rem; font-size: 0.9rem; display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

/* Gallery */
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.75rem; }
.filters button { font: inherit; font-size: 0.95rem; font-weight: 600; padding: 0.5rem 1.05rem; border-radius: 999px; border: 1.5px solid var(--line); background: transparent; color: var(--navy); cursor: pointer; }
.filters button:hover { border-color: var(--navy); }
.filters button[aria-pressed="true"] { background: var(--navy); color: var(--cream); border-color: var(--navy); }
.grid-g { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 0.75rem; }
.grid-g a { display: block; overflow: hidden; border-radius: 3px; aspect-ratio: 16 / 10; background: var(--cream-2); }
.grid-g a[hidden] { display: none; }
.lb { position: fixed; inset: 0; z-index: 90; background: #061F2B; color: var(--cream); display: grid; grid-template-rows: auto 1fr auto; padding: env(safe-area-inset-top, 0px) 0 env(safe-area-inset-bottom, 0px); }
.lb[hidden] { display: none; }
.lb-top { display: flex; justify-content: space-between; align-items: center; padding: 0.9rem var(--gutter); gap: 1rem; }
.lb-cap { font-weight: 600; }
.lb-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 clamp(3rem, 8vw, 5rem); }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb button { font: inherit; color: var(--cream); background: rgba(246, 241, 223, 0.12); border: 1px solid rgba(246, 241, 223, 0.4); border-radius: 999px; cursor: pointer; min-width: 2.75rem; height: 2.75rem; padding: 0 1rem; font-weight: 600; }
.lb button:hover { background: rgba(246, 241, 223, 0.25); }
.lb .nv { position: absolute; top: 50%; translate: 0 -50%; padding: 0; width: 2.75rem; }
.lb .prev { inset-inline-start: 0.5rem; }
.lb .next { inset-inline-end: 0.5rem; }
html[dir="rtl"] .lb .nv span { display: inline-block; transform: scaleX(-1); }
.lb-count { direction: ltr; unicode-bidi: isolate; text-align: center; padding: 0.8rem; font-size: 0.9rem; color: var(--sand-l); }

/* Contact */
.info-list { display: grid; gap: 1rem; list-style: none; padding: 0; }
.info-list li { display: grid; gap: 0.15rem; padding: 1.1rem 1.25rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r); }
.info-list .k { font-size: 0.85rem; font-weight: 600; color: var(--sand-d); }
.info-list a, .info-list span.v { font-size: 1.15rem; font-weight: 600; text-decoration: none; }
.info-list a:hover { text-decoration: underline; }
form.contact { display: grid; gap: 1.1rem; }
.fields { display: grid; gap: 1.1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .fields.two { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
label { display: grid; gap: 0.4rem; font-weight: 600; font-size: 0.95rem; min-width: 0; }
input, select, textarea { font: inherit; font-size: 1rem; font-weight: 400; color: var(--navy); background: var(--paper); border: 1.5px solid var(--line); border-radius: 3px; padding: 0.8rem 0.9rem; width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--blue); outline: 2px solid var(--blue); outline-offset: 1px; }
textarea { min-height: 9rem; resize: vertical; }
.hp { position: absolute; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.msg { padding: 1rem 1.15rem; border-radius: var(--r); border: 1.5px solid var(--navy); background: var(--paper); font-weight: 500; }
.msg[hidden] { display: none; }
.msg.ok { border-color: var(--blue); }
.fallback { display: grid; gap: 0.8rem; }
.fallback[hidden] { display: none; }

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.page-hero .hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; max-width: none; }
.page-hero.has-img::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(var(--dir), rgba(6, 31, 43, 0.95) 0%, rgba(6, 31, 43, 0.82) 50%, rgba(6, 31, 43, 0.45) 100%); }
.page-hero.has-img::after { display: none; }
