/* ================================================================
   HIBA KHARFA — free booking audit (audit.html)
   Loaded after styles.css. Hiba's palette: Noir, Bone, Crimson.
   Crimson stays on the progress line, the chosen answer, the leak
   marks and the one button per screen.
   ================================================================ */
.page-audit {
  --noir: #0A0A0C;
  --bone: #F4F1EA;
  --crimson: #D11A2A;
  --flare: #F0505D;
  --sand: #CFC6B4;
  --card: rgba(20,18,21,.72);
  background: var(--noir);
  color: rgba(244,241,234,.78);
}
.page-audit h1, .page-audit h2, .page-audit h3, .page-audit strong { color: var(--bone); }
.page-audit .btn-volt { background: var(--crimson); color: var(--bone); }
.page-audit .btn-volt:hover { background: var(--flare); color: var(--noir); }
.page-audit .lang-btn.active { background: var(--bone); color: var(--noir); }

/* header: logo + language only */
.audit-nav .nav-inner { justify-content: space-between; }

/* ---------------- stage ---------------- */
.audit {
  min-height: 100vh; min-height: 100svh;
  padding: clamp(130px, 18vh, 190px) 0 clamp(4rem, 10vh, 7rem);
  overflow: hidden;
}
.audit-glow {
  position: absolute; left: 50%; top: 40%;
  transform: translate(-50%, -50%);
  width: 80vw; height: 80vw; max-width: 1000px; max-height: 1000px;
  background: radial-gradient(circle, rgba(122,16,32,.30) 0%, rgba(122,16,32,.10) 40%, transparent 70%);
  pointer-events: none;
}
.audit-inner { position: relative; z-index: 2; }

/* progress */
.audit-bar {
  display: grid; grid-template-columns: auto 1fr; align-items: center;
  gap: .9rem 1.2rem; margin-bottom: clamp(2.5rem, 6vh, 4rem);
}
.audit-bar[hidden] { display: none; }
.audit-back {
  background: none; border: 0; padding: .4rem 0; cursor: pointer;
  color: var(--dim); transition: color .18s var(--ease);
}
.audit-back:hover { color: var(--bone); }
.audit-count { justify-self: end; }
.audit-track { grid-column: 1 / -1; height: 2px; background: var(--hairline); border-radius: 2px; overflow: hidden; }
.audit-track span {
  display: block; height: 100%; width: 0; background: var(--crimson);
  transition: width .5s var(--ease);
}

/* each screen rises in */
.audit-screen { animation: auRise .55s var(--ease) both; }
@keyframes auRise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.audit-title { margin-bottom: 1.6rem; }
.audit [data-focus]:focus { outline: none; }
.audit-q {
  font-size: clamp(1.9rem, 4vw, 3rem);
  line-height: 1.02; margin-bottom: .9rem; max-width: 24ch;
}
.audit-sub { color: var(--dim); font-size: .95rem; }

/* answers */
.audit-options { list-style: none; padding: 0; display: grid; gap: .7rem; margin-top: 2.2rem; max-width: 640px; }
.audit-opt {
  display: flex; align-items: center; gap: 1rem;
  width: 100%; min-height: 56px; padding: .95rem 1.2rem;
  font: inherit; font-size: 1.05rem; text-align: start; color: var(--bone);
  background: var(--card);
  border: 1px solid var(--hairline); border-radius: 14px;
  cursor: pointer;
  transition: border-color .18s var(--ease), background-color .18s var(--ease), transform .18s var(--ease);
}
.audit-opt:hover { border-color: rgba(244,241,234,.28); }
.audit-opt:active { transform: scale(.985); }
.audit-opt:focus-visible { outline: 2px solid var(--flare); outline-offset: 3px; }
.audit-opt[aria-pressed="true"] { border-color: var(--crimson); background: rgba(209,26,42,.09); }
.audit-key {
  flex-shrink: 0; display: grid; place-items: center;
  width: 1.9rem; height: 1.9rem;
  font-family: var(--f-mono); font-size: .75rem; color: var(--dim);
  border: 1px solid var(--hairline); border-radius: 7px;
  transition: background-color .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.audit-opt[aria-pressed="true"] .audit-key { background: var(--crimson); border-color: var(--crimson); color: var(--bone); }

.audit-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; margin-top: 2.2rem; }
.audit .btn[disabled] { opacity: .35; pointer-events: none; }
.audit-skip {
  background: none; border: 0; padding: .4rem 0; cursor: pointer;
  font: inherit; font-size: .9rem; color: var(--dim);
  border-bottom: 1px solid var(--hairline);
  transition: color .18s var(--ease), border-color .18s var(--ease);
}
.audit-skip:hover { color: var(--bone); border-color: rgba(244,241,234,.3); }
.audit-link { color: var(--dim); border-bottom: 1px solid var(--hairline); }
.audit-link:hover { color: var(--bone); }

