/* Jordan Connector — public home page */

/* Metric-matched fallback so the swap to Readex Pro doesn't shift the layout. */
@font-face {
    font-family: "Readex Fallback";
    src: local("Segoe UI"), local("Arial"), local("Roboto"), local("Helvetica Neue");
    size-adjust: 104%;
    ascent-override: 96%;
    descent-override: 30%;
    line-gap-override: 0%;
}

:root {
    --paper: #f6f4ee;
    --paper-deep: #eeebe2;
    --surface: #fcfbf8;
    --sheet: #fffefb;
    --ink: #10221b;
    --ink-soft: #33443d;
    --muted: #5b6962;
    --line: #dcd8cc;
    --line-soft: #e7e4da;
    --green: #1d6a4d;
    --green-strong: #14523a;
    --green-tint: #e2eee7;
    --orange: #e9851f;
    --orange-ink: #9c4f08;
    --issue: #a3381f;
    --issue-tint: #f7e5de;

    --dark: #0d1e17;
    --dark-raised: #13291f;
    --dark-line: rgba(214, 235, 224, .13);
    --dark-text: #e7efe9;
    --dark-muted: #a3b6ac;
    --dark-accent: #8fd9b3;

    --font: "Readex Pro", "Readex Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
    --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;

    --r-sm: .5rem;
    --r-md: .75rem;
    --r-lg: 1.25rem;
    --r-xl: 1.75rem;

    --shadow-sm: 0 1px 2px rgba(16, 34, 27, .06);
    --shadow-md: 0 1px 2px rgba(16, 34, 27, .05), 0 14px 34px -14px rgba(16, 34, 27, .22);
    --shadow-lg: 0 2px 4px rgba(16, 34, 27, .05), 0 32px 64px -24px rgba(16, 34, 27, .32);

    --ease-out: cubic-bezier(.2, .7, .2, 1);
    --shell: 75rem;
    --header-h: 4.25rem;
}

/* Base */
*, *::before, *::after { box-sizing: border-box; }

html {
    color-scheme: light;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
    margin: 0;
    min-width: 20rem;
    overflow-x: clip;
    color: var(--ink-soft);
    background-color: var(--paper);
    font: 400 1.0625rem/1.65 var(--font);
    font-optical-sizing: auto;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

html[lang="ar"] body { line-height: 1.85; }

h1, h2, h3 {
    margin: 0;
    color: var(--ink);
    font-weight: 600;
    text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
img { max-width: 100%; height: auto; }
button { font: inherit; color: inherit; }
ul, ol, dl, dd { margin: 0; padding: 0; }
ul, ol { list-style: none; }

svg {
    width: 1.15rem;
    height: 1.15rem;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

html[dir="rtl"] .flip-rtl { transform: scaleX(-1); }

:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 3px;
    border-radius: .35rem;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: fixed;
    inset-block-start: .75rem;
    inset-inline-start: .75rem;
    z-index: 100;
    padding: .6rem 1rem;
    color: #fff;
    background: var(--ink);
    border-radius: var(--r-sm);
    transform: translateY(-160%);
    transition: transform .2s var(--ease-out);
}

.skip-link:focus { transform: none; }

.shell {
    width: min(var(--shell), 100% - 2.5rem);
    margin-inline: auto;
}

.mono {
    font-family: var(--mono);
    font-size: .85em;
    letter-spacing: 0;
    direction: ltr;
    unicode-bidi: isolate;
}

/* Buttons and links */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    min-height: 3rem;
    padding: .7rem 1.25rem;
    border: 1px solid transparent;
    border-radius: var(--r-md);
    font-size: .95rem;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .15s ease, box-shadow .2s ease;
}

.btn:active { transform: translateY(1px) scale(.985); }
.btn svg { transition: translate .2s var(--ease-out); }
.btn:hover svg.flip-rtl, .text-link:hover svg.flip-rtl { translate: .2rem 0; }
html[dir="rtl"] .btn:hover svg.flip-rtl, html[dir="rtl"] .text-link:hover svg.flip-rtl { translate: -.2rem 0; }

.btn--primary {
    color: #fff;
    background: var(--green);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .14) inset, 0 6px 16px -6px rgba(20, 82, 58, .55);
}

.btn--primary:hover { background: var(--green-strong); }

.btn--quiet {
    color: var(--ink);
    background: transparent;
    border-color: var(--line);
}

