:root {
    --ink: #12161c;
    --ink-soft: #1c222b;
    --ivory: #f3efe6;
    --paper: #f7f4ee;
    --sand: #e8e1d4;
    --line: rgba(28, 25, 21, 0.12);
    --line-strong: rgba(28, 25, 21, 0.22);
    --gold: #8d6d3f;
    --gold-soft: #d7c4a3;
    --muted: #5c564e;
    --muted-light: #c9c1b6;
    --white: #fffcf7;
    --danger: #7a3030;
    --ok: #1e4a38;
    --header: 7.4rem;
    --font-display: "Amiri", "Arabic Typesetting", "Traditional Arabic", "Sakkal Majalla", serif;
    --font-body: "Tajawal", "Segoe UI", Tahoma, sans-serif;
    --font-latin: "Cormorant Garamond", Georgia, serif;
    --shadow: 0 24px 60px rgba(12, 14, 18, 0.16);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--ivory);
    color: #1c1915;
    font-family: var(--font-body);
    font-size: 1.0625rem;
    line-height: 1.85;
    text-rendering: optimizeLegibility;
}

img,
svg {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0;
}

h1 {
    font-size: clamp(2.7rem, 6vw, 5.35rem);
    margin-bottom: 1rem;
}

h2 {
    font-size: clamp(2rem, 3.4vw, 3.15rem);
    margin-bottom: 0.8rem;
}

h3 {
    font-size: 1.55rem;
    margin-bottom: 0.45rem;
}

p {
    margin-bottom: 0;
}

::selection {
    background: #e4d3b4;
    color: #1c1915;
}

:focus-visible {
    outline: 2px solid var(--gold-soft);
    outline-offset: 3px;
}

.container {
    width: min(1120px, calc(100% - 2.5rem));
    margin-inline: auto;
}

.skip {
    position: absolute;
    inset-inline-start: 1rem;
    top: -4rem;
    z-index: 100;
    background: var(--ivory);
    color: var(--ink);
    padding: 0.6rem 1rem;
}