/* text fields */
.audit-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2.2rem; max-width: 640px; }
.audit-field { display: grid; gap: .55rem; }
.audit-field input {
  width: 100%; min-height: 54px; padding: .8rem 1rem;
  font: inherit; font-size: 1.05rem; color: var(--bone);
  background: var(--card);
  border: 1px solid var(--hairline); border-radius: 12px;
  transition: border-color .18s var(--ease);
}
.audit-field input:hover { border-color: rgba(244,241,234,.28); }
.audit-field input:focus { outline: none; border-color: var(--crimson); }

/* notes, between questions */
.audit-note-big {
  font-size: clamp(1.55rem, 3vw, 2.3rem); line-height: 1.22;
  font-weight: 500; color: var(--bone);
  max-width: 30ch; text-wrap: balance;
}
.audit-note-small { margin-top: 1.4rem; max-width: 56ch; }
.audit-counter {
  font-family: var(--f-display); font-weight: 700; font-size: clamp(4.5rem, 12vw, 8rem);
  line-height: .9; color: var(--crimson); margin-bottom: 1rem;
}
.audit-fact {
  display: grid; grid-template-columns: auto 1fr; gap: 1.4rem; align-items: start;
  margin: 1.6rem 0 0; max-width: 680px;
  padding: 1.4rem 1.5rem;
  background: var(--card);
  border: 1px solid var(--hairline); border-radius: 16px;
}
.audit-fact-num { font-family: var(--f-display); font-weight: 700; font-size: clamp(2.6rem, 6vw, 3.8rem); line-height: .9; color: var(--bone); }
.audit-fact .mono-label { margin-bottom: .5rem; }
.audit-fact div p:not(.mono-label) { color: var(--sand); font-size: 1rem; }
.audit-fact figcaption { margin-top: .8rem; }
.audit-cost { margin-top: 1.6rem; padding-top: 1.2rem; border-top: 1px solid var(--hairline); max-width: 680px; }
.audit-cost .mono-label { margin-bottom: .45rem; }
.audit-cost p:not(.mono-label) { color: var(--bone); font-weight: 500; }

/* ---------------- the diagnosis ---------------- */
.audit-path {
  list-style: none; padding: 0; display: grid; grid-template-columns: repeat(5, 1fr);
  gap: .6rem; margin: 2.6rem 0 2.4rem;
}
.audit-path li { display: grid; gap: .35rem; padding-top: .9rem; border-top: 2px solid var(--hairline); }
.audit-path-name { font-family: var(--f-display); font-weight: 600; font-size: 1.25rem; line-height: 1; color: var(--dim); }
.audit-path .is-leak { border-top-color: var(--crimson); }
.audit-path .is-leak .audit-path-name { color: var(--bone); }
.audit-path .is-leak .audit-path-status { color: var(--flare); }
.audit-path .is-watch { border-top-color: var(--sand); }
.audit-path .is-watch .audit-path-name { color: var(--sand); }

.audit-lost {
  display: flex; align-items: center; gap: 1.4rem;
  padding: 1.4rem 0; margin-bottom: 2.4rem;
  border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
}
.audit-lost .audit-counter { font-size: clamp(3.5rem, 8vw, 5.5rem); margin: 0; }
.audit-lost p:last-child { max-width: 34ch; }

