/* ──────────────────────────────────────────────────────────────────────────
 * AZDAN UAE E-Invoicing — public website
 *
 * One stylesheet for every page (/, /erp/, /erp/netsuite/). Static files
 * served by nginx from the landing root; no build step.
 *
 * Brand: AZDAN green #24B167, cream #E3DDCF, slate #504755, black, white;
 * blue #4054B2 for information only. Headings in Philosopher.
 *
 * Themes: light and dark tokens below; the page picks one before first
 * paint (inline script in <head>, saved per browser). Motion is opacity
 * and transform only, and stops under prefers-reduced-motion.
 * ────────────────────────────────────────────────────────────────────────── */

:root {
    --green: #24b167;
    --blue: #4054b2;
    --font-heading: "Philosopher", Georgia, "Times New Roman", serif;
    --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

    --container: 1200px;
    --gutter: clamp(16px, 4vw, 32px);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 26px;
    --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
    --header-h: 68px;
}

:root,
[data-theme="light"] {
    color-scheme: light;
    --bg: #f6f3ec;
    --bg-alt: #efeae0;
    --surface: #ffffff;
    --surface-2: #f8f5ef;
    --surface-3: #f1ece2;
    --text: #15130f;
    --text-2: #4b4539;
    --muted: #6d6658;
    --line: rgba(31, 26, 18, 0.10);
    --line-strong: rgba(31, 26, 18, 0.18);
    --accent: #13814a;          /* green for text on light surfaces (AA) */
    --accent-soft: rgba(36, 177, 103, 0.12);
    --accent-line: rgba(36, 177, 103, 0.35);
    --info-soft: rgba(64, 84, 178, 0.10);
    --on-accent: #07140d;
    --header-bg: rgba(246, 243, 236, 0.78);
    --shadow-sm: 0 1px 2px rgba(40, 30, 10, 0.06);
    --shadow-md: 0 1px 2px rgba(40, 30, 10, 0.05), 0 12px 32px -18px rgba(40, 30, 10, 0.28);
    --shadow-lg: 0 2px 6px rgba(40, 30, 10, 0.05), 0 30px 70px -36px rgba(40, 30, 10, 0.45);
    --glow-a: rgba(36, 177, 103, 0.16);
    --glow-b: rgba(64, 84, 178, 0.10);
    --grid-line: rgba(31, 26, 18, 0.05);
    --mark-tile: #ffffff;
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg: #090b0a;
    --bg-alt: #0d100e;
    --surface: #121513;
    --surface-2: #171b18;
    --surface-3: #1e231f;
    --text: #f2f0e9;
    --text-2: #cdc7b9;
    --muted: #9a9486;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.16);
    --accent: #3ccf82;
    --accent-soft: rgba(36, 177, 103, 0.14);
    --accent-line: rgba(60, 207, 130, 0.40);
    --info-soft: rgba(110, 128, 230, 0.14);
    --on-accent: #04110a;
    --header-bg: rgba(9, 11, 10, 0.72);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 1px 2px rgba(0, 0, 0, 0.4), 0 14px 36px -18px rgba(0, 0, 0, 0.8);
    --shadow-lg: 0 2px 8px rgba(0, 0, 0, 0.45), 0 36px 80px -36px rgba(0, 0, 0, 0.9);
    --glow-a: rgba(36, 177, 103, 0.20);
    --glow-b: rgba(64, 84, 178, 0.16);
    --grid-line: rgba(255, 255, 255, 0.04);
    --mark-tile: #ffffff;
}

/* ── Base ─────────────────────────────────────────────────────────────── */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 400 16px/1.6 var(--font-body);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

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

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

p {
    margin: 0;
}

h1,
h2,
h3,
h4 {
    margin: 0;
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.01em;
    color: var(--text);
}

ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 6px;
}

