/* ===================== Design tokens ===================== */
:root {
  --navy-900: #0B1B33;
  --navy-800: #0F2745;
  --navy-700: #14355e;
  --gold: #C79A3E;
  --gold-soft: #E4C87F;
  --logo-gold: #B89050;
  --logo-navy: #102040;
  --ink: #0F172A;
  --muted: #4B5A6E;
  --line: #E3E8EF;
  --bg: #FFFFFF;
  --bg-tint: #F6F8FB;
  --white: #FFFFFF;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(15, 39, 69, .06), 0 4px 16px rgba(15, 39, 69, .05);
  --shadow-md: 0 8px 30px rgba(15, 39, 69, .10);
  --maxw: 1120px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --font: 'IBM Plex Sans', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

html[dir="rtl"] {
  --font: 'IBM Plex Sans Arabic', 'IBM Plex Sans', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

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

a { color: inherit; text-decoration: none; }

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

/* ===================== Buttons ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  font-family: var(--font);
  font-weight: 600;
  font-size: 1rem;
  line-height: 1;
  padding: .85rem 1.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .1s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn-sm { padding: .6rem 1rem; font-size: .92rem; }
.btn-block { width: 100%; }

.btn-primary {
  background: var(--navy-800);
  color: var(--white);
  border-color: var(--navy-800);
}
.btn-primary:hover { background: var(--navy-700); border-color: var(--navy-700); }

.btn-ghost {
  background: transparent;
  color: var(--navy-800);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--navy-800); background: var(--bg-tint); }

/* ===================== Header ===================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  font-weight: 700;
  color: var(--navy-900);
}
.brand-mark-img { height: 44px; width: auto; flex: none; display: block; }
.wordmark {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: .05em;
  line-height: 1;
  white-space: nowrap;
}
.wm-g { color: var(--logo-gold); }
.wm-n { color: var(--logo-navy); }
.wordmark--light .wm-n { color: #EDF2FA; }
.wordmark--light .wm-g { color: var(--gold-soft); }
.site-footer .brand-mark-img { height: 30px; }

.nav-links {
  display: flex;
  gap: 1.6rem;
  margin-inline-start: auto;
  font-size: .96rem;
  font-weight: 500;
}
.nav-links a {
  color: var(--muted);
  padding: .3rem 0;
  transition: color .2s var(--ease);
}
.nav-links a:hover { color: var(--navy-900); }

.nav-actions {
  display: flex;
  align-items: center;
  gap: .7rem;
}
.lang-toggle {
  font-family: var(--font);
  font-weight: 600;
  font-size: .9rem;
  color: var(--navy-800);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .45rem .85rem;
  cursor: pointer;
  min-width: 56px;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.lang-toggle:hover { border-color: var(--navy-800); background: var(--bg-tint); }

.menu-toggle {
  display: none;
  background: transparent;
  border: none;
  color: var(--navy-900);
  cursor: pointer;
  padding: .3rem;
}

/* ===================== Hero ===================== */
.hero {
  position: relative;
  background:
    radial-gradient(1100px 500px at 78% -10%, rgba(199, 154, 62, .12), transparent 60%),
    linear-gradient(180deg, var(--navy-900), var(--navy-800));
  color: var(--white);
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(70% 60% at 50% 0%, #000, transparent 75%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  padding-block: clamp(4.5rem, 10vw, 8rem);
  max-width: 860px;
}
.eyebrow {
  display: inline-block;
  font-size: .86rem;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--gold-soft);
  margin: 0 0 1.1rem;
  padding: .35rem .8rem;
  border: 1px solid rgba(228, 200, 127, .3);
  border-radius: 999px;
}
.hero-title {
  font-size: clamp(2.3rem, 6vw, 4rem);
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 0 0 1.3rem;
}
.hero-sub {
  font-size: clamp(1.05rem, 2.2vw, 1.28rem);
  color: rgba(255, 255, 255, .82);
  max-width: 44ch;
  margin: 0 0 2rem;
}
html[dir="rtl"] .hero-sub { max-width: 52ch; }
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  margin-bottom: 2.6rem;
}
.hero .btn-ghost {
  color: var(--white);
  border-color: rgba(255, 255, 255, .28);
}
.hero .btn-ghost:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .5); }
.hero-trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .7rem;
  font-size: .92rem;
  color: rgba(255, 255, 255, .7);
}
.hero-trust .dot { color: var(--gold); }

/* Hero two-column with logo (home) */
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 3rem;
  align-items: center;
  padding-block: clamp(0.9rem, 2.1vw, 1.5rem);
}
.hero-copy { max-width: 640px; }
.hero-figure {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-figure::before {
  content: "";
  position: absolute;
  width: 116%;
  padding-bottom: 116%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(199, 154, 62, .22), rgba(199, 154, 62, .06) 55%, transparent 72%);
  z-index: 0;
}
.hero-mark {
  position: relative;
  z-index: 1;
  width: min(280px, 64%);
  height: auto;
  filter: drop-shadow(0 22px 55px rgba(0, 0, 0, .4));
}

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 1.8rem; padding-block: clamp(3rem, 8vw, 4.5rem); }
  .hero-figure { order: -1; justify-content: flex-start; }
  .hero-mark { width: 120px; }
  .hero-copy { max-width: none; }
}

