/* ==========================================================================
   Home page — the components the form pages do not already have.
   Everything shared (reset, page ground, buttons, footer, tokens, fonts)
   comes from css/main.css unchanged.

   Written with CSS logical properties throughout, so Arabic (RTL) and
   English (LTR) share one stylesheet, matching css/main.css.
   ========================================================================== */

/* --- Skip link ------------------------------------------------------------
   Off-screen until focused, so a keyboard visitor can jump the navigation
   without a visible control cluttering the header for everyone else.        */
.skip-link {
  position: absolute;
  inset-block-start: var(--sp-2);
  inset-inline-start: var(--sp-2);
  z-index: 100;
  padding: var(--sp-2) var(--sp-4);
  border-radius: var(--r-md);
  background: var(--navy);
  color: var(--gold-light);
  font-size: var(--fs-sm);
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform var(--t-fast);
}
.skip-link:focus-visible { transform: none; }

/* --- Navigation -----------------------------------------------------------
   One sticky bar rather than the stacked utility / brand / badge bars the
   brochure mock used: three fixed rows cost ~140px of every screen before a
   word of content, which is most of a phone's viewport.                     */
.site-nav {
  position: sticky;
  inset-block-start: 0;
  z-index: 40;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-block-end: 1px solid var(--border-soft);
  transition: box-shadow var(--t-base);
}
.site-nav.is-stuck { box-shadow: 0 1px 12px rgba(41, 39, 89, .08); }

.nav-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  min-block-size: 4.5rem;
}

.nav-brand { flex: none; display: inline-flex; align-items: center; }
.nav-brand img { inline-size: auto; block-size: 2.6rem; }

/* Pushes the actions to the far edge on wide screens and disappears once the
   links move into the drawer. */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  margin-inline-start: auto;
}
.nav-links a {
  padding: var(--sp-2) var(--sp-3);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color var(--t-fast), background var(--t-fast);
}
.nav-links a:hover { color: var(--navy); background: var(--navy-tint); }
.nav-links a[aria-current="true"] { color: var(--navy); }

.nav-actions { display: flex; align-items: center; gap: var(--sp-3); flex: none; }

/* main.css pins .lang-switch to the corner of .site-header; inside the bar it
   is a normal flex item. */
.site-nav .lang-switch { position: static; }

/* main.css styles .btn for the forms, where it is always a <button>. On this
   page the same class lands on <a>, which arrives underlined. */
.btn { text-decoration: none; }

/* Hamburger — a real button, shown only once the links collapse. */
.nav-toggle {
  display: none;
  flex: none;
  inline-size: 2.6rem;
  block-size: 2.6rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-alt);
  color: var(--navy);
  cursor: pointer;
}
.nav-toggle svg { inline-size: 1.25rem; block-size: 1.25rem; margin-inline: auto; }
.nav-toggle .i-close { display: none; }
.nav-toggle[aria-expanded="true"] .i-open  { display: none; }
.nav-toggle[aria-expanded="true"] .i-close { display: block; }

@media (max-width: 60rem) {
  .nav-toggle { display: block; }
  .nav-actions { margin-inline-start: auto; }

  /* The links become a drawer under the bar. Height animation rather than a
     full-screen overlay: the bar stays visible, so the toggle never moves
     out from under the finger that opened it. */
  .nav-links {
    position: absolute;
    inset-inline: 0;
    inset-block-start: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    margin: 0;
    padding: 0 var(--sp-5);
    background: var(--bg-alt);
    border-block-end: 1px solid var(--border-soft);
    box-shadow: 0 12px 24px rgba(41, 39, 89, .08);
    max-block-size: 0;
    overflow: hidden;
    visibility: hidden;
    transition: max-block-size var(--t-base), visibility var(--t-base), padding var(--t-base);
  }
  .nav-links.is-open {
    max-block-size: 30rem;   /* five links now, not four */
    visibility: visible;
    padding-block: var(--sp-3);
  }
  .nav-links a {
    padding: var(--sp-3) var(--sp-2);
    font-size: var(--fs-md);
    border-radius: 0;
  }
  .nav-links a + a { border-block-start: 1px solid var(--border-soft); }
}

