/* ==========================================================
   د. أحمد الصباغ — Landing page
   Tokens
   ========================================================== */
:root {
  --ink: #0A3447;
  --ink-deep: #072636;
  --mint: #3ED9B3;
  --mint-soft: #6FE8C9;
  --mint-deep: #17A584;
  --mist: #EEF6F5;
  --paper: #FFFFFF;
  --text: #12262F;
  --muted: #486068;
  --line: rgba(10, 52, 71, .14);
  --line-light: rgba(255, 255, 255, .22);
  --error: #B3261E;
  --wa: #128C4A;

  --f-display: "Noto Kufi Arabic", system-ui, sans-serif;
  --f-body: "IBM Plex Sans Arabic", system-ui, sans-serif;

  --wrap: 1160px;
  --header-h: 68px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.9;
  color: var(--text);
  background: var(--paper);
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--f-display); margin: 0; line-height: 1.3; letter-spacing: 0; font-weight: 700; text-wrap: balance; }
.lede { text-wrap: balance; }
p { text-wrap: pretty; }
p { margin: 0; }
a { color: inherit; }
button, input, select { font: inherit; }

:focus-visible { outline: 3px solid var(--mint-deep); outline-offset: 3px; border-radius: 6px; }
.on-dark :focus-visible { outline-color: var(--mint); }

.wrap { width: min(100% - 40px, var(--wrap)); margin-inline: auto; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 52px; padding: .7rem 1.6rem;
  border-radius: 999px; border: 2px solid transparent;
  font-family: var(--f-body); font-weight: 600; font-size: 1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--mint); color: var(--ink); }
.btn-primary:hover { background: var(--mint-soft); }
.btn-ghost { border-color: var(--line-light); color: #fff; background: transparent; }
.btn-ghost:hover { border-color: var(--mint); color: var(--mint); }
.btn-sm { min-height: 44px; padding: .45rem 1.25rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--ink); color: #fff;
  border-bottom: 1px solid var(--line-light);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: var(--header-h);
}
.brand { display: flex; flex-direction: column; text-decoration: none; line-height: 1.35; }
.brand b { font-family: var(--f-display); font-weight: 700; font-size: 1.15rem; }
.brand small { font-size: .8rem; color: rgba(255, 255, 255, .75); }
.header-actions { display: flex; align-items: center; gap: 1rem; }
.header-phone { display: none; align-items: center; gap: .5rem; text-decoration: none; font-weight: 500; }
.header-phone:hover { color: var(--mint); }
.header-phone svg { width: 18px; height: 18px; }

/* ---------- Hero ---------- */
.hero {
  background: var(--ink); color: #fff;
  padding-block: clamp(40px, 6vw, 88px) 56px;
  overflow: hidden;
}
.hero-grid {
  display: grid; grid-template-columns: 1.1fr .9fr; align-items: center;
  gap: clamp(32px, 6vw, 96px);
}
.hero h1 { font-size: clamp(2.7rem, 7vw, 4.8rem); font-weight: 800; line-height: 1.15; }
.lede {
  margin-top: 1rem;
  font-family: var(--f-display); font-weight: 500;
  font-size: clamp(1.2rem, 2.4vw, 1.65rem); line-height: 1.6;
  color: var(--mint);
}
.sub { margin-top: 1.25rem; max-width: 32em; color: rgba(255, 255, 255, .82); font-size: 1.1rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

.arch-wrap { position: relative; width: min(100%, 400px); justify-self: center; }
.arch-wrap::before {
  content: ""; position: absolute; inset: 0;
  border: 2px solid var(--mint); border-radius: 999px 999px 0 0;
  transform: translate(-18px, 18px);
}
.arch {
  position: relative; aspect-ratio: 4 / 5;
  border-radius: 999px 999px 0 0; overflow: hidden; background: #dfe5e6;
}
.arch img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }

