/* ==========================================================================
   DMF — Dar Al-Masri Financial
   Accounting, Tax, HR & Payroll — Jordan & the West Bank
   ========================================================================== */

:root {
  --header-h: 88px;
  --gold-deep: #8C6B2F;
  --gold: #B8894A;
  --gold-light: #C9A76A;
  --gold-pale: #E3CFA6;
  --sand: #F6EFE2;
  --sand-deep: #EADFC9;
  --cream: #FDFBF7;
  --ink: #22262B;
  --ink-light: #3C444E;
  --slate: #5A6672;
  --slate-pale: #8A94A0;
  --sky: #DCE9F2;
  --sky-deep: #C3D8E8;
  --terra: #A63A2E;
  --line: #E6DECF;
  --white: #FFFFFF;

  --serif: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --wrap: 1180px;
  --narrow: 760px;
  --radius: 4px;
  --shadow: 0 1px 2px rgba(34,38,43,.04), 0 8px 30px rgba(34,38,43,.06);
  --shadow-lift: 0 2px 6px rgba(34,38,43,.06), 0 18px 50px rgba(34,38,43,.10);
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink-light);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-deep); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
button { font: inherit; }
::selection { background: var(--gold-pale); color: var(--ink); }

/* ---------- type ---------- */
h1, h2, h3, h4 { font-family: var(--serif); color: var(--ink); font-weight: 600; margin: 0 0 .5em; letter-spacing: -.012em; }
h1 { font-size: clamp(2.4rem, 5.4vw, 4rem); line-height: 1.06; letter-spacing: -.022em; font-weight: 400; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.6rem); line-height: 1.15; font-weight: 400; }
h3 { font-size: 1.32rem; line-height: 1.25; font-weight: 600; }
h4 { font-family: var(--sans); font-size: .82rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-deep); }
p { margin: 0 0 1.1em; }
em { font-style: italic; }
.lede { font-size: clamp(1.12rem, 1.8vw, 1.32rem); line-height: 1.55; color: var(--ink-light); }
.eyebrow {
  font-family: var(--sans); font-size: .74rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase; color: var(--gold-deep);
  margin: 0 0 1.1rem; display: block;
}
.muted { color: var(--slate); }
.small { font-size: .87rem; }

/* ---------- layout ---------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 28px; }
.narrow { max-width: var(--narrow); }
section { padding: clamp(64px, 8vw, 118px) 0; }
.section-sand { background: var(--sand); }
.section-ink { background: var(--ink); color: var(--sky); }
.section-ink h2, .section-ink h3 { color: var(--white); }
.section-ink .eyebrow { color: var(--gold-light); }
.section-ink a { color: var(--gold-light); }
.section-sky { background: var(--sky); }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

.grid { display: grid; gap: 28px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: start; }
.split-40 { grid-template-columns: .8fr 1.2fr; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: rgba(253,251,247,.92);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.brand img { height: 46px; width: auto; }
.brand span { display: none; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  font-size: .89rem; font-weight: 500; color: var(--ink-light);
  padding: 9px 13px; border-radius: var(--radius); transition: color .18s var(--ease), background .18s var(--ease);
}
.nav a:hover { color: var(--gold-deep); background: var(--sand); text-decoration: none; }
.nav a.active { color: var(--gold-deep); }
.nav-cta {
  font-size: .89rem; font-weight: 600; color: var(--white) !important;
  background: var(--ink); padding: 10px 20px !important; border-radius: 100px;
  transition: background .18s var(--ease);
}
.nav-cta:hover { background: var(--gold-deep); text-decoration: none; }
.menu-btn { display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; cursor: pointer; color: var(--ink); }

/* dropdown */
.has-sub { position: relative; }
.has-sub > .sub {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 268px;
  background: var(--white); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: var(--shadow-lift); padding: 8px; opacity: 0; visibility: hidden;
  transform: translateY(-6px); transition: all .2s var(--ease);
}
.has-sub:hover > .sub, .has-sub:focus-within > .sub { opacity: 1; visibility: visible; transform: translateY(0); }
.has-sub > .sub a { display: block; padding: 10px 13px; font-size: .89rem; }
.has-sub > .sub a strong { display: block; font-weight: 600; color: var(--ink); }
.has-sub > .sub a small { display: block; color: var(--slate); font-size: .79rem; line-height: 1.35; margin-top: 2px; }
.has-sub > .sub a:hover strong { color: var(--gold-deep); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, var(--sand) 0%, var(--sky) 100%); padding: clamp(60px,7vw,96px) 0 0; }
.hero-inner { position: relative; z-index: 2; max-width: 780px; }
.hero h1 { color: var(--ink); }
.hero h1 em { color: var(--gold-deep); font-style: italic; }
.hero .lede { max-width: 620px; margin-top: 1.2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 2.2rem; }
.hero-art { display: block; width: 100%; margin-top: clamp(36px,5vw,60px); }
@media (max-width: 760px) { .hero-art { height: 150px; object-fit: cover; object-position: 62% bottom; } }
.hero-sub { padding-bottom: clamp(36px,5vw,56px); }