.skip:focus {
    top: 0.6rem;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.scroll-progress {
    position: fixed;
    inset-inline: 0;
    top: 0;
    height: 2px;
    background: var(--gold-soft);
    transform: scaleX(0);
    transform-origin: 100% 50%;
    z-index: 80;
}

.site-header {
    position: fixed;
    inset-inline: 0;
    top: 0;
    z-index: 70;
    color: var(--ivory);
    transition: background 0.25s ease, border-color 0.25s ease;
}

.site-header.is-scrolled,
.site-header.is-open {
    background: rgba(18, 22, 28, 0.96);
    border-bottom: 1px solid rgba(215, 196, 163, 0.18);
}

.site-header.is-scrolled:not(.is-open) {
    backdrop-filter: blur(14px);
}

.topbar {
    border-bottom: 1px solid rgba(243, 239, 230, 0.08);
    color: var(--muted-light);
    font-size: 0.86rem;
}

.topbar-inner,
.nav-inner,
.legalbar,
.btn-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.topbar-inner {
    min-height: 2.35rem;
}

.topbar p {
    margin: 0;
}

.topbar-links {
    display: flex;
    gap: 1.2rem;
}

.topbar a {
    text-decoration: none;
}

.topbar a:hover {
    color: var(--gold-soft);
}

.nav-inner {
    min-height: 4.7rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-decoration: none;
    color: inherit;
}

.logo-mark {
    width: 2.7rem;
    height: 2.7rem;
    flex: none;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.logo-name {
    font-family: var(--font-display);
    font-size: 1.45rem;
}

.logo-en {
    font-family: var(--font-latin);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-size: 0.72rem;
    color: var(--gold-soft);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-inline-start: auto;
}

.site-nav ul {
    display: flex;
    gap: 1.25rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    text-decoration: none;
    font-size: 1rem;
    color: rgba(243, 239, 230, 0.86);
    white-space: nowrap;
}

.nav-link:hover,
.nav-link.is-active {
    color: var(--gold-soft);
}

.nav-toggle {
    display: none;
    width: 2.8rem;
    height: 2.8rem;
    margin-inline-start: auto;
    border: 1px solid rgba(243, 239, 230, 0.3);
    background: transparent;
    color: var(--ivory);
    cursor: pointer;
    position: relative;
    z-index: 2;
}

.nav-toggle-lines,
.nav-toggle-lines::before,
.nav-toggle-lines::after {
    display: block;
    width: 1.15rem;
    height: 1px;
    background: currentColor;
    position: relative;
}

.nav-toggle-lines::before,
.nav-toggle-lines::after {
    content: "";
    position: absolute;
    inset-inline-start: 0;
}

.nav-toggle-lines::before {
    top: -6px;
}

.nav-toggle-lines::after {
    top: 6px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3.05rem;
    padding: 0.7rem 1.3rem;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.btn-gold {
    background: var(--gold);
    border-color: var(--gold);
    color: #fff;
}

.btn-gold:hover {
    background: #a07e4d;
    border-color: #a07e4d;
}

.btn-line {
    background: transparent;
    border-color: rgba(243, 239, 230, 0.45);
    color: var(--ivory);
}

.btn-line:hover {
    border-color: var(--gold-soft);
    color: var(--gold-soft);
}

.btn-line.on-light {
    border-color: var(--ink);
    color: var(--ink);
}

.btn-line.on-light:hover {
    background: var(--ink);
    color: var(--ivory);
}

.hero {
    min-height: 100vh;
    padding: calc(var(--header) + 2.2rem) 0 4.5rem;
    background:
        radial-gradient(ellipse at 15% 10%, rgba(184, 149, 108, 0.18), transparent 42%),
        linear-gradient(180deg, #171c24 0%, #10141a 78%);
    color: var(--ivory);
}

.hero-grid,
.split,
.contact-grid,
.service-layout,
.footer-grid {
    display: grid;
    gap: 2.5rem;
}

.hero-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    align-items: end;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
    color: var(--gold);
    font-size: 0.98rem;
}

.eyebrow::before {
    content: "";
    width: 2rem;
    height: 1px;
    background: currentColor;
}

.eyebrow.on-dark {
    color: var(--gold-soft);
}

.hero-copy p,
.prose p,
.lead,
.person p,
.matter p,
.service-block p,
.value p,
.principle p,
.office-card p,
.faq-item p {
    color: var(--muted);
}

.hero-copy p {
    max-width: 38rem;
    color: var(--muted-light);
    font-size: 1.12rem;
}

.hero-note {
    margin-top: 1rem;
    color: rgba(243, 239, 230, 0.62);
    font-size: 0.92rem;
}

.btn-row {
    justify-content: flex-start;
    margin-top: 1.7rem;
    flex-wrap: wrap;
}

.hero-visual {
    position: relative;
}

.arch {
    width: min(100%, 430px);
    margin-inline-start: auto;
    height: auto;
}

.dossier {
    width: min(100%, 340px);
    margin-top: -4.2rem;
    margin-inline-start: auto;
    background: var(--ivory);
    color: #1c1915;
    padding: 1.35rem 1.35rem 1.15rem;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 1;
}

.dossier-en {
    font-family: var(--font-latin);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    font-size: 0.78rem;
    color: var(--gold);
}

.dossier-since {
    margin: 0.35rem 0 1rem;
    font-family: var(--font-display);
    font-size: 1.35rem;
}

.stat-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.6rem;
    border-top: 1px solid var(--line);
    padding-top: 0.9rem;
}

.stat-row strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1;
}

.stat-row span {
    display: block;
    margin-top: 0.35rem;
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.principles {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    border-block: 1px solid var(--line);
    background: var(--paper);
}

.principle {
    padding: 1.6rem 1.3rem 1.45rem;
    border-inline-start: 1px solid var(--line);
}

.principle:first-child {
    border-inline-start: 0;
}

.idx {
    display: block;
    margin-bottom: 0.7rem;
    color: var(--gold);
    font-family: var(--font-display);
    font-size: 1.05rem;
}

.principle h3,
.matter h3,
.value h3,
.step h3 {
    font-size: 1.4rem;
}

.principle p {
    font-size: 0.98rem;
}

.section {
    padding: clamp(4.2rem, 8vw, 7rem) 0;
}

.section-head {
    max-width: 40rem;
    margin-bottom: 2.2rem;
}

.split {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: start;
}

.pullquote {
    margin: 1.4rem 0;
    padding-inline-start: 1.1rem;
    border-inline-start: 1px solid var(--gold);
    font-family: var(--font-display);
    font-style: italic;
    font-size: clamp(1.45rem, 2.4vw, 1.9rem);
    line-height: 1.75;
    color: #1c1915;
}

.text-link {
    display: inline-flex;
    margin-top: 0.4rem;
    color: var(--gold);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid rgba(141, 109, 63, 0.45);
}

.text-link:hover {
    color: #1c1915;
    border-color: #1c1915;
}

.band-sand {
    background: var(--sand);
}

.practice-list {
    border-bottom: 1px solid var(--line-strong);
}

.practice-item {
    display: grid;
    grid-template-columns: 4.2rem minmax(0, 1fr) auto;
    gap: 1.2rem;
    align-items: center;
    padding: 1.45rem 0.4rem;
    border-top: 1px solid var(--line-strong);
    text-decoration: none;
    color: inherit;
    transition: background 0.2s ease, color 0.2s ease, padding 0.2s ease;
}

.practice-item strong {
    display: block;
    font-family: var(--font-display);
    font-size: clamp(1.45rem, 2vw, 1.9rem);
    font-weight: 700;
    line-height: 1.4;
}

.practice-item .desc {
    display: block;
    margin-top: 0.25rem;
    color: var(--muted);
    font-style: normal;
}

.practice-num {
    font-family: var(--font-display);
    color: var(--gold);
    font-size: 1.15rem;
}

.arrow {
    font-size: 1.4rem;
    transition: transform 0.2s ease;
}

.practice-item:hover {
    background: var(--ink);
    color: var(--ivory);
    padding-inline: 1rem;
}

.practice-item:hover .desc {
    color: var(--muted-light);
}

.practice-item:hover .arrow {
    transform: translateX(-6px);
}

.matter-grid,
.team-grid,
.values,
.steps {
    display: grid;
    gap: 1rem;
}

.matter-grid,
.team-grid {
    grid-template-columns: repeat(3, 1fr);
}

.values {
    grid-template-columns: 1fr 1fr;
}

.matter,
.person,
.value,
.office-card,
.form-card,
.success-card {
    background: var(--white);
    border: 1px solid var(--line);
    padding: 1.45rem 1.3rem 1.35rem;
    position: relative;
}

.matter::before,
.person::before,
.value::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 2px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: 100% 50%;
    transition: transform 0.35s ease;
}

.matter:hover::before,
.person:hover::before,
.value:hover::before {
    transform: scaleX(1);
}

.matter .label,
.person .focus,
.service-kicker {
    color: var(--gold);
    font-size: 0.92rem;
}

.matter h3,
.person h3 {
    margin-top: 0.15rem;
    font-size: 1.7rem;
}

.band-ink {
    background:
        radial-gradient(ellipse at 90% 0%, rgba(184, 149, 108, 0.16), transparent 40%),
        var(--ink);
    color: var(--ivory);
}

.band-ink .section-head p,
.step p,
.closing p {
    color: var(--muted-light);
}

.steps {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.step {
    padding-top: 1rem;
    border-top: 1px solid rgba(215, 196, 163, 0.35);
}

.team-grid {
    align-items: stretch;
}

.seal {
    width: 4rem;
    height: 4rem;
    display: grid;
    place-items: center;
    border: 1px solid var(--gold);
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin-bottom: 1.1rem;
}

.person .role {
    color: #1c1915;
    font-weight: 500;
}

.section-action {
    margin-top: 1.5rem;
}

.faq-list {
    border-top: 1px solid var(--line-strong);
}

.faq-item {
    border-bottom: 1px solid var(--line-strong);
}

.faq-item summary {
    cursor: pointer;
    list-style: none;
    padding: 1.15rem 0;
    font-family: var(--font-display);
    font-size: 1.4rem;
    line-height: 1.5;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    float: left;
    color: var(--gold);
    font-family: var(--font-body);
}

.faq-item[open] summary::after {
    content: "–";
}

.faq-item p {
    padding-bottom: 1.15rem;
    max-width: 46rem;
}

.closing {
    background: #0e1218;
    color: var(--ivory);
    padding: clamp(4rem, 8vw, 6.5rem) 0;
}

.closing-inner {
    max-width: 46rem;
}

.site-footer {
    background: #0b0e13;
    color: var(--muted-light);
    padding-top: 3.5rem;
}

.footer-grid {
    grid-template-columns: 1.4fr 0.7fr 1fr 1fr;
    padding-bottom: 2.4rem;
}

.footer-logo {
    margin-bottom: 1rem;
}

.footer-lead,
.footer-hours {
    margin-top: 0.8rem;
    max-width: 26rem;
}

.site-footer h2 {
    color: var(--ivory);
    font-size: 1.25rem;
    margin-bottom: 0.8rem;
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer li + li {
    margin-top: 0.35rem;
}

.site-footer a {
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--gold-soft);
}

.site-footer address {
    font-style: normal;
}

.legalbar {
    border-top: 1px solid rgba(243, 239, 230, 0.08);
    padding: 1rem 0 1.2rem;
    font-size: 0.9rem;
    gap: 0.6rem 1.5rem;
}

.page-hero {
    padding: calc(var(--header) + 3rem) 0 3.2rem;
    background:
        radial-gradient(ellipse at 10% 0%, rgba(184, 149, 108, 0.16), transparent 42%),
        #141920;
    color: var(--ivory);
}

.page-hero p {
    max-width: 40rem;
    color: var(--muted-light);
    font-size: 1.12rem;
}

.page-hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.4rem);
    max-width: 11em;
}

