/* Omanzil components: the website, the booking page and any other web page.
   Load tokens.css first (this file imports it). Every class starts with "om-".
   Rules that keep the brand (brand/kit.html sections 4, 5 and 11):
   - one copper button per screen (.om-btn--primary); everything else is secondary, tertiary or a link
   - at most two Oman elements per screen (peaks, contours, arch, falaj steps, bilingual label, ridge, grain)
   - right-to-left works by setting dir="rtl" on <html>: the file uses logical properties throughout */

@import url("tokens.css");

/* ---------- base ---------- */
.om-page {
  margin: 0;
  background: var(--om-bg);
  color: var(--om-text);
  font: var(--om-weight-text) var(--om-size-body)/1.6 var(--om-font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.om-page *, .om-page *::before, .om-page *::after { box-sizing: border-box; }
[dir="rtl"] .om-page, .om-page[dir="rtl"], .om-ar { font-family: var(--om-font-arabic); }
[dir="rtl"] .om-page, .om-page[dir="rtl"] { font-size: 17px; line-height: 1.75; }

.om-wrap { max-width: var(--om-page-max); margin-inline: auto; padding-inline: max(16px, env(safe-area-inset-left, 0px)); }
.om-section { padding-block: var(--om-space-8); }
.om-section--white { background: var(--om-white); }
.om-section--deep { background: var(--om-sea-deep); color: var(--om-on-deep-text); }

.om-h1, .om-h2, .om-h3, .om-h4 { font-weight: var(--om-weight-heading); margin: 0; letter-spacing: -.015em; text-wrap: balance; }
.om-h1 { font-size: var(--om-size-display); line-height: 1.08; }
.om-h2 { font-size: var(--om-size-h2); line-height: 1.15; }
.om-h3 { font-size: var(--om-size-h3); line-height: 1.25; }
.om-h4 { font-size: 16px; line-height: 1.3; }
[dir="rtl"] .om-h1, [dir="rtl"] .om-h2, [dir="rtl"] .om-h3 { letter-spacing: 0; line-height: 1.35; }
.om-lead { font-size: 18px; color: var(--om-text-muted); max-width: 46ch; margin: var(--om-space-3) 0 0; }
.om-muted { color: var(--om-text-muted); }
.om-small { font-size: var(--om-size-small); }
.om-num { font-variant-numeric: tabular-nums; }
.om-link { color: var(--om-brand); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.om-link:hover { text-decoration-thickness: 2px; }

/* uppercase label; the bilingual version puts the Arabic word at the other end of the line (element 5) */
.om-label { font-size: var(--om-size-label); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--om-text-muted); }
.om-bilabel { display: flex; justify-content: space-between; align-items: baseline; gap: var(--om-space-4); }
.om-bilabel .om-ar { letter-spacing: 0; text-transform: none; font-size: 13px; }

/* ---------- logo ---------- */
.om-logo { display: block; height: auto; width: 150px; color: var(--om-ink); }
.om-logo--white { color: var(--om-white); }
.om-logo--sea { color: var(--om-sea); }

/* ---------- buttons ---------- */
.om-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--om-space-2);
  min-height: 44px; padding: 12px 20px; border-radius: var(--om-radius); border: 1.5px solid transparent;
  font-family: inherit; font-size: 15px; font-weight: var(--om-weight-button); line-height: 1.2; text-decoration: none; white-space: nowrap;
  cursor: pointer; transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.om-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--om-cream), 0 0 0 5px var(--om-focus); }