.page-hero { background: var(--sand); border-bottom: 1px solid var(--line); padding: clamp(52px,6vw,84px) 0 clamp(44px,5vw,68px); position: relative; overflow: hidden; }
.page-hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.3rem); max-width: 22ch; }
.page-hero .lede { max-width: 640px; }
.page-hero-art { position: absolute; right: -60px; bottom: -10px; width: 46%; opacity: .16; pointer-events: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: .93rem; font-weight: 600; padding: 14px 26px; border-radius: 100px;
  border: 1px solid transparent; cursor: pointer; transition: all .2s var(--ease);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--white); }
.btn-primary:hover { background: var(--gold-deep); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--white); }
.btn-gold { background: var(--gold-deep); color: var(--white); }
.btn-gold:hover { background: var(--ink); }
.btn-arrow::after { content: "→"; font-size: 1.05em; transition: transform .2s var(--ease); }
.btn:hover .btn-arrow::after, .btn-arrow:hover::after { transform: translateX(3px); }

/* ---------- cards ---------- */
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: 8px;
  padding: 30px 28px; transition: all .22s var(--ease); position: relative;
}
.card:hover { box-shadow: var(--shadow-lift); transform: translateY(-2px); border-color: var(--gold-pale); }
.card h3 { margin-bottom: .4em; }
.card p { color: var(--slate); font-size: .95rem; margin-bottom: 0; }
.card .card-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 18px; font-size: .89rem; font-weight: 600; }
a.card { display: block; color: inherit; }
a.card:hover { text-decoration: none; }
.card-num { font-family: var(--serif); font-size: 2.1rem; color: var(--gold-pale); line-height: 1; margin-bottom: 14px; display: block; }
.card-flat { background: transparent; border: 0; padding: 0; }
.card-flat:hover { box-shadow: none; transform: none; }

.stat { text-align: left; }
.stat .n { font-family: var(--serif); font-size: clamp(2.4rem,4vw,3.4rem); color: var(--gold-deep); line-height: 1; display: block; }
.stat .l { font-size: .87rem; color: var(--slate); margin-top: 8px; display: block; }
.section-ink .stat .n { color: var(--gold-light); }
.section-ink .stat .l { color: var(--sky-deep); }

/* ---------- lists ---------- */
.ticks { list-style: none; padding: 0; margin: 0; }
.ticks li { position: relative; padding-left: 30px; margin-bottom: 13px; font-size: .97rem; }
.ticks li::before {
  content: ""; position: absolute; left: 4px; top: .62em; width: 9px; height: 9px;
  border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold);
  transform: rotate(45deg) translateY(-2px);
}
.ticks-tight li { margin-bottom: 8px; font-size: .93rem; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: .97rem; }
.plain li:last-child { border-bottom: 0; }

/* scope block: label + detail */
.scope { border-top: 1px solid var(--line); padding-top: 26px; margin-top: 26px; }
.scope:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.scope h3 { font-family: var(--sans); font-size: 1.03rem; font-weight: 600; color: var(--ink); margin-bottom: .55em; }

/* ---------- callout ---------- */
.callout {
  background: var(--sand); border-left: 3px solid var(--gold); border-radius: 0 6px 6px 0;
  padding: 26px 30px; margin: 34px 0;
}
.callout p:last-child { margin-bottom: 0; }
.callout strong { color: var(--ink); }
.callout-ink { background: var(--ink); color: var(--sky); border-left-color: var(--gold-light); }
.callout-ink strong { color: var(--white); }

