/* Shellati — site styles. One family for both scripts; logical properties so RTL is a flip, not a rewrite. */
:root {
  --ink: #1F2523; --muted: #5A615E; --faint: #9AA19D; --rule: #E2E5E3;
  --green: #1B7F5A; --deep: #145F43; --mint: #E3F3EB; --paper: #FFFFFF; --soft: #F3F5F3;
  --amber: #7A4B00; --amber-soft: #FFE2A3;
  --measure: 1040px; --gutter: 20px;
  --font: "IBM Plex Sans Arabic", "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --ink: #ECEFED; --muted: #AAB2AE; --faint: #6F7773; --rule: #2A312E; --paper: #121715; --soft: #1A2320; --mint: #173A2D; --amber-soft: #3A2A08; --amber: #F2C572; }
}
:root[data-theme="dark"] { --ink: #ECEFED; --muted: #AAB2AE; --faint: #6F7773; --rule: #2A312E; --paper: #121715; --soft: #1A2320; --mint: #173A2D; --amber-soft: #3A2A08; --amber: #F2C572; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.6; }
body[dir="rtl"] { font-size: 18px; line-height: 1.8; }
a { color: var(--deep); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green); }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 4px; }
img, svg { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
body[dir="rtl"] h1, body[dir="rtl"] h2, body[dir="rtl"] h3 { letter-spacing: 0; line-height: 1.35; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0; }
.wrap { max-width: var(--measure); margin-inline: auto; padding-inline: var(--gutter); }
.prose { max-width: 62ch; }
.hidden { display: none !important; }
[hidden] { display: none !important; }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; }
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--ink); }
.brand strong { font-size: 1.35rem; font-weight: 700; color: var(--deep); }
.brand span { color: var(--muted); font-size: 1rem; }
.nav { display: flex; align-items: center; gap: 18px; font-size: 0.95rem; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--deep); }
.lang { border: 1px solid var(--rule); background: transparent; color: var(--ink); font: inherit; font-size: 0.9rem; padding: 6px 12px; border-radius: 999px; cursor: pointer; }
.lang:hover { border-color: var(--green); color: var(--deep); }

/* hero */
.hero { padding-block: 40px 56px; display: grid; gap: 36px; grid-template-columns: 1fr; align-items: center; }
@media (min-width: 880px) { .hero { grid-template-columns: 1.05fr 1fr; gap: 48px; padding-block: 64px 80px; } }
.hero .lede { color: var(--muted); font-size: 1.2rem; margin-top: 18px; max-width: 34ch; }
.hero .cta { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 12px; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; border: 1px solid transparent; }
.btn-primary { background: var(--green); color: #fff; }
.btn-primary:hover { background: var(--deep); color: #fff; }
.btn-ghost { background: transparent; color: var(--deep); border-color: var(--rule); }
.btn-ghost:hover { border-color: var(--green); }
.note { color: var(--muted); font-size: 0.95rem; }

/* the ledger strip — the one piece of motion on the page */
.ledger { background: var(--soft); border: 1px solid var(--rule); border-radius: 18px; padding: 22px 22px 18px; position: relative; overflow: hidden; }
.ledger::before { content: ""; position: absolute; inset-inline-start: 56px; top: 0; bottom: 0; width: 1px; background: color-mix(in srgb, var(--amber) 35%, transparent); }
.ledger-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; font-size: 0.95rem; color: var(--muted); }
.ledger-title b { color: var(--ink); font-weight: 600; }
.ledger ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.ledger li { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 12px; padding-block: 8px; border-bottom: 1px dashed var(--rule); font-size: 0.98rem; }
.ledger li:last-child { border-bottom: 0; }
.ledger .m { color: var(--faint); font-variant-numeric: tabular-nums; font-size: 0.85rem; }
.ledger .who { font-weight: 500; }
.ledger .amt { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 0.9rem; }
.ledger li.now { background: var(--mint); margin-inline: -22px; padding-inline: 22px; border-radius: 10px; border-bottom-color: transparent; }
.ledger li.now .who::after { content: attr(data-now); font-size: 0.8rem; color: var(--deep); margin-inline-start: 10px; font-weight: 600; }
.ledger li.done .who { color: var(--muted); }
.ledger li.done .amt { color: var(--green); }
.ledger-foot { margin-top: 12px; font-size: 0.85rem; color: var(--muted); display: flex; justify-content: space-between; gap: 12px; }
.ledger-foot code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.8rem; color: var(--faint); }

