/* ==========================================================================
   ALGEBRA AVOCATS
   Display: Sansation (the face of the logo wordmark). Text: Inter.
   ========================================================================== */

@font-face {
    font-family: "Sansation";
    src: url("../fonts/Sansation_Light.woff") format("woff");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Sansation";
    src: url("../fonts/Sansation_Regular.woff") format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Plex Arabic";
    src: url("../fonts/plex-arabic-light.woff2") format("woff2");
    font-weight: 300;
    font-display: swap;
}
@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-medium.woff2") format("woff2");
    font-weight: 500 700;
    font-display: swap;
}
@font-face {
    font-family: "Inter";
    src: url("../fonts/inter-regular.woff") format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Inter";
    src: url("../fonts/inter-italic.woff") format("woff");
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}
@font-face {
    font-family: "Inter";
    src: url("../fonts/inter-medium.woff") format("woff");
    font-weight: 500 700;
    font-style: normal;
    font-display: swap;
}

:root {
    /* Palette */
    --ink:        #2a2d29;   /* graphite with a green cast, body text and dark bands */
    --ink-soft:   #555a52;   /* secondary text */
    --olive:      #a8a878;   /* the firm's colour */
    --olive-deep: #5f6038;   /* olive that passes contrast on white, links and accents */
    --olive-pale: #dcdcc4;
    --stone:      #ecede6;   /* quiet surface */
    --paper:      #ffffff;
    --line:       #cfd0c2;

    /* Type */
    --display: "Sansation", "Century Gothic", "Avenir Next", system-ui, sans-serif;
    --text:    "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    --step--1: 0.875rem;
    --step-0:  1.0625rem;   /* 17px body */
    --step-1:  1.3125rem;
    --step-2:  1.625rem;
    --step-3:  clamp(1.9rem, 1.4rem + 1.6vw, 2.5rem);
    --step-4:  clamp(2.3rem, 1.5rem + 3vw, 3.6rem);

    /* Space */
    --gutter: clamp(1rem, 0.5rem + 2.5vw, 2.5rem);
    --section: clamp(3.5rem, 2rem + 6vw, 7rem);
    --max: 76rem;
    --measure: 68ch;

    --header-h: 76px;
}

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

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-padding-top: calc(var(--header-h) + 1rem);
}
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--text);
    font-size: var(--step-0);
    line-height: 1.65;
    font-kerning: normal;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3 {
    font-family: var(--display);
    font-weight: 300;
    line-height: 1.15;
    letter-spacing: 0.01em;
    margin: 0 0 0.6em;
    text-wrap: balance;
}
h3 { font-weight: 400; }
p { margin: 0 0 1.1em; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
address { font-style: normal; }

a { color: var(--olive-deep); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--ink); }

:focus-visible {
    outline: 2px solid var(--olive-deep);
    outline-offset: 3px;
    border-radius: 2px;
}
main:focus { outline: none; }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0);
    white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute;
    inset-inline-start: 1rem; top: -4rem;
    z-index: 100;
    padding: 0.6rem 1rem;
    background: var(--ink);
    color: var(--paper);
    font-family: var(--display);
}
.skip-link:focus { top: 1rem; color: var(--paper); }

.wrap {
    width: 100%;
    max-width: var(--max);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.lead {
    font-size: var(--step-1);
    line-height: 1.55;
    color: var(--ink);
}

.prose { max-width: var(--measure); }
.prose h2 { font-size: var(--step-3); margin-top: 1.6em; }
.prose h3 { font-size: var(--step-1); margin-top: 1.8em; margin-bottom: 0.5em; }
.prose address { margin-bottom: 1.1em; padding-inline-start: 1rem; border-inline-start: 2px solid var(--olive); }

/* --------------------------------------------------------------------------
   Buttons and links
   ----------------------------------------------------------------------- */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0.7rem 1.4rem;
    border: 1px solid var(--olive);
    background: var(--olive);
    color: var(--ink);
    font-family: var(--display);
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.03em;
    text-decoration: none;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color .2s, color .2s, border-color .2s;
}
.button:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

