/* =========================================================================
   الهلالي وشركاه — مكتب محاماة مصري
   -------------------------------------------------------------------------
   The look is deliberately the opposite of the other two law demos in the
   portfolio: Blackstone is a dark international firm photographed in glass
   towers, and alrifai-law is navy and gold. This one is paper.

   An Egyptian law office does not live in a tower; it lives in files, seals
   and a room with a wooden desk. So: warm ivory, ink, one deep green, and a
   brass hairline.

   The photographs come from the demos we already own — the library and the
   courtroom and the desk from Blackstone, the Egyptian portrait from
   alrifai-law — and are cropped square for the team so no American skyline
   ends up behind a lawyer in Tanta. Every photo slot also degrades: a card
   with no picture falls back to the initials on the letterhead, because a
   real office will send one phone snapshot and four apologies.
   ========================================================================= */

:root {
  /* Paper, ink, and the two accents */
  --paper: #f7f4ed;
  --paper-2: #f1ece1;
  --paper-3: #ffffff;
  --ink: #16181a;
  --ink-2: #33383d;
  --ink-3: #6b7177;
  --green: #14493a;
  --green-2: #1c6650;
  --green-soft: rgba(20, 73, 58, 0.07);
  --brass: #9a7b3f;
  --brass-2: #c9a35c;
  --brass-soft: rgba(154, 123, 63, 0.12);
  --line: rgba(22, 24, 26, 0.12);
  --line-2: rgba(22, 24, 26, 0.2);
  --shadow: 0 18px 50px rgba(22, 24, 26, 0.09);
  --shadow-lg: 0 30px 70px rgba(22, 24, 26, 0.14);

  --display: "Amiri", "Times New Roman", serif;
  --body: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;

  --radius: 4px;
  --radius-lg: 8px;
  --wrap: min(1120px, calc(100% - 40px));
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* The faint grain that makes a flat colour read as paper rather than as a
   blank div. One repeating SVG, no image request. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='.035'/%3E%3C/svg%3E");
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--brass-2);
  color: var(--ink);
}

.wrap {
  width: var(--wrap);
  margin-inline: auto;
  position: relative;
  z-index: 1;
}

h1,
h2,
h3,
.display {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0;
  margin: 0;
}

/* --------------------------------------------------------------- the rule */
/* A thin brass rule under every section title: the visual signature of the
   whole site, and the only decoration it owns. */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 10px;
  color: var(--brass);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--brass);
}

/* ------------------------------------------------------------------ header */
.site-head {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 244, 237, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-head__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  flex: 0 0 auto;
}

.brand__mark {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
}

.brand__name {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.25;
}

.brand__sub {
  display: block;
  font-family: var(--body);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--ink-3);
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav a {
  padding: 8px 12px;
  border-radius: var(--radius);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.18s, background 0.18s;
}

.nav a:hover {
  color: var(--green);
  background: var(--green-soft);
}

.nav a[aria-current="page"] {
  color: var(--green);
  font-weight: 600;
}

.head-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 17px;
  border-radius: var(--radius);
  background: var(--green);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.18s;
}

.head-cta:hover {
  background: var(--green-2);
}

.burger {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: transparent;
  cursor: pointer;
}

/* -------------------------------------------------------------------- hero */
.hero {
  position: relative;
  padding: 74px 0 64px;
  overflow: hidden;
}

/* The seal: a large, very faint geometric rosette behind the hero. Drawn,
   not photographed, so it costs nothing and scales to any screen. */
.hero__seal {
  position: absolute;
  inset-inline-end: -140px;
  top: -80px;
  width: 620px;
  height: 620px;
  opacity: 0.075;
  pointer-events: none;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 54px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.3;
}

.hero h1 em {
  font-style: normal;
  color: var(--green);
  position: relative;
}

.hero h1 em::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 4px;
  height: 8px;
  background: var(--brass-soft);
  z-index: -1;
}

.hero__lead {
  margin: 18px 0 26px;
  font-size: 17.5px;
  color: var(--ink-2);
  max-width: 44ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 24px;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}

.btn--primary {
  background: var(--green);
  color: #fff;
}

.btn--primary:hover {
  background: var(--green-2);
}

.btn--ghost {
  border-color: var(--line-2);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--green);
  color: var(--green);
}