.om-btn--primary { background: var(--om-action); color: #fff; }
.om-btn--primary:hover { background: var(--om-action-hover); }
.om-btn--secondary { background: transparent; color: var(--om-sea); border-color: var(--om-sea); font-weight: 500; }
.om-btn--secondary:hover { background: var(--om-shallows); }
.om-btn--tertiary { background: transparent; color: var(--om-sea); font-weight: 500; padding-inline: 4px; text-decoration: underline; text-underline-offset: 3px; }
.om-btn--whatsapp { background: var(--om-white); color: var(--om-ink); border-color: var(--om-sand); font-weight: 500; }
.om-btn--on-deep { background: var(--om-white); color: var(--om-sea); }
.om-btn--sm { min-height: 36px; padding: 8px 14px; font-size: 14px; }
.om-btn--block { display: flex; width: 100%; }
.om-btn:disabled, .om-btn[aria-disabled="true"] { background: var(--om-sand); color: var(--om-stone); border-color: transparent; cursor: not-allowed; }
.om-btn .om-icon { width: 18px; height: 18px; }

/* ---------- forms ---------- */
.om-field { display: grid; gap: 6px; font-size: 14px; }
.om-field > label, .om-field > .om-field__label { font-weight: 500; color: var(--om-ink); }
.om-input, .om-select, .om-textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--om-input-border); border-radius: var(--om-radius);
  background: var(--om-white); color: var(--om-ink); font: inherit; font-size: 16px; /* 16px stops phones zooming in */
}
.om-textarea { min-height: 110px; resize: vertical; }
.om-input::placeholder, .om-textarea::placeholder { color: #8C8377; }
.om-input:focus, .om-select:focus, .om-textarea:focus { outline: none; border-color: var(--om-sea); box-shadow: 0 0 0 3px var(--om-shallows); }
.om-input[aria-invalid="true"], .om-select[aria-invalid="true"], .om-textarea[aria-invalid="true"] { border-color: var(--om-error); }
.om-help { font-size: 13px; color: var(--om-stone); }
.om-help--error { color: var(--om-error); }
.om-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.om-check input { accent-color: var(--om-sea); width: 18px; height: 18px; margin: 2px 0 0; }

/* phone with country code */
.om-phone { display: grid; grid-template-columns: minmax(96px, auto) minmax(0, 1fr); gap: var(--om-space-2); }

/* ---------- tags, chips, badges ---------- */
.om-tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: 3px; border: 1px solid transparent;
  font-size: 10.5px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; background: var(--om-cream); color: var(--om-sea); }