@media (max-width: 30rem) {
  .nav-brand img { block-size: 2.1rem; }
}

/* --- Section scaffolding -------------------------------------------------- */
.sec { padding-block: clamp(var(--sp-7), 7vw, 5.5rem); }
.sec--tint { background: rgba(255, 255, 255, .55); border-block: 1px solid var(--border-soft); }

/* html has scroll-behavior: smooth in main.css, so an in-page jump would land
   the heading underneath the sticky bar. Reserving the bar's height here fixes
   it for the keyboard, the URL fragment and the navigation links alike —
   which a JS scroll handler would not. */
:target,
main [id] { scroll-margin-block-start: 5.5rem; }

.sec-head { text-align: center; max-inline-size: 44rem; margin-inline: auto; margin-block-end: var(--sp-7); }
.sec-head.is-start { text-align: start; margin-inline: 0; }
.sec-head--tight { margin-block-end: var(--sp-5); }

.eyebrow {
  display: block;
  font-size: var(--fs-xs);
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-block-end: var(--sp-3);
}
html[lang="ar"] .eyebrow { letter-spacing: .06em; text-transform: none; }

.sec-title {
  font-size: clamp(1.5rem, 1.1rem + 1.7vw, var(--fs-2xl));
  font-weight: 700;
  line-height: var(--lh-tight);
  color: var(--navy);
}
html[lang="en"] .sec-title {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: .01em;
}
.sec-lede { margin-block-start: var(--sp-3); color: var(--ink-muted); font-size: var(--fs-md); }

/* --- Hero -----------------------------------------------------------------
   One centred column. The navy credentials card that used to hold the right
   half is gone, so a two-column grid would leave the copy pinned to one side
   of an empty row; centring makes the single column read as the intention.  */
.hero { padding-block: clamp(var(--sp-7), 8vw, 6rem); }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  text-align: center;
}
.hero-copy { max-inline-size: 52rem; }

/* main.css styles .tagline for the centred form headers, where it sits below
   the wordmark. Here it opens the column, so the top margin goes and the
   separators drop back to a tint — gold dots between gold words read as one
   smudge at this size. */
.hero-copy .tagline { margin-block-start: 0; }
.hero-copy .tagline .sep { color: rgba(185, 158, 71, .45); }

.hero-title {
  font-size: clamp(1.9rem, 1.2rem + 3.2vw, 3.1rem);
  font-weight: 700;
  line-height: 1.22;
  color: var(--navy);
  text-wrap: balance;
}
html[lang="en"] .hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: .01em;
}
.hero-lede {
  margin-block-start: var(--sp-5);
  margin-inline: auto;
  max-inline-size: 44rem;
  font-size: var(--fs-md);
  color: var(--ink-muted);
}

/* Three calls to action rather than two, so they wrap onto a second row on a
   phone instead of shrinking below a comfortable tap target. */
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-3);
  margin-block-start: var(--sp-6);
}
.hero-note {
  margin-block-start: var(--sp-4);
  font-size: var(--fs-xs);
  color: var(--ink-faint);
}

/* --- Practice areas ------------------------------------------------------- */
.svc-grid {
  display: grid;
  gap: var(--sp-5);
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
}
.svc {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
  transition: border-color var(--t-base), box-shadow var(--t-base), transform var(--t-base);
}
.svc:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}
.svc-icon {
  inline-size: 2.75rem;
  block-size: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: var(--navy-tint);
  margin-block-end: var(--sp-4);
  transition: background var(--t-base);
}
.svc-icon svg { inline-size: 1.35rem; block-size: 1.35rem; stroke: var(--navy); fill: none; }
.svc:hover .svc-icon { background: var(--gold-tint); }
.svc:hover .svc-icon svg { stroke: var(--gold); }
.svc h3 { font-size: var(--fs-md); font-weight: 700; color: var(--navy); margin-block-end: var(--sp-2); }
.svc p  { font-size: var(--fs-sm); color: var(--ink-muted); }