.button--ghost { background: transparent; border-color: rgba(255,255,255,.7); color: var(--paper); }
.button--ghost:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }

.button--outline { background: transparent; border-color: var(--ink); color: var(--ink); }
.button--outline:hover { background: var(--ink); color: var(--paper); }

.button--light { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.button--light:hover { background: var(--olive); border-color: var(--olive); color: var(--ink); }

.text-link {
    font-family: var(--display);
    font-size: 1rem;
    letter-spacing: 0.02em;
    color: var(--olive-deep);
    text-decoration: none;
    border-bottom: 1px solid currentColor;
    padding-bottom: 2px;
}
.text-link:hover { color: var(--ink); }

/* --------------------------------------------------------------------------
   Header
   ----------------------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255,255,255,.96);
    border-bottom: 1px solid transparent;
    transition: border-color .2s;
}
@supports (backdrop-filter: blur(8px)) {
    .site-header { background: rgba(255,255,255,.88); backdrop-filter: blur(8px); }
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    min-height: var(--header-h);
}

.brand { display: block; color: var(--ink); flex: none; }
.brand:hover { color: var(--ink); }
.brand__logo { height: 42px; width: auto; }

.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.site-nav__list { display: flex; align-items: center; gap: 1.6rem; list-style: none; }

.site-nav__link {
    position: relative;
    display: inline-block;
    padding: 0.4rem 0;
    font-family: var(--display);
    font-size: 1rem;
    letter-spacing: 0.03em;
    color: var(--ink);
    text-decoration: none;
}
.site-nav__link::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 2px;
    background: var(--olive);
    transform: scaleX(0);
    transform-origin: left;
}
[dir="rtl"] .site-nav__link::after { transform-origin: right;
    transition: transform .25s;
}
.site-nav__link:hover::after,
.site-nav__link[aria-current="page"]::after { transform: scaleX(1); }

.site-nav__link--cta {
    padding: 0.55rem 1.1rem;
    border: 1px solid var(--ink);
}
.site-nav__link--cta::after { display: none; }
.site-nav__link--cta:hover,
.site-nav__link--cta[aria-current="page"] { background: var(--ink); color: var(--paper); }

.lang-switch {
    display: inline-grid;
    place-items: center;
    min-width: 44px;
    min-height: 44px;
    font-family: var(--display);
    font-size: 0.9rem;
    letter-spacing: 0.08em;
    color: var(--ink-soft);
    text-decoration: none;
    border-inline-start: 1px solid var(--line);
    padding-inline-start: 1.25rem;
}
.lang-switch:hover { color: var(--olive-deep); }

.nav-toggle { display: none; }

@media (max-width: 960px) {
    :root { --header-h: 64px; }
    .brand__logo { height: 34px; }

    .js .nav-toggle {
        display: inline-flex;
        align-items: center;
        gap: 0.6rem;
        min-height: 44px;
        padding: 0 0.25rem;
        background: none;
        border: 0;
        font-family: var(--display);
        font-size: 1rem;
        color: var(--ink);
        cursor: pointer;
    }
    .nav-toggle__bars,
    .nav-toggle__bars::before,
    .nav-toggle__bars::after {
        display: block;
        width: 22px;
        height: 1.5px;
        background: currentColor;
        transition: transform .2s, opacity .2s;
    }
    .nav-toggle__bars { position: relative; }
    .nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
    .nav-toggle__bars::before { top: -7px; }
    .nav-toggle__bars::after  { top: 7px; }
    .nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
    .nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
    .nav-toggle[aria-expanded="true"] .nav-toggle__bars::after  { transform: translateY(-7px) rotate(-45deg); }

    .site-header__inner { flex-wrap: wrap; }

    .site-nav {
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding-bottom: 1.25rem;
    }
    .js .site-nav { display: none; }
    .js .site-nav.is-open { display: flex; }

    .site-nav__list { flex-direction: column; align-items: stretch; gap: 0; }
    .site-nav__list li { border-top: 1px solid var(--line); }
    .site-nav__link { display: block; padding: 0.95rem 0; font-size: 1.25rem; }
    .site-nav__link::after { display: none; }
    .site-nav__link[aria-current="page"] { color: var(--olive-deep); }
    .site-nav__link--cta { border: 0; padding: 0.95rem 0; }
    .site-nav__link--cta:hover, .site-nav__link--cta[aria-current="page"] { background: none; color: var(--olive-deep); }
    .lang-switch {
        justify-content: start;
        border-inline-start: 0;
        border-top: 1px solid var(--line);
        padding: 0.95rem 0 0;
        font-size: 1rem;
    }
}

/* --------------------------------------------------------------------------
   Hero (home)
   ----------------------------------------------------------------------- */
.hero {
    position: relative;
    isolation: isolate;
    min-height: min(88svh, 820px);
    display: flex;
    align-items: flex-end;
    color: var(--paper);
    background: var(--ink);
    overflow: hidden;
}
.hero__media { position: absolute; inset: 0; z-index: -1; }
.hero__media picture { width: 100%; height: 100%; }
.hero__media img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: 30% 40%;
    filter: grayscale(1) contrast(1.05);
}
/* Olive duotone + a graphite fall-off on the left where the text sits */
.hero__media::before,
.hero__media::after { content: ""; position: absolute; inset: 0; }
.hero__media::before { background: var(--olive); mix-blend-mode: multiply; opacity: .55; }
.hero__media::after {
    background:
        linear-gradient(90deg, rgba(42,45,41,.92) 0%, rgba(42,45,41,.7) 45%, rgba(42,45,41,.15) 100%),
        linear-gradient(0deg, rgba(42,45,41,.6) 0%, rgba(42,45,41,0) 45%);
}