.btn--quiet:hover { background: var(--surface); border-color: #c9c4b6; }
.btn--quiet svg { width: .95rem; height: .95rem; fill: currentColor; stroke: none; }

.btn--light { color: var(--dark); background: #f3f1ea; }
.btn--light:hover { background: #fff; }

.btn--ghost-light {
    color: var(--dark-text);
    border-color: var(--dark-line);
}

.btn--ghost-light:hover { background: rgba(255, 255, 255, .06); border-color: rgba(214, 235, 224, .28); }

.btn--sm { min-height: 2.5rem; padding: .5rem .95rem; font-size: .875rem; }

.text-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    color: var(--green);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: rgba(29, 106, 77, .3);
    text-underline-offset: .25em;
    transition: text-decoration-color .2s ease, color .2s ease;
}

.text-link:hover { color: var(--green-strong); text-decoration-color: currentColor; }
.text-link svg { width: 1rem; height: 1rem; transition: translate .2s var(--ease-out); }
.text-link--light { color: var(--dark-accent); text-decoration-color: rgba(143, 217, 179, .35); }
.text-link--light:hover { color: #b5ead0; }

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(246, 244, 238, .86);
    border-bottom: 1px solid transparent;
    transition: border-color .25s ease, background-color .25s ease;
}

@supports (backdrop-filter: blur(1px)) {
    .site-header { background: rgba(246, 244, 238, .84); backdrop-filter: blur(14px) saturate(1.2); }
}

.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-bar {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-height: var(--header-h);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    color: var(--ink);
    flex: none;
}

.brand img { width: 2.6rem; height: auto; }

.brand-name {
    display: grid;
    font-size: .98rem;
    font-weight: 600;
    line-height: 1.15;
}

.brand-name small {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 400;
}

.primary-nav {
    display: flex;
    align-items: center;
    gap: .25rem;
    margin-inline-start: auto;
}

.primary-nav a {
    padding: .45rem .7rem;
    color: var(--ink-soft);
    font-size: .9rem;
    border-radius: var(--r-sm);
    transition: color .2s ease, background-color .2s ease;
}

.primary-nav a:hover { color: var(--ink); background: rgba(16, 34, 27, .05); }
.primary-nav a[aria-current="true"] { color: var(--green); }
.nav-only-mobile { display: none; }

.header-actions {
    display: flex;
    align-items: center;
    gap: .9rem;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    color: var(--ink-soft);
    font-size: .9rem;
    transition: color .2s ease;
}

.lang-switch:hover { color: var(--green); }
.lang-switch svg { width: 1rem; height: 1rem; }
.lang-switch--light { color: var(--dark-muted); }
.lang-switch--light:hover { color: var(--dark-text); }

.header-signin { font-size: .9rem; color: var(--ink); font-weight: 500; }
.header-signin:hover { color: var(--green); }

.menu-button {
    display: none;
    place-items: center;
    width: 2.6rem;
    height: 2.6rem;
    padding: 0;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    cursor: pointer;
}

.menu-button__close { display: none; }
.menu-button[aria-expanded="true"] .menu-button__open { display: none; }
.menu-button[aria-expanded="true"] .menu-button__close { display: block; }

/* Shared section rhythm */
.section { padding-block: clamp(4.5rem, 9vw, 7.5rem) clamp(5rem, 10vw, 8.5rem); }

.section-head {
    display: grid;
    gap: 1rem;
    max-width: 44rem;
    margin-block-end: clamp(2.5rem, 5vw, 3.75rem);
}

.section-head--tight { margin-block-end: 2.25rem; }

.section-head p:not(.kicker) {
    max-width: 38rem;
    color: var(--muted);
    font-size: 1.125rem;
}

.kicker {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    color: var(--orange-ink);
    font-size: .875rem;
    font-weight: 500;
}

.kicker::before {
    content: "";
    width: 1.5rem;
    height: 2px;
    background: var(--orange);
    border-radius: 2px;
}

.kicker--light { color: #f2b673; }

h2 {
    font-size: clamp(1.9rem, 1.2rem + 2.4vw, 2.9rem);
    line-height: 1.12;
}

html[lang="en"] h1, html[lang="en"] h2 { letter-spacing: -.025em; }
html[lang="ar"] h2 { line-height: 1.35; }

/* Hero */
.hero {
    position: relative;
    padding-block: clamp(2.75rem, 6vw, 5rem) clamp(3.5rem, 7vw, 6rem);
    isolation: isolate;
}

.hero::before {
    /* Faint ledger rules, like accounting paper. */
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: repeating-linear-gradient(to bottom, transparent 0 39px, rgba(16, 34, 27, .055) 39px 40px);
    -webkit-mask-image: radial-gradient(ellipse 70% 80% at 70% 40%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 80% at 70% 40%, #000 20%, transparent 75%);
}

html[dir="rtl"] .hero::before {
    -webkit-mask-image: radial-gradient(ellipse 70% 80% at 30% 40%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse 70% 80% at 30% 40%, #000 20%, transparent 75%);
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
    align-items: center;
    gap: clamp(2.5rem, 5vw, 4.5rem);
}

.hero-copy { display: grid; justify-items: start; gap: 1.5rem; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .35rem .85rem .35rem .65rem;
    color: var(--ink-soft);
    font-size: .875rem;
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
}

html[dir="rtl"] .eyebrow { padding: .35rem .65rem .35rem .85rem; }

.eyebrow-dot {
    width: .5rem;
    height: .5rem;
    background: var(--orange);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(233, 133, 31, .18);
}

h1 {
    font-size: clamp(2.55rem, 1.4rem + 4.6vw, 4.5rem);
    font-weight: 600;
    line-height: 1.04;
}

html[lang="ar"] h1 { line-height: 1.28; font-size: clamp(2.35rem, 1.3rem + 4.2vw, 4.1rem); }

.h1-accent {
    position: relative;
    color: var(--green);
    white-space: nowrap;
}

.h1-accent::after {
    content: "";
    position: absolute;
    inset-inline: -.04em;
    bottom: .04em;
    z-index: -1;
    height: .2em;
    background: rgba(233, 133, 31, .28);
    border-radius: .1em;
}

.hero-lead {
    max-width: 34rem;
    color: var(--muted);
    font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-block-start: .25rem; }

.hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem 1.25rem;
    color: var(--muted);
    font-size: .9rem;
}

.hero-points li { display: inline-flex; align-items: center; gap: .4rem; }
.hero-points svg { width: 1rem; height: 1rem; color: var(--green); stroke-width: 2.2; }

/* Hero visual */
.hero-visual { display: grid; gap: 1.1rem; min-width: 0; }

.source-picker {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem;
    justify-self: start;
    padding: .3rem;
    background: rgba(255, 254, 251, .7);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-md);
}

.source-picker__label { padding-inline: .5rem .25rem; color: var(--muted); font-size: .8rem; }

.source-picker button {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-height: 2.25rem;
    padding: .3rem .7rem;
    color: var(--ink-soft);
    font-size: .85rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: background-color .2s ease, border-color .2s ease, color .2s ease;
}

.source-picker button img { width: 1.1rem; height: 1.1rem; object-fit: contain; }
.source-picker button:hover { color: var(--ink); background: rgba(16, 34, 27, .05); }

.source-picker button[aria-pressed="true"] {
    color: var(--ink);
    background: var(--sheet);
    border-color: var(--line);
    box-shadow: var(--shadow-sm);
}

/* Grid children don't shrink below their content by default; this lets the sample documents fit 320px phones. */
.hero-visual > *, .stage { min-width: 0; }
.stage { position: relative; }

.doc {
    position: relative;
    width: min(100%, 29rem);
    padding: 1.6rem 1.6rem 2.75rem;
    color: var(--ink);
    background: var(--sheet);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-lg);
    rotate: -1.2deg;
}

html[dir="rtl"] .doc { rotate: 1.2deg; }

.doc::before {
    /* The orange margin rule along the edge of the sheet. */
    content: "";
    position: absolute;
    inset-block: 1.4rem;
    inset-inline-start: 0;
    width: 3px;
    background: var(--orange);
    border-radius: 0 3px 3px 0;
}

html[dir="rtl"] .doc::before { border-radius: 3px 0 0 3px; }

.doc-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.doc-seller { display: flex; align-items: center; gap: .65rem; min-width: 0; }

.doc-monogram {
    display: grid;
    place-items: center;
    width: 2.3rem;
    height: 2.3rem;
    color: #fff;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .04em;
    background: var(--ink);
    border-radius: .6rem;
    flex: none;
}

.doc-seller strong { display: block; font-size: .92rem; font-weight: 600; line-height: 1.3; }
.doc-seller small { color: var(--muted); font-size: .76rem; }

.doc-status {
    position: relative;
    display: inline-grid;
    flex: none;
    font-size: .75rem;
    font-weight: 500;
}

.doc-status > span {
    grid-area: 1 / 1;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .25rem .6rem;
    border-radius: 999px;
    white-space: nowrap;
}

.doc-status__wait { color: var(--muted); background: var(--paper-deep); }
.doc-status__done { color: var(--green-strong); background: var(--green-tint); }
.doc-status__done svg { width: .85rem; height: .85rem; stroke-width: 2.6; }

.doc-title {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-block: 1.4rem 1rem;
    padding-block-end: .9rem;
    border-bottom: 1px dashed var(--line);
}

.doc-title strong { font-size: 1.3rem; font-weight: 600; }
.doc-title span { color: var(--muted); font-size: .82rem; }

.doc-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-block-end: 1.1rem; }
.doc-meta dt { color: var(--muted); font-size: .72rem; }
.doc-meta dd { font-size: .86rem; font-weight: 500; direction: ltr; unicode-bidi: isolate; text-align: start; }
html[dir="rtl"] .doc-meta dd { text-align: right; }

.doc-lines { display: grid; gap: .1rem; font-size: .86rem; }

.doc-line {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding-block: .45rem;
    border-bottom: 1px solid var(--line-soft);
}

.doc-line em { color: var(--muted); font-style: normal; }
.doc-line > span:last-child, .doc-totals dd { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }

.doc-foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-block-start: 1.1rem;
}

