/* ============================================================
   النصار للمحاماة — Design System
   Derived from brand mark: Kufic-square emblem, navy/ink/stone palette
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Almarai:wght@300;400;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Newsreader:ital,opsz,wght@0,6..72,400;0,6..72,500;0,6..72,600;1,6..72,400&family=Inter:wght@300;400;500;600&display=swap');

:root{
  /* --- brand palette (from logo book) --- */
  --navy: #25498D;
  --navy-deep: #17294D;
  --ink: #201D1D;
  --stone: #9FA3A6;
  --stone-soft: #D8D5CE;
  --teal: #3C93B2;
  --paper: #FAF8F4;
  --paper-deep: #F1EDE5;
  --line: #E2DED4;
  --white: #ffffff;

  /* type */
  --f-ar: 'Almarai', sans-serif;
  --f-serif: 'Newsreader', serif;
  --f-en: 'Inter', sans-serif;

  --radius: 2px;
  --container: 1180px;
}

*,*::before,*::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin:0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-ar);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
html[lang="en"] body{ font-family: var(--f-en); line-height: 1.7; }

img{ max-width:100%; display:block; }
a{ color: inherit; text-decoration: none; }
ul{ list-style: none; margin:0; padding:0; }
button{ font-family: inherit; cursor:pointer; }

.container{
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}

/* ---------- eyebrow / labels ---------- */
.eyebrow{
  display:inline-flex;
  align-items:center;
  gap:10px;
  font-size: 13px;
  letter-spacing: .06em;
  color: var(--navy);
  font-weight: 700;
  text-transform: uppercase;
}
html[lang="ar"] .eyebrow{ text-transform:none; letter-spacing:0; }
.eyebrow::before{
  content:"";
  width:7px; height:7px;
  background: var(--teal);
  transform: rotate(45deg);
  flex:none;
}

h1,h2,h3{ margin:0; font-weight:800; color: var(--navy-deep); }
html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] h3{
  font-family: var(--f-serif); font-weight:600; letter-spacing:-.01em;
}
p{ margin:0; text-align:justify; text-align-last:start; }

.section{ padding: 96px 0; }
.section--tight{ padding: 64px 0; }
.section--alt{ background: var(--paper-deep); }
.section--navy{ background: var(--navy-deep); color: var(--white); }
.section--navy h1,.section--navy h2,.section--navy h3{ color: var(--white); }

.divider{
  width:100%; height:1px;
  background: var(--line);
  border:0;
  margin: 0;
}

/* diamond motif — signature element echoing the Kufic construction grid */
.diamond{
  width:10px; height:10px;
  background: var(--teal);
  transform: rotate(45deg);
  flex: none;
  display:inline-block;
}

