/* Hala public site. Plain CSS, no build step.
   Palette and contrast rules: docs/brand/README.md. Navy and champagne gold for
   the header, hero and footer; warm ivory with navy ink for reading. Light gold
   is only ever a fill or text on navy; gold-coloured text on light is bronze.
   Logical properties (inline-start/end) so Arabic (dir=rtl) mirrors itself. */
:root {
  --navy: #0b1b2b;
  --navy-2: #15293d;
  --gold: #d4b171;
  --gold-light: #f1dfb4;
  --gold-pale: #e4cfa7; /* gold text and links on navy */
  --bronze: #7d5f27; /* gold-coloured text on light, 5.4:1 on ivory */
  --bronze-deep: #5e461b; /* hover */
  --teal: #103439;
  --ivory: #f7f4ec;
  --paper: #ffffff;
  --ink: #0b1b2b;
  --muted: #5a6573; /* 5.4:1 on ivory */
  --on-navy: #f5f1e8;
  --on-navy-muted: #c9d2db; /* 9.7:1 on navy-2 */
  --line: #e7e1d4;
  --hairline-gold: rgb(212 177 113 / 0.45);
  --radius: 14px;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  font-family: Inter, "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
}
html[lang="ar"] { font-family: "IBM Plex Sans Arabic", "Noto Sans Arabic", Tahoma, system-ui, sans-serif; }
* { box-sizing: border-box; }
body {
  margin: 0; color: var(--ink); background: var(--ivory); font-size: 18px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
html[lang="ar"] body { line-height: 1.75; }
a { color: var(--bronze); text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color 0.2s var(--ease); }
a:hover { color: var(--bronze-deep); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: 980px; margin: 0 auto; padding: 0 20px; }
.wrap.wide { max-width: 1100px; }
.muted { color: var(--muted); }

.skip { position: absolute; inset-inline-start: 12px; top: -48px; z-index: 10; background: var(--gold); color: var(--navy); padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }

/* Header: navy with a fine gold horizon line. Wraps to two rows on phones. */
header.top { background: var(--navy); border-bottom: 1px solid var(--hairline-gold); }
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: inline-flex; align-items: baseline; gap: 8px; font-weight: 600; font-size: 20px; color: var(--on-navy); text-decoration: none; letter-spacing: 0.01em; }
.brand:hover { color: var(--on-navy); }
.brand img { width: 30px; height: 30px; border-radius: 7px; flex: none; align-self: center; }
.brand-by { color: var(--gold); font-weight: 500; font-size: 14px; }
.main-nav { order: 3; flex: 1 1 100%; display: flex; gap: 4px 18px; overflow-x: auto; scrollbar-width: none; }
.main-nav a, .langs a { color: var(--on-navy-muted); text-decoration: none; font-size: 15px; white-space: nowrap; min-height: 36px; display: inline-flex; align-items: center; }
.main-nav a:hover, .langs a:hover { color: var(--gold-light); }
.main-nav a[aria-current="page"] { color: var(--gold-pale); box-shadow: inset 0 -1px 0 var(--gold); }
.bar-end { margin-inline-start: auto; display: flex; align-items: center; gap: 14px; }
.langs { display: flex; gap: 10px; }
.langs a[aria-current="true"] { color: var(--gold-pale); font-weight: 600; }
.login {
  display: inline-flex; align-items: center; min-height: 40px; padding: 6px 18px; border-radius: 999px;
  border: 1px solid var(--hairline-gold); color: var(--on-navy); text-decoration: none; font-size: 15px; white-space: nowrap;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.login:hover { background: var(--gold); border-color: var(--gold); color: var(--navy); }

/* Hero: midnight navy, as in the icon, with gold accents. */
.hero {
  background: radial-gradient(120% 90% at 50% 100%, var(--navy-2) 0%, var(--navy) 70%);
  color: var(--on-navy); padding: 56px 0 64px; border-bottom: 1px solid var(--hairline-gold);
}
.hero-sm { padding: 40px 0 44px; }
.hero h1 { color: var(--on-navy); font-weight: 600; letter-spacing: -0.015em; max-width: 22ch; }
.hero p.lead { color: var(--on-navy-muted); max-width: 52ch; margin: 0 0 28px; }
.hero-sm p.lead { margin-bottom: 0; }
.horizon {
  height: 1px; width: 120px; margin: 0 0 28px; border: 0;
  background: linear-gradient(90deg, transparent, var(--gold) 22%, var(--gold) 78%, transparent);
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.cta, .ghost {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 28px; border-radius: 999px;
  font-weight: 600; letter-spacing: 0.01em; text-decoration: none;
  transition: background-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease), color 0.2s var(--ease);
}
.cta {
  background: var(--gold); color: var(--navy);
  box-shadow: 0 0 0 1px rgb(241 223 180 / 0.35) inset, 0 8px 24px -10px rgb(212 177 113 / 0.55);
}
.cta:hover { background: var(--gold-light); color: var(--navy); transform: translateY(-1px); box-shadow: 0 0 0 1px rgb(241 223 180 / 0.6) inset, 0 12px 28px -10px rgb(212 177 113 / 0.7); }
.cta:active { transform: scale(0.98); }
.ghost { border: 1px solid var(--hairline-gold); color: var(--on-navy); }
.ghost:hover { border-color: var(--gold); color: var(--gold-light); }
.ghost-dark { border-color: var(--line); color: var(--ink); background: var(--paper); }
.ghost-dark:hover { border-color: var(--gold); color: var(--bronze-deep); }

/* Reading sections: ivory, navy ink, gold hairlines. */
main > section.wrap { padding-top: 48px; padding-bottom: 48px; }
main > section.wrap + section.wrap { border-top: 1px solid var(--line); }
h1 { font-size: 34px; line-height: 1.25; margin: 0 0 16px; }
h2 { font-size: 24px; line-height: 1.3; margin: 0 0 18px; font-weight: 600; }
main > section.wrap > h2::before, .band h2::before { content: ""; display: block; width: 32px; height: 1px; background: var(--gold); margin-bottom: 14px; }
h3, .h3 { font-size: 19px; line-height: 1.35; margin: 0 0 8px; font-weight: 600; }
p.lead { font-size: 20px; color: var(--muted); }
ul, ol { padding-inline-start: 22px; }
li::marker { color: var(--bronze); }
.more { margin: 20px 0 0; }

.cards { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; background: var(--paper);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.card p { color: var(--muted); margin: 0 0 8px; }
.card p:last-child { margin-bottom: 0; }
.card:hover { border-color: var(--hairline-gold); box-shadow: 0 10px 24px -14px rgb(11 27 43 / 0.25); }
.card-link { display: block; color: var(--ink); text-decoration: none; }
.card-link:hover { color: var(--ink); }
.card-link h3::after { content: " \2192"; color: var(--bronze); }
html[dir="rtl"] .card-link h3::after { content: " \2190"; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.step { padding: 20px; border-inline-start: 2px solid var(--gold); background: var(--paper); border-start-end-radius: var(--radius); border-end-end-radius: var(--radius); }
.step p { color: var(--muted); margin: 0; }
.step-n { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 999px; background: var(--navy); color: var(--gold-light); font-weight: 600; font-size: 15px; margin-bottom: 10px; }

.ticks { list-style: none; padding: 0; margin: 0 0 20px; }
.ticks li { position: relative; padding-inline-start: 26px; margin: 8px 0; }
.ticks li::before { content: ""; position: absolute; inset-inline-start: 2px; top: 0.7em; width: 8px; height: 8px; border-radius: 999px; background: var(--gold); box-shadow: 0 0 0 3px rgb(212 177 113 / 0.2); }

.jump { display: flex; flex-wrap: wrap; gap: 10px; padding-top: 24px; }
.jump a { padding: 6px 16px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); text-decoration: none; color: var(--ink); }
.jump a:hover { border-color: var(--gold); }

/* Pricing */
.plans { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 18px; padding: 28px 24px; background: var(--paper); }
.plan h2 { margin-bottom: 8px; }
.plan .ticks { flex: 1; }
.plan-popular { border-color: var(--gold); box-shadow: 0 18px 40px -22px rgb(11 27 43 / 0.45); background: linear-gradient(180deg, #fffaf0, var(--paper) 40%); }
.price { margin: 0; display: flex; align-items: baseline; gap: 4px; }
.price strong { font-size: 40px; line-height: 1.1; font-weight: 600; letter-spacing: -0.02em; }
.price span { color: var(--muted); }
.yearly { color: var(--muted); font-size: 15px; margin: 4px 0 18px; }
.badge { display: inline-block; align-self: flex-start; margin: 0 0 12px; padding: 3px 12px; border-radius: 999px; background: var(--navy); color: var(--gold-light); font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }
.card .badge { color: var(--gold-light); }
.card .badge-muted, .badge-muted { background: var(--line); color: var(--muted); }
.note { background: #f3ead6; border-inline-start: 2px solid var(--gold); border-radius: var(--radius); padding: 14px 18px; margin: 20px 0 0; }

.faq .qa { padding: 18px 0; border-bottom: 1px solid var(--line); }
.faq .qa:last-child { border-bottom: 0; }
.faq .qa p { margin: 0; color: var(--muted); }

/* Closing call to action */
.band { background: var(--teal); color: var(--on-navy); padding: 48px 0; border-top: 1px solid var(--hairline-gold); }
.band h2 { color: var(--on-navy); }
.band p { color: var(--on-navy-muted); margin: 0 0 22px; }

/* Legal pages: long text on a white sheet over the ivory canvas. */
.legal section {
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px;
  margin: 24px 0 40px; padding: 32px 20px;
}
.legal h1 { font-weight: 600; letter-spacing: -0.01em; }
.legal h1::after { content: ""; display: block; width: 48px; height: 1px; background: var(--gold); margin-top: 16px; }
.legal h2 { margin-top: 36px; font-size: 22px; }
.legal .updated { color: var(--muted); font-size: 15px; }

/* Footer: navy again, closing the page like the icon's sea. */
footer { background: var(--navy); color: var(--on-navy-muted); border-top: 1px solid var(--hairline-gold); padding: 40px 0; font-size: 15px; }
footer a { color: var(--gold-pale); text-decoration: none; }
footer a:hover { color: var(--gold-light); text-decoration: underline; }
footer .brand { margin-bottom: 8px; }
.foot-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.foot-grid nav { display: flex; flex-direction: column; gap: 6px; }
.foot-grid strong { color: var(--on-navy); font-weight: 600; margin-bottom: 4px; }
.foot-grid small { color: var(--on-navy-muted); }
.rights { margin: 28px 0 0; padding-top: 18px; border-top: 1px solid rgb(212 177 113 / 0.2); }

html[lang="ar"] .hero h1, html[lang="ar"] .legal h1 { letter-spacing: 0; line-height: 1.4; }

@media (min-width: 900px) {
  .main-nav { order: 0; flex: 0 1 auto; margin-inline-start: 12px; }
}
@media (min-width: 720px) {
  h1 { font-size: 44px; }
  .hero { padding: 88px 0 96px; }
  .hero-sm { padding: 56px 0 60px; }
  .legal section { padding: 48px 56px; margin-top: 40px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .cta:hover { transform: none; }
}
.plan-popular .badge { position: absolute; top: -13px; inset-inline-start: 24px; margin: 0; }