.doc-qr {
    position: relative;
    display: grid;
    place-items: center;
    width: 5.4rem;
    height: 5.4rem;
    flex: none;
}

.doc-qr__pending {
    grid-area: 1 / 1;
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: #b0aa99;
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .1em;
    border: 1.5px dashed #cdc7b8;
    border-radius: .6rem;
}

.doc-qr__code {
    grid-area: 1 / 1;
    width: 100%;
    height: 100%;
    padding: .35rem;
    fill: var(--ink);
    stroke: none;
    background: #fff;
    border: 1px solid var(--line-soft);
    border-radius: .6rem;
    shape-rendering: crispEdges;
}

.doc-totals { display: grid; gap: .2rem; min-width: 11.5rem; font-size: .82rem; }
.doc-totals > div { display: flex; justify-content: space-between; gap: 1.25rem; }
.doc-totals dt { color: var(--muted); }

.doc-total {
    margin-block-start: .35rem;
    padding-block-start: .45rem;
    border-top: 1.5px solid var(--ink);
    font-size: 1rem;
}

.doc-total dt { color: var(--ink) !important; font-weight: 600; }
.doc-total dd { font-weight: 600; }
.doc-total small { color: var(--muted); font-size: .72rem; font-weight: 500; }

.trail {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: min(100% - 1.5rem, 27rem);
    margin-block-start: -1.6rem;
    margin-inline-start: 1.75rem;
    padding: .95rem .5rem .85rem;
    color: var(--dark-text);
    background: var(--dark);
    border-radius: var(--r-lg);
    box-shadow: 0 26px 50px -22px rgba(13, 30, 23, .65);
}