.story {
    display: grid;
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    gap: 2.5rem;
}

.story .year {
    font-family: var(--font-display);
    font-size: clamp(4rem, 8vw, 6.5rem);
    line-height: 0.9;
    color: rgba(28, 25, 21, 0.14);
}

.service-layout {
    grid-template-columns: 240px minmax(0, 1fr);
    align-items: start;
}

.side-index {
    position: sticky;
    top: 8rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding-top: 0.4rem;
}

.side-index a {
    text-decoration: none;
    color: var(--muted);
    padding: 0.35rem 0;
    border-bottom: 1px solid transparent;
}

.side-index a:hover {
    color: #1c1915;
    border-color: var(--gold);
}

.service-block {
    scroll-margin-top: 7rem;
    padding: 1.6rem 0 1.8rem;
    border-top: 1px solid var(--line-strong);
}

.service-block h2 {
    font-size: clamp(1.8rem, 3vw, 2.5rem);
}

.clean-list {
    list-style: none;
    margin: 1rem 0 0;
    padding: 0;
}

.clean-list li {
    position: relative;
    padding-inline-start: 1.05rem;
    margin-bottom: 0.4rem;
}

.clean-list li::before {
    content: "";
    width: 0.35rem;
    height: 0.35rem;
    background: var(--gold);
    position: absolute;
    inset-inline-start: 0;
    top: 0.75em;
}

