/* ============================================================
   Hassef Law — Bilingual (AR/EN) Legal Firm Website
   Design: dark luxury gold/bronze, elegant serif display
   ============================================================ */

:root {
  --bg: #0d1117;
  --bg-2: #121821;
  --card: #161d29;
  --card-2: #1a2332;
  --line: rgba(200, 169, 92, 0.14);
  --line-2: rgba(255, 255, 255, 0.06);
  --gold: #c8a95c;
  --gold-2: #e6cf94;
  --gold-grad: linear-gradient(135deg, #e6cf94 0%, #c8a95c 45%, #a98743 100%);
  --text: #eef1f5;
  --text-2: #a8b0bd;
  --text-3: #6d7686;
  --radius: 18px;
  --font-ar: "Cairo", "Segoe UI", sans-serif;
  --font-en: "Inter", "Segoe UI", sans-serif;
  --font-display-en: "Cormorant Garamond", "Inter", serif;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-ar);
  background: var(--bg);
  color: var(--text);
  line-height: 1.8;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

html[lang="en"] body { font-family: var(--font-en); }
html[lang="en"] h1, html[lang="en"] h2, html[lang="en"] h3 { font-family: var(--font-display-en); }

::selection { background: rgba(200, 169, 92, 0.35); color: #fff; }

.container { width: min(1180px, 92%); margin-inline: auto; }

/* ---------- Header ---------- */
.header {
  position: fixed; inset-inline: 0; top: 0; z-index: 100;
  padding: 18px 0;
  background: rgba(13, 17, 23, 0.75);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: all 0.35s ease;
}
.header.scrolled {
  padding: 10px 0;
  background: rgba(13, 17, 23, 0.92);
  border-bottom-color: var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); }
.brand-mark {
  width: 46px; height: 46px; flex: none;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--gold-grad);
  color: #0d1117;
  font-size: 1.5rem; font-weight: 900;
  font-family: var(--font-ar);
  box-shadow: 0 6px 20px rgba(200, 169, 92, 0.35);
}
html[lang="en"] .brand-mark { font-family: var(--font-display-en); font-weight: 700; }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-name { font-weight: 800; font-size: 1.05rem; }
.brand-sub { font-size: 0.72rem; color: var(--text-2); letter-spacing: 0.02em; }

.nav { display: flex; align-items: center; gap: 26px; }
.nav a {
  text-decoration: none; color: var(--text-2);
  font-size: 0.9rem; font-weight: 600;
  position: relative; transition: color 0.25s;
}
.nav a::after {
  content: ""; position: absolute;
  bottom: -6px; inset-inline-start: 0;
  width: 0; height: 2px;
  background: var(--gold-grad);
  border-radius: 2px; transition: width 0.3s ease;
}
.nav a:hover { color: var(--text); }
.nav a:hover::after { width: 100%; }
.nav a.nav-cta {
  color: #0d1117; background: var(--gold-grad);
  padding: 9px 22px; border-radius: 99px; font-weight: 700;
}
.nav a.nav-cta::after { display: none; }

.header-actions { display: flex; align-items: center; gap: 14px; }

.lang-toggle {
  display: flex; align-items: center; gap: 6px;
  background: transparent; color: var(--text-2);
  border: 1px solid var(--line);
  border-radius: 99px; padding: 7px 16px;
  font-family: var(--font-ar); font-size: 0.85rem; font-weight: 700;
  cursor: pointer; transition: all 0.25s;
}
.lang-toggle:hover { border-color: var(--gold); color: var(--gold-2); }
.lang-active { color: var(--gold-2); }
.lang-sep { opacity: 0.4; }

.menu-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer; padding: 6px;
}
.menu-toggle span {
  width: 24px; height: 2px; background: var(--text);
  border-radius: 2px; transition: all 0.3s;
}

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center;
  padding: 140px 0 90px;
  overflow: hidden;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-glow {
  position: absolute; border-radius: 50%;
  filter: blur(120px); opacity: 0.16;
}
.hero-glow-1 { width: 560px; height: 560px; background: #c8a95c; top: -160px; inset-inline-end: -120px; }
.hero-glow-2 { width: 460px; height: 460px; background: #2e4a7a; bottom: -180px; inset-inline-start: -140px; }
.hero-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 75%);
}
.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: 60px; align-items: center;
}