.trail-step {
    position: relative;
    display: grid;
    justify-items: center;
    align-content: start;
    gap: .15rem;
    padding-inline: .25rem;
    text-align: center;
}

.trail-step:not(:last-child)::after {
    /* Connector between this dot and the next one. */
    content: "";
    position: absolute;
    top: .62rem;
    inset-inline-start: calc(50% + .9rem);
    width: calc(100% - 1.8rem);
    height: 1px;
    background: var(--dark-line);
}

.trail-dot {
    display: grid;
    place-items: center;
    width: 1.25rem;
    height: 1.25rem;
    margin-block-end: .35rem;
    color: var(--dark);
    background: var(--dark-accent);
    border-radius: 50%;
}

.trail-dot svg { width: .75rem; height: .75rem; stroke-width: 3; }
.trail-step strong { font-size: .82rem; font-weight: 500; line-height: 1.3; }
.trail-step small { max-width: 100%; overflow: hidden; color: var(--dark-muted); font-size: .7rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }

/* Hero sequence: plays on load and whenever the source changes. */
@media (prefers-reduced-motion: no-preference) {
    .js .hero-visual.is-playing .trail-step {
        animation: step-in .45s var(--ease-out) both;
        animation-delay: calc(var(--step) * .55s + .35s);
    }

    .js .hero-visual.is-playing .trail-dot {
        animation: dot-done .3s ease-out both;
        animation-delay: calc(var(--step) * .55s + .55s);
    }

    .js .hero-visual.is-playing .doc-qr__code { animation: stamp .55s cubic-bezier(.2, .9, .3, 1.35) 2.3s both; }
    .js .hero-visual.is-playing .doc-qr__pending { animation: fade-out .2s ease 2.25s both; }
    .js .hero-visual.is-playing .doc-status__done { animation: fade-in .3s ease 2.4s both; }
    .js .hero-visual.is-playing .doc-status__wait { animation: fade-out .2s ease 2.35s both; }
}

/* Without the sequence, show the finished state. */
.doc-status__wait, .doc-qr__pending { opacity: 0; }

@media (prefers-reduced-motion: no-preference) {
    .js .hero-visual.is-playing .doc-status__wait, .js .hero-visual.is-playing .doc-qr__pending { opacity: 1; }
}

@keyframes step-in { from { opacity: .25; } to { opacity: 1; } }
@keyframes dot-done { from { background: transparent; box-shadow: inset 0 0 0 1.5px var(--dark-muted); color: transparent; } to { background: var(--dark-accent); box-shadow: none; } }
@keyframes stamp { from { opacity: 0; transform: scale(1.35) rotate(-8deg); } to { opacity: 1; transform: none; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }

/* Integrations ledger */
.integrations { background: var(--surface); border-block: 1px solid var(--line-soft); }

.ledger { border-top: 1.5px solid var(--ink); }

.ledger-row {
    display: grid;
    grid-template-columns: minmax(13rem, 1.1fr) minmax(0, 1.3fr) minmax(0, 1.4fr);
    align-items: center;
    gap: 1.5rem;
    padding-block: 1.15rem;
    border-bottom: 1px solid var(--line);
    transition: background-color .2s ease;
}

.ledger-row:hover { background: rgba(16, 34, 27, .025); }

.ledger-system { display: flex; align-items: center; gap: .85rem; color: var(--ink); }
.ledger-system img { width: 2.25rem; height: 2.25rem; object-fit: contain; }
.ledger-system strong { font-size: 1.02rem; font-weight: 500; }

.ledger-glyph {
    display: grid;
    place-items: center;
    width: 2.25rem;
    height: 2.25rem;
    color: var(--green);
    font-family: var(--mono);
    font-size: .85rem;
    font-weight: 600;
    background: var(--green-tint);
    border-radius: .6rem;
}

.ledger-docs { color: var(--ink-soft); font-size: .95rem; }
.ledger-how { color: var(--muted); font-size: .92rem; }

/* How it works */
.how-grid {
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr);
    align-items: start;
    gap: clamp(2.5rem, 6vw, 5.5rem);
}

.steps { counter-reset: step; display: grid; }