.audit-cards { display: grid; gap: 1rem; }
.audit-card {
  padding: clamp(1.3rem, 3vw, 1.9rem);
  background: var(--card);
  border: 1px solid var(--hairline); border-radius: 16px;
}
.audit-card.is-leak { border-inline-start: 2px solid var(--crimson); }
.audit-card-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.audit-pill {
  font-family: var(--f-mono); font-size: .68rem; letter-spacing: .12em; text-transform: uppercase;
  padding: .3em .8em; border-radius: 999px; border: 1px solid var(--hairline); color: var(--sand);
}
.audit-card.is-leak .audit-pill { border-color: rgba(209,26,42,.7); color: var(--flare); }
.audit-card h3 { font-size: clamp(1.4rem, 2.5vw, 1.8rem); margin: 1rem 0 .8rem; }
.audit-card p { max-width: 62ch; }
.audit-told { color: var(--dim); font-size: .95rem; margin-bottom: .6rem; }
.audit-pattern { margin-top: 2.4rem; max-width: 60ch; }

.audit-cta { margin-top: clamp(4rem, 9vh, 6rem); padding-top: clamp(3rem, 7vh, 4.5rem); border-top: 1px solid var(--hairline); }
.audit-proof {
  margin: 0 0 1.4rem; padding: 1rem 1.2rem; max-width: 680px;
  border: 1px solid var(--hairline); border-radius: 12px; color: var(--bone);
}
.audit-proof .mono-label { display: block; margin-bottom: .4rem; }
.audit-proof small { display: block; margin-top: .4rem; color: var(--dim); }
.audit-cta .booking-card { margin: 1.4rem 0 1rem; }

@media (max-width: 768px) {
  .audit { padding-top: 110px; }
  .audit-fields { grid-template-columns: 1fr; }
  .audit-path { grid-template-columns: 1fr; gap: 0; }
  .audit-path li {
    grid-template-columns: 2.2rem 1fr auto; align-items: baseline;
    padding: .8rem 0; border-top-width: 1px;
  }
  .audit-path li:last-child { border-bottom: 1px solid var(--hairline); }
  .audit-lost { flex-direction: column; align-items: flex-start; gap: .6rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .audit-fact { grid-template-columns: 1fr; gap: .6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .audit-screen { animation: none; }
  .audit-track span { transition: none; }
}

/* ---------------- Arabic (RTL) ----------------
   styles.css already switches body, headings and mono accents to Cairo under [dir="rtl"]
   (Clash Display and Space Mono carry no Arabic glyphs). These rules cover the audit's own
   display text, give Arabic room to breathe, and mirror what logical properties don't. */
[dir="rtl"] .audit-q,
[dir="rtl"] .audit-note-big,
[dir="rtl"] .audit-path-name,
[dir="rtl"] .audit-fact-num,
[dir="rtl"] .audit-card h3,
[dir="rtl"] .audit-pill,
[dir="rtl"] .audit-opt,
[dir="rtl"] .audit-field input,
[dir="rtl"] .audit-skip { font-family: 'Cairo', 'Satoshi', sans-serif; }
[dir="rtl"] .audit-q { line-height: 1.35; max-width: 26ch; }
[dir="rtl"] .audit-title, [dir="rtl"] .audit-cta .h3 { line-height: 1.35; }
[dir="rtl"] .audit-note-big { line-height: 1.55; }
[dir="rtl"] .audit-card h3 { line-height: 1.4; }
[dir="rtl"] .audit-path-name { line-height: 1.3; }
[dir="rtl"] .audit-pill { letter-spacing: .02em; text-transform: none; }
/* the Arabic fact figures are words ("قرابة 7 مرات"), so they run smaller than the FR/EN numerals */
[dir="rtl"] .audit-fact-num { font-size: clamp(1.6rem, 4vw, 2.3rem); line-height: 1.25; font-weight: 700; }
/* the HBR citations stay in English: left-to-right inside a right-aligned block */
[dir="rtl"] .audit-fact figcaption { direction: ltr; text-align: right; unicode-bidi: isolate; }
/* the counter and the numeric inputs keep Western digits */
[dir="rtl"] .audit-counter { direction: ltr; text-align: right; }
[dir="rtl"] .audit-field input[inputmode="numeric"] { text-align: right; }
/* the progress fill grows from the right */
[dir="rtl"] .audit-track span { margin-inline-start: 0; margin-left: auto; }
[dir="rtl"] .audit-lost .audit-counter { text-align: right; }