.hero__inner {
    position: relative;
    padding-block: clamp(6rem, 12vw, 9rem) clamp(3rem, 7vw, 5.5rem);
}
.hero__mark {
    width: clamp(64px, 8vw, 96px);
    height: auto;
    color: var(--olive);
    margin-bottom: 2rem;
}
.hero__title {
    max-width: 19ch;
    font-size: var(--step-4);
    line-height: 1.08;
    letter-spacing: 0;
    margin-bottom: 0.5em;
}
.hero__lead {
    max-width: 46ch;
    font-size: var(--step-1);
    line-height: 1.5;
    color: rgba(255,255,255,.86);
    margin-bottom: 2rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0; }

@media (prefers-reduced-motion: no-preference) {
    .hero__mark, .hero__title, .hero__lead, .hero__actions {
        animation: rise .9s cubic-bezier(.2,.7,.2,1) both;
    }
    .hero__title   { animation-delay: .12s; }
    .hero__lead    { animation-delay: .24s; }
    .hero__actions { animation-delay: .36s; }
    .hero__media img { animation: settle 2.4s ease-out both; }
}
@keyframes rise   { from { opacity: 0; transform: translateY(14px); } }
@keyframes settle { from { transform: scale(1.06); } }

/* --------------------------------------------------------------------------
   Sections
   ----------------------------------------------------------------------- */
.section { padding-block: var(--section); }
.section--stone { background: var(--stone); }
.section--rule { border-top: 1px solid var(--line); }

.section__head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section__head--row {
    max-width: none;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem 2rem;
}
.section__head--row .section__title { margin: 0; }
.section__title { font-size: var(--step-3); }
.section__lead { font-size: var(--step-1); line-height: 1.55; color: var(--ink-soft); margin: 0; }

/* --------------------------------------------------------------------------
   The dictionary entry, the signature element
   ----------------------------------------------------------------------- */
.firm-intro__grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(2.5rem, 6vw, 6rem);
    align-items: start;
}
.definition {
    margin: 0;
    padding-top: 0.5rem;
    border-top: 2px solid var(--ink);
}
.definition__word {
    font-family: var(--display);
    font-weight: 300;
    font-size: clamp(3.2rem, 2rem + 5vw, 5.75rem);
    line-height: 1;
    letter-spacing: -0.015em;
    margin: 0.3em 0 0.2em;
}
.definition__gram {
    font-style: italic;
    color: var(--ink-soft);
    margin-bottom: 1.4rem;
}
.definition__senses {
    list-style: none;
    counter-reset: sense;
    border-top: 1px solid var(--line);
}
.definition__senses li {
    counter-increment: sense;
    display: flex;
    align-items: baseline;
    gap: 1rem;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--line);
    font-family: var(--display);
    font-size: var(--step-2);
    font-weight: 300;
    line-height: 1.2;
}
.definition__senses li::before {
    content: counter(sense) ".";
    flex: none;
    width: 1.5rem;
    font-family: var(--text);
    font-size: var(--step-0);
    font-weight: 500;
    color: var(--olive-deep);
}