.steps li {
    position: relative;
    display: grid;
    gap: .35rem;
    padding-block: 0 2rem;
    padding-inline-start: 3.5rem;
    counter-increment: step;
}

.steps li::before {
    content: counter(step, decimal-leading-zero);
    position: absolute;
    inset-inline-start: 0;
    top: -.1rem;
    display: grid;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    color: var(--ink);
    font-family: var(--mono);
    font-size: .8rem;
    font-weight: 600;
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: 50%;
}

.steps li:not(:last-child)::after {
    content: "";
    position: absolute;
    inset-inline-start: 1.17rem;
    top: 2.5rem;
    bottom: .4rem;
    width: 1px;
    background: linear-gradient(var(--line), var(--line) 60%, transparent);
}

.steps li:last-child { padding-block-end: 0; }
.steps li:last-child::before { color: #fff; background: var(--green); border-color: var(--green); }
.steps h3 { font-size: 1.15rem; font-weight: 500; }
.steps p { max-width: 30rem; color: var(--muted); }

.demo { position: sticky; top: calc(var(--header-h) + 1.5rem); display: grid; gap: .9rem; }

.demo-frame {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--paper-deep);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-lg);
}

.demo-frame video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--paper-deep);
}

.demo-frame.is-playing .demo-play { display: none; }

.demo-play {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .85rem;
    width: 100%;
    color: #fff;
    font-size: .95rem;
    font-weight: 500;
    background: linear-gradient(to top, rgba(13, 30, 23, .6), rgba(13, 30, 23, .05) 70%);
    border: 0;
    cursor: pointer;
}

.demo-play__icon {
    display: grid;
    place-items: center;
    width: 4.25rem;
    height: 4.25rem;
    color: var(--dark);
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .3);
    transition: transform .25s var(--ease-out);
}

.demo-play__icon svg { width: 1.4rem; height: 1.4rem; margin-inline-start: .2rem; fill: currentColor; stroke: none; }
html[dir="rtl"] .demo-play__icon svg { margin-inline-start: 0; margin-inline-end: .2rem; }
.demo-play:hover .demo-play__icon { transform: scale(1.06); }
.demo-play:focus-visible { outline-offset: -4px; border-radius: var(--r-xl); }
.demo-caption { color: var(--muted); font-size: .92rem; }
.demo-caption a { color: var(--green); text-decoration: underline; text-underline-offset: .2em; }

/* Features bento */
.features { background: var(--paper-deep); }

.bento {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.tile {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.75rem;
    min-width: 0;
    padding: clamp(1.4rem, 2.5vw, 2rem);
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-xl);
    transition: border-color .25s ease, box-shadow .25s ease, translate .25s var(--ease-out);
}

.tile:hover { border-color: var(--line); box-shadow: var(--shadow-md); translate: 0 -2px; }
.tile--wide { grid-column: span 2; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: center; }
.tile-copy { display: grid; gap: .6rem; align-content: start; }
.tile h3 { font-size: 1.2rem; font-weight: 500; line-height: 1.3; }
.tile p { color: var(--muted); font-size: .97rem; }

.mock-checks {
    display: grid;
    gap: .5rem;
    padding: .75rem;
    background: var(--paper);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-lg);
    font-size: .85rem;
}

.check-row {
    display: grid;
    grid-template-columns: auto auto 1fr;
    align-items: start;
    gap: .65rem;
    padding: .65rem .75rem;
    background: var(--sheet);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-sm);
}

.check-row .mono { color: var(--ink); padding-block-start: .1rem; }
.check-icon { display: grid; place-items: center; width: 1.35rem; height: 1.35rem; color: var(--green); background: var(--green-tint); border-radius: 50%; }
.check-icon svg { width: .8rem; height: .8rem; stroke-width: 2.6; }
.check-row--issue { background: #fff; box-shadow: 0 0 0 1px rgba(163, 56, 31, .22), var(--shadow-sm); }
.check-row--issue .check-icon { color: var(--issue); background: var(--issue-tint); }
.check-row--issue strong { display: block; color: var(--issue); font-weight: 500; }
.check-row--issue small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.45; }

.mock-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .9rem 1rem;
    color: var(--ink);
    font-size: .88rem;
    background: var(--paper);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-md);
}

.switch {
    position: relative;
    width: 2.6rem;
    height: 1.5rem;
    flex: none;
    background: var(--green);
    border-radius: 999px;
}

.switch span {
    position: absolute;
    top: .2rem;
    inset-inline-end: .2rem;
    width: 1.1rem;
    height: 1.1rem;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}

.mock-page { display: flex; align-items: flex-end; gap: 1.25rem; }

.page-sheet {
    position: relative;
    display: grid;
    align-content: start;
    gap: .45rem;
    width: 6.5rem;
    aspect-ratio: 1 / 1.414;
    padding: .8rem .7rem;
    background: var(--sheet);
    border: 1px solid var(--line);
    border-radius: .35rem;
    box-shadow: var(--shadow-md);
}

.page-line { height: .3rem; background: var(--line-soft); border-radius: 2px; }
.page-line--short { width: 60%; }