.contact-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
    align-items: start;
}

.form-card h2,
.office-card h2,
.success-card h2 {
    font-size: 2rem;
}

.form-note,
.field span,
.form-alert {
    color: var(--muted);
    font-size: 0.95rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem 1rem;
    margin-top: 1.2rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.field-wide {
    grid-column: 1 / -1;
}

.field span {
    color: #1c1915;
}

input,
select,
textarea {
    width: 100%;
    border: 1px solid #ddd4c6;
    background: #fff;
    color: #1c1915;
    padding: 0.8rem 0.9rem;
    border-radius: 0;
}

textarea {
    min-height: 150px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--gold);
    outline: 3px solid rgba(141, 109, 63, 0.15);
}

select {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--gold) 50%),
        linear-gradient(135deg, var(--gold) 50%, transparent 50%);
    background-position: left 1.15rem top 1.25rem, left 0.75rem top 1.25rem;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
    padding-left: 2.2rem;
}

.form-alert {
    padding: 0.8rem 0.9rem;
    background: #f8ecec;
    color: var(--danger);
    border: 1px solid #edd3d3;
}

.form-alert ul {
    margin: 0.4rem 0 0;
    padding-inline-start: 1.1rem;
}

.hp {
    position: absolute;
    inset-inline-start: -9999px;
    height: 0;
    overflow: hidden;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.8rem 1rem;
    margin-top: 0.4rem;
}