/* One orchestrated moment: the hero arrives on load */
@media (prefers-reduced-motion: no-preference) {
  .hero-copy > * { animation: rise .7s cubic-bezier(.2, .7, .2, 1) both; }
  .hero-copy > :nth-child(2) { animation-delay: .08s; }
  .hero-copy > :nth-child(3) { animation-delay: .16s; }
  .hero-copy > :nth-child(4) { animation-delay: .24s; }
  .arch { animation: arch-in .9s cubic-bezier(.2, .7, .2, 1) .1s both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes arch-in { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0); } }

/* ---------- Booking ---------- */
/* The card straddles the hero edge: dark behind its top, mist behind the rest */
.book { background: linear-gradient(var(--ink) 90px, var(--mist) 90px); }
.book-card {
  background: var(--paper); border-radius: 24px;
  padding: clamp(20px, 3vw, 32px);
  box-shadow: 0 40px 70px -40px rgba(10, 52, 71, .55), 0 0 0 1px var(--line);
}
.book-head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: .15rem 1.5rem; margin-bottom: 1.25rem;
}
.book-head h2 { font-size: 1.5rem; }
.book-head p { color: var(--muted); font-size: .95rem; }

.book-form { display: grid; grid-template-columns: 1fr 1fr 1.2fr auto; gap: 16px; align-items: start; }
.field label { display: block; margin-bottom: .35rem; font-weight: 600; font-size: .95rem; line-height: 1.8; }
.field input, .field select {
  width: 100%; min-height: 52px; padding: .6rem .9rem;
  border: 1.5px solid rgba(10, 52, 71, .3); border-radius: 12px;
  background: #fff; color: var(--text);
}
.field input[dir="ltr"] { text-align: right; }
.field input::placeholder { color: #7a8d95; }
.field select {
  appearance: none; -webkit-appearance: none;
  padding-left: 2.5rem;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230A3447' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat left .9rem center / 16px;
}
.field input:focus, .field select:focus {
  outline: 3px solid rgba(62, 217, 179, .55); outline-offset: 0; border-color: var(--mint-deep);
}
.field[data-invalid] input, .field[data-invalid] select { border-color: var(--error); }
.err { min-height: 1.6em; margin-top: .25rem; color: var(--error); font-size: .88rem; line-height: 1.6; }
.book-form .btn { margin-top: calc(.95rem * 1.8 + .35rem); }
.form-status { margin-top: .5rem; color: var(--ink); font-weight: 500; }
.form-status:empty { display: none; }

/* ---------- Sections ---------- */
.section { padding-block: clamp(64px, 9vw, 120px); }
.section--mist { background: var(--mist); }
.section-head { max-width: 40rem; margin-bottom: clamp(28px, 4vw, 48px); }
.section-title { font-size: clamp(1.8rem, 3.8vw, 2.7rem); }
.section-head p { margin-top: .6rem; color: var(--muted); }

/* About */
.about-grid {
  display: grid; grid-template-columns: 1.25fr .75fr; align-items: start;
  gap: clamp(32px, 6vw, 88px);
}
.about-copy p { max-width: 36em; margin-top: 1.1rem; font-size: 1.1rem; }
.about-copy .section-title + p { margin-top: 1.5rem; }
.expertise h3 { font-size: 1.15rem; margin-bottom: .75rem; }
.expertise ul { list-style: none; margin: 0; padding: 0; }
.expertise li {
  display: flex; gap: .9rem; align-items: flex-start;
  padding: 1rem 0; border-bottom: 1px solid var(--line); font-weight: 500; line-height: 1.7;
}
.expertise li:first-child { border-top: 1px solid var(--line); }
.expertise svg { flex: none; width: 22px; height: 22px; margin-top: .3rem; color: var(--mint-deep); }

/* Services */
.services {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-auto-flow: column; grid-template-rows: repeat(4, auto);
  column-gap: clamp(32px, 6vw, 88px);
}
.services li { border-bottom: 1px solid var(--line); }
.services li:nth-child(1), .services li:nth-child(5) { border-top: 1px solid var(--line); }
.service {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  width: 100%; padding: 1.2rem .25rem;
  background: none; border: 0; cursor: pointer; text-align: start;
  font-family: var(--f-display); font-weight: 600; font-size: 1.15rem; line-height: 1.5;
  color: var(--ink);
}
.chev {
  display: grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line);
  transition: background-color .2s, border-color .2s;
}
.chev svg { width: 18px; height: 18px; }
.service:hover .chev, .service:focus-visible .chev { background: var(--mint); border-color: var(--mint); }