.page-qr {
    position: absolute;
    inset-inline-start: .7rem;
    bottom: .7rem;
    width: 1.9rem;
    height: 1.9rem;
    fill: var(--ink);
    stroke: none;
    outline: 1.5px dashed var(--orange);
    outline-offset: 3px;
    shape-rendering: crispEdges;
}

.page-readout { display: grid; gap: .3rem; font-family: var(--mono); font-size: .76rem; }
.page-readout div { display: flex; gap: .6rem; padding: .2rem .5rem; background: var(--paper); border-radius: .35rem; }
.page-readout dt { min-width: 2.2rem; color: var(--muted); font-family: var(--font); }
.page-readout dd { color: var(--ink); }

.mock-types { display: grid; gap: .55rem; }
.type-row { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.type-label { min-width: 4.25rem; color: var(--muted); font-size: .78rem; }

.chip {
    padding: .3rem .7rem;
    color: var(--ink-soft);
    font-size: .8rem;
    background: var(--paper);
    border: 1px solid var(--line-soft);
    border-radius: .45rem;
}

.chip--on { color: var(--green-strong); background: var(--green-tint); border-color: rgba(29, 106, 77, .25); font-weight: 500; }

.mock-chart {
    display: grid;
    gap: 1rem;
    padding: 1.1rem 1.2rem;
    background: var(--paper);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-lg);
}

.chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .8rem; }
.chart-head strong { color: var(--ink); font-size: 1.35rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.chart-head small { color: var(--muted); font-size: .78rem; font-weight: 400; }
.chart-bars { display: flex; align-items: flex-end; gap: .35rem; height: 5.5rem; }
.chart-bars i { flex: 1; height: var(--h); background: linear-gradient(to top, var(--green), #3b8c69); border-radius: .25rem .25rem .1rem .1rem; opacity: .9; }
.chart-bars i:last-child { background: var(--orange); }

.mock-return {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem .6rem;
    padding: .9rem 1rem;
    font-size: .88rem;
    background: var(--paper);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-md);
}

.mock-return .mono { color: var(--ink); }
.mock-return svg { width: 1rem; height: 1rem; color: var(--muted); }
.return-meter { flex-basis: 100%; height: .4rem; background: var(--line-soft); border-radius: 999px; overflow: hidden; }
.return-meter span { display: block; width: var(--fill); height: 100%; background: var(--orange); border-radius: inherit; }
.mock-return small { color: var(--muted); font-size: .78rem; }

/* Developers (the page darkens from here to the footer) */
.dev { color: var(--dark-muted); background: var(--dark); }
.dev h2 { color: var(--dark-text); }

.dev-grid {
    display: grid;
    grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr);
    align-items: center;
    gap: clamp(2.5rem, 6vw, 5rem);
}

.dev-copy { display: grid; gap: 1.25rem; justify-items: start; }
.dev-copy > p:not(.kicker) { max-width: 34rem; font-size: 1.08rem; }
.dev-points { display: grid; gap: .65rem; color: var(--dark-text); font-size: .95rem; }
.dev-points li { display: flex; gap: .6rem; }
.dev-points svg { width: 1.05rem; height: 1.05rem; margin-block-start: .3rem; color: var(--dark-accent); stroke-width: 2.2; }
.dev-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; margin-block-start: .5rem; }

.code-window {
    min-width: 0;
    overflow: hidden;
    background: #08150f;
    border: 1px solid var(--dark-line);
    border-radius: var(--r-lg);
    box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .7);
}

.code-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .55rem .6rem .55rem 1.1rem;
    color: var(--dark-muted);
    font-size: .8rem;
    border-bottom: 1px solid var(--dark-line);
}

html[dir="rtl"] .code-bar { padding: .55rem 1.1rem .55rem .6rem; }

.code-copy {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    min-height: 2rem;
    padding: .25rem .65rem;
    color: var(--dark-text);
    font-size: .8rem;
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--dark-line);
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: background-color .2s ease, color .2s ease;
}

.code-copy:hover { background: rgba(255, 255, 255, .1); }
.code-copy svg { width: .9rem; height: .9rem; }
.code-copy.is-copied { color: var(--dark-accent); }

.code-window pre {
    margin: 0;
    padding: 1.25rem 1.35rem 1.5rem;
    overflow-x: auto;
    color: #d6e4dc;
    font: 400 .82rem/1.75 var(--mono);
    text-align: left;
    tab-size: 2;
}