/* sections */
.section { padding-block: 56px; border-top: 1px solid var(--rule); }
.section h2 { max-width: 24ch; }
.section .intro { color: var(--muted); margin-top: 12px; max-width: 58ch; }
.steps { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 22px; counter-reset: step; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
.steps li { counter-increment: step; padding-top: 14px; border-top: 2px solid var(--green); }
.steps li::before { content: counter(step); display: inline-block; font-weight: 700; color: var(--deep); font-size: 0.95rem; margin-bottom: 6px; }
.steps h3 { margin-bottom: 6px; }
.steps p { color: var(--muted); font-size: 0.98rem; }

table.types { width: 100%; border-collapse: collapse; margin-top: 28px; font-size: 0.98rem; }
table.types th, table.types td { text-align: start; vertical-align: top; padding: 12px 10px; border-bottom: 1px solid var(--rule); }
table.types th { font-weight: 600; color: var(--ink); }
table.types thead th { color: var(--deep); border-bottom: 2px solid var(--green); }
table.types td { color: var(--muted); }
table.types td:first-child, table.types th:first-child { padding-inline-start: 0; color: var(--ink); font-weight: 600; }
@media (max-width: 640px) {
  table.types thead { display: none; }
  table.types tr { display: grid; grid-template-columns: 1fr; padding-block: 10px; border-bottom: 1px solid var(--rule); }
  table.types td, table.types th { border: 0; padding: 2px 0; }
  table.types td::before { content: attr(data-k) ": "; color: var(--faint); }
}

.trust { display: grid; gap: 28px; margin-top: 28px; }
@media (min-width: 880px) { .trust { grid-template-columns: 1fr 1fr; gap: 48px; } }
.trust h3 { margin-bottom: 8px; }
.trust p { color: var(--muted); }
.vote { margin-top: 18px; background: var(--amber-soft); color: var(--amber); border-radius: 14px; padding: 16px 18px; font-size: 0.98rem; }
.vote b { display: block; margin-bottom: 4px; }
.vote .ans { display: flex; gap: 8px; margin-top: 10px; }
.vote .ans span { border: 1px solid currentColor; border-radius: 8px; padding: 4px 12px; font-size: 0.9rem; }

.stamp { margin-top: 28px; padding: 28px; border: 2px solid var(--green); border-radius: 18px; max-width: 70ch; position: relative; }
.stamp h2 { color: var(--deep); font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.stamp p { margin-top: 12px; color: var(--muted); }
.stamp ul { margin: 14px 0 0; padding-inline-start: 20px; color: var(--muted); }
.stamp li + li { margin-top: 4px; }

.faq { margin-top: 24px; max-width: 70ch; }
.faq details { border-top: 1px solid var(--rule); padding-block: 12px; }
.faq details:last-child { border-bottom: 1px solid var(--rule); }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--green); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); margin-top: 8px; }

.video { margin-top: 28px; aspect-ratio: 16 / 9; width: 100%; max-width: 760px; background: var(--soft); border: 1px dashed var(--rule); border-radius: 16px; display: grid; place-items: center; color: var(--muted); text-align: center; padding: 20px; }
.video iframe { width: 100%; height: 100%; border: 0; border-radius: 16px; }

footer { padding-block: 40px 56px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 0.92rem; }
footer .cols { display: flex; flex-wrap: wrap; gap: 14px 28px; margin-top: 8px; }
footer a { color: var(--muted); }

/* legal pages */
.legal { padding-block: 32px 64px; }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.legal .meta { color: var(--muted); margin-top: 8px; }
.legal h2 { font-size: 1.3rem; margin-top: 36px; }
.legal p, .legal li { color: var(--ink); max-width: 70ch; }
.legal p { margin-top: 10px; }
.legal ul { padding-inline-start: 20px; margin-top: 8px; }
.legal table { border-collapse: collapse; margin-top: 12px; font-size: 0.95rem; max-width: 70ch; }
.legal th, .legal td { text-align: start; padding: 8px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.legal th { font-weight: 600; }
.draft { background: var(--amber-soft); color: var(--amber); padding: 10px 14px; border-radius: 10px; font-size: 0.95rem; margin-top: 16px; max-width: 70ch; }

/* invite landing */
.invite { min-height: 70vh; display: grid; place-items: center; padding-block: 48px; }
.invite .card { max-width: 440px; width: 100%; text-align: center; display: grid; gap: 16px; }
.invite .mark { width: 72px; height: 72px; border-radius: 36px; background: var(--mint); color: var(--deep); display: grid; place-items: center; margin-inline: auto; font-weight: 700; font-size: 1.6rem; }
.invite p { color: var(--muted); }

@media (prefers-reduced-motion: no-preference) {
  .ledger li.now { animation: landed 700ms ease-out both; }
  @keyframes landed { from { background: transparent; } to { background: var(--mint); } }
}