/* Reviews */
.reviews-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.reviews-head .section-head { margin-bottom: 1.5rem; }
.nav-btns { display: flex; gap: .5rem; margin-bottom: 1.5rem; }
.nav-btn {
  display: grid; place-items: center; width: 48px; height: 48px; padding: 0;
  border-radius: 50%; border: 1.5px solid var(--ink); background: transparent; color: var(--ink);
  cursor: pointer; transition: background-color .2s, color .2s;
}
.nav-btn:hover { background: var(--ink); color: #fff; }
.nav-btn svg { width: 22px; height: 22px; }

.track {
  display: flex; gap: 20px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; padding: 4px 2px 18px; scrollbar-width: thin;
}
.card {
  flex: 0 0 min(330px, 78vw); aspect-ratio: 4 / 5;
  scroll-snap-align: start; border-radius: 20px; overflow: hidden; background: var(--ink);
}
.card > button { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.card img { width: 100%; height: 100%; object-fit: cover; }
.card--video .play {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1rem;
  background: var(--ink); color: #fff; cursor: pointer;
  font-family: var(--f-display); font-weight: 600; font-size: 1.1rem;
}
.play-icon {
  display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%;
  background: var(--mint); color: var(--ink); transition: background-color .2s;
}
.play-icon svg { width: 30px; height: 30px; }
.play:hover .play-icon { background: var(--mint-soft); }
.card--video iframe { display: block; width: 100%; height: 100%; border: 0; }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: min(92vw, 760px); max-height: 92vh; overflow: visible; }
.lightbox::backdrop { background: rgba(6, 28, 39, .85); }
.lightbox img { width: 100%; max-height: 90vh; object-fit: contain; border-radius: 16px; }
.lightbox form { margin: 0; }
.lightbox-close {
  position: absolute; top: 10px; inset-inline-end: 10px;
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%; background: #fff; color: var(--ink); cursor: pointer;
}
.lightbox-close svg { width: 20px; height: 20px; }

/* Closing CTA */
.cta { background: var(--ink); color: #fff; }
.cta-inner { display: grid; grid-template-columns: 1.2fr auto; align-items: center; gap: 2rem; }
.cta h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
.cta p { margin-top: .8rem; max-width: 32em; color: rgba(255, 255, 255, .8); }
.cta-actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Footer */
.site-footer { background: var(--ink-deep); color: rgba(255, 255, 255, .75); padding-block: 28px; font-size: .92rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; }

/* Floating WhatsApp */
.fab {
  position: fixed; inset-block-end: 20px; inset-inline-end: 20px; z-index: 60;
  display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%;
  background: var(--wa); color: #fff; box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .5);
}
.fab svg { width: 28px; height: 28px; }
.fab:focus-visible { outline-color: var(--ink); }

/* ---------- Responsive ---------- */
@media (min-width: 760px) {
  .header-phone { display: inline-flex; }
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .arch-wrap { width: min(100% - 18px, 340px); }
  .book-form { grid-template-columns: 1fr 1fr; }
  .book-form .btn { grid-column: 1 / -1; margin-top: 0; }
  .about-grid { grid-template-columns: 1fr; }
  .services { grid-auto-flow: row; grid-template-rows: none; grid-template-columns: 1fr; }
  .services li:nth-child(5) { border-top: 0; }
  .cta-inner { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .book-form { grid-template-columns: 1fr; gap: 8px; }
  .err:empty { min-height: 0; margin: 0; }
  .brand small { display: none; }
  .hero-actions .btn { flex: 1 1 100%; }
  .cta-actions .btn { flex: 1 1 100%; }
}