.code-window pre:focus-visible { outline-offset: -3px; }
.c-comment { color: #7f978a; }
.c-str { color: #f2b673; }

/* FAQ */
.faq { background: var(--paper); }

.faq-grid {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    align-items: start;
    gap: clamp(2.5rem, 6vw, 5.5rem);
}

.faq-intro { position: sticky; top: calc(var(--header-h) + 1.5rem); display: grid; gap: 1rem; justify-items: start; }
.faq-intro > p:not(.kicker) { max-width: 26rem; color: var(--muted); }
.faq-contact { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; margin-block-start: .25rem; }
.faq-contact .text-link { text-decoration: none; }
.faq-contact .text-link:hover { text-decoration: underline; }

.faq-list { border-top: 1.5px solid var(--ink); }
.faq-item { display: grid; gap: .5rem; padding-block: 1.5rem; border-bottom: 1px solid var(--line); }
.faq-item h3 { font-size: 1.1rem; font-weight: 500; line-height: 1.4; }
.faq-item p { max-width: 40rem; color: var(--muted); }

/* Closing call to action + footer */
.closing {
    position: relative;
    padding-block: clamp(4.5rem, 9vw, 7rem);
    color: var(--dark-muted);
    background: var(--dark);
    overflow: hidden;
    isolation: isolate;
}

.closing::before {
    content: "";
    position: absolute;
    inset: auto -10% -60% auto;
    z-index: -1;
    width: 42rem;
    height: 42rem;
    background: radial-gradient(circle, rgba(233, 133, 31, .16), transparent 62%);
}

html[dir="rtl"] .closing::before { inset: auto auto -60% -10%; }

.closing-inner { display: grid; justify-items: start; gap: 1.25rem; }
.closing h2 { max-width: 46rem; color: var(--dark-text); font-size: clamp(2rem, 1.2rem + 3vw, 3.4rem); }
.closing p { max-width: 34rem; font-size: 1.1rem; }
.closing-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-block-start: .75rem; }

.site-footer {
    padding-block: 3.5rem 2rem;
    color: var(--dark-muted);
    background: var(--dark);
    border-top: 1px solid var(--dark-line);
    font-size: .92rem;
}

.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 2.5rem; }
.footer-brand { display: grid; gap: 1rem; align-content: start; }
.footer-brand p { max-width: 22rem; }
.brand--light, .brand--light .brand-name { color: var(--dark-text); }
.brand--light .brand-name small { color: var(--dark-muted); }
.footer-col { display: grid; gap: .6rem; align-content: start; justify-items: start; }
.footer-title { margin-block-end: .3rem; color: var(--dark-text); font-size: .9rem; font-weight: 500; letter-spacing: 0; }
.footer-col a { transition: color .2s ease; }
.footer-col a:hover { color: var(--dark-text); }
.social { display: flex; gap: .5rem; margin-block-start: .4rem; }

.social a {
    display: grid;
    place-items: center;
    width: 2.4rem;
    height: 2.4rem;
    border: 1px solid var(--dark-line);
    border-radius: var(--r-sm);
    transition: background-color .2s ease, color .2s ease;
}

.social a:hover { color: var(--dark-text); background: rgba(255, 255, 255, .06); }
.social svg { width: 1.05rem; height: 1.05rem; }

.footer-base {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-block-start: 3rem;
    padding-block-start: 1.5rem;
    border-top: 1px solid var(--dark-line);
    font-size: .85rem;
}

/* Scroll reveal: only hides content once the script has confirmed it can show it again. */
@media (prefers-reduced-motion: no-preference) {
    .js [data-reveal] {
        opacity: 0;
        translate: 0 14px;
        transition: opacity .6s var(--ease-out), translate .6s var(--ease-out);
        transition-delay: calc(var(--reveal-index, 0) * 70ms);
    }

    .js [data-reveal].is-visible { opacity: 1; translate: none; }
    .js .tile[data-reveal].is-visible:hover { translate: 0 -2px; }
}

/* Affiliate program page */
.hero-aside { color: var(--muted); font-size: .95rem; }

.reward-row { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }

.reward-stat {
    display: grid;
    gap: .15rem;
    min-width: 9.5rem;
    padding: .9rem 1.2rem;
    background: var(--surface);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
}

.reward-stat dd { order: -1; color: var(--green); font-size: 2.1rem; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.reward-stat dt { color: var(--muted); font-size: .85rem; }
.reward-plus { color: var(--muted); font-size: 1.4rem; }

.ref-card { padding-block-end: 2.75rem; }
.doc-monogram svg { width: 1.1rem; height: 1.1rem; }
.doc-monogram--soft { width: 2rem; height: 2rem; color: var(--ink); background: var(--paper-deep); font-size: .68rem; }

.ref-link {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-block: 1.25rem 1.4rem;
    padding-block: .55rem;
    padding-inline: .85rem .55rem;
    color: var(--ink);
    background: var(--paper);
    border: 1px dashed var(--line);
    border-radius: var(--r-md);
}

.ref-link > svg { width: 1rem; height: 1rem; color: var(--green); }
.ref-link .mono { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .8rem; }

.ref-copy {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .3rem .6rem;
    color: #fff;
    font-size: .75rem;
    background: var(--green);
    border-radius: var(--r-sm);
}

.ref-copy svg { width: .8rem; height: .8rem; }
.ref-heading { margin-block-end: .4rem; color: var(--muted); font-size: .78rem; }
.ref-list { display: grid; }

.ref-list li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: .7rem;
    padding-block: .6rem;
    border-top: 1px solid var(--line-soft);
}

.ref-list strong { display: block; font-size: .86rem; font-weight: 500; line-height: 1.3; }
.ref-list small { color: var(--muted); font-size: .74rem; }
.ref-pending { opacity: .75; }