.btn--wa {
  background: #1f7a4d;
  color: #fff;
}

.btn--wa:hover {
  background: #228c58;
}

/* The card that stands in for a hero photograph: the office's facts, set
   like the first page of a file. */
.hero__card {
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-top: 3px solid var(--green);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 26px 26px 20px;
}

.hero__card h2 {
  font-size: 19px;
  margin-bottom: 4px;
}

.hero__card p {
  margin: 0 0 18px;
  font-size: 14px;
  color: var(--ink-3);
}

.facts {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.fact {
  background: var(--paper-3);
  padding: 14px 16px;
}

.fact b {
  display: block;
  font-family: var(--display);
  font-size: 26px;
  line-height: 1.2;
  color: var(--green);
}

.fact span {
  font-size: 13px;
  color: var(--ink-3);
}

/* ---------------------------------------------------------------- sections */
.section {
  padding: 72px 0;
}

.section--tint {
  background: var(--paper-2);
  border-block: 1px solid var(--line);
}

.section__head {
  max-width: 62ch;
  margin-bottom: 36px;
}

.section__head h2 {
  font-size: clamp(26px, 3.4vw, 36px);
}

.section__head p {
  margin: 12px 0 0;
  color: var(--ink-2);
  font-size: 16.5px;
}

.grid {
  display: grid;
  gap: 18px;
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ------------------------------------------------------------------- cards */
.card {
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: var(--green);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.card h3 {
  font-size: 19px;
  margin-bottom: 8px;
}

.card p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.85;
}

.card__icon {
  width: 40px;
  height: 40px;
  margin-bottom: 14px;
  color: var(--green);
}

.card__more {
  display: inline-block;
  margin-top: 14px;
  color: var(--green);
  font-size: 14px;
  font-weight: 600;
}

/* --------------------------------------------------------------- the team */
/* Monograms, not portraits. A real office sends a phone snapshot taken in
   front of a window; a monogram cannot be taken badly. */
.person {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.person__mark {
  flex: 0 0 auto;
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--brass);
  background: var(--brass-soft);
  color: var(--green);
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
}

.person__name {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
}

.person__role {
  color: var(--brass);
  font-size: 13.5px;
  font-weight: 600;
}

.person__line {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.8;
}

.person__meta {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  padding: 3px 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 12px;
  color: var(--ink-3);
}

/* ------------------------------------------------------------------ steps */
.steps {
  counter-reset: step;
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--paper-3);
}

.step {
  counter-increment: step;
  display: flex;
  gap: 18px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.step:last-child {
  border-bottom: 0;
}

.step::before {
  content: "0" counter(step);
  font-family: var(--display);
  font-size: 22px;
  font-weight: 700;
  color: var(--brass);
  flex: 0 0 auto;
  line-height: 1.5;
}

.step h3 {
  font-size: 17.5px;
  margin-bottom: 3px;
}

.step p {
  margin: 0;
  color: var(--ink-2);
  font-size: 14.5px;
}

/* --------------------------------------------------------------- articles */
.article-card {
  display: flex;
  flex-direction: column;
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  height: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.article-card:hover {
  border-color: var(--green);
  box-shadow: var(--shadow);
}

.article-card__kicker {
  color: var(--brass);
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 8px;
}

.article-card h3 {
  font-size: 18px;
  line-height: 1.55;
  margin-bottom: 10px;
}

.article-card p {
  margin: 0 0 16px;
  color: var(--ink-2);
  font-size: 14.5px;
  flex: 1;
}

.article-card__read {
  color: var(--green);
  font-size: 14px;
  font-weight: 600;
}

/* ---------------------------------------------------------------- article */
.prose {
  max-width: 68ch;
  margin-inline: auto;
}

.prose h2 {
  font-size: 25px;
  margin: 38px 0 12px;
}

.prose h3 {
  font-size: 20px;
  margin: 26px 0 8px;
}

.prose p,
.prose li {
  color: var(--ink-2);
  font-size: 16.5px;
  line-height: 2;
}

.prose ul,
.prose ol {
  padding-inline-start: 22px;
}

.prose li {
  margin-bottom: 8px;
}

.prose blockquote {
  margin: 26px 0;
  padding: 16px 20px;
  border-inline-start: 3px solid var(--brass);
  background: var(--brass-soft);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.prose blockquote p {
  margin: 0;
  color: var(--ink);
}

/* -------------------------------------------------------------------- faq */
.faq {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--paper-3);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq details:last-child {
  border-bottom: 0;
}

.faq summary {
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  font-family: var(--display);
  font-size: 22px;
  color: var(--brass);
  flex: 0 0 auto;
}

.faq details[open] summary::after {
  content: "−";
}

.faq p {
  margin: 0;
  padding: 0 22px 20px;
  color: var(--ink-2);
  font-size: 15px;
}

/* ------------------------------------------------------------------ forms */
.form {
  display: grid;
  gap: 14px;
}

.field label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: var(--paper-3);
  font-size: 15px;
  transition: border-color 0.18s, box-shadow 0.18s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-soft);
}

.form__note {
  font-size: 13px;
  color: var(--ink-3);
  margin: 0;
}

.form__ok {
  padding: 14px 16px;
  border: 1px solid var(--green);
  background: var(--green-soft);
  border-radius: var(--radius);
  color: var(--green);
  font-weight: 600;
  font-size: 15px;
}

/* ----------------------------------------------------------------- footer */
.site-foot {
  background: var(--ink);
  color: #cfd3d6;
  padding: 54px 0 26px;
}

.site-foot a {
  color: #cfd3d6;
}

.site-foot a:hover {
  color: var(--brass-2);
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 32px;
}

.site-foot h4 {
  font-family: var(--display);
  font-size: 16px;
  color: #fff;
  margin: 0 0 12px;
}

.site-foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 14.5px;
}

.site-foot li {
  margin-bottom: 7px;
}

.foot-bottom {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 13px;
  color: #8f9599;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: space-between;
}

/* A demo has to say it is a demo. */
.demo-note {
  background: var(--brass-soft);
  border-bottom: 1px solid var(--brass);
  color: #6b5222;
  font-size: 13px;
  text-align: center;
  padding: 7px 16px;
}

/* --------------------------------------------------------- the float call */
.wa-float {
  position: fixed;
  inset-inline-end: 18px;
  bottom: 18px;
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 18px;
  border-radius: 999px;
  background: #1f7a4d;
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(31, 122, 77, 0.3);
}

/* ------------------------------------------------------------- responsive */
@media (max-width: 960px) {
  .hero__grid,
  .grid--3,
  .grid--4,
  .foot-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero__grid {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .hero__seal {
    width: 420px;
    height: 420px;
    inset-inline-end: -160px;
  }
}

@media (max-width: 720px) {
  :root {
    --wrap: calc(100% - 32px);
  }

  .nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow);
  }

  .nav[hidden] {
    display: none;
  }

  .nav a {
    padding: 12px 14px;
  }

  .burger {
    display: inline-flex;
  }

  .head-cta {
    display: none;
  }

  .grid--2,
  .grid--3,
  .grid--4,
  .foot-grid {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 52px 0;
  }

  .wa-float {
    inset-inline-end: 12px;
    bottom: 12px;
    padding: 11px 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ------------------------------------------------------------- photographs */
/* Added after the first pass: the demo was drawing rectangles while a library
   of 431 photographs sat in the repo next door. On a paper background a photo
   works as something pasted onto the page — a hairline, a real shadow, and a
   warm cast so it belongs to the ivory rather than sitting on top of it. */

.hero__side {
  display: grid;
  gap: 16px;
}

.hero__photo {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  filter: saturate(0.92);
}

/* The three-across strip that breaks the page between the process and the
   team: proof that the work happens somewhere real. */
.band-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.band-photos figure {
  margin: 0;
}

.band-photos img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  filter: saturate(0.9);
}

.band-photos figcaption {
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--ink-3);
  text-align: center;
}

.person__photo {
  flex: 0 0 auto;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  object-position: top center;
  border: 1px solid var(--brass);
}

.article-card__cover {
  width: calc(100% + 44px);
  margin: -22px -22px 16px;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.article-hero {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  margin-bottom: 26px;
}

.branch img {
  width: calc(100% + 48px);
  margin: -24px -24px 16px;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

@media (max-width: 720px) {
  .band-photos {
    grid-template-columns: 1fr;
  }
}