[dir="rtl"] .om-tag { letter-spacing: 0; font-size: 12px; }
.om-tag--sea { background: var(--om-sea); color: #fff; }
.om-tag--outline { background: transparent; border-color: var(--om-sand); color: var(--om-stone); }
.om-tag--sold { background: var(--om-sand); color: var(--om-stone); }
.om-tag--new { background: var(--om-copper); color: #fff; } /* launches only; never next to a copper button */

.om-chip { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 7px 14px; border-radius: 999px;
  border: 1px solid var(--om-input-border); background: var(--om-white); color: var(--om-ink); font: inherit; font-size: 14px; cursor: pointer; }
.om-chip[aria-pressed="true"], .om-chip--on { background: var(--om-sea); border-color: var(--om-sea); color: #fff; }

/* ---------- booking: days and time slots ---------- */
.om-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.om-day { display: grid; place-items: center; gap: 2px; padding: 8px 2px; border-radius: var(--om-radius); border: 1px solid transparent;
  background: transparent; color: var(--om-ink); font: inherit; font-size: 13px; cursor: pointer; }
.om-day b { font-size: 16px; font-weight: 500; font-variant-numeric: tabular-nums; }
.om-day[aria-pressed="true"] { background: var(--om-sea); color: #fff; }
.om-day:disabled { color: #B9B1A7; cursor: default; }
.om-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: var(--om-space-2); }
.om-slot { min-height: 44px; padding: 10px 6px; border: 1px solid var(--om-input-border); border-radius: var(--om-radius);
  background: var(--om-white); color: var(--om-sea); font: inherit; font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; cursor: pointer; }
.om-slot:hover { border-color: var(--om-sea); }
.om-slot[aria-pressed="true"] { background: var(--om-sea); border-color: var(--om-sea); color: #fff; }
.om-slot:disabled { color: #B9B1A7; border-style: dashed; cursor: default; }

/* ---------- price and figures ---------- */
.om-price { font-size: 20px; font-weight: 600; color: var(--om-sea); font-variant-numeric: tabular-nums; }
.om-price small { font-size: 13px; font-weight: 400; color: var(--om-stone); margin-inline-start: 6px; }
.om-stat { display: grid; gap: 2px; }
.om-stat b { font-size: 28px; font-weight: 500; letter-spacing: -.015em; color: var(--om-sea); font-variant-numeric: tabular-nums; }
.om-stat span { font-size: 13px; color: var(--om-stone); }
.om-facts { display: flex; flex-wrap: wrap; gap: 6px 24px; font-size: 14px; color: var(--om-stone); }
.om-facts b { color: var(--om-ink); font-weight: 600; }

/* price and payment tables */
.om-table { width: 100%; border-collapse: collapse; background: var(--om-white); font-size: 14px; font-variant-numeric: tabular-nums; }
.om-table th, .om-table td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--om-sand); }
.om-table th { font-size: 11.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--om-stone); }
.om-table .om-num, .om-table td.num, .om-table th.num { text-align: end; }
.om-table tr.om-total td { font-weight: 600; color: var(--om-sea); border-top: 1.5px solid var(--om-sea); border-bottom: 0; }
.om-table-scroll { overflow-x: auto; }

/* ---------- the falaj line: every step-by-step (element 4) ---------- */
.om-steps { list-style: none; margin: 0; padding: 0; padding-inline-start: 28px; position: relative; display: grid; }
.om-steps::before { content: ""; position: absolute; inset-inline-start: 8px; top: 8px; bottom: 8px; width: 2px; background: var(--om-sea); border-radius: 1px; }
.om-step { position: relative; padding-block-end: 20px; font-size: 15px; }
.om-step:last-child { padding-block-end: 0; }
.om-step::before { content: ""; position: absolute; inset-inline-start: -25px; top: 6px; width: 12px; height: 12px; border-radius: 50%;
  background: var(--om-cream); border: 2px solid var(--om-sea); }
.om-step--done::before { background: var(--om-sea); }
.om-step b { display: block; font-weight: 600; }
.om-step span { color: var(--om-stone); font-size: 14px; }
@media (min-width: 900px) {
  .om-steps--row { grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: var(--om-space-4); padding-inline-start: 0; padding-top: 28px; }
  .om-steps--row::before { inset-inline: 6px; top: 13px; bottom: auto; width: auto; height: 2px; }
  .om-steps--row .om-step::before { inset-inline-start: 0; top: -21px; }
  .om-steps--row .om-step { padding-block-end: 0; }
}

/* questions and answers: <details class="om-faq"><summary>Question</summary><p>Answer</p></details> */
.om-faq { border-bottom: 1px solid var(--om-sand); }
.om-faq:first-of-type { border-top: 1px solid var(--om-sand); }
.om-faq summary { display: flex; justify-content: space-between; gap: var(--om-space-4); padding: 14px 0; font-weight: 500; cursor: pointer; list-style: none; }
.om-faq summary::-webkit-details-marker { display: none; }
.om-faq summary::after { content: "+"; color: var(--om-sea); font-weight: 400; font-size: 20px; line-height: 1; }
.om-faq[open] summary::after { content: "\2212"; }
.om-faq p { margin: 0 0 14px; color: var(--om-stone); font-size: 15px; max-width: 70ch; }

/* ---------- notices ---------- */
.om-notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--om-radius); font-size: 14px; }
.om-notice--info { background: var(--om-shallows); color: var(--om-sea); }
.om-notice--good { background: var(--om-good-bg); color: var(--om-good); }
.om-notice--warn { background: var(--om-warn-bg); color: var(--om-warn); }
.om-notice--error { background: var(--om-error-bg); color: var(--om-error); }

/* ---------- cards ---------- */
.om-grid { display: grid; gap: var(--om-space-4); grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.om-card { display: grid; grid-template-rows: auto 1fr; border: 1px solid var(--om-sand); border-radius: var(--om-radius-card); overflow: hidden;
  background: var(--om-white); color: var(--om-ink); min-width: 0; }
.om-card__img { position: relative; aspect-ratio: 16 / 10; background: var(--om-shallows) center / cover no-repeat; }
.om-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.om-card__img .om-tag { position: absolute; top: 10px; inset-inline-start: 10px; }
.om-card__body { display: grid; gap: 6px; align-content: start; padding: 14px 16px 16px; }
.om-card__title { font-size: 18px; font-weight: 500; letter-spacing: -.01em; line-height: 1.25; margin: 0; }
.om-card__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--om-stone); }
.om-card__meta .om-icon { width: 15px; height: 15px; margin-inline-end: 4px; }
.om-card__actions { margin-top: 8px; display: flex; gap: var(--om-space-2); }
.om-card--sold .om-card__img { filter: grayscale(.6); }