/* --------------------------------------------------------------------------
   Practice areas (home)
   ----------------------------------------------------------------------- */
.practice-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
}
.practice {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 0.25rem clamp(1.25rem, 3vw, 2.5rem) 0.5rem;
    border-inline-start: 1px solid var(--olive);
}
.practice:first-child { padding-inline-start: 0; border-inline-start: 0; }
.practice__title { font-size: var(--step-2); margin-bottom: 0.75rem; }
.practice p { color: var(--ink-soft); flex: 1; }

/* --------------------------------------------------------------------------
   Partners (home)
   ----------------------------------------------------------------------- */
.partner-grid {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(1.25rem, 3vw, 2.5rem);
}
.partner-card a { display: block; color: inherit; text-decoration: none; }
.partner-card picture {
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: var(--stone);
    margin-bottom: 1rem;
}
.partner-card__photo { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.partner-card__name {
    display: block;
    font-family: var(--display);
    font-size: var(--step-1);
    line-height: 1.25;
}
.partner-card a:hover .partner-card__name { color: var(--olive-deep); }
.partner-card__role { display: block; font-style: italic; color: var(--ink-soft); }
.partner-card__short { display: block; font-size: var(--step--1); color: var(--ink-soft); margin-top: 0.4rem; line-height: 1.5; }

/* --------------------------------------------------------------------------
   Documents
   ----------------------------------------------------------------------- */
.doc-list { list-style: none; border-top: 1px solid var(--line); }
.doc {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 1rem 2.5rem;
    align-items: center;
    padding: 1.75rem 0;
    border-bottom: 1px solid var(--line);
}
.doc__title { font-size: var(--step-2); margin-bottom: 0.4rem; }
.doc__title a { color: var(--ink); text-decoration: none; }
.doc__title a:hover { color: var(--olive-deep); text-decoration: underline; }
.doc__note { color: var(--ink-soft); margin-bottom: 0.3rem; max-width: var(--measure); }
.doc__meta { font-size: var(--step--1); font-style: italic; color: var(--ink-soft); margin: 0; }
.doc__download {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    font-family: var(--display);
    font-size: 0.95rem;
    line-height: 1.35;
    color: var(--ink);
    text-decoration: none;
}
.doc__download small { font-family: var(--text); font-size: var(--step--1); color: var(--ink-soft); }
.doc__download:hover { color: var(--olive-deep); }
.doc__badge {
    display: grid;
    place-items: center;
    width: 48px; height: 58px;
    border: 1px solid var(--ink);
    font-family: var(--display);
    font-size: 0.8rem;
    letter-spacing: 0.06em;
    clip-path: polygon(0 0, 72% 0, 100% 20%, 100% 100%, 0 100%);
    position: relative;
    background: linear-gradient(225deg, var(--olive) 0 14%, transparent 14%);
}
.doc__download:hover .doc__badge { background: var(--olive); }
.doc-list--compact .doc__title { font-size: var(--step-1); }

/* --------------------------------------------------------------------------
   Contact band
   ----------------------------------------------------------------------- */
.contact-band { background: var(--ink); color: var(--paper); }
.contact-band__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) auto;
    gap: 2rem 3rem;
    align-items: center;
    padding-block: clamp(3rem, 6vw, 5rem);
}
.contact-band__title { font-size: var(--step-3); margin-bottom: 0.4em; }
.contact-band__text p { color: rgba(255,255,255,.75); margin: 0; }
.contact-band__details { display: grid; gap: 0.9rem; margin: 0; }
.contact-band__details div { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; }
.contact-band__details dt { font-family: var(--display); color: var(--olive); }
.contact-band__details dd { margin: 0; }
.contact-band a:not(.button) { color: var(--paper); }
.contact-band a:not(.button):hover { color: var(--olive); }

