/* المحامي أحمد نجدت بري — «marble chamber»: ink black + antique gold on ivory marble. See DESIGN.md */
@font-face { font-family: "Ruqaa"; font-weight: 700; font-display: swap; src: url(fonts/ruqaa-ar.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Ruqaa"; font-weight: 700; font-display: swap; src: url(fonts/ruqaa-lat.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F; }
@font-face { font-family: "Kufi"; font-weight: 400 700; font-display: swap; src: url(fonts/kufi-ar.woff2) format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC; }
@font-face { font-family: "Kufi"; font-weight: 400 700; font-display: swap; src: url(fonts/kufi-lat.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122; }
@font-face { font-family: "Corm"; font-weight: 600; font-display: swap; src: url(fonts/corm-lat.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+2000-206F; }

:root {
  --ivory: #f6f1e6; --ivory-2: #ece4d3; --ink: #121110; --ink-2: #2b2824; --muted: #4a443b;
  --gold: #b8892f; --gold-hi: #e6c77a; --gold-ink: #7d5a17; --line: rgba(125, 90, 23, .28);
  --pad: clamp(20px, 5vw, 72px); --max: 1240px;
  --disp: "Ruqaa", "Kufi", serif; --text: "Kufi", system-ui, sans-serif;
}
html:lang(en) { --disp: "Corm", Georgia, serif; }
* { box-sizing: border-box; }
html, body { margin: 0; overflow-x: clip; }
body { background: var(--ivory); color: var(--ink); font: 400 17px/1.85 var(--text); -webkit-font-smoothing: antialiased; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
.wrap { width: min(var(--max), 100% - 2 * var(--pad)); margin-inline: auto; }

/* marble ground: soft veins + warm light, painted once (fixed layer, no repaint on scroll) */
.marble { position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(120% 70% at 85% 0%, rgba(255, 255, 255, .9), transparent 60%),
    url("img/marble.svg") center / cover no-repeat,
    linear-gradient(180deg, var(--ivory), var(--ivory-2)); }

/* header */
.hd { position: fixed; z-index: 40; inset-block-start: 0; inset-inline: 0; height: 68px; display: flex; align-items: center; justify-content: space-between;
  padding-inline: var(--pad); background: rgba(246, 241, 230, .94); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand svg { width: 38px; height: 38px; }
.brand b { font: 700 21px/1.2 var(--disp); }
.brand small { display: block; font: 500 11px/1.2 var(--text); color: var(--gold-ink); letter-spacing: 0; }
html:lang(en) .brand small { letter-spacing: .18em; }
.hd-cta { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 999px; background: var(--ink); color: var(--gold-hi);
  font: 600 14px/1 var(--text); text-decoration: none; }
.hd nav { display: flex; gap: 26px; font: 500 15px/1 var(--text); }
.hd nav a { text-decoration: none; color: var(--ink-2); }
.hd nav a:hover { color: var(--gold-ink); }
@media (max-width: 860px) { .hd nav { display: none; } .brand small { display: none; } .brand b { font-size: 18px; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 54px; padding: 0 28px; border-radius: 999px;
  font: 600 16px/1 var(--text); text-decoration: none; transition: background .25s, color .25s, transform .2s; }
.btn-ink { background: var(--ink); color: var(--gold-hi); box-shadow: 0 14px 30px -14px rgba(18, 17, 16, .6), inset 0 0 0 1px rgba(230, 199, 122, .35); }
.btn-ink:hover { background: #000; }
.btn-line { color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-line:hover { background: var(--ink); color: var(--gold-hi); }
.btn svg { width: 20px; height: 20px; }

/* hero */
.hero { min-height: 100svh; padding-block: 108px 64px; display: grid; align-items: center; }
.hero .wrap { display: grid; grid-template-columns: 1.02fr 1fr; gap: clamp(32px, 6vw, 90px); align-items: center; }
.kick { display: inline-flex; align-items: center; gap: 12px; font: 600 15px/1.4 var(--text); color: var(--gold-ink); }
.kick::before { content: ""; width: 38px; height: 1.5px; background: var(--gold); }
.h-name { margin: 6px 0 0; font: 700 clamp(54px, 7.4vw, 116px)/1.32 var(--disp); color: var(--ink); padding-block: .08em; }
html:lang(en) .h-name { line-height: 1.02; letter-spacing: -.01em; }
.h-rule { display: block; width: min(320px, 70%); height: 2px; margin: 14px 0 22px; background: linear-gradient(90deg, var(--gold), var(--gold-hi), var(--gold)); }
.h-role { margin: 0; font: 600 clamp(20px, 2.1vw, 26px)/1.6 var(--text); }
.h-lead { margin: 12px 0 30px; max-width: 34em; font-size: 17.5px; color: var(--ink-2); }
.h-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.h-motto { margin-top: 34px; display: flex; align-items: center; gap: 14px; font: 700 24px/1.6 var(--disp); color: var(--gold-ink); }
.h-motto svg { width: 34px; height: 34px; flex: none; }
html:lang(en) .h-motto { font-size: 22px; font-style: italic; }

/* portrait: double gold frame, a light that runs round the frame, a glint across the glass */
.pf { position: relative; justify-self: center; width: min(560px, 100%); padding: 14px; }
.pf::before { content: ""; position: absolute; inset: 0; border: 1px solid var(--gold); border-radius: 10px; }
.pf::after { content: ""; position: absolute; inset: -9px; border: 1px solid var(--line); border-radius: 14px; }
.portrait { position: relative; border-radius: 6px; overflow: hidden; padding: 3px; isolation: isolate;
  background: linear-gradient(135deg, #6b4e16, #c9a24d 30%, #5c4312 55%, #d6b363 80%, #6b4e16);
  box-shadow: 0 40px 70px -30px rgba(18, 17, 16, .55), 0 0 0 1px rgba(18, 17, 16, .5); }
.orbit { position: absolute; z-index: 0; left: 50%; top: 50%; width: 160%; aspect-ratio: 1; margin: -80% 0 0 -80%;
  background: conic-gradient(from 0deg, transparent 0deg, transparent 280deg, rgba(255, 236, 180, .15) 300deg, #f3d488 330deg, #fffaf0 346deg, #f3d488 352deg, transparent 360deg);
  animation: orbit 4.6s linear infinite; will-change: transform; }
.portrait img { position: relative; z-index: 1; width: 100%; height: auto; border-radius: 4px; }
.glint { position: absolute; z-index: 2; inset: 3px; border-radius: 4px; pointer-events: none; overflow: hidden; }
.glint::before { content: ""; position: absolute; inset: -10% -60%; background: linear-gradient(105deg, transparent 42%, rgba(255, 244, 214, .38) 50%, transparent 58%);
  transform: translateX(-70%); animation: glint 6s cubic-bezier(.6, 0, .3, 1) 3.4s infinite; }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes glint { 0% { transform: translateX(-70%); } 30%, 100% { transform: translateX(70%); } }
.pf-cap { position: absolute; z-index: 3; inset-inline-start: -6px; bottom: -22px; padding: 10px 18px; background: var(--ink); color: var(--gold-hi); border-radius: 4px;
  font: 600 13.5px/1.4 var(--text); box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .5); }

@media (max-width: 860px) {
  .hero { padding-block: 88px 40px; min-height: 0; }
  .hero .wrap { grid-template-columns: 1fr; gap: 26px; }
  .pf { order: -1; width: min(440px, 100%); padding: 10px; }
  .h-name { font-size: clamp(48px, 14vw, 72px); }
  .h-rule { margin: 8px 0 16px; }
  .h-lead { font-size: 16.5px; margin-bottom: 22px; }
  .h-cta .btn { flex: 1 1 100%; }
  .h-motto { margin-top: 24px; font-size: 21px; }
}

/* black marble band with the fields */
.band { background: #121110 url("img/marble-dark.svg") center / cover; color: var(--gold-hi); border-block: 1px solid var(--gold); padding-block: 18px; }
.band .gm-mq span { font: 700 clamp(26px, 3.4vw, 40px)/1.5 var(--disp); padding-inline: 26px; display: inline-flex; align-items: center; gap: 52px; white-space: nowrap; }
.band .gm-mq span::after { content: "✦"; font: 400 16px/1 var(--text); color: var(--gold); }

/* statement */
.state { padding-block: clamp(80px, 12vw, 160px); }
.state p { margin: 0; max-width: 22em; font: 700 clamp(30px, 4.3vw, 58px)/1.6 var(--disp); }
html:lang(en) .state p { line-height: 1.25; max-width: 19em; }
.state .sig { margin-top: 26px; font: 600 15px/1.4 var(--text); color: var(--gold-ink); }

/* section heads */
.sh { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: clamp(26px, 4vw, 52px); }
.sh h2 { margin: 0; font: 700 clamp(38px, 5.4vw, 74px)/1.35 var(--disp); }
html:lang(en) .sh h2 { line-height: 1.05; }
.sh p { margin: 0; max-width: 26em; color: var(--ink-2); }
.eb { display: block; font: 600 14px/1.4 var(--text); color: var(--gold-ink); margin-bottom: 4px; }

/* المواد — practice areas as articles of a code */
.arts { padding-block: 20px clamp(80px, 10vw, 140px); }
.art-list { border-top: 1.5px solid var(--ink); }
.art { display: grid; grid-template-columns: 120px 1fr 1.2fr 44px; gap: 24px; align-items: center; padding-block: 26px; border-bottom: 1px solid var(--line);
  transition: background .3s, padding .3s var(--gm-ease); }
.art-n { font: 700 15px/1.3 var(--text); color: var(--gold-ink); }
.art-n b { display: block; font: 700 34px/1.4 var(--disp); color: var(--gold); }
.art h3 { margin: 0; font: 700 clamp(26px, 2.6vw, 34px)/1.5 var(--disp); }
html:lang(en) .art h3 { line-height: 1.15; }
.art p { margin: 0; color: var(--ink-2); }
.art svg { width: 40px; height: 40px; color: var(--gold); justify-self: end; }
@media (hover: hover) { .art:hover { background: rgba(255, 255, 255, .55); padding-inline: 18px; } }
@media (max-width: 860px) {
  .sh { flex-direction: column; align-items: start; gap: 10px; }
  .art { grid-template-columns: 78px 1fr; gap: 6px 14px; padding-block: 20px; }
  .art-n { grid-row: span 2; } .art-n b { font-size: 25px; }
  .art p { grid-column: 2; font-size: 16px; }
  .art svg { display: none; }
}
.note { margin-top: 18px; font-size: 14.5px; color: var(--muted); }

/* signature: the scale */
.scale-sec { padding-block: clamp(70px, 9vw, 130px); background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .55) 30%, rgba(255, 255, 255, .55) 70%, transparent); }
.scale-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(24px, 5vw, 70px); align-items: center; }
.scale-svg { width: 100%; height: auto; overflow: visible; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: s; }
.steps li { position: relative; padding: 16px 20px; padding-inline-start: 66px; border-radius: 10px; border: 1px solid var(--line); background: rgba(246, 241, 230, .7);
  transition: background .4s, color .4s, border-color .4s, transform .5s var(--gm-ease); }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; inset-inline-start: 18px; top: 16px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; border: 1.5px solid var(--gold); color: var(--gold-ink); font: 700 15px/1 var(--text); transition: inherit; }
.steps b { display: block; font: 700 19px/1.5 var(--text); }
.steps span { display: block; font-size: 15.5px; color: var(--ink-2); line-height: 1.7; transition: color .4s; }
.steps li.on { background: var(--ink); border-color: var(--ink); color: var(--gold-hi); transform: translateX(calc(var(--dir, -1) * 6px)); }
.steps li.on span { color: #e9e1d0; }
.steps li.on::before { background: var(--gold); color: var(--ink); border-color: var(--gold); }
html[dir="ltr"] .steps li.on { --dir: 1; }
.verdict { margin-top: 18px; font: 700 26px/1.5 var(--disp); color: var(--gold-ink); opacity: .25; transition: opacity .6s; }
.verdict.on { opacity: 1; }
@media (max-width: 860px) {
  .scale-grid { grid-template-columns: 1fr; }
  .steps li { padding: 12px 14px; padding-inline-start: 58px; }
  .steps li::before { top: 13px; inset-inline-start: 14px; }
  .steps b { font-size: 17px; } .steps span { font-size: 15px; }
}

/* principles — black marble plaques */
.prin { padding-block: clamp(70px, 9vw, 130px); }
.plaques { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.plq { position: relative; padding: 34px 28px 30px; border-radius: 6px; color: #efe7d6; background: #141311 url("img/marble-dark.svg") center / cover;
  box-shadow: inset 0 0 0 1px rgba(230, 199, 122, .45), inset 0 0 0 7px #141311, inset 0 0 0 8px rgba(230, 199, 122, .25), 0 30px 50px -30px rgba(0, 0, 0, .6); }
.plq svg { width: 44px; height: 44px; color: var(--gold-hi); margin-bottom: 18px; }
.plq h3 { margin: 0 0 6px; font: 700 30px/1.5 var(--disp); color: var(--gold-hi); }
html:lang(en) .plq h3 { line-height: 1.2; }
.plq p { margin: 0; font-size: 16px; color: #e9e1d0; }
.plq:nth-child(2) { transform: translateY(28px); }
@media (max-width: 860px) { .plaques { grid-template-columns: 1fr; } .plq:nth-child(2) { transform: none; } }

/* close */
.close { padding-block: clamp(80px, 11vw, 150px) 40px; text-align: center; position: relative; }
.motto-big { display: block; font: 700 clamp(46px, 11vw, 170px)/1.45 var(--disp); color: var(--ink); padding-block: .05em; }
html:lang(en) .motto-big { line-height: 1.05; font-style: italic; }
.motto-big .gl { background: linear-gradient(100deg, var(--gold-ink) 0%, var(--gold) 35%, #f0d48c 50%, var(--gold) 65%, var(--gold-ink) 100%); background-size: 250% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; padding: .12em .04em .2em; animation: sheen 6s linear infinite; }
@keyframes sheen { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.close .lead { max-width: 30em; margin: 10px auto 30px; font-size: 18px; color: var(--ink-2); }
.seal { width: 132px; height: 132px; margin: 0 auto 26px; }
.close .h-cta { justify-content: center; }
.ft { margin-top: 70px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; font-size: 14px; color: var(--muted); }
.ft a { color: var(--gold-ink); }

/* language button (physical left) */
.lang { position: fixed; z-index: 46; left: 18px; bottom: 18px; min-width: 56px; height: 56px; padding: 0 16px; border-radius: 999px; display: grid; place-items: center;
  background: var(--ink); color: var(--gold-hi); font: 700 15px/1 var(--text); text-decoration: none; box-shadow: 0 12px 26px -10px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(230, 199, 122, .4); }

/* entrance — ~3 s, auto, once per visit */
.intro { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; pointer-events: none;
  background: radial-gradient(70% 60% at 50% 45%, #fbf7ee, var(--ivory) 55%, var(--ivory-2));
  animation: intro-out .8s cubic-bezier(.76, 0, .24, 1) 2.5s forwards; }
.no-intro .intro { display: none; }
.intro-in { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 20px; }
.intro-mark { width: clamp(120px, 22vw, 170px); height: auto; color: var(--gold); }
.intro-mark path, .intro-mark line, .intro-mark circle { stroke-dasharray: 600; stroke-dashoffset: 600; animation: draw 1.6s cubic-bezier(.65, 0, .35, 1) .1s forwards; }
.intro-k { font: 600 15px/1.4 var(--text); color: var(--gold-ink); animation: up .9s var(--gm-ease, ease) .7s both; }
.intro-name { margin: 0; font: 700 clamp(34px, 6vw, 60px)/1.4 var(--disp); color: var(--ink); animation: up .9s var(--gm-ease, ease) .85s both; }
.intro-line { display: block; width: 170px; height: 1.5px; background: var(--gold); animation: line 1s var(--gm-ease, ease) 1.1s both; }
.intro-sub { font: 600 11.5px/1.4 var(--text); letter-spacing: .32em; color: var(--gold-ink); animation: up .9s var(--gm-ease, ease) 1.25s both; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes up { from { opacity: 0; transform: translateY(14px); } }
@keyframes line { from { transform: scaleX(0); } }
@keyframes intro-out { to { opacity: 0; visibility: hidden; transform: scale(1.03); } }

@media (prefers-reduced-motion: reduce) {
  .intro { animation-delay: 1.5s; } .intro * { animation: none !important; stroke-dashoffset: 0 !important; }
  .orbit, .glint::before, .motto-big .gl { animation: none; }
}
html:lang(en) .intro-sub { letter-spacing: 0; font-size: 14px; }
.brand b, .hd-cta { white-space: nowrap; }
@media (max-width: 440px) { html:lang(en) .brand b { font-size: 17px; } html:lang(en) .hd-cta { font-size: 12.5px; padding: 0 13px; } }
/* WhatsApp button (physical right; language button stays left) */
.wa-fab { position: fixed; z-index: 46; right: 18px; bottom: 18px; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
  background: #1f9d55; color: #fff; box-shadow: 0 12px 26px -10px rgba(0, 0, 0, .5), inset 0 0 0 2px rgba(230, 199, 122, .7); }
.wa-fab svg { width: 30px; height: 30px; }
@media (min-width: 1101px) { .wa-fab { right: 28px; bottom: 24px; } }
@media (max-width: 860px) { .ft { padding-bottom: 72px; justify-content: center; text-align: center; } }