.om-agent { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: var(--om-space-3); align-items: center;
  padding: var(--om-space-3); border: 1px solid var(--om-sand); border-radius: var(--om-radius-card); background: var(--om-white); font-size: 14px; }
.om-agent__photo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--om-shallows); }

.om-review { margin: 0; border-inline-start: 2px solid var(--om-gold); padding: 4px 0; padding-inline-start: 14px; font-size: 15px; }
.om-review cite { display: block; margin-top: 6px; font-size: 13px; font-style: normal; color: var(--om-stone); }

/* ---------- header ---------- */
.om-header { position: sticky; top: 0; z-index: 20; background: var(--om-cream); border-bottom: 1px solid var(--om-sand); }
.om-header__in { display: flex; align-items: center; justify-content: space-between; gap: var(--om-space-4); min-height: 64px; }
.om-header .om-logo { width: 150px; }
.om-nav { display: flex; gap: 22px; font-size: 15px; }
.om-nav a { color: var(--om-ink); text-decoration: none; }
.om-nav a:hover, .om-nav a[aria-current="page"] { color: var(--om-sea); text-decoration: underline; text-underline-offset: 6px; }
.om-switch { border: 1px solid var(--om-input-border); border-radius: 3px; padding: 3px 7px; background: var(--om-white); color: var(--om-ink); font: inherit; font-size: 13px; }
.om-header__util { display: flex; gap: 10px; align-items: center; }
@media (max-width: 900px) { .om-nav, .om-header__util .om-switch { display: none; } .om-header .om-logo { width: 128px; } }

/* sticky action bar on phones (project and unit pages) */
.om-sticky-cta { position: sticky; bottom: 0; z-index: 15; display: flex; justify-content: space-between; align-items: center; gap: var(--om-space-3);
  padding: 10px max(16px, env(safe-area-inset-left, 0px)) calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--om-white); border-top: 1px solid var(--om-sand); font-size: 14px; }
@media (min-width: 900px) { .om-sticky-cta { display: none; } }

/* ---------- footer (deep sea, Muscat contours at 14 percent, no fort edge) ---------- */
.om-footer { position: relative; overflow: hidden; background: var(--om-sea-deep); color: var(--om-on-deep-text); font-size: 14px; padding-block: var(--om-space-7) var(--om-space-5); }
.om-footer .om-contours { color: var(--om-on-deep-label); opacity: .14; }
.om-footer__grid { position: relative; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--om-space-5); }
.om-footer .om-logo { width: 170px; color: var(--om-white); }
.om-footer h2, .om-footer h3, .om-footer__head { margin: 0 0 8px; font-size: var(--om-size-label); font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: var(--om-on-deep-label); }
.om-footer a { color: var(--om-on-deep-text); text-decoration: none; display: block; line-height: 2; }
.om-footer a:hover { color: var(--om-white); text-decoration: underline; }
.om-footer__legal { position: relative; margin-top: var(--om-space-6); padding-top: var(--om-space-3); border-top: 1px solid rgba(213, 230, 230, .25);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--om-space-3); font-size: 12.5px; color: var(--om-on-deep-muted); }
@media (max-width: 760px) { .om-footer__grid { grid-template-columns: 1fr 1fr; } .om-footer__grid > :first-child { grid-column: 1 / -1; } }