/* --------------------------------------------------------------------------
   Inner page header
   ----------------------------------------------------------------------- */
.page-head {
    position: relative;
    overflow: hidden;
    background: var(--stone);
    border-bottom: 1px solid var(--line);
}
.page-head__inner { position: relative; z-index: 1; padding-block: clamp(3rem, 7vw, 6rem) clamp(2.5rem, 5vw, 4rem); }
.page-head__title { font-size: var(--step-4); margin-bottom: 0.35em; }
.page-head__lead { max-width: 52ch; font-size: var(--step-1); line-height: 1.55; color: var(--ink-soft); margin: 0; }
.page-head__mark {
    position: absolute;
    inset-inline-end: max(-4rem, calc((100vw - var(--max)) / 2 - 4rem));
    top: 50%;
    width: clamp(220px, 32vw, 420px);
    height: auto;
    transform: translateY(-50%);
    color: var(--olive);
    opacity: .35;
    pointer-events: none;
}

/* In-page index (team, expertise) */
.team-index { padding-top: 1.5rem; }
.team-index ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 2rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--line);
}
.team-index a {
    font-family: var(--display);
    color: var(--ink);
    text-decoration: none;
}
.team-index a:hover { color: var(--olive-deep); text-decoration: underline; }

/* --------------------------------------------------------------------------
   Firm page
   ----------------------------------------------------------------------- */
.pillars {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
    margin: 1rem 0 2.75rem;
}
.pillar { border-top: 2px solid var(--olive); padding-top: 1.25rem; }
.pillar__title { font-size: var(--step-2); margin-bottom: 0.5rem; }
.pillar p { color: var(--ink-soft); margin: 0; }
.pillars__links { display: flex; flex-wrap: wrap; gap: 0.75rem; margin: 0; }

.photo-band { margin: 0; height: clamp(220px, 34vw, 440px); overflow: hidden; }
.photo-band picture, .photo-band img { width: 100%; height: 100%; }
.photo-band img { object-fit: cover; object-position: center 60%; filter: grayscale(1); }

/* --------------------------------------------------------------------------
   Team profiles
   ----------------------------------------------------------------------- */
.profile { padding-block: clamp(3rem, 6vw, 5.5rem); }
.profile + .profile { border-top: 1px solid var(--line); }
.profile__grid {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: start;
}
.profile__aside { position: sticky; top: calc(var(--header-h) + 1.5rem); }
.profile__aside picture { aspect-ratio: 4 / 5; overflow: hidden; background: var(--stone); margin-bottom: 1.25rem; max-width: 22rem; }
.profile__photo { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.profile__name { font-size: var(--step-3); margin-bottom: 0.15em; }
.profile__role { font-style: italic; color: var(--ink-soft); margin-bottom: 1.25rem; }
.profile__facts { margin: 0 0 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.profile__facts dt { font-family: var(--display); font-size: var(--step--1); color: var(--olive-deep); }
.profile__facts dd { margin: 0; }

.profile__sections {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.25rem 3rem;
    margin-top: 2.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--line);
}
.profile__section h3 { font-size: var(--step-1); margin-bottom: 0.75rem; }
.profile__section ul { list-style: none; }
.profile__section li {
    position: relative;
    padding-inline-start: 1.1rem;
    margin-bottom: 0.55rem;
    font-size: 0.98rem;
    line-height: 1.55;
}
.profile__section li::before {
    content: "";
    position: absolute;
    inset-inline-start: 0; top: 0.68em;
    width: 6px; height: 1px;
    background: var(--olive-deep);
}

/* --------------------------------------------------------------------------
   Expertise areas
   ----------------------------------------------------------------------- */
.area { padding-block: clamp(3rem, 6vw, 5rem); }
.area + .area { border-top: 1px solid var(--line); }
.area:nth-of-type(even) { background: var(--stone); border-top: 0; }
.area__grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: start;
}
.area__head { position: sticky; top: calc(var(--header-h) + 1.5rem); }
.area__title { font-size: var(--step-3); }
.area__summary { color: var(--ink-soft); font-size: var(--step-1); line-height: 1.55; }
.area__list { list-style: none; counter-reset: item; border-top: 1px solid var(--line); }
.area__list li {
    position: relative;
    padding-block: 1rem;
    padding-inline-start: 1.75rem;
    border-bottom: 1px solid var(--line);
    line-height: 1.6;
}
.area__list li::before {
    content: "";
    position: absolute;
    inset-inline-start: 0; top: 1.75rem;
    width: 0.9rem; height: 1px;
    background: var(--olive-deep);
}