/* ---------- table ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: .93rem; }
.tbl th {
  text-align: left; font-family: var(--sans); font-size: .73rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--white);
  background: var(--gold-deep); padding: 13px 16px;
}
.tbl td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:nth-child(even) td { background: var(--sand); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }

/* ---------- calculator ---------- */
.calc { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(28px,4vw,56px); align-items: start; }
.calc-form { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 30px; box-shadow: var(--shadow); }
.field { margin-bottom: 20px; }
.field label { display: block; font-size: .85rem; font-weight: 600; color: var(--ink); margin-bottom: 7px; }
.field .hint { font-size: .78rem; color: var(--slate); font-weight: 400; margin-top: 5px; display: block; }
.field input[type="number"], .field select, .field input[type="text"], .field input[type="email"], .field textarea {
  width: 100%; padding: 12px 14px; font-family: var(--sans); font-size: 1rem; color: var(--ink);
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184,137,74,.14);
}
.field textarea { min-height: 130px; resize: vertical; }
.radio-row { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-row label {
  flex: 1; min-width: 110px; text-align: center; padding: 11px 8px; margin: 0;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--cream);
  cursor: pointer; font-weight: 500; font-size: .9rem; transition: all .16s var(--ease);
}
.radio-row input { position: absolute; opacity: 0; width: 0; height: 0; }
.radio-row input:checked + span { color: var(--white); }
.radio-row label:has(input:checked) { background: var(--ink); border-color: var(--ink); color: var(--white); }

.calc-out { background: var(--ink); color: var(--sky); border-radius: 10px; padding: 30px; }
.calc-out h3 { font-family: var(--sans); font-size: .78rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 18px; }
.calc-line { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 11px 0; border-bottom: 1px solid rgba(201,167,106,.18); font-size: .94rem; }
.calc-line:last-of-type { border-bottom: 0; }
.calc-line .v { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--white); white-space: nowrap; }
.calc-line.sub { font-size: .87rem; color: #A8B2BD; padding: 8px 0; }
.calc-line.sub .v { font-weight: 500; color: var(--sky-deep); }
.calc-total { margin-top: 18px; padding-top: 18px; border-top: 2px solid var(--gold); display: flex; justify-content: space-between; align-items: baseline; gap: 16px; }
.calc-total .l { font-family: var(--serif); font-size: 1.2rem; color: var(--white); }
.calc-total .v { font-family: var(--serif); font-size: clamp(1.7rem,3vw,2.3rem); color: var(--gold-light); font-variant-numeric: tabular-nums; line-height: 1; }
.calc-note { font-size: .79rem; color: var(--slate-pale); margin-top: 22px; line-height: 1.5; }

/* ---------- insights ---------- */
.post-card { display: flex; flex-direction: column; height: 100%; }
.post-card .meta { font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-deep); font-weight: 600; margin-bottom: 12px; }
.post-card h3 { font-size: 1.24rem; }
.post-card p { flex-grow: 1; }
.article { max-width: var(--narrow); margin: 0 auto; }
.article h2 { margin-top: 2.2em; font-size: 1.9rem; }
.article h3 { margin-top: 1.8em; font-family: var(--sans); font-size: 1.06rem; }
.article ul { padding-left: 0; }
.article > p:first-of-type { font-size: 1.16rem; line-height: 1.6; color: var(--ink-light); }
.article-meta { font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; color: var(--slate); margin-bottom: 1.4rem; }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: var(--sky-deep); padding: clamp(56px,6vw,84px) 0 0; position: relative; overflow: hidden; }
.site-footer h4 { color: var(--gold-light); margin-bottom: 1.1em; }
.site-footer a { color: var(--sky-deep); font-size: .92rem; }
.site-footer a:hover { color: var(--gold-light); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 40px; position: relative; z-index: 2; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 9px; }
.footer-brand img { height: 40px; margin-bottom: 18px; filter: brightness(1.08); }
.footer-brand p { font-size: .9rem; color: var(--slate-pale); max-width: 32ch; }
.footer-bottom {
  margin-top: clamp(40px,5vw,64px); padding: 24px 0 30px; border-top: 1px solid rgba(201,167,106,.2);
  display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between;
  font-size: .78rem; color: var(--slate-pale); position: relative; z-index: 2;
}
.footer-skyline { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; opacity: .1; pointer-events: none; z-index: 1; }
.footer-legal { max-width: 62ch; line-height: 1.55; }