.container {
    width: 100%;
    max-width: calc(var(--container) + var(--gutter) * 2);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.skip-link {
    position: absolute;
    inset-inline-start: 12px;
    top: -60px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    background: var(--green);
    color: var(--on-accent);
    font-weight: 600;
    transition: top 0.2s var(--ease);
}

.skip-link:focus {
    top: 12px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* ── Buttons, chips, eyebrows ─────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 999px;
    font: 600 14.5px/1 var(--font-body);
    white-space: nowrap;
    cursor: pointer;
    transition: transform 0.18s var(--ease), background-color 0.18s var(--ease), border-color 0.18s var(--ease), box-shadow 0.18s var(--ease), color 0.18s var(--ease);
}

.btn svg {
    width: 16px;
    height: 16px;
    flex: none;
}

.btn--primary {
    background: var(--green);
    color: var(--on-accent);
    box-shadow: 0 8px 24px -12px rgba(36, 177, 103, 0.7);
}

.btn--primary:hover {
    transform: translateY(-1px);
    background: #2bc073;
    box-shadow: 0 12px 28px -12px rgba(36, 177, 103, 0.85);
}

.btn--secondary {
    background: var(--surface);
    border-color: var(--line-strong);
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

.btn--secondary:hover {
    transform: translateY(-1px);
    border-color: var(--accent-line);
}

.btn--ghost {
    background: transparent;
    color: var(--text-2);
}

.btn--ghost:hover {
    background: var(--surface-3);
    color: var(--text);
}

.btn--lg {
    min-height: 50px;
    padding: 14px 24px;
    font-size: 15.5px;
}

.btn .arrow {
    transition: transform 0.18s var(--ease);
}

.btn:hover .arrow {
    transform: translateX(3px);
}

/* Arrows and chevrons point the way the reader goes. */
[dir="rtl"] svg:has(> use[href="#i-arrow"]),
[dir="rtl"] svg:has(> use[href="#i-chevron"]) {
    transform: scaleX(-1);
}

[dir="rtl"] .btn:hover .arrow {
    transform: scaleX(-1) translateX(3px);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border: 1px solid var(--accent-line);
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font: 600 12.5px/1 var(--font-body);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    box-shadow: 0 0 0 4px var(--accent-soft);
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-2);
    font: 600 13px/1.1 var(--font-body);
    box-shadow: var(--shadow-sm);
}

.chip svg {
    width: 16px;
    height: 16px;
    color: var(--accent);
    flex: none;
}

a.chip:hover {
    border-color: var(--accent-line);
    color: var(--text);
}

.icon {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-tile {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid var(--accent-line);
    flex: none;
}

.icon-tile--info {
    background: var(--info-soft);
    color: var(--blue);
    border-color: rgba(64, 84, 178, 0.3);
}

[data-theme="dark"] .icon-tile--info {
    color: #8b9bf0;
}

/* ── Header ───────────────────────────────────────────────────────────── */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-h);
    background: var(--header-bg);
    backdrop-filter: saturate(160%) blur(16px);
    -webkit-backdrop-filter: saturate(160%) blur(16px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.site-header.is-scrolled {
    border-bottom-color: var(--line);
    box-shadow: var(--shadow-sm);
}

.site-header__inner {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 100%;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex: none;
}

.brand img {
    width: 104px;
    height: auto;
}

.brand__tag {
    padding-inline-start: 10px;
    border-inline-start: 1px solid var(--line-strong);
    color: var(--text-2);
    font: 600 12.5px/1.15 var(--font-body);
    letter-spacing: 0.02em;
}

.nav {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-inline-start: auto;
}

.nav a {
    padding: 8px 12px;
    border-radius: 999px;
    color: var(--text-2);
    font: 500 14.5px/1 var(--font-body);
    transition: color 0.15s var(--ease), background-color 0.15s var(--ease);
}

.nav a:hover,
.nav a[aria-current="page"] {
    color: var(--text);
    background: var(--surface-3);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text-2);
    cursor: pointer;
    transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.icon-btn:hover {
    color: var(--text);
    border-color: var(--line-strong);
}

.icon-btn svg {
    width: 18px;
    height: 18px;
}

/* Language switch (English ⇄ العربية) */
.lang-switch {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 999px;
    color: var(--text-2);
    font: 600 14.5px/1 var(--font-body);
    transition: color 0.15s var(--ease), background-color 0.15s var(--ease);
}

.lang-switch:hover {
    color: var(--text);
    background: var(--surface-3);
}

a[lang="ar"][data-lang-switch] {
    font-family: "IBM Plex Sans Arabic", "Noto Sans Arabic", Tahoma, sans-serif;
}

a[lang="en"][data-lang-switch] {
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

.theme-toggle .sun {
    display: none;
}

[data-theme="dark"] .theme-toggle .sun {
    display: block;
}

[data-theme="dark"] .theme-toggle .moon {
    display: none;
}

/* Sign-in selector */
.signin {
    position: relative;
}

.signin__panel {
    position: absolute;
    inset-inline-end: 0;
    top: calc(100% + 10px);
    width: min(360px, calc(100vw - 32px));
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
    transform-origin: top right;
    visibility: hidden;
    transition: opacity 0.16s var(--ease), transform 0.16s var(--ease), visibility 0s linear 0.16s;
}

[dir="rtl"] .signin__panel {
    transform-origin: top left;
}

.signin.is-open .signin__panel {
    opacity: 1;
    transform: none;
    visibility: visible;
    transition: opacity 0.16s var(--ease), transform 0.16s var(--ease), visibility 0s;
}

.signin__head {
    padding: 10px 12px 8px;
    color: var(--muted);
    font: 600 12px/1 var(--font-body);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.signin__option {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px;
    border-radius: var(--radius-md);
    transition: background-color 0.15s var(--ease);
}

.signin__option:hover,
.signin__option:focus-visible {
    background: var(--surface-3);
}

.signin__option strong {
    display: block;
    font: 600 15px/1.3 var(--font-body);
    color: var(--text);
}

.signin__option span {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.45;
}

.signin__option .chev {
    margin-inline-start: auto;
    align-self: center;
    color: var(--muted);
}

.menu-toggle {
    display: none;
}

.mobile-nav {
    display: none;
}

/* ── Sections ─────────────────────────────────────────────────────────── */

.section {
    position: relative;
    padding-block: clamp(64px, 9vw, 112px);
}

.section--alt {
    background: var(--bg-alt);
    border-block: 1px solid var(--line);
}

.section-head {
    max-width: 760px;
    margin-bottom: clamp(36px, 5vw, 56px);
}

.section-head--center {
    margin-inline: auto;
    text-align: center;
}

.section-head h2 {
    margin-top: 16px;
    font-size: clamp(30px, 4.2vw, 46px);
}

.section-head p {
    margin-top: 16px;
    color: var(--text-2);
    font-size: clamp(16px, 1.6vw, 18px);
    line-height: 1.65;
}

.lead {
    color: var(--text-2);
    font-size: clamp(17px, 1.8vw, 20px);
    line-height: 1.6;
}

.text-accent {
    color: var(--accent);
}

/* ── Hero ─────────────────────────────────────────────────────────────── */

.hero {
    position: relative;
    padding-block: clamp(48px, 7vw, 96px) clamp(56px, 8vw, 104px);
    overflow: hidden;
    isolation: isolate;
}

.hero::before {
    content: "";
    position: absolute;
    inset: -20% -10% auto;
    height: 760px;
    z-index: -1;
    background:
        radial-gradient(520px 360px at 82% 18%, var(--glow-a), transparent 70%),
        radial-gradient(480px 320px at 8% 70%, var(--glow-b), transparent 70%);
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(var(--grid-line) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(ellipse 70% 60% at 60% 30%, #000 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 60% 30%, #000 30%, transparent 80%);
}

.hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
    gap: clamp(32px, 5vw, 64px);
    align-items: center;
}

.hero h1 {
    margin-top: 22px;
    font-size: clamp(40px, 6vw, 68px);
    line-height: 1.03;
    letter-spacing: -0.02em;
}

.hero .lead {
    margin-top: 22px;
    max-width: 620px;
}

.hero__ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 32px;
}

.hero__trust {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 36px;
}

/* Invoice journey card (illustration) */
.journey {
    position: relative;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, var(--surface), var(--surface-2));
    box-shadow: var(--shadow-lg);
}

.journey::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(140deg, var(--accent-line), transparent 40%, transparent 65%, rgba(64, 84, 178, 0.35));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.journey__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 16px;
    border-bottom: 1px dashed var(--line-strong);
}

.journey__doc small {
    display: block;
    color: var(--muted);
    font: 600 11.5px/1 var(--font-body);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.journey__doc strong {
    display: block;
    margin-top: 6px;
    font: 700 17px/1.2 var(--font-mono);
    letter-spacing: -0.01em;
}

.journey__amount {
    text-align: end;
    font: 700 18px/1.2 var(--font-body);
}

.journey__amount small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.journey__steps {
    display: grid;
    gap: 6px;
    margin-top: 14px;
}

.jstep {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 10px 10px;
    border-radius: var(--radius-md);
}

.jstep:nth-child(odd) {
    background: var(--surface-3);
}

.jstep__dot {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid var(--accent-line);
}

.jstep__dot svg {
    width: 15px;
    height: 15px;
}

.jstep strong {
    display: block;
    font: 600 14.5px/1.3 var(--font-body);
}

.jstep span {
    display: block;
    color: var(--muted);
    font-size: 12.5px;
}

.jstep__state {
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent);
    font: 700 11.5px/1 var(--font-body);
    letter-spacing: 0.02em;
}

.journey__foot {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12.5px;
}

.journey__foot b {
    color: var(--text-2);
    font-weight: 600;
}

.js .journey .jstep {
    opacity: 0.35;
    transform: translateY(4px);
    transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.js .journey.is-visible .jstep {
    opacity: 1;
    transform: none;
}

.js .journey.is-visible .jstep:nth-child(2) { transition-delay: 0.25s; }
.js .journey.is-visible .jstep:nth-child(3) { transition-delay: 0.5s; }
.js .journey.is-visible .jstep:nth-child(4) { transition-delay: 0.75s; }

/* ── Accreditation band ───────────────────────────────────────────────── */

.trust-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.trust-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}

.trust-card:hover {
    transform: translateY(-3px);
    border-color: var(--accent-line);
    box-shadow: var(--shadow-md);
}

.trust-card h3 {
    font-size: 19px;
    line-height: 1.2;
}

.trust-card p {
    color: var(--text-2);
    font-size: 14.5px;
    line-height: 1.55;
}

.trust-card__link {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent);
    font: 600 14px/1.2 var(--font-body);
}

.card .trust-card__link {
    color: var(--accent);
}

.trust-card__link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.trust-card__link svg {
    width: 14px;
    height: 14px;
}

.trust-card__mark {
    padding: 8px;
    border-radius: var(--radius-sm);
    background: var(--mark-tile);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.trust-card__mark img {
    width: 100%;
    height: auto;
}

/* ── Cards & features ─────────────────────────────────────────────────── */

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.card {
    position: relative;
    padding: 26px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
}

.card:hover {
    transform: translateY(-3px);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-md);
}

.card h3 {
    margin-top: 18px;
    font-size: 20px;
}

.card p {
    margin-top: 10px;
    color: var(--text-2);
    font-size: 15px;
    line-height: 1.6;
}

.card .tag {
    position: absolute;
    top: 22px;
    inset-inline-end: 22px;
    color: var(--muted);
    font: 600 11.5px/1 var(--font-mono);
    letter-spacing: 0.04em;
}

.checklist {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.checklist li {
    position: relative;
    padding-inline-start: 28px;
    color: var(--text-2);
    font-size: 15px;
    line-height: 1.55;
}

.checklist li::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 2px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2324b167' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 8.5l2.5 2.5L12 5.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* ── 5-corner model ───────────────────────────────────────────────────── */

.model {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
    gap: clamp(28px, 4vw, 48px);
    align-items: center;
}

.model__figure {
    padding: clamp(16px, 3vw, 28px);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background: var(--surface);
    box-shadow: var(--shadow-md);
}

.model__figure svg {
    width: 100%;
    height: auto;
}

.model__svg--tall {
    display: none;
    max-width: 380px;
    margin-inline: auto;
}

.model__figure figcaption {
    margin-top: 12px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.mf-node rect {
    fill: var(--surface-2);
    stroke: var(--line-strong);
}

.mf-node--azdan rect {
    fill: var(--accent-soft);
    stroke: var(--green);
    stroke-width: 1.5;
}

.mf-node--fta rect {
    fill: var(--info-soft);
    stroke: rgba(64, 84, 178, 0.55);
}

.mf-corner {
    fill: var(--muted);
    font: 700 11px var(--font-mono);
    letter-spacing: 0.06em;
}

.mf-title {
    fill: var(--text);
    font: 700 15px var(--font-body);
}

.mf-sub {
    fill: var(--muted);
    font: 500 12px var(--font-body);
}

.mf-path {
    fill: none;
    stroke: var(--line-strong);
    stroke-width: 2;
}

.mf-path--peppol {
    stroke: var(--green);
    stroke-dasharray: 6 6;
    animation: dash 1.2s linear infinite;
}

.mf-path--report {
    stroke: rgba(64, 84, 178, 0.7);
    stroke-dasharray: 4 5;
}

.mf-label {
    fill: var(--accent);
    font: 700 11.5px var(--font-body);
    letter-spacing: 0.04em;
}

.mf-label--info {
    fill: var(--blue);
}

[data-theme="dark"] .mf-label--info {
    fill: #8b9bf0;
}

.mf-packet {
    fill: var(--green);
}

.mf-packet--report {
    fill: var(--blue);
}

@keyframes dash {
    to {
        stroke-dashoffset: -24;
    }
}

.corners {
    display: grid;
    gap: 12px;
}

.corners li {
    display: grid;
    grid-template-columns: 46px 1fr;
    gap: 14px;
    align-items: start;
}

.corners b {
    display: grid;
    place-items: center;
    height: 30px;
    border-radius: 8px;
    background: var(--surface-3);
    border: 1px solid var(--line);
    font: 700 12px/1 var(--font-mono);
    color: var(--text-2);
}

.corners li.is-azdan b {
    background: var(--accent-soft);
    border-color: var(--accent-line);
    color: var(--accent);
}

.corners strong {
    display: block;
    font: 600 15.5px/1.35 var(--font-body);
}

.corners span {
    display: block;
    margin-top: 2px;
    color: var(--text-2);
    font-size: 14.5px;
    line-height: 1.5;
}

/* ── Steps ────────────────────────────────────────────────────────────── */

.steps {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 16px;
    counter-reset: step;
}

.step {
    position: relative;
    padding: 22px 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.step::before {
    counter-increment: step;
    content: counter(step, decimal-leading-zero);
    display: block;
    color: var(--accent);
    font: 700 13px/1 var(--font-mono);
    letter-spacing: 0.08em;
}

.step h3 {
    margin-top: 14px;
    font-size: 18px;
}

.step p {
    margin-top: 8px;
    color: var(--text-2);
    font-size: 14.5px;
    line-height: 1.55;
}

/* ── Split / benefits ─────────────────────────────────────────────────── */

.split {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(28px, 5vw, 64px);
    align-items: start;
}

.split .section-head {
    position: sticky;
    top: calc(var(--header-h) + 32px);
    margin-bottom: 0;
}

.facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 28px;
}

.fact {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.fact strong {
    display: block;
    font: 700 22px/1.1 var(--font-heading);
}

.fact span {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
}

.benefits {
    display: grid;
    gap: 14px;
}

.benefit {
    display: grid;
    grid-template-columns: 44px 1fr;
    gap: 16px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
}

.benefit h3 {
    font-size: 19px;
}

.benefit p {
    margin-top: 6px;
    color: var(--text-2);
    font-size: 15px;
}

/* ── ERP teaser & connectors ─────────────────────────────────────────── */

.erp-band {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: clamp(28px, 5vw, 56px);
    align-items: center;
    padding: clamp(28px, 4vw, 48px);
    border: 1px solid var(--line);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(420px 260px at 100% 0%, var(--glow-a), transparent 70%),
        var(--surface);
    box-shadow: var(--shadow-md);
}

.erp-band h2 {
    margin-top: 16px;
    font-size: clamp(28px, 3.6vw, 40px);
}

.erp-band p {
    margin-top: 14px;
    color: var(--text-2);
}

.erp-band .hero__ctas {
    margin-top: 24px;
}

.connectors {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.connector {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-2);
    transition: border-color 0.18s var(--ease), transform 0.18s var(--ease);
}

a.connector:hover {
    border-color: var(--accent-line);
    transform: translateY(-2px);
}

/* The status sits above the name, so long names never crowd it. */
.connector__top {
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 10px;
}

.connector strong {
    font: 600 15.5px/1.3 var(--font-body);
}

.connector span {
    color: var(--text-2);
    font-size: 14px;
    line-height: 1.5;
}

.status {
    padding: 4px 9px;
    border-radius: 999px;
    font: 700 11px/1 var(--font-body);
    letter-spacing: 0.03em;
    white-space: nowrap;
}

.status--live {
    background: var(--accent-soft);
    color: var(--accent);
    border: 1px solid var(--accent-line);
}

.status--any {
    background: var(--info-soft);
    color: var(--blue);
    border: 1px solid rgba(64, 84, 178, 0.3);
}

[data-theme="dark"] .status--any {
    color: #8b9bf0;
}

/* ── Security & ISO ───────────────────────────────────────────────────── */

.iso-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.iso-card {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 22px;
    align-items: center;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
}

.iso-card__mark {
    padding: 10px;
    border-radius: var(--radius-md);
    background: var(--mark-tile);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.iso-card__mark img {
    width: 100%;
    height: auto;
}

.iso-card h3 {
    font-size: 21px;
}

.iso-card .std {
    display: inline-block;
    margin-top: 6px;
    color: var(--accent);
    font: 700 13px/1 var(--font-mono);
}

.iso-card p {
    margin-top: 10px;
    color: var(--text-2);
    font-size: 14.5px;
    line-height: 1.55;
}

.iso-card dl {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 4px 12px;
    margin: 12px 0 0;
    font-size: 13px;
}

.iso-card dt {
    color: var(--muted);
}

.iso-card dd {
    margin: 0;
    color: var(--text-2);
    font-weight: 600;
}

.security-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.security-item {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
}

.security-item strong {
    display: block;
    margin-top: 12px;
    font: 600 15.5px/1.3 var(--font-body);
}

.security-item span {
    display: block;
    margin-top: 6px;
    color: var(--text-2);
    font-size: 14px;
    line-height: 1.5;
}

/* ── FAQ ──────────────────────────────────────────────────────────────── */

.faq {
    display: grid;
    gap: 10px;
    max-width: 880px;
    margin-inline: auto;
}

.faq details {
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    transition: border-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.faq details[open] {
    border-color: var(--accent-line);
    box-shadow: var(--shadow-sm);
}

.faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    cursor: pointer;
    list-style: none;
    font: 600 16px/1.4 var(--font-body);
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: "";
    flex: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--surface-3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%2324b167' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M8 4v8M4 8h8'/%3E%3C/svg%3E") center / 12px no-repeat;
    transition: transform 0.2s var(--ease);
}

.faq details[open] summary::after {
    transform: rotate(45deg);
}

.faq .answer {
    padding: 0 20px 20px;
    color: var(--text-2);
    font-size: 15.5px;
    line-height: 1.65;
}

.faq .answer a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ── Contact ──────────────────────────────────────────────────────────── */

.contact {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: clamp(24px, 4vw, 48px);
    padding: clamp(28px, 5vw, 56px);
    border-radius: var(--radius-xl);
    background:
        radial-gradient(520px 320px at 0% 0%, rgba(36, 177, 103, 0.28), transparent 70%),
        radial-gradient(420px 300px at 100% 100%, rgba(64, 84, 178, 0.22), transparent 70%),
        #0c0f0d;
    color: #f2f0e9;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.contact h2 {
    color: #ffffff;
    font-size: clamp(30px, 4vw, 44px);
}

.contact .eyebrow {
    color: #6fe2a4;
    border-color: rgba(111, 226, 164, 0.35);
    background: rgba(36, 177, 103, 0.14);
}

.contact p {
    margin-top: 14px;
    color: #cfc9bb;
    font-size: 17px;
}

.contact .hero__ctas .btn--secondary {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    box-shadow: none;
}

.contact-list {
    display: grid;
    gap: 10px;
    align-content: center;
}

.contact-item {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.04);
    transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}

a.contact-item:hover {
    border-color: rgba(111, 226, 164, 0.5);
    background: rgba(255, 255, 255, 0.07);
}

.contact-item .icon-tile {
    width: 40px;
    height: 40px;
    background: rgba(36, 177, 103, 0.16);
    border-color: rgba(111, 226, 164, 0.35);
    color: #6fe2a4;
}

.contact-item small {
    display: block;
    color: #a9a394;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.contact-item strong {
    display: block;
    margin-top: 2px;
    color: #ffffff;
    font: 600 15px/1.35 var(--font-body);
    overflow-wrap: anywhere;
}

/* ── Sub-page hero, breadcrumbs, NetSuite flow ───────────────────────── */

.page-hero {
    position: relative;
    padding-block: clamp(40px, 6vw, 80px) clamp(40px, 6vw, 72px);
    overflow: hidden;
    isolation: isolate;
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: -30% -10% auto;
    height: 560px;
    z-index: -1;
    background: radial-gradient(520px 320px at 80% 10%, var(--glow-a), transparent 70%);
}

.page-hero h1 {
    margin-top: 18px;
    max-width: 860px;
    font-size: clamp(36px, 5vw, 56px);
    line-height: 1.06;
}

.page-hero .lead {
    margin-top: 18px;
    max-width: 720px;
}

.crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
    color: var(--muted);
    font-size: 13.5px;
}

.crumbs a:hover {
    color: var(--text);
}

.crumbs li + li::before {
    content: "/";
    margin-inline-end: 8px;
    color: var(--line-strong);
}

.crumbs [aria-current="page"] {
    color: var(--text-2);
}

.flow {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: stretch;
}

.flow__node {
    position: relative;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    text-align: center;
}

.flow__node small {
    display: block;
    color: var(--muted);
    font: 600 11.5px/1 var(--font-body);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.flow__node strong {
    display: block;
    margin-top: 8px;
    font: 600 15.5px/1.3 var(--font-body);
}

.flow__node--azdan {
    border-color: var(--accent-line);
    background: var(--accent-soft);
}

.flow__node:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50%;
    inset-inline-end: -12px;
    width: 10px;
    height: 10px;
    border-top: 2px solid var(--accent);
    border-inline-end: 2px solid var(--accent);
    transform: translateY(-50%) rotate(45deg);
}

/* border-inline-end already mirrors the chevron; rotate it the other way. */
[dir="rtl"] .flow__node:not(:last-child)::after {
    transform: translateY(-50%) rotate(-45deg);
}

.ns-logo {
    width: 150px;
    height: auto;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.note {
    margin-top: 28px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

/* ── Footer ───────────────────────────────────────────────────────────── */

.site-footer {
    padding-block: 64px 32px;
    border-top: 1px solid var(--line);
    background: var(--bg-alt);
}

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) repeat(4, minmax(0, 1fr));
    gap: 32px;
}

.footer-about p {
    margin-top: 16px;
    max-width: 340px;
    color: var(--text-2);
    font-size: 14.5px;
    line-height: 1.6;
}

.site-footer .footer-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 18px;
}

.footer-badges .chip {
    padding: 6px 10px;
    font-size: 12px;
    box-shadow: none;
}

.site-footer h3 {
    font: 700 13px/1 var(--font-body);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.site-footer ul {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.site-footer li,
.site-footer li a {
    color: var(--text-2);
    font-size: 14.5px;
    line-height: 1.45;
}

.site-footer li a:hover {
    color: var(--text);
}

.social {
    display: flex;
    gap: 8px;
    margin-top: 18px;
}

.social a {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--text-2);
    transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.social a:hover {
    color: var(--accent);
    border-color: var(--accent-line);
}

.social svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 12px 24px;
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.footer-bottom p {
    max-width: 760px;
}

/* ── Arabic ─────────────────────────────────────────────────────────────
   IBM Plex Sans Arabic for headings and text, taller lines for the
   script, and no letter-spacing anywhere: spacing breaks the joining of
   Arabic letters. */

html[lang="ar"] {
    --font-heading: "IBM Plex Sans Arabic", "Noto Sans Arabic", Tahoma, sans-serif;
    --font-body: "IBM Plex Sans Arabic", "Noto Sans Arabic", Tahoma, system-ui, sans-serif;
}

html[lang="ar"] body {
    line-height: 1.75;
}

html[lang="ar"] *,
html[lang="ar"] *::before,
html[lang="ar"] *::after {
    letter-spacing: normal !important;
}

html[lang="ar"] h1,
html[lang="ar"] h2,
html[lang="ar"] h3,
html[lang="ar"] h4 {
    line-height: 1.35;
    font-weight: 700;
}

html[lang="ar"] .hero h1 {
    font-size: clamp(34px, 5.2vw, 58px);
    line-height: 1.25;
}

html[lang="ar"] .page-hero h1 {
    font-size: clamp(32px, 4.6vw, 50px);
    line-height: 1.25;
}

html[lang="ar"] .eyebrow,
html[lang="ar"] .signin__head,
html[lang="ar"] .site-footer h3,
html[lang="ar"] .journey__doc small,
html[lang="ar"] .flow__node small,
html[lang="ar"] .contact-item small,
html[lang="ar"] .mobile-nav .mobile-nav__group {
    text-transform: none;
    font-size: 13px;
}

html[lang="ar"] .faq summary,
html[lang="ar"] .card p,
html[lang="ar"] .lead {
    line-height: 1.8;
}

/* SVG labels in the diagrams. */
html[lang="ar"] .mf-title {
    font: 700 15px var(--font-body);
}

html[lang="ar"] .mf-sub,
html[lang="ar"] .mf-label--info {
    font-family: var(--font-body);
}

/* ── Reveal on scroll (only when JS runs; content is visible without it) ── */

.js .reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.js .reveal.is-visible {
    opacity: 1;
    transform: none;
}

.js .reveal-group > .reveal:nth-child(2) { transition-delay: 0.06s; }
.js .reveal-group > .reveal:nth-child(3) { transition-delay: 0.12s; }
.js .reveal-group > .reveal:nth-child(4) { transition-delay: 0.18s; }
.js .reveal-group > .reveal:nth-child(5) { transition-delay: 0.24s; }
.js .reveal-group > .reveal:nth-child(6) { transition-delay: 0.3s; }

/* ── Responsive ───────────────────────────────────────────────────────── */

@media (max-width: 1100px) {
    .nav {
        display: none;
    }

    .menu-toggle {
        display: inline-grid;
    }

    .header-actions {
        margin-inline-start: auto;
    }

    .mobile-nav {
        position: fixed;
        inset: var(--header-h) 0 auto 0;
        display: block;
        max-height: calc(100vh - var(--header-h));
        overflow-y: auto;
        padding: 12px var(--gutter) 24px;
        border-bottom: 1px solid var(--line);
        background: var(--bg);
        box-shadow: var(--shadow-lg);
        opacity: 0;
        transform: translateY(-8px);
        visibility: hidden;
        transition: opacity 0.18s var(--ease), transform 0.18s var(--ease), visibility 0s linear 0.18s;
    }

    .mobile-nav.is-open {
        opacity: 1;
        transform: none;
        visibility: visible;
        transition: opacity 0.18s var(--ease), transform 0.18s var(--ease), visibility 0s;
    }

    .mobile-nav a {
        display: block;
        padding: 14px 4px;
        border-bottom: 1px solid var(--line);
        font: 600 16px/1.2 var(--font-body);
    }

    .mobile-nav .mobile-nav__group {
        margin-top: 16px;
        color: var(--muted);
        font: 700 12px/1 var(--font-body);
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    .trust-grid,
    .security-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .steps {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .footer-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .footer-about {
        grid-column: 1 / -1;
    }
}

@media (max-width: 900px) {
    .hero__grid,
    .model,
    .split,
    .erp-band,
    .contact,
    .iso-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .split .section-head {
        position: static;
    }

    .grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .flow {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .flow__node:nth-child(2)::after {
        display: none;
    }
}

@media (max-width: 640px) {
    :root {
        --header-h: 62px;
    }

    .brand__tag,
    .header-actions .btn--contact,
    .header-actions .lang-switch {
        display: none;
    }

    /* A tighter header, so the longer Arabic "sign in" still fits. */
    .site-header__inner {
        gap: 12px;
    }

    .brand img {
        width: 92px;
    }

    [data-signin-trigger] {
        padding-inline: 12px;
    }

    [data-signin-trigger] svg:last-child {
        display: none;
    }

    /* On a phone the sign-in choices span the screen: anchored to the
       button they could run off the edge (and widen the page) in Arabic. */
    .signin__panel {
        position: fixed;
        top: calc(var(--header-h) + 8px);
        inset-inline: 16px;
        width: auto;
    }

    .trust-grid,
    .security-grid,
    .grid-3,
    .grid-2,
    .steps,
    .connectors,
    .facts {
        grid-template-columns: minmax(0, 1fr);
    }

    .iso-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .flow {
        grid-template-columns: minmax(0, 1fr);
    }

    .flow__node::after {
        display: none;
    }

    /* The wide model would shrink its labels to a few pixels; stack it. */
    .model__svg--wide {
        display: none;
    }

    .model__svg--tall {
        display: block;
    }

    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero__ctas .btn {
        flex: 1 1 auto;
    }

    .jstep {
        grid-template-columns: 30px 1fr;
    }

    .jstep__state {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        transition-delay: 0s !important;
    }

    .mf-packet {
        display: none;
    }

    .js .reveal,
    .js .journey .jstep {
        opacity: 1;
        transform: none;
    }
}

@media print {
    .site-header,
    .mobile-nav,
    .contact .hero__ctas,
    .theme-toggle {
        display: none !important;
    }

    body {
        background: #fff;
        color: #000;
    }
}