/* ===================== Sections ===================== */
.section { padding-block: clamp(4rem, 8vw, 6.5rem); }
.section--tint { background: var(--bg-tint); border-block: 1px solid var(--line); }

.section-eyebrow {
  font-size: .85rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 .8rem;
}
.section-title {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -.015em;
  margin: 0 0 1rem;
  max-width: 20ch;
}
.section-lead {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 62ch;
  margin: 0 0 3rem;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.audience-chip {
  display: inline-block;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .03em;
  color: var(--navy-900);
  background: rgba(199, 154, 62, .14);
  border: 1px solid rgba(199, 154, 62, .35);
  padding: .3rem .7rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

/* ===================== Nav dropdown (Services) ===================== */
.nav-dropdown { position: relative; }
.nav-dropdown-btn {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-family: var(--font);
  font-size: .96rem;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: .3rem 0;
  transition: color .2s var(--ease);
}
.nav-dropdown-btn:hover,
.nav-dropdown-btn[aria-expanded="true"] { color: var(--navy-900); }
.nav-dropdown-btn svg { transition: transform .2s var(--ease); }
.nav-dropdown-btn[aria-expanded="true"] svg { transform: rotate(180deg); }

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% + .8rem);
  inset-inline-start: 0;
  min-width: 300px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: .5rem;
  display: none;
}
.nav-dropdown-menu.open { display: block; animation: fade-in .2s var(--ease); }
.nav-dropdown-menu a {
  display: block;
  padding: .7rem .8rem;
  border-radius: var(--radius-sm);
  transition: background-color .2s var(--ease);
}
.nav-dropdown-menu a:hover { background: var(--bg-tint); }
.ddi-title { display: block; font-weight: 600; color: var(--navy-900); font-size: 1rem; }
.ddi-sub { display: block; font-size: .85rem; color: var(--muted); margin-top: .1rem; }

/* ===================== Services grid (home) ===================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}
.service-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #cfd7e2;
}
.service-card h3 { font-size: 1.4rem; color: var(--navy-900); margin: .3rem 0 .6rem; }
.service-card p { color: var(--muted); margin: 0 0 1.4rem; flex: 1; }
.service-more { font-weight: 600; color: var(--gold); transition: color .2s var(--ease); }
.service-card:hover .service-more { color: var(--navy-800); }

/* ===================== Subpage helpers ===================== */
.hero--page .hero-inner { padding-block: clamp(3.5rem, 8vw, 5.5rem); }
.backlink {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: rgba(255, 255, 255, .75);
  font-size: .95rem;
  font-weight: 500;
  margin-bottom: 1.3rem;
  transition: color .2s var(--ease);
}
.backlink:hover { color: #fff; }
.cta-band { text-align: center; }
.cta-band .section-title,
.cta-band .section-lead { margin-inline: auto; }
.cta-band .section-title { max-width: none; }
.cta-band .btn-primary {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy-900);
}
.cta-band .btn-primary:hover { background: var(--gold-soft); border-color: var(--gold-soft); }

/* ===================== Ladder (Scope) ===================== */
.ladder {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
.ladder--four { grid-template-columns: repeat(4, 1fr); }
.ladder-card h4 {
  font-size: 1.25rem;
  margin: .6rem 0 .6rem;
  color: var(--navy-900);
}
.ladder-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.6rem 1.8rem;
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.ladder-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: #cfd7e2;
}
.ladder-card--accent { border-color: rgba(199, 154, 62, .5); }
.ladder-card--accent::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-soft));
  border-radius: var(--radius) var(--radius) 0 0;
}
.ladder-num {
  font-size: .95rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: .05em;
}
.ladder-card h3 {
  font-size: 1.3rem;
  margin: .6rem 0 .6rem;
  color: var(--navy-900);
}
.ladder-card p { margin: 0; color: var(--muted); font-size: 1rem; }

.scope-note {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin-top: 2rem;
  padding: 1rem 1.3rem;
  background: var(--navy-900);
  color: rgba(255, 255, 255, .92);
  border-radius: var(--radius-sm);
}
.scope-note svg { color: var(--gold-soft); flex: none; }
.scope-note p { margin: 0; font-size: 1rem; font-weight: 500; }