/* ============ HEADER ============ */
.site-header{
  position: sticky; top:0; z-index: 40;
  background: rgba(250,248,244,.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-header .container{
  display:flex; align-items:center; justify-content:space-between;
  height: 84px;
}
.brand{
  display:flex; align-items:center; gap:14px;
}
.brand img{ height:40px; width:auto; }
.brand-name{
  font-weight:800; font-size: 17px; color: var(--navy-deep);
  line-height:1.3;
}
.brand-name small{
  display:block; font-weight:400; font-size:12px; color: var(--stone); letter-spacing:.02em;
}

.main-nav{ display:flex; align-items:center; gap:36px; }
.main-nav a{
  font-size:14.5px; font-weight:700; color: var(--ink);
  position:relative; padding-block:6px;
}
.main-nav a.active{ color: var(--navy); }
.main-nav a.active::after{
  content:""; position:absolute; bottom:0; inset-inline:0; height:2px; background: var(--teal);
}

.header-actions{ display:flex; align-items:center; gap:16px; }
.lang-btn{
  border: 1px solid var(--navy); background: transparent;
  color: var(--navy); font-weight:700; font-size:13px;
  padding: 7px 14px; border-radius: var(--radius);
  transition: .2s;
}
.lang-btn:hover{ background: var(--navy); color:#fff; }

.btn{
  display:inline-flex; align-items:center; gap:10px;
  padding: 13px 26px;
  font-weight:700; font-size:14.5px;
  border-radius: var(--radius);
  border:1px solid transparent;
  transition:.2s;
  white-space:nowrap;
}
.btn--primary{ background: var(--navy); color:#fff; }
.btn--primary:hover{ background: var(--navy-deep); }
.btn--ghost{ border-color: var(--ink); color:var(--ink); }
.btn--ghost:hover{ border-color:var(--navy); color:var(--navy); }
.btn--ghost-light{ border-color: rgba(255,255,255,.5); color:#fff; }
.btn--ghost-light:hover{ border-color:#fff; }

.nav-toggle{
  display:none;
  align-items:center; justify-content:center;
  width:40px; height:40px;
  background:transparent; border:1px solid var(--line);
  flex-direction:column; gap:4px;
}
.nav-toggle span{ width:18px; height:2px; background: var(--ink); display:block; }

/* ============ HERO ============ */
.hero{
  position:relative;
  overflow:hidden;
  padding: 84px 0 100px;
  background: var(--paper);
}
.hero-grid{
  display:grid; grid-template-columns: 1.15fr .85fr; gap:64px; align-items:center;
}
.hero h1{
  font-size: clamp(34px, 4.4vw, 54px);
  line-height:1.25;
  margin-block: 22px 22px;
}
.hero .lede{
  font-size:17px; color:#4b4744; max-width: 56ch;
  margin-bottom: 36px;
}
.hero-actions{ display:flex; gap:16px; flex-wrap:wrap; }

.hero-mark{
  position:relative;
  display:flex; align-items:center; justify-content:center;
  aspect-ratio: 1/1;
}
.hero-mark svg{ width:100%; height:100%; }
.hero-mark img{ width:58%; }

.hero-tagline{
  margin-top:26px; text-align:center;
  font-family: var(--f-ar);
  color: var(--navy);
  font-weight:800; font-size:19px;
}
.hero-tagline span{
  display:block; font-weight:400; color: var(--stone); font-size:13.5px; margin-top:6px;
}

/* ============ VALUE / PILLARS ============ */
.pillars{
  display:grid; grid-template-columns: repeat(3,1fr); gap:1px;
  background: var(--line);
  border:1px solid var(--line);
}
.pillar{
  background: var(--paper);
  padding: 40px 34px;
}
.pillar .num{
  font-family: var(--f-serif); font-style:italic;
  color: var(--stone-soft); font-size:15px; margin-bottom:18px; display:block;
}
.pillar h3{ font-size:20px; margin-bottom:14px; }
.pillar p{ color:#54504c; font-size:14.5px; }

/* ============ SERVICES GRID ============ */
.services-grid{
  display:grid; grid-template-columns: repeat(3,1fr); gap: 28px;
  margin-top: 48px;
}
.service-card{
  background: var(--white);
  border:1px solid var(--line);
  padding: 34px 28px;
  transition:.25s;
}
.service-card:hover{ border-color: var(--navy); box-shadow: 0 12px 28px -18px rgba(23,41,77,.35); }
.service-card .icon{
  width:44px; height:44px; margin-bottom:22px;
  color: var(--navy);
}
.service-card h3{ font-size:18px; margin-bottom:10px; }
.service-card p{ font-size:14px; color:#5a5652; }

.section-head{
  display:flex; align-items:flex-end; justify-content:space-between; gap:24px; flex-wrap:wrap;
}
.section-head h2{ font-size: clamp(26px,3vw,36px); margin-top:14px; }
.section-head .lede{ max-width:52ch; color:#54504c; font-size:15px; margin-top:14px; }

/* ============ ABOUT ============ */
.about-hero{
  display:grid; grid-template-columns: .9fr 1.1fr; gap:64px; align-items:center;
}
.about-hero .plate{
  background: var(--navy-deep);
  aspect-ratio: 4/5;
  display:flex; align-items:center; justify-content:center;
  position:relative;
}
.about-hero .plate img{ width:42%; }
.about-hero .plate::before{
  content:""; position:absolute; inset:18px; border:1px solid rgba(255,255,255,.18);
}

.founder{
  display:grid; grid-template-columns: .8fr 1.2fr; gap:56px; align-items:center;
}
.founder-card{
  background: var(--paper-deep);
  border-inline-start: 4px solid var(--navy);
  padding: 44px;
}
.founder-card h3{ font-size:22px; }
.founder-card .role{ color: var(--teal); font-weight:700; font-size:13.5px; margin-block:8px 18px; text-transform:uppercase; letter-spacing:.04em; }
html[lang="ar"] .founder-card .role{ text-transform:none; letter-spacing:0;}
.founder-card p{ color:#54504c; font-size:14.5px; }

.philosophy-block{
  display:grid; grid-template-columns: .5fr 1.5fr; gap:48px;
}
.philosophy-block .label{ font-weight:800; color:var(--navy); font-size:15px; }
.philosophy-block .body p{ font-size:16px; color:#3a3733; margin-bottom:18px; }
.philosophy-block .body p:last-child{ margin-bottom:0; }

/* ============ CONTACT ============ */
.contact-grid{
  display:grid; grid-template-columns: .9fr 1.1fr; gap:64px;
}
.contact-list{ display:flex; flex-direction:column; gap:0; }
.contact-item{
  display:flex; gap:18px; padding-block:26px;
  border-bottom:1px solid var(--line);
}
.contact-item:first-child{ padding-top:0; }
.contact-item .icon{ width:22px; height:22px; color:var(--navy); flex:none; margin-top:3px; }
.contact-item h4{ font-size:13px; text-transform:uppercase; letter-spacing:.05em; color:var(--stone); margin-bottom:6px; font-weight:700;}
html[lang="ar"] .contact-item h4{ text-transform:none; letter-spacing:0; }
.contact-item a, .contact-item span{ font-size:16.5px; font-weight:700; color: var(--ink); }

.form{
  background:var(--white); border:1px solid var(--line); padding:40px;
}
.form-row{ display:grid; grid-template-columns:1fr 1fr; gap:20px; margin-bottom:20px; }
.field{ display:flex; flex-direction:column; gap:8px; }
.field.full{ grid-column: 1/-1; }
.field label{ font-size:13px; font-weight:700; color:#54504c; }
.field input, .field textarea, .field select{
  border:1px solid var(--stone-soft);
  background: var(--paper);
  padding:12px 14px;
  font-family:inherit; font-size:14.5px; color: var(--ink);
  border-radius: var(--radius);
}
.field input:focus, .field textarea:focus, .field select:focus{
  outline:2px solid var(--navy); outline-offset:1px; border-color:var(--navy);
}
.field textarea{ resize:vertical; min-height:120px; }
.form .btn{ width:100%; justify-content:center; margin-top:6px; }
.form-note{ font-size:12.5px; color:var(--stone); margin-top:14px; text-align:center; }

/* ============ FOOTER ============ */
.site-footer{ background: var(--navy-deep); color:#fff; padding: 64px 0 28px; }
.footer-grid{
  display:grid; grid-template-columns: 1.4fr .8fr .8fr 1fr; gap:40px;
  padding-bottom: 44px; border-bottom:1px solid rgba(255,255,255,.12);
}
.footer-brand{ display:flex; gap:14px; align-items:flex-start; }
.footer-brand img{ height:38px; }
.footer-brand-name{ font-weight:800; font-size:16px; }
.footer-brand-name small{ display:block; color:rgba(255,255,255,.55); font-weight:400; font-size:12.5px; margin-top:6px; max-width:26ch; }
.footer h5{ font-size:13px; text-transform:uppercase; letter-spacing:.05em; color:rgba(255,255,255,.5); margin-bottom:18px; font-weight:700;}
html[lang="ar"] .footer h5{ text-transform:none; letter-spacing:0; }
.footer-links{ display:flex; flex-direction:column; gap:12px; }
.footer-links a{ font-size:14.5px; color:rgba(255,255,255,.85); }
.footer-links a:hover{ color:#fff; }
.footer-links a[href^="tel:"]{ text-align:end; }
html[lang="en"] .footer-links a[href^="tel:"]{ text-align:start; }
.footer-bottom{
  padding-top: 26px; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:12px;
  font-size:13px; color: rgba(255,255,255,.5);
}

/* ============ responsive ============ */
@media (max-width: 900px){
  .main-nav{
    display:none;
    position:absolute; top:84px; inset-inline:0;
    background: var(--paper);
    border-bottom:1px solid var(--line);
    flex-direction:column; align-items:stretch;
    gap:0; padding: 8px 24px 20px;
  }
  .main-nav.is-open{ display:flex; }
  .main-nav a{ padding-block:14px; border-bottom:1px solid var(--line); }
  .main-nav a:last-child{ border-bottom:0; }
  .nav-toggle{ display:inline-flex; }
  .hero-grid, .about-hero, .founder, .contact-grid, .philosophy-block{ grid-template-columns:1fr; }
  .pillars{ grid-template-columns:1fr; }
  .services-grid{ grid-template-columns: 1fr 1fr; }
  .footer-grid{ grid-template-columns: 1fr 1fr; }
  .form-row{ grid-template-columns:1fr; }
  .about-hero{ gap:36px; }
  .about-hero .plate{ order:-1; aspect-ratio: 16/9; }
}
@media (max-width: 560px){
  .services-grid{ grid-template-columns: 1fr; }
  .footer-grid{ grid-template-columns: 1fr; }
  .section{ padding: 64px 0; }
}

@media (max-width: 640px){
  .site-header .container{ height:72px; }
  .header-actions .btn--primary{ display:none; }
  .brand img{ height:32px; }
  .brand-name{ font-size:15px; }
  .brand-name small{ font-size:10.5px; }
  .main-nav{ top:72px; }
}