.fine {
    color: var(--muted);
    font-size: 0.88rem;
}

.success-card {
    background: #f4f7f4;
    border-color: #d5e3da;
}

.success-card h2,
.success-card p {
    color: var(--ok);
}

.success-card p {
    margin: 0.6rem 0 1rem;
}

.office-card a {
    color: var(--gold);
}

.map-link {
    display: inline-block;
    margin-top: 0.8rem;
}

.js .reveal {
    opacity: 0;
    transform: translateY(16px);
    animation: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.js .reveal.is-in {
    opacity: 1;
    transform: none;
}

body.nav-open {
    overflow: hidden;
}

@media (max-width: 980px) {
    .hero-grid,
    .split,
    .story,
    .service-layout,
    .contact-grid,
    .footer-grid,
    .principles,
    .matter-grid,
    .steps {
        grid-template-columns: 1fr 1fr;
    }

    .footer-grid,
    .service-layout,
    .story,
    .hero-grid,
    .split,
    .contact-grid {
        grid-template-columns: 1fr;
    }

    .principles .principle:nth-child(odd) {
        border-inline-start: 0;
    }

    .principle:nth-child(n + 3) {
        border-top: 1px solid var(--line);
    }

    .side-index {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.4rem 1rem;
    }

    .team-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 900px) {
    .nav-toggle {
        display: grid;
        place-items: center;
        position: relative;
        z-index: 80;
    }

    .site-nav {
        position: fixed;
        inset: 0;
        z-index: 60;
        margin: 0;
        padding: 8rem 1.6rem 2rem;
        background: #12161c;
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        visibility: hidden;
        opacity: 0;
        transform: translateY(-8px);
    }

    .site-nav.is-open {
        visibility: visible;
        opacity: 1;
        transform: none;
    }

    .site-nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
        width: 100%;
    }

    .nav-link {
        display: inline-flex;
        min-height: 2.8rem;
        align-items: center;
        font-size: 1.35rem;
        font-family: var(--font-display);
    }

    .nav-cta {
        width: 100%;
    }
}

@media (max-width: 760px) {
    .topbar {
        display: none;
    }

    :root {
        --header: 4.8rem;
    }

    .principles,
    .matter-grid,
    .team-grid,
    .values,
    .steps,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .principle {
        border-inline-start: 0;
        border-top: 1px solid var(--line);
    }

    .principle:first-child {
        border-top: 0;
    }

    .practice-item {
        grid-template-columns: 2.6rem minmax(0, 1fr);
    }

    .arrow {
        display: none;
    }

    .legalbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .dossier {
        margin-top: 1.4rem;
        width: 100%;
    }

    .arch {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .js .reveal,
    .js .reveal.is-in {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

@media print {
    .site-header,
    .scroll-progress,
    .closing,
    .nav-toggle,
    .topbar {
        display: none !important;
    }

    body,
    .page-hero,
    .hero,
    .band-ink,
    .site-footer {
        background: white !important;
        color: black !important;
    }

    .page-hero,
    .hero {
        padding-top: 1rem;
    }
}