.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--line);
  background: rgba(200, 169, 92, 0.06);
  border-radius: 99px; padding: 8px 18px;
  font-size: 0.82rem; font-weight: 600; color: var(--gold-2);
  margin-bottom: 26px;
}
.badge-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px var(--gold);
  animation: pulse 2.4s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

.hero-title {
  font-size: clamp(2.2rem, 5vw, 3.7rem);
  font-weight: 900; line-height: 1.35;
  margin-bottom: 22px;
}
.hero-title span { display: block; }
.hero-title-accent {
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-sub {
  font-size: 1.08rem; color: var(--text-2);
  max-width: 560px; margin-bottom: 36px;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 52px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 34px; border-radius: 99px;
  font-family: inherit; font-size: 0.95rem; font-weight: 700;
  text-decoration: none; cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--gold-grad); color: #0d1117;
  box-shadow: 0 8px 28px rgba(200, 169, 92, 0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(200, 169, 92, 0.45); }
.btn-ghost {
  color: var(--text); border-color: var(--line-2);
  background: rgba(255,255,255,0.03);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-2); }

.hero-stats { display: flex; gap: 48px; flex-wrap: wrap; }
.stat { display: flex; flex-direction: column; gap: 4px; }
.stat-num {
  font-size: 2rem; font-weight: 900;
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label { font-size: 0.8rem; color: var(--text-3); }

/* hero visual */
.hero-visual { display: flex; justify-content: center; }
.hero-card {
  position: relative; width: 340px; height: 340px;
  border-radius: 32px;
  background: linear-gradient(160deg, var(--card-2), var(--card));
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid; place-items: center;
  animation: float 7s ease-in-out infinite;
}
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }
.card-rings { position: absolute; inset: 0; }
.ring {
  position: absolute; border-radius: 50%;
  border: 1px solid var(--line);
}
.ring-1 { inset: 26px; animation: spin 24s linear infinite; }
.ring-2 { inset: 60px; border-color: rgba(200,169,92,0.25); animation: spin 18s linear infinite reverse; }
.ring-3 { inset: 94px; animation: spin 32s linear infinite; }
.ring::before {
  content: ""; position: absolute; top: -3px; inset-inline-start: calc(50% - 3px);
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold);
}
@keyframes spin { to { transform: rotate(360deg); } }
.scale-icon { width: 130px; height: 130px; color: var(--gold-2); }
.scale-icon svg { width: 100%; height: 100%; filter: drop-shadow(0 6px 18px rgba(200,169,92,0.35)); }

/* ---------- Sections ---------- */
.section { padding: 110px 0; position: relative; }
.section-head { text-align: center; margin-bottom: 56px; }
.section-tag {
  display: inline-block;
  font-size: 0.8rem; font-weight: 700;
  color: var(--gold-2); letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
html[lang="ar"] .section-tag { letter-spacing: 0; }
.section-title {
  font-size: clamp(1.8rem, 3.6vw, 2.7rem);
  font-weight: 800; line-height: 1.4;
}
.section-intro {
  max-width: 820px; margin: -24px auto 52px;
  text-align: center; color: var(--text-2); font-size: 1.02rem;
}

/* About */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.about-text p { color: var(--text-2); font-size: 1.05rem; margin-bottom: 20px; }
.about-text p:first-child { color: var(--text); font-size: 1.18rem; font-weight: 600; }
.about-cards { display: grid; gap: 18px; }
.about-card {
  display: flex; align-items: center; gap: 18px;
  background: var(--card); border: 1px solid var(--line-2);
  border-radius: var(--radius); padding: 22px 26px;
  transition: all 0.3s ease;
}
.about-card:hover { border-color: var(--line); transform: translateX(0) translateY(-3px); box-shadow: var(--shadow); }
.about-card-icon {
  width: 52px; height: 52px; flex: none;
  display: grid; place-items: center;
  border-radius: 14px;
  background: rgba(200, 169, 92, 0.08);
  border: 1px solid var(--line);
  color: var(--gold-2);
}
.about-card-icon svg { width: 26px; height: 26px; }
.about-card h3 { font-size: 1.05rem; margin-bottom: 2px; }
.about-card p { font-size: 0.88rem; color: var(--text-3); }

/* Services */
.services-gov {
  background:
    radial-gradient(ellipse 60% 50% at 85% 10%, rgba(200,169,92,0.05), transparent),
    var(--bg-2);
  border-block: 1px solid var(--line-2);
}
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 22px; }
.service-card {
  position: relative; overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 34px 30px 30px;
  transition: all 0.35s ease;
}
.service-card::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 0;
  width: 3px; height: 0;
  background: var(--gold-grad);
  transition: height 0.4s ease;
}
.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--line);
  box-shadow: var(--shadow);
  background: var(--card-2);
}
.service-card:hover::before { height: 100%; }
.service-num {
  font-size: 0.85rem; font-weight: 800;
  color: var(--gold); opacity: 0.75;
  margin-bottom: 14px;
  font-family: var(--font-en);
}
.service-card h3 { font-size: 1.12rem; font-weight: 800; margin-bottom: 10px; line-height: 1.55; }
.service-card p { font-size: 0.9rem; color: var(--text-3); }