/* --------------------------------------------------------------------------
   Contact page
   ----------------------------------------------------------------------- */
.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: start;
}
.contact-block { padding-bottom: 2rem; margin-bottom: 2rem; border-bottom: 1px solid var(--line); }
.contact-block:last-child { border-bottom: 0; margin-bottom: 0; }
.contact-block__title { font-size: var(--step-1); color: var(--olive-deep); font-weight: 400; margin-bottom: 1rem; }
.contact-big { font-family: var(--display); font-size: var(--step-2); line-height: 1.3; margin-bottom: 0.4rem; overflow-wrap: anywhere; }
.contact-big a { color: var(--ink); text-decoration: none; }
.contact-big a:hover { color: var(--olive-deep); text-decoration: underline; }
.contact-block address { margin-bottom: 1.25rem; font-size: var(--step-1); line-height: 1.55; }

.metro { list-style: none; margin-bottom: 1.25rem; }
.metro li { display: flex; align-items: center; gap: 0.5rem; }
.metro__badge, .metro__line {
    display: inline-grid;
    place-items: center;
    width: 28px; height: 28px;
    border-radius: 50%;
    font-family: var(--display);
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1;
}
.metro__badge { border: 1.5px solid var(--ink); }
.metro__line { background: #ffcd00; color: var(--ink); }

.map { position: relative; aspect-ratio: 4 / 3; background: var(--stone); overflow: hidden; }
.map__placeholder, .map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map__placeholder picture, .map__image { width: 100%; height: 100%; }
.map__image { object-fit: cover; filter: grayscale(1); opacity: .45; }
.map__consent {
    position: absolute;
    inset: auto 0 0 0;
    padding: 1.5rem;
    background: rgba(255,255,255,.94);
    border-top: 2px solid var(--olive);
}
.map__consent p { font-size: var(--step--1); color: var(--ink-soft); margin: 0.75rem 0 0; }

/* --------------------------------------------------------------------------
   Legal
   ----------------------------------------------------------------------- */
.legal .prose { font-size: 1rem; }
.notice {
    max-width: var(--measure);
    padding: 1rem 1.25rem;
    background: var(--stone);
    border-inline-start: 2px solid var(--olive);
    font-style: italic;
    margin-bottom: 2rem;
}

/* --------------------------------------------------------------------------
   Footer
   ----------------------------------------------------------------------- */
.site-footer { background: #1f221e; color: rgba(255,255,255,.78); font-size: 0.95rem; }
.site-footer a { color: rgba(255,255,255,.88); text-decoration: none; }
.site-footer a:hover { color: var(--olive); text-decoration: underline; }
.site-footer__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 2.5rem;
    padding-block: clamp(3rem, 5vw, 4.5rem) 2.5rem;
}
.site-footer__logo { height: 44px; width: auto; color: var(--paper); margin-bottom: 1rem; }
.site-footer__bar { font-style: italic; margin: 0; }
.site-footer__address { line-height: 1.8; }
.site-footer__nav { list-style: none; columns: 2; column-gap: 2rem; line-height: 2; }
.site-footer__legal {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.5rem 2rem;
    padding-block: 1.25rem 2rem;
    border-top: 1px solid rgba(255,255,255,.12);
    font-size: var(--step--1);
}
.site-footer__legal p { margin: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; }

/* --------------------------------------------------------------------------
   Arabic (right to left)
   ----------------------------------------------------------------------- */
[lang="ar"] {
    --display: "Plex Arabic", "Segoe UI", Tahoma, sans-serif;
    --text:    "Plex Arabic", "Segoe UI", Tahoma, sans-serif;
}
[lang="ar"] body { line-height: 1.85; font-size: 1.125rem; }
[lang="ar"] .profile__section li, [lang="ar"] .partner-card__short, [lang="ar"] .doc__meta { font-size: 1rem; }
/* Arabic letters must stay joined and has no italics */
[lang="ar"] *,
[lang="ar"] *::before,
[lang="ar"] *::after { letter-spacing: 0 !important; }
[lang="ar"] em, [lang="ar"] i,
[lang="ar"] .definition__gram, [lang="ar"] .partner-card__role, [lang="ar"] .profile__role,
[lang="ar"] .doc__meta, [lang="ar"] .notice, [lang="ar"] .site-footer__bar { font-style: normal; }
[lang="ar"] h1, [lang="ar"] h2, [lang="ar"] h3 { line-height: 1.35; }
[lang="ar"] .hero__title { line-height: 1.3; }
[lang="ar"] .definition__word { line-height: 1.25; }
[dir="rtl"] .hero__media img { object-position: 30% 40%; }
[dir="rtl"] .hero__media::after {
    background:
        linear-gradient(270deg, rgba(42,45,41,.92) 0%, rgba(42,45,41,.7) 45%, rgba(42,45,41,.15) 100%),
        linear-gradient(0deg, rgba(42,45,41,.6) 0%, rgba(42,45,41,0) 45%);
}
/* Latin content (names, addresses, phone numbers) keeps its own direction */
.ltr { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .ltr { text-align: right; }

.lang-list {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    list-style: none;
    border-inline-start: 1px solid var(--line);
    padding-inline-start: 0.75rem;
}
.lang-list .lang-switch { border: 0; padding: 0 0.25rem; }
@media (max-width: 960px) {
    .lang-list { border-inline-start: 0; border-top: 1px solid var(--line); padding: 0.5rem 0 0; gap: 1rem; }
    .lang-list .lang-switch { padding: 0; justify-content: start; }
}

/* --------------------------------------------------------------------------
   Responsive
   ----------------------------------------------------------------------- */
@media (max-width: 960px) {
    .firm-intro__grid,
    .profile__grid,
    .area__grid,
    .contact-grid { grid-template-columns: minmax(0, 1fr); }

    .profile__aside, .area__head { position: static; }
    .profile__aside {
        display: grid;
        grid-template-columns: 9rem minmax(0, 1fr);
        gap: 0 1.25rem;
        align-items: start;
    }
    .profile__aside picture { grid-row: span 4; margin: 0; }

    .practice-columns { grid-template-columns: minmax(0, 1fr); }
    .practice,
    .practice:first-child { padding: 1.5rem 0; border-inline-start: 0; border-top: 1px solid var(--olive); }

    .partner-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pillars { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }

    .contact-band__inner { grid-template-columns: minmax(0, 1fr); }
    .contact-band__inner .button { justify-self: start; }

    .site-footer__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .site-footer__brand { grid-column: 1 / -1; }

    .page-head__mark { opacity: .2; inset-inline-end: -5rem; }
}

@media (max-width: 640px) {
    .partner-grid { grid-template-columns: minmax(0, 1fr); }
    .partner-card a { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 0 1rem; align-items: start; }
    .partner-card picture { grid-row: span 3; margin: 0; }

    .profile__sections { grid-template-columns: minmax(0, 1fr); }
    .profile__aside { grid-template-columns: 6.5rem minmax(0, 1fr); }

    .doc { grid-template-columns: minmax(0, 1fr); }
    .contact-band__details div { grid-template-columns: minmax(0, 1fr); gap: 0; }
    .site-footer__grid { grid-template-columns: minmax(0, 1fr); }
    .site-footer__nav { columns: 1; }
    .map { aspect-ratio: 3 / 4; }
    .hero__actions .button { flex: 1 1 100%; }
}

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

@media print {
    .site-header, .site-footer, .contact-band, .hero__media, .page-head__mark, .map, .team-index { display: none !important; }
    .hero { min-height: 0; color: var(--ink); background: none; }
    body { font-size: 11pt; }
}