/* --- About ---------------------------------------------------------------- */
.about-grid {
  display: grid;
  gap: clamp(var(--sp-6), 5vw, var(--sp-8));
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}
@media (max-width: 58rem) { .about-grid { grid-template-columns: minmax(0, 1fr); } }

.about-copy p + p { margin-block-start: var(--sp-4); }
.about-copy p { color: var(--ink-muted); }

.points { display: grid; gap: var(--sp-4); }
.point {
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-5);
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-inline-start: 3px solid var(--gold);
  border-radius: var(--r-md);
}
.point svg { inline-size: 1.3rem; block-size: 1.3rem; stroke: var(--gold); fill: none; flex: none; margin-block-start: .2rem; }
.point h3 { font-size: var(--fs-sm); font-weight: 700; color: var(--navy); margin-block-end: var(--sp-1); }
.point p  { font-size: var(--fs-sm); color: var(--ink-muted); }

/* --- Vision & mission ----------------------------------------------------- */
.vm-grid {
  display: grid;
  gap: var(--sp-5);
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
}
.vm {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  padding: clamp(var(--sp-5), 3vw, var(--sp-6));
  box-shadow: var(--shadow-card);
}
.vm-icon {
  inline-size: 3rem;
  block-size: 3rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--gold-tint);
  border: 1px solid rgba(185, 158, 71, .3);
  margin-block-end: var(--sp-4);
}
.vm-icon svg { inline-size: 1.4rem; block-size: 1.4rem; stroke: var(--gold); fill: none; }
.vm h3 { font-size: var(--fs-lg); font-weight: 700; color: var(--navy); margin-block-end: var(--sp-3); }
.vm p  { color: var(--ink-muted); }

/* --- How it works --------------------------------------------------------- */
.steps {
  display: grid;
  gap: var(--sp-5);
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  counter-reset: step;
}
.step { text-align: center; padding-inline: var(--sp-3); }
.step-num {
  inline-size: 3rem;
  block-size: 3rem;
  margin-inline: auto;
  margin-block-end: var(--sp-4);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: var(--gold-light);
  font-size: var(--fs-md);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.step h3 { font-size: var(--fs-md); font-weight: 700; color: var(--navy); margin-block-end: var(--sp-2); }
.step p  { font-size: var(--fs-sm); color: var(--ink-muted); }

/* --- Forms ----------------------------------------------------------------
   The three intake forms are the point of the page, so they get the largest
   cards on it rather than a line in the navigation only. minmax(20rem, 1fr)
   fits all three on a wide screen and drops to two, then one, below.        */
.form-grid {
  display: grid;
  gap: var(--sp-5);
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
}

/* The whole card is the link: a card-sized target beats a small "read more",
   and it stays one tab stop rather than several. */
.form-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: clamp(var(--sp-5), 3vw, var(--sp-6));
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--t-base), box-shadow var(--t-base), transform var(--t-base);
}
.form-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-lift);
  transform: translateY(-3px);
}
.form-card .fc-top { display: flex; align-items: center; gap: var(--sp-3); }
.form-card .fc-icon {
  inline-size: 2.5rem;
  block-size: 2.5rem;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: var(--navy);
}
.form-card .fc-icon svg { inline-size: 1.2rem; block-size: 1.2rem; stroke: var(--gold-light); fill: none; }
.form-card h3 { font-size: var(--fs-lg); font-weight: 700; color: var(--navy); }
.form-card p  { color: var(--ink-muted); font-size: var(--fs-sm); flex: 1; }

.fc-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
  font-size: var(--fs-xs);
  color: var(--ink-faint);
}
.fc-meta span { display: inline-flex; align-items: center; gap: var(--sp-1); }
.fc-meta svg { inline-size: .85rem; block-size: .85rem; stroke: var(--gold); fill: none; flex: none; }

.fc-go {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  margin-block-start: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--navy);
}
.fc-go svg { inline-size: 1rem; block-size: 1rem; stroke: currentColor; fill: none; transition: transform var(--t-fast); }
/* The chevron points along the reading direction, so it flips with the page. */
html[dir="rtl"] .fc-go svg { transform: scaleX(-1); }
.form-card:hover .fc-go { color: var(--gold); }
.form-card:hover .fc-go svg { transform: translateX(3px); }
html[dir="rtl"] .form-card:hover .fc-go svg { transform: scaleX(-1) translateX(3px); }

