/* ghalai.com — Ghala's public page.
   Dark-committed: the brand assets in brand/ bake a dark ground into both logos.
   Logical properties throughout so the RTL flow stays honest. */

@font-face {
  font-family: 'Plex Arabic';
  src: url('../fonts/plex-arabic-regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Plex Arabic';
  src: url('../fonts/plex-arabic-bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

:root {
  --ground: #0b0e0c;
  --surface: #121714;
  --surface-2: #171e1a;
  --line: #232c26;
  --ink: #e9ede8;
  --muted: #a2ada3;
  --muted-dim: #7d877f;
  --green: #43d97b;
  --green-deep: #2ea85c;
  --green-glow: rgba(67, 217, 123, 0.09);
  --radius: 16px;
  --measure: 62ch;
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: 'Plex Arabic', 'IBM Plex Sans Arabic', system-ui, -apple-system, sans-serif;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Latin runs — Arabic bidi reorders the segments of a compound number
   (a phone, a date, a version) and silently shows a value nobody wrote. */
.ltr {
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

a { color: var(--green); }

:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}

.wrap {
  width: min(100% - 2.5rem, 68rem);
  margin-inline: auto;
}

.prose { max-width: var(--measure); }

/* ── hero ─────────────────────────────────────────────── */

.hero {
  position: relative;
  padding-block: clamp(2.5rem, 7vw, 5rem) clamp(3rem, 8vw, 6rem);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset-block-start: -30%;
  inset-inline: -10%;
  height: 80%;
  background: radial-gradient(ellipse 60% 60% at 50% 40%, var(--green-glow), transparent 70%);
  pointer-events: none;
}

.hero > * { position: relative; }

.mark {
  display: block;
  width: clamp(126px, 22vw, 176px);
  height: auto;
  margin-block-end: clamp(1.75rem, 5vw, 2.75rem);
}

h1 {
  margin: 0;
  font-size: clamp(1.9rem, 1.15rem + 3.6vw, 3.5rem);
  line-height: 1.28;
  font-weight: 700;
  letter-spacing: -0.01em;
  /* keeps «محادثة واتساب» whole on the second line instead of orphaning one word */
  max-width: 13ch;
  text-wrap: balance;
}

.lede {
  margin-block: 1.25rem 0;
  max-width: 46ch;
  font-size: clamp(1.05rem, 1rem + 0.5vw, 1.35rem);
  color: var(--muted);
  line-height: 1.7;
  text-wrap: pretty;
}

.lede strong {
  color: var(--ink);
  font-weight: 400;
}

/* ── call to action ───────────────────────────────────── */

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem 1.75rem;
  margin-block-start: clamp(2rem, 5vw, 2.75rem);
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  background: var(--green);
  color: #06170d;
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  transition: transform 0.15s ease, background-color 0.15s ease;
}

.cta:hover {
  background: #5ce890;
  transform: translateY(-1px);
}

.cta svg {
  width: 1.3em;
  height: 1.3em;
  flex: none;
}

.number {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  line-height: 1.4;
}

.number .num {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.number .num-label {
  font-size: 0.85rem;
  color: var(--muted-dim);
}

.micro {
  margin-block-start: 1.5rem;
  font-size: 0.92rem;
  color: var(--muted-dim);
}

/* ── the growing line: the sprout motif carried down the page ── */

main { position: relative; }

section {
  padding-block: clamp(2.75rem, 7vw, 4.5rem);
  border-block-start: 1px solid var(--line);
}

h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.35rem, 1.15rem + 1vw, 1.9rem);
  font-weight: 700;
  line-height: 1.4;
}

h2 .leaf {
  display: inline-block;
  width: 0.72em;
  height: 0.72em;
  margin-inline-end: 0.5rem;
  vertical-align: baseline;
  color: var(--green);
}

.section-note {
  margin: 0 0 clamp(1.75rem, 4vw, 2.5rem);
  color: var(--muted);
  max-width: 52ch;
}

/* ── services ─────────────────────────────────────────── */

/* four services — two-by-two, never three-plus-a-lonely-one */
.services {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (min-width: 42rem) {
  .services { grid-template-columns: repeat(2, 1fr); }
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.4rem 1.5rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.card h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.65;
}

/* what you type — one bubble, the visitor's own words.
   Deliberately no reply bubble: we do not put words in Ghala's mouth. */
.bubble {
  margin-block-start: auto;
  padding-block-start: 1rem;
}

.bubble .msg {
  display: inline-block;
  position: relative;
  padding: 0.6rem 0.9rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 14px;
  border-start-end-radius: 4px;
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.6;
}

.bubble-label {
  display: block;
  margin-block-end: 0.45rem;
  font-size: 0.78rem;
  color: var(--muted-dim);
  letter-spacing: 0.02em;
}

/* ── escalation strip ─────────────────────────────────── */

.escalate {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
  padding: clamp(1.4rem, 3.5vw, 2rem);
  background: linear-gradient(135deg, rgba(67, 217, 123, 0.08), transparent 65%);
  border: 1px solid rgba(67, 217, 123, 0.28);
  border-radius: var(--radius);
}

.escalate p {
  margin: 0;
  flex: 1 1 22rem;
  color: var(--muted);
}

.escalate strong { color: var(--ink); }

.quote {
  display: inline-block;
  padding: 0.55rem 1rem;
  background: rgba(67, 217, 123, 0.12);
  border-radius: 999px;
  color: var(--green);
  font-weight: 700;
  white-space: nowrap;
}

/* ── limits ───────────────────────────────────────────── */

.limits {
  display: grid;
  gap: 0.85rem;
  list-style: none;
  margin: 0;
  padding: 0;
  max-width: var(--measure);
}

.limits li {
  display: grid;
  grid-template-columns: 1.6rem 1fr;
  gap: 0.6rem;
  padding: 1.1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.7;
}

.limits b {
  color: var(--ink);
  font-weight: 700;
}

.limits .x {
  color: var(--muted-dim);
  font-size: 1.1rem;
  line-height: 1.55;
  text-align: center;
}

/* ── cost + how it works ──────────────────────────────── */

.two-up {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: clamp(1.75rem, 5vw, 3.5rem);
  align-items: start;
}

.plain {
  margin: 0;
  color: var(--muted);
  max-width: 46ch;
}

.plain + .plain { margin-block-start: 0.9rem; }

.plain b { color: var(--ink); }

.free {
  display: inline-block;
  margin-block-end: 1rem;
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem);
  font-weight: 700;
  color: var(--green);
}

/* ── qr ───────────────────────────────────────────────── */

.qr-block {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.qr-block svg {
  width: 7.5rem;
  height: 7.5rem;
  flex: none;
  border-radius: 8px;
}

.qr-block p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ── footer ───────────────────────────────────────────── */

footer {
  padding-block: clamp(2.5rem, 6vw, 3.5rem) clamp(3rem, 7vw, 4rem);
  border-block-start: 1px solid var(--line);
  color: var(--muted-dim);
  font-size: 0.9rem;
}

footer .rows {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 2rem;
}

footer p { margin: 0; }

footer a {
  color: var(--muted);
  text-decoration-color: var(--line);
  /* Measured at 390px: the hit area was 23px tall — one pixel under the 24px
     floor. The negative margin cancels the padding visually, so the row keeps
     its rhythm and only the touch target grows. Every visitor here is on a
     phone: this page exists to be opened from WhatsApp. */
  display: inline-block;
  padding-block: 0.6rem;
  margin-block: -0.6rem;
}

footer a:hover { color: var(--green); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; }
}

/* ── privacy page ─────────────────────────────────────
   Reuses .wrap .card .two-up .escalate .quote .ltr from above.
   Only what a long-form document needs is added here. */

.doc-head {
  padding-block: clamp(2rem, 6vw, 3.5rem) clamp(1.5rem, 4vw, 2.5rem);
  border-block-end: 1px solid var(--line);
}

.back {
  display: inline-block;
  margin-block-end: 1.5rem;
  color: var(--muted-dim);
  font-size: 0.9rem;
  text-decoration: none;
}

/* No arrow glyph: an arrow is directionally strong and flips or reads as
   "opens elsewhere" inside RTL text. A bordered chip says "go back" with
   zero ambiguity in either direction. */
.back {
  padding: 0.55rem 0.95rem;   /* 40px tall → 44px, the comfortable-touch floor */
  border: 1px solid var(--line);
  border-radius: 999px;
}
.back:hover { color: var(--green); border-color: rgba(67, 217, 123, 0.4); }

/* plain block, not the hero's .number: that one is a flex column and an
   ltr child inside it hugs the wrong edge. */
.contact {
  margin-block: 1.25rem 0.15rem;
  font-size: 1.15rem;
  font-weight: 700;
}

.contact-label { margin: 0; color: var(--muted-dim); font-size: 0.85rem; }

.doc-title {
  margin: 0;
  font-size: clamp(1.9rem, 1.4rem + 2.4vw, 3rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.doc-sec { padding-block: clamp(2.25rem, 5vw, 3.25rem); }
.doc-sec.alt { background: var(--surface); border-block: 1px solid var(--line); }

.doc-sec h2 {
  margin: 0 0 1.5rem;
  font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.55rem);
  font-weight: 700;
}

.lede.small {
  max-width: var(--measure);
  font-size: clamp(1rem, 0.97rem + 0.25vw, 1.12rem);
}

/* the "what we keep" list — a term and its plain explanation, stacked */
.keep {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.85rem;
  max-width: var(--measure);
}

.keep li {
  padding: 1rem 1.15rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.7;
}

.doc-sec.alt .keep li { background: var(--surface-2); }
.keep strong { display: block; margin-block-end: 0.3rem; color: var(--ink); font-weight: 700; }
.keep li > strong ~ strong { display: inline; margin: 0; }

/* an admission, not a warning — amber because it is a gap we own, not a danger */
.warn {
  max-width: var(--measure);
  margin-block: 1.5rem 0;
  padding: 1.15rem 1.3rem;
  background: rgba(217, 160, 67, 0.07);
  border: 1px solid rgba(217, 160, 67, 0.3);
  border-radius: var(--radius);
}

.warn p { margin: 0; color: var(--ink); }
.warn .plain { margin-block-start: 0.5rem; color: var(--muted); font-size: 0.95rem; line-height: 1.7; }

.doc-sec .section-note {
  max-width: var(--measure);
  margin-block: 2rem 1rem;
  color: var(--muted-dim);
  font-size: 0.95rem;
}

.doc-sec .two-up { margin-block-start: 1.25rem; }
.doc-sec .escalate { max-width: var(--measure); margin-block-start: 1.5rem; }

/* 🔴 placeholder block — must be visible at a glance that it is unfilled */
.ph {
  padding: 1rem 1.15rem;
  background: rgba(217, 83, 79, 0.07);
  border: 1px dashed rgba(217, 83, 79, 0.45);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 2;
}

.ph-slot { color: var(--muted-dim); letter-spacing: 0.15em; }

.inline-link {
  color: var(--green);
  text-decoration: none;
  border-block-end: 1px solid rgba(67, 217, 123, 0.35);
}
.inline-link:hover { border-block-end-color: var(--green); }
