/* ============================================================
   Gusto Global Accounting Solution FZCO
   Bilingual (EN/AR · LTR/RTL) design system
   Palette: Onyx · Trust Blue · Matte Gold · Sandstone
   Type:    Inter (EN)  +  Cairo (AR), weight-matched
   RTL:     built entirely on CSS logical properties
   ============================================================ */

:root {
  /* Palette */
  --onyx:       #0e1420;
  --onyx-800:   #151d2e;
  --onyx-700:   #1d2740;
  --blue:       #17456e;
  --blue-700:   #0f3557;
  --blue-deep:  #0f3557;
  --blue-link:  #4a90c2;
  --gold:       #c6a15b;
  --gold-soft:  #d8bd86;
  --gold-dark:  #8a6a2f;   /* AA-safe gold for text on light */
  --sandstone:  #e4d7bf;
  --sand-bg:    #f6f2ea;
  --sand-2:     #efe8db;
  --paper:      #ffffff;
  --ink:        #0e1420;
  --muted:      #5f6b7a;
  --line:       #e3dccd;
  --line-dark:  #2a3550;
  --sand-white: #f2ecdd;

  /* Type scale (fluid) */
  --t-display: clamp(2.6rem, 5.4vw, 4.6rem);
  --t-h1:      clamp(2.1rem, 4vw, 3.1rem);
  --t-h2:      clamp(1.55rem, 3vw, 2.25rem);
  --t-h3:      clamp(1.15rem, 2vw, 1.4rem);
  --t-lead:    clamp(1.08rem, 1.5vw, 1.3rem);
  --t-body:    1rem;
  --t-small:   0.82rem;
  --t-eyebrow: 0.74rem;

  --f-en: "Inter", "Segoe UI", system-ui, sans-serif;
  --f-ar: "Cairo", "Segoe UI", system-ui, sans-serif;
  --f-sans: var(--f-en);

  --maxw: 1200px;
  --radius: 4px;
  --shadow: 0 1px 2px rgba(14,20,32,.06), 0 12px 34px rgba(14,20,32,.08);
  --shadow-gold: 0 10px 30px rgba(198,161,91,.18);
  --ring: 0 0 0 3px rgba(198,161,91,.30);
}

/* Arabic pages switch the sans stack to Cairo */
[lang="ar"], [dir="rtl"] { --f-sans: var(--f-ar); }