/* ---------- Oman elements ---------- */
/* 1 peaks: inline elements/peaks.svg with class="om-peaks", or .om-list-peaks for bullets (same drawing, inlined below) */
.om-peaks { width: 18px; height: 14px; color: var(--om-sea); flex: none; }
.om-list-peaks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.om-list-peaks li { display: flex; gap: 10px; align-items: baseline; }
.om-list-peaks li::before { content: ""; flex: none; width: 16px; height: 12px; background: var(--om-sea);
  --om-peaks-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 12 128 100'><path d='M4.5 108 48.5 20 69.485 61.97 43.5 108Z'/><path d='M53.5 108 88.5 46 123.5 108Z'/></svg>");
  -webkit-mask: var(--om-peaks-mask) center / contain no-repeat; mask: var(--om-peaks-mask) center / contain no-repeat; transform: translateY(1px); }

/* 2 contours: an inline contour SVG (elements/contours/<area>.svg) inside a positioned box */
.om-contours { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; color: var(--om-gold); opacity: .55; }
.om-contours--behind-text { opacity: .15; } /* never stronger behind text */

/* 3 arch: put elements/arch.svg in the page once; one arch per page, key photo only */
/* places and buildings only; a person's photo is .om-avatar (a circle), never the arch */
.om-arch { clip-path: url(#omArch); aspect-ratio: 4 / 5; width: 100%; object-fit: cover; display: block; }
.om-avatar { width: 64px; aspect-ratio: 1; border-radius: 50%; object-fit: cover; display: inline-grid; place-items: center; overflow: hidden;
  background: var(--om-shallows); color: var(--om-sea); font-weight: 600; font-size: 22px; letter-spacing: .02em; }
.om-avatar--sm { width: 40px; font-size: 14px; }
.om-avatar--lg { width: 112px; font-size: 34px; }
@media (max-width: 760px) { .om-arch { aspect-ratio: 4 / 3; } }

/* 6 ridge: elements/ridge-muttrah.svg as the one seam per page, cream above, white below */
.om-ridge { display: block; width: 100%; height: 48px; color: var(--om-gold); background: var(--om-cream); --om-ridge-below: var(--om-white); }

/* 7 grain on cream surfaces */
.om-grain { background-image: var(--om-grain); }

/* ---------- icons (1.5 px line, 16 to 20 px) ---------- */
.om-icon { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; flex: none; }

/* ---------- layout helpers used by the page types ---------- */
.om-hero { display: grid; grid-template-columns: 5fr 6fr; gap: var(--om-space-6); align-items: center; padding-block: var(--om-space-7) 0; }
.om-actions { display: flex; flex-wrap: wrap; gap: var(--om-space-3); align-items: center; margin-top: var(--om-space-5); }
.om-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--om-space-5); align-items: start; }
.om-gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 180px 180px; gap: 6px; }
.om-gallery > * { width: 100%; height: 100%; object-fit: cover; border-radius: 3px; }
.om-gallery > :first-child { grid-row: 1 / 3; }
@media (max-width: 900px) {
  .om-hero, .om-two { grid-template-columns: 1fr; }
  .om-gallery { grid-template-columns: 1fr 1fr; grid-template-rows: 140px 140px; }
}

/* skeleton while loading */
.om-skeleton { background: linear-gradient(90deg, var(--om-sand) 0 40%, #F1E9DE 50%, var(--om-sand) 60% 100%) 0 0 / 300% 100%; border-radius: 3px; animation: om-shimmer 1.4s linear infinite; }
@keyframes om-shimmer { to { background-position: -150% 0; } }
@media (prefers-reduced-motion: reduce) { .om-skeleton { animation: none; } .om-btn { transition: none; } }