/* --- Contact -------------------------------------------------------------- */
.contact-grid {
  display: grid;
  gap: var(--sp-5);
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}
.contact-card {
  display: block;
  padding: var(--sp-5);
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--r-lg);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--t-base), box-shadow var(--t-base), transform var(--t-base);
}
.contact-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-card);
  transform: translateY(-2px);
}
.contact-card .cc-icon {
  inline-size: 3rem;
  block-size: 3rem;
  margin-inline: auto;
  margin-block-end: var(--sp-4);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--navy-tint);
  transition: background var(--t-base);
}
.contact-card:hover .cc-icon { background: var(--gold-tint); }
.contact-card .cc-icon svg { inline-size: 1.3rem; block-size: 1.3rem; stroke: var(--navy); fill: none; }
.contact-card h3 { font-size: var(--fs-sm); font-weight: 700; color: var(--navy); margin-block-end: var(--sp-2); }
.contact-card p  { font-size: var(--fs-sm); color: var(--ink-muted); word-break: break-word; }
.contact-card p.ltr { direction: ltr; unicode-bidi: isolate; }

/* --- Footer navigation ---------------------------------------------------
   Sits above the contact row that main.css already styles.                  */
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--sp-3) var(--sp-5);
  margin-block-end: var(--sp-5);
  padding-block-end: var(--sp-5);
  border-block-end: 1px solid rgba(255, 255, 255, .14);
}
.footer-nav a { color: rgba(255, 255, 255, .82); text-decoration: none; font-size: var(--fs-sm); }
.footer-nav a:hover { color: #fff; text-decoration: underline; }

/* --- Floating actions -----------------------------------------------------
   Anchored to the inline-start edge, so they mirror with the page like
   everything else here: bottom-right in Arabic, bottom-left in English.     */
.fab-stack {
  position: fixed;
  inset-block-end: var(--sp-5);
  inset-inline-start: var(--sp-5);
  z-index: 30;
  display: flex;
  flex-direction: column-reverse;
  gap: var(--sp-3);
}
.fab {
  inline-size: 3.25rem;
  block-size: 3.25rem;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  box-shadow: var(--shadow-lift);
  transition: transform var(--t-fast), opacity var(--t-base), visibility var(--t-base);
}
.fab:hover { transform: translateY(-2px); }
.fab svg { inline-size: 1.5rem; block-size: 1.5rem; }

.fab--wa { background: #25D366; }
.fab--wa svg { fill: #fff; stroke: none; }

/* The gold ring is what separates this from the navy footer, which is the
   one place the button is most likely to be sitting when it is visible. */
.fab--top {
  background: var(--navy);
  color: var(--gold-light);
  box-shadow: var(--shadow-lift), 0 0 0 1px var(--gold);
  opacity: 0;
  visibility: hidden;
}
.fab--top svg { stroke: currentColor; fill: none; }
.fab--top.is-shown { opacity: 1; visibility: visible; }

@media (max-width: 30rem) {
  .fab-stack { inset-block-end: var(--sp-4); inset-inline-start: var(--sp-4); }
  .fab { inline-size: 2.9rem; block-size: 2.9rem; }
}

/* --- Rise on scroll -------------------------------------------------------
   Named .rise, not .reveal: main.css already owns .reveal for the forms'
   conditional "Other" inputs and gives it display:none, which would collapse
   every element here that has no display of its own.

   Gated on .has-js so the content is never hidden when the script fails to
   run, and disabled outright when the visitor has asked for less motion.    */
@media (prefers-reduced-motion: no-preference) {
  html.has-js .rise {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity .5s ease, transform .5s ease;
  }
  html.has-js .rise.is-up { opacity: 1; transform: none; }
}

/* Whatever the scroll position was, the paper copy shows everything. */
@media print {
  html.has-js .rise { opacity: 1 !important; transform: none !important; }
}