/* Values */
.values-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; }
.value-card {
  text-align: center;
  background: linear-gradient(170deg, var(--card-2), var(--card));
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  padding: 44px 24px 38px;
  transition: all 0.3s ease;
}
.value-card:hover { transform: translateY(-5px); border-color: var(--line); box-shadow: var(--shadow); }
.value-icon {
  width: 64px; height: 64px; margin: 0 auto 20px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(200, 169, 92, 0.08);
  border: 1px solid var(--line);
  color: var(--gold-2);
  transition: all 0.3s ease;
}
.value-card:hover .value-icon {
  background: var(--gold-grad); color: #0d1117;
  box-shadow: 0 8px 24px rgba(200, 169, 92, 0.4);
}
.value-icon svg { width: 30px; height: 30px; }
.value-card h3 { font-size: 1.05rem; font-weight: 800; }

/* Contact */
.contact-card {
  position: relative; overflow: hidden;
  text-align: center;
  background: linear-gradient(170deg, var(--card-2), var(--card));
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 80px 40px;
  box-shadow: var(--shadow);
}
.contact-glow {
  position: absolute; width: 420px; height: 420px;
  background: #c8a95c; filter: blur(140px); opacity: 0.1;
  top: -200px; inset-inline-start: calc(50% - 210px);
  pointer-events: none;
}
.contact-card h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; margin-bottom: 16px; }
.contact-card p { color: var(--text-2); max-width: 560px; margin: 0 auto 36px; }
.contact-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 26px; position: relative; }
.contact-note { font-size: 0.85rem !important; color: var(--text-3) !important; margin-bottom: 0 !important; }

/* Footer */
.footer {
  border-top: 1px solid var(--line-2);
  background: #0a0e13;
  padding: 54px 0 34px;
}
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand .brand-mark { width: 40px; height: 40px; font-size: 1.2rem; border-radius: 10px; }
.footer-nav { display: flex; gap: 26px; flex-wrap: wrap; }
.footer-nav a { color: var(--text-2); text-decoration: none; font-size: 0.88rem; transition: color 0.25s; }
.footer-nav a:hover { color: var(--gold-2); }
.footer-copy {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 0.8rem; color: var(--text-3); text-align: end;
}
.footer-domain { color: var(--gold); font-weight: 700; letter-spacing: 0.06em; }
html[lang="en"] .footer-copy { text-align: right; }

/* ---------- Reveal animations ---------- */
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
html[lang="en"] .reveal.visible { transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .nav {
    position: fixed; top: 0; inset-inline-end: 0;
    width: min(320px, 80vw); height: 100vh;
    flex-direction: column; align-items: flex-start;
    justify-content: center; gap: 26px; padding: 40px;
    background: rgba(13, 17, 23, 0.98);
    backdrop-filter: blur(20px);
    border-inline-start: 1px solid var(--line);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  }
  html[dir="rtl"] .nav { transform: translateX(-100%); }
  .nav.open { transform: translateX(0) !important; }
  .menu-toggle { display: flex; position: relative; z-index: 200; }
  .menu-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-toggle.open span:nth-child(2) { opacity: 0; }
  .menu-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .hero-stats { gap: 30px; }
}

@media (max-width: 600px) {
  .section { padding: 80px 0; }
  .hero { padding-top: 120px; }
  .hero-actions .btn { width: 100%; }
  .contact-card { padding: 60px 24px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .footer-copy { text-align: center !important; align-items: center; }
}

/* RTL/LTR arrows direction for reveal */
html[dir="ltr"] .reveal { transform: translateY(28px); }