/* ---------- Reset ---------- */
*,*::before,*::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--f-sans);
  font-size: var(--t-body);
  line-height: 1.65;
  color: var(--ink);
  background: var(--sand-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img,svg { display: block; max-width: 100%; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1,h2,h3,h4 { font-family: var(--f-sans); line-height: 1.16; color: var(--ink); font-weight: 700; letter-spacing: -0.01em; }
[dir="rtl"] h1,[dir="rtl"] h2,[dir="rtl"] h3,[dir="rtl"] h4 { letter-spacing: 0; }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); font-weight: 600; }
p { color: #38424f; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: clamp(1.15rem, 4vw, 2.6rem); }
.section { padding-block: clamp(3.8rem, 7vw, 6.5rem); }
.section--tight { padding-block: clamp(2.4rem, 5vw, 4rem); }
.section--sand2 { background: var(--sand-2); }
.section--onyx { background: var(--onyx); color: var(--sand-white); }
.section--onyx h1,.section--onyx h2,.section--onyx h3,.section--onyx h4 { color: var(--sand-white); }
.section--onyx p { color: #c4cbd6; }
.section--blue { background: var(--blue-deep); color: var(--sand-white); }
.section--blue h2,.section--blue h3 { color: var(--sand-white); }
.section--blue p { color: #cdd8e4; }

.eyebrow {
  font-family: var(--f-en);
  font-size: var(--t-eyebrow); font-weight: 600;
  letter-spacing: .24em; text-transform: uppercase;
  color: var(--gold-dark); margin-block-end: .9rem;
}
[dir="rtl"] .eyebrow { font-family: var(--f-ar); letter-spacing: .06em; }
.section--onyx .eyebrow,.section--blue .eyebrow { color: var(--gold-soft); }
.lead { font-size: var(--t-lead); color: #45505f; max-width: 62ch; }
.section--onyx .lead,.section--blue .lead { color: #cdd6e2; }
.center { text-align: center; }
.center .lead { margin-inline: auto; }

/* ---------- Mashrabiya signature motif ---------- */
.mashrabiya {
  background-image:
    linear-gradient(45deg, transparent 46%, rgba(198,161,91,.16) 47%, rgba(198,161,91,.16) 53%, transparent 54%),
    linear-gradient(-45deg, transparent 46%, rgba(198,161,91,.16) 47%, rgba(198,161,91,.16) 53%, transparent 54%);
  background-size: 26px 26px;
}
.motif-band { height: 6px; background: repeating-linear-gradient(-45deg, var(--gold) 0 2px, transparent 2px 8px); opacity: .6; }
.rule-gold { width: 54px; height: 2px; background: var(--gold); margin-block: 1.2rem; }
.center .rule-gold { margin-inline: auto; }

/* ---------- Header / Nav ---------- */
.site-header { position: sticky; inset-block-start: 0; z-index: 60; background: rgba(14,20,32,.92); backdrop-filter: saturate(140%) blur(10px); border-block-end: 1px solid var(--line-dark); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 74px; }
.brand { display: inline-flex; align-items: center; gap: .7rem; text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand .glyph { block-size: 34px; inline-size: auto; flex: none; display: block; }
.brand .bt { display: flex; flex-direction: column; line-height: 1.05; }
.brand .bt b { font-family: var(--f-en); color: var(--sand-white); font-weight: 700; font-size: 1.04rem; letter-spacing: .01em; }
.brand .bt span { font-size: .58rem; letter-spacing: .26em; text-transform: uppercase; color: var(--gold-soft); font-family: var(--f-en); }
[dir="rtl"] .brand .bt b,[dir="rtl"] .brand .bt span { font-family: var(--f-ar); letter-spacing: 0; }
.nav-links { display: flex; align-items: center; gap: 1.7rem; list-style: none; }
.nav-links a { color: #d7dde6; font-weight: 500; font-size: .95rem; text-decoration: none; padding-block: .3rem; border-block-end: 2px solid transparent; }
.nav-links a:hover,.nav-links a[aria-current="page"] { color: var(--gold-soft); border-block-end-color: var(--gold); }
.nav-right { display: flex; align-items: center; gap: 1rem; }
.lang-switch { font-family: var(--f-en); font-size: .84rem; font-weight: 600; color: var(--sand-white); border: 1px solid var(--line-dark); border-radius: var(--radius); padding: .4rem .7rem; text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; }
.lang-switch:hover { border-color: var(--gold); color: var(--gold-soft); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-dark); border-radius: var(--radius); padding: .5rem .6rem; cursor: pointer; color: var(--sand-white); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: .55rem; font-family: var(--f-sans); font-weight: 600; font-size: .96rem; padding: .85rem 1.5rem; border-radius: var(--radius); border: 1.5px solid transparent; cursor: pointer; transition: transform .15s, background .15s, box-shadow .15s, color .15s; text-decoration: none; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: var(--onyx); }
.btn-gold:hover { background: var(--gold-soft); color: var(--onyx); box-shadow: var(--shadow-gold); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-700); color: #fff; box-shadow: var(--shadow); }
.btn-ghost { background: transparent; color: var(--sand-white); border-color: var(--line-dark); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-soft); }
.btn-outline { background: transparent; color: var(--blue); border-color: var(--blue); }
.btn-outline:hover { background: var(--blue); color: #fff; }
.btn-lg { padding: 1rem 1.8rem; font-size: 1.02rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .85rem; margin-block-start: 1.7rem; }
.center .btn-row { justify-content: center; }

/* Directional arrow flips in RTL */
.arrow::after { content: "\2192"; margin-inline-start: .1rem; }
[dir="rtl"] .arrow::after { content: "\2190"; }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--onyx); color: var(--sand-white); overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; opacity: .5;
  background-image:
    linear-gradient(45deg, transparent 46%, rgba(198,161,91,.10) 47%, rgba(198,161,91,.10) 53%, transparent 54%),
    linear-gradient(-45deg, transparent 46%, rgba(198,161,91,.10) 47%, rgba(198,161,91,.10) 53%, transparent 54%);
  background-size: 30px 30px;
  -webkit-mask-image: radial-gradient(120% 90% at 100% 0%, #000 0%, transparent 62%);
  mask-image: radial-gradient(120% 90% at 100% 0%, #000 0%, transparent 62%);
}
[dir="rtl"] .hero::before { -webkit-mask-image: radial-gradient(120% 90% at 0% 0%, #000 0%, transparent 62%); mask-image: radial-gradient(120% 90% at 0% 0%, #000 0%, transparent 62%); }
.hero-inner { position: relative; padding-block: clamp(4rem, 9vw, 7rem); }
.hero h1 { font-size: var(--t-display); max-width: 18ch; }
.hero .lead { margin-block-start: 1.3rem; color: #cdd6e2; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 1.4rem 2.2rem; margin-block-start: 2.4rem; padding-block-start: 1.6rem; border-block-start: 1px solid var(--line-dark); }
.hero-meta .m b { display: block; font-family: var(--f-en); font-size: 1.5rem; color: var(--gold-soft); font-weight: 700; }
[dir="rtl"] .hero-meta .m b { font-family: var(--f-ar); }
.hero-meta .m span { font-size: .82rem; color: #98a3b2; }

/* ---------- Grids / cards ---------- */
.grid { display: grid; gap: 1.3rem; }
.grid-2 { grid-template-columns: repeat(2,1fr); }
.grid-3 { grid-template-columns: repeat(3,1fr); }
.grid-4 { grid-template-columns: repeat(4,1fr); }
.split { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(1.6rem,4vw,3.5rem); align-items: center; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 6px; padding: 1.6rem; box-shadow: var(--shadow); }
.card h3 { margin-block-end: .55rem; }
.card p { font-size: .95rem; }
.card .num { font-family: var(--f-en); font-weight: 700; color: var(--gold-dark); font-size: .95rem; }
.section--onyx .card { background: var(--onyx-800); border-color: var(--line-dark); }
.section--onyx .card p { color: #b7c0cc; }
.section--onyx .card .num { color: var(--gold-soft); }
.card-ico { inline-size: 34px; block-size: 34px; color: var(--blue); margin-block-end: .9rem; }
.section--onyx .card-ico { color: var(--gold-soft); }

/* ---------- Feature list with gold markers ---------- */
.ticks { list-style: none; display: grid; gap: .9rem; }
.ticks li { position: relative; padding-inline-start: 1.9rem; color: #38424f; }
.ticks li::before { content: ""; position: absolute; inset-inline-start: 0; inset-block-start: .5em; inline-size: 8px; block-size: 8px; background: var(--gold); transform: rotate(45deg); }
.section--onyx .ticks li,.section--blue .ticks li { color: #cdd6e2; }

/* ---------- Steps (numbered, real sequence) ---------- */
.steps { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.3rem; counter-reset: s; }
.step { padding-block-start: 2.7rem; position: relative; }
.step::before { counter-increment: s; content: counter(s,decimal-leading-zero); position: absolute; inset-block-start: 0; inset-inline-start: 0; font-family: var(--f-en); font-weight: 700; color: var(--gold-dark); font-size: 1.05rem; inline-size: 2.1rem; block-size: 2.1rem; display: grid; place-items: center; border: 1.5px solid var(--gold); border-radius: 50%; }
.section--onyx .step::before { color: var(--gold-soft); }
.step h3 { font-size: 1.06rem; margin-block-end: .35rem; }
.step p { font-size: .92rem; }

/* ---------- Stats band ---------- */
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.3rem; text-align: center; }
.stat .n { font-family: var(--f-en); font-weight: 700; font-size: clamp(1.9rem,4vw,2.9rem); color: var(--gold-soft); line-height: 1; }
[dir="rtl"] .stat .n { font-family: var(--f-ar); }
.stat .l { font-size: .84rem; color: #9aa5b3; margin-block-start: .5rem; }

/* ---------- Quote ---------- */
.quote { background: var(--onyx-800); border: 1px solid var(--line-dark); border-inline-start: 3px solid var(--gold); border-radius: 6px; padding: 1.8rem; }
.quote blockquote { color: var(--sand-white); font-size: 1.08rem; line-height: 1.6; }
.quote .who { margin-block-start: 1rem; font-size: .9rem; color: #9aa5b3; }
.quote .who b { color: var(--gold-soft); display: block; font-family: var(--f-en); }
[dir="rtl"] .quote .who b { font-family: var(--f-ar); }

/* ---------- FAQ ---------- */
.faq { max-width: 840px; margin-inline: auto; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 5px; margin-block-end: .7rem; }
.faq summary { cursor: pointer; padding: 1.05rem 1.3rem; font-weight: 600; color: var(--ink); list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem; font-family: var(--f-sans); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold-dark); font-size: 1.35rem; }
.faq details[open] summary::after { content: "\2212"; }
.faq details[open] summary { border-block-end: 1px solid var(--line); }
.faq .a { padding: 1.05rem 1.3rem; color: #45505f; font-size: .96rem; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 1.1rem; }
.field { display: grid; gap: .35rem; }
.field.row { grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field label { font-weight: 600; font-size: .88rem; color: var(--ink); }
.field .req { color: #b3402f; }
.field input,.field select,.field textarea {
  font-family: var(--f-sans); font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: .78rem .9rem; inline-size: 100%;
}
.tel { display: grid; grid-template-columns: auto 1fr; gap: .5rem; }
.field textarea { min-block-size: 140px; resize: vertical; }
.field :is(input,select,textarea):focus { outline: none; border-color: var(--gold); box-shadow: var(--ring); }
.consent { display: flex; gap: .6rem; align-items: flex-start; font-size: .9rem; color: #45505f; }
.consent input { inline-size: auto; margin-block-start: .25rem; }
.form-note { font-size: .84rem; color: var(--muted); }

/* ---------- Sticky CTA ---------- */
.sticky-cta { position: fixed; inset-block-end: 1.1rem; inset-inline-end: 1.1rem; z-index: 55; box-shadow: var(--shadow-gold); }
@media (max-width: 560px){ .sticky-cta { inset-inline: 1rem; inset-block-end: 1rem; justify-content: center; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--onyx); color: #b7c0cc; padding-block: clamp(3rem,6vw,4.5rem) 1.8rem; border-block-start: 1px solid var(--line-dark); }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 2rem; }
.footer-brand .bt b { color: var(--sand-white); font-family: var(--f-en); font-weight: 700; font-size: 1.05rem; }
[dir="rtl"] .footer-brand .bt b { font-family: var(--f-ar); }
.footer-brand p { color: #96a1af; font-size: .9rem; max-width: 34ch; margin-block-start: .8rem; }
.footer-col h4 { font-size: .76rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-soft); margin-block-end: .9rem; font-family: var(--f-en); }
[dir="rtl"] .footer-col h4 { font-family: var(--f-ar); letter-spacing: 0; }
.footer-col ul { list-style: none; }
.footer-col li { margin-block-end: .5rem; }
.footer-col a { color: #b7c0cc; font-size: .92rem; }
.footer-col a:hover { color: var(--gold-soft); }
.footer-bottom { border-block-start: 1px solid var(--line-dark); margin-block-start: 2.4rem; padding-block-start: 1.4rem; display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between; font-size: .82rem; color: #7d8a99; }
.footer-bottom a { color: #7d8a99; }

/* ---------- Utilities ---------- */
.mt-2{margin-block-start:1.2rem}.mt-3{margin-block-start:2rem}
.skip { position: absolute; inset-inline-start: -999px; inset-block-start: 0; background: var(--gold); color: var(--onyx); padding: .7rem 1rem; z-index: 100; font-weight: 600; }
.skip:focus { inset-inline-start: 0; }
.badges { display: flex; flex-wrap: wrap; gap: .6rem; margin-block-start: 1.4rem; }
.badge { font-family: var(--f-en); font-size: .74rem; letter-spacing: .06em; color: #c4cbd6; border: 1px solid var(--line-dark); border-radius: 50px; padding: .35rem .8rem; }
[dir="rtl"] .badge { font-family: var(--f-ar); letter-spacing: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px){
  .split{ grid-template-columns: 1fr; }
  .grid-3,.grid-4,.steps{ grid-template-columns: 1fr 1fr; }
  .stats{ grid-template-columns: 1fr 1fr; }
  .footer-grid{ grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px){
  .nav-links{ position: fixed; inset-block-start: 74px; inset-inline: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--onyx); border-block-end: 1px solid var(--line-dark); padding: .5rem 1.2rem 1.2rem; transform: translateY(-130%); transition: transform .25s; }
  .nav-links[data-open="true"]{ transform: translateY(0); }
  .nav-links a{ padding-block: .85rem; border-block-end: 1px solid var(--line-dark); }
  .nav-toggle{ display: inline-flex; }
  .grid-2,.grid-3,.grid-4,.steps,.stats,.footer-grid,.field.row{ grid-template-columns: 1fr; }
}

/* ---------- A11y ---------- */
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce){ *{ animation-duration:.001ms!important; transition-duration:.001ms!important; scroll-behavior:auto!important; } }
@media (forced-colors: active){ .btn,.card,.quote,.step::before{ border:1px solid; } }