.ref-badge {
    padding: .2rem .55rem;
    color: var(--green-strong);
    font-size: .76rem;
    font-weight: 600;
    background: var(--green-tint);
    border-radius: 999px;
    white-space: nowrap;
}

.ref-badge--wait { color: var(--muted); font-weight: 500; background: var(--paper-deep); }
.trail--three { grid-template-columns: repeat(3, minmax(0, 1fr)); width: min(100% - 1.5rem, 22rem); }

.callout {
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
    display: grid;
    gap: .8rem;
    justify-items: start;
    padding: clamp(1.5rem, 3vw, 2.25rem);
    background: var(--paper);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-xl);
}

.callout-icon {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    color: var(--green);
    background: var(--green-tint);
    border-radius: var(--r-md);
}

.callout h3 { font-size: 1.2rem; font-weight: 500; line-height: 1.35; }
.callout p { color: var(--muted); }

/* Responsive
   Header: the full navigation needs about 64rem; below that it folds into the menu button.
   Layout: two-column sections stack below 60rem; phones (under 40rem) get one column throughout. */
@media (max-width: 72rem) {
    .header-signin { display: none; }
    .primary-nav a { padding-inline: .5rem; }
}

@media (max-width: 64rem) {
    .menu-button { display: inline-grid; }
    .header-actions { margin-inline-start: auto; gap: .65rem; }
    .nav-only-mobile { display: block; }

    .primary-nav {
        position: absolute;
        inset-inline: 0;
        top: 100%;
        display: grid;
        gap: 0;
        max-height: calc(100dvh - var(--header-h));
        margin: 0;
        padding: .5rem 1.25rem 1.25rem;
        overflow-y: auto;
        background: var(--paper);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 24px 40px -24px rgba(16, 34, 27, .3);
        visibility: hidden;
        opacity: 0;
        translate: 0 -.5rem;
        transition: opacity .2s ease, translate .2s var(--ease-out), visibility 0s linear .2s;
    }

    .primary-nav.is-open { visibility: visible; opacity: 1; translate: none; transition-delay: 0s; }
    .primary-nav a:not(.btn) { padding: .85rem .25rem; font-size: 1rem; border-bottom: 1px solid var(--line-soft); border-radius: 0; }
    .primary-nav .nav-cta { display: none; }
}

@media (max-width: 60rem) {
    .hero-grid, .how-grid, .dev-grid, .faq-grid { grid-template-columns: minmax(0, 1fr); }
    .hero-visual { width: 100%; max-width: 34rem; }
    .demo, .faq-intro, .callout { position: static; }
    .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tile--wide { grid-template-columns: minmax(0, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1 / -1; }

    .ledger-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: .35rem 1.5rem; }
    .ledger-system { grid-row: span 2; }
}

@media (max-width: 40rem) {
    .shell { width: min(var(--shell), 100% - 2rem); }
    .header-bar { gap: .75rem; }
    .header-cta { display: none; }
    .primary-nav .nav-cta { display: flex; margin-block-start: .9rem; }
    .brand-name small { display: none; }
    .lang-switch svg { display: none; }

    .btn { white-space: normal; text-align: center; }
    .eyebrow { border-radius: var(--r-md); font-size: .82rem; line-height: 1.5; }
    .source-picker__label { display: none; }
    .source-picker { display: grid; grid-template-columns: 1fr 1fr; justify-self: stretch; gap: .2rem; }
    .source-picker button { justify-content: center; }
    .trail-step small { white-space: normal; }
    .hero-actions .btn { flex: 1 1 auto; }
    .doc { padding: 1.25rem 1.2rem 2.4rem; rotate: none !important; }
    .doc-totals { min-width: 0; flex: 1; }
    .trail, .trail--three { width: calc(100% - 1.5rem); margin-inline: .75rem; }

    .bento { grid-template-columns: minmax(0, 1fr); }
    .tile--wide { grid-column: auto; }
    .mock-page { flex-wrap: wrap; }

    .ledger-row { grid-template-columns: minmax(0, 1fr); gap: .3rem; padding-block: 1rem; }
    .ledger-system { grid-row: auto; margin-block-end: .2rem; }
    .ledger-docs, .ledger-how { padding-inline-start: 3.1rem; }

    .reward-stat { flex: 1 1 8rem; min-width: 0; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
}

/* Small phones, 320 to 368px wide */
@media (max-width: 23rem) {
    .shell { width: min(var(--shell), 100% - 1.5rem); }
    .brand img { width: 2.2rem; }
    .brand-name { font-size: .9rem; }
    .lang-switch svg { display: block; width: 1.25rem; height: 1.25rem; }
    .lang-switch__label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    h1 { font-size: 2.2rem; }
    html[lang="ar"] h1 { font-size: 2.05rem; }
    .doc { padding-inline: 1rem; }
    .doc-qr { width: 4.6rem; height: 4.6rem; }
    .trail { padding-inline: .25rem; }
    .trail-step strong { font-size: .76rem; }
    .ledger-docs, .ledger-how { padding-inline-start: 0; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-delay: 0s !important; }
}