/* ---------- misc ---------- */
.assoc {
  border: 1px solid var(--gold-pale); border-radius: 10px; padding: 30px 32px;
  background: linear-gradient(180deg, var(--white) 0%, var(--sand) 100%);
}
.assoc .assoc-head {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding-bottom: 18px; margin-bottom: 18px; border-bottom: 1px solid var(--gold-pale);
}
.assoc .assoc-mark { flex: 0 0 auto; }
.assoc .assoc-mark img { display: block; width: 168px; height: auto; }
.assoc .assoc-lock {
  font-family: var(--sans); font-size: .7rem; font-weight: 600; letter-spacing: .14em;
  text-transform: uppercase; color: var(--gold-deep);
}
.assoc h3 { font-family: var(--serif); font-size: 1.28rem; margin: 0 0 .5em; color: var(--ink); }
.assoc p { font-size: .94rem; color: var(--slate); margin-bottom: 0; }
.assoc p + p { margin-top: .8em; }
.assoc .assoc-note {
  display: block; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--gold-pale);
  font-size: .84rem; color: var(--slate);
}
.assoc-ink {
  background: var(--ink); border-color: rgba(201,167,106,.35);
}
.assoc-ink h3 { color: var(--white); }
.assoc-ink p, .assoc-ink .assoc-note { color: var(--sky-deep); }
.assoc-ink .assoc-head, .assoc-ink .assoc-note { border-color: rgba(201,167,106,.28); }
.assoc-ink a { color: var(--gold-light); }

/* two-practice lockup band */
.lockup { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; justify-content: center; }
.lockup img { display: block; height: 46px; width: auto; }
.lockup .lockup-x {
  font-family: var(--serif); font-size: 1.5rem; color: var(--gold-light); line-height: 1;
}
@media (max-width: 560px) {
  .lockup img { height: 34px; }
  .assoc .assoc-mark img { width: 140px; }
}

.badge {
  display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .1em;
  text-transform: uppercase; color: var(--gold-deep); background: var(--sand);
  border: 1px solid var(--gold-pale); border-radius: 100px; padding: 5px 13px;
}
.kicker-rule { width: 46px; height: 2px; background: var(--gold); margin: 0 0 24px; border: 0; }
.center { text-align: center; }
.center .kicker-rule { margin-left: auto; margin-right: auto; }
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; }
.mt-l { margin-top: 44px; } .mt-m { margin-top: 28px; }

/* ---------- responsive ---------- */
@media (max-width: 940px) {
  .g4 { grid-template-columns: repeat(2, 1fr); }
  .g3 { grid-template-columns: repeat(2, 1fr); }
  .calc { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 34px; }
}
@media (max-width: 820px) {
  :root { --header-h: 76px; }
  .brand img { height: 40px; }
  .menu-btn { display: block; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto; flex-direction: column; align-items: stretch;
    background: var(--cream); border-bottom: 1px solid var(--line); padding: 14px 20px 24px;
    gap: 2px; max-height: calc(100vh - var(--header-h)); overflow-y: auto;
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: all .2s var(--ease);
  }
  .nav.open { transform: none; opacity: 1; visibility: visible; }
  .nav a { padding: 13px 10px; font-size: 1rem; }
  .nav-cta { text-align: center; margin-top: 10px; }
  .has-sub > .sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 12px; background: transparent; }
  .has-sub > .sub a small { display: none; }
  .split, .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .split-40 { grid-template-columns: 1fr; }
  .page-hero-art { display: none; }
}
@media (max-width: 520px) {
  :root { --header-h: 68px; }
  .brand img { height: 34px; }
  body { font-size: 16px; }
  .wrap { padding: 0 20px; }
  .card { padding: 24px 22px; }
  .calc-form, .calc-out { padding: 24px 20px; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* reveal on scroll */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; } }

/* print */
@media print {
  .site-header, .site-footer, .hero-art, .btn { display: none; }
  body { background: #fff; color: #000; }
}