/* ===================== Compare (why organized) ===================== */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}
.compare-col {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.8rem;
}
.compare-col--risk { background: #FBF6F4; border-color: #EAD9D2; }
.compare-col--good { border-color: rgba(199, 154, 62, .5); box-shadow: var(--shadow-sm); }
.compare-col h3 {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-size: 1.2rem;
  color: var(--navy-900);
  margin: 0 0 1.3rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.compare-col h3 .ci { width: 24px; height: 24px; }
.compare-col--risk h3 .ci { color: #B4472F; }
.compare-col--good h3 .ci { color: #1F7A4D; }
.compare-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.3rem; }
.compare-list li { display: flex; gap: .75rem; }
.compare-list .ci { flex: none; width: 22px; height: 22px; margin-top: .1rem; }
.compare-col--risk .compare-list .ci { color: #B4472F; }
.compare-col--good .compare-list .ci { color: #1F7A4D; }
.ci-title { display: block; font-weight: 600; color: var(--navy-900); }
.ci-text { display: block; color: var(--muted); font-size: .97rem; margin-top: .15rem; }

/* ===================== Phases ===================== */
.phases {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.2rem;
}
.phase {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem;
  box-shadow: var(--shadow-sm);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.phase:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.phase--core {
  background: var(--navy-900);
  border-color: var(--navy-900);
  color: var(--white);
}
.phase-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .9rem;
}
.phase-tag {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .05em;
  color: var(--muted);
  text-transform: uppercase;
}
.phase--core .phase-tag { color: var(--gold-soft); }
.phase-free {
  font-size: .74rem;
  font-weight: 700;
  color: #1f7a4d;
  background: #e6f4ec;
  padding: .2rem .5rem;
  border-radius: 999px;
}
.phase-core-tag {
  font-size: .72rem;
  font-weight: 700;
  color: var(--navy-900);
  background: var(--gold-soft);
  padding: .2rem .5rem;
  border-radius: 999px;
}
.phase h3 { font-size: 1.2rem; margin: 0 0 .5rem; }
.phase p { margin: 0; font-size: .96rem; color: var(--muted); }
.phase--core p { color: rgba(255, 255, 255, .8); }

/* ===================== Contact ===================== */
.section--dark {
  background:
    radial-gradient(900px 400px at 15% 0%, rgba(199, 154, 62, .12), transparent 60%),
    linear-gradient(180deg, var(--navy-800), var(--navy-900));
  color: var(--white);
}
.section--dark .section-title { color: var(--white); }
.section--dark .section-lead { color: rgba(255, 255, 255, .8); }
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.contact-list { list-style: none; margin: 2rem 0 0; padding: 0; display: grid; gap: 1rem; }
.contact-list li { display: flex; align-items: center; gap: .8rem; font-size: 1.05rem; }
.contact-list svg { color: var(--gold-soft); flex: none; }
.contact-list a { transition: color .2s var(--ease); }
.contact-list a:hover { color: var(--gold-soft); }

.contact-form {
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: var(--radius);
  padding: 1.8rem;
  display: grid;
  gap: 1.1rem;
}
.field { display: grid; gap: .4rem; }
.field label { font-size: .9rem; font-weight: 600; color: rgba(255, 255, 255, .85); }
.field input,
.field textarea {
  font-family: var(--font);
  font-size: 1rem;
  color: var(--white);
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: var(--radius-sm);
  padding: .8rem .9rem;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.field input::placeholder,
.field textarea::placeholder { color: rgba(255, 255, 255, .45); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold-soft);
  background: rgba(255, 255, 255, .1);
}
.field textarea { resize: vertical; min-height: 96px; }
.contact-form .btn-primary {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--navy-900);
}
.contact-form .btn-primary:hover { background: var(--gold-soft); border-color: var(--gold-soft); }
.form-note { margin: 0; font-size: .84rem; color: rgba(255, 255, 255, .55); text-align: center; }
.form-success { text-align: center; padding: 1.5rem .5rem; }
.form-success h3 { font-size: 1.35rem; margin: 0 0 .5rem; color: var(--white); }
.form-success p { margin: 0; color: rgba(255, 255, 255, .8); }

/* ===================== Footer ===================== */
.site-footer {
  background: var(--navy-900);
  color: rgba(255, 255, 255, .7);
  padding-block: 2.5rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
}
.site-footer .brand { color: var(--white); }
.footer-tag { margin: 0; font-size: .95rem; margin-inline-start: auto; }
.footer-copy { margin: 0; font-size: .88rem; width: 100%; color: rgba(255, 255, 255, .5); border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 1.2rem; }

/* ===================== Focus states ===================== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===================== Responsive ===================== */
@media (max-width: 900px) {
  .ladder, .phases { grid-template-columns: 1fr 1fr; }
  .contact-inner { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .menu-toggle { display: inline-flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 68px;
    inset-inline: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 1rem 24px 1.4rem;
    gap: .4rem;
    box-shadow: var(--shadow-md);
  }
  .nav-links.open a { padding: .6rem 0; font-size: 1.05rem; }
  .nav-actions .btn-primary { display: none; }
  .nav-dropdown { width: 100%; }
  .nav-dropdown-btn { font-size: 1.05rem; padding: .6rem 0; }
  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding: 0;
    min-width: 0;
    margin-inline-start: .8rem;
  }
  .nav-dropdown-menu.open { animation: none; }
  .services-grid, .ladder, .phases, .compare { grid-template-columns: 1fr; }
  .footer-tag { margin-inline-start: 0; width: 100%; }
}

/* ===================== Reduced motion ===================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
