/* ZakApp marketing site - "Nur" (light theme).
   Handwritten CSS, one file, no build step. Token values come from the app's
   approved v1.0 design contract; no colours are invented here. */

/* ---------- 1. Fonts (self-hosted, no external requests) ---------- */

@font-face {
    font-family: 'Inter';
    src: url('fonts/inter-var.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Outfit';
    src: url('fonts/outfit-var.woff2') format('woff2');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* Two Amiri cuts, because the wordmark is Arabic and the Latin cut carries no
   Arabic glyphs at all. Upstream ships amiri-400.woff2 (Latin) and
   amiri-arabic-400.woff2 (Arabic) as separate files; loading only the first
   silently dropped the wordmark to whatever Arabic face the OS happened to
   have. unicode-range keeps each to its own script. */
@font-face {
    font-family: 'Amiri';
    src: url('fonts/amiri-arabic-400.woff2') format('woff2');
    unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF;
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Amiri';
    src: url('fonts/amiri-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* ---------- 2. Tokens ---------- */

:root {
    --bg: #FAF9F5;
    --surface: #FFFFFF;
    --surface-2: #F3F0E9;
    --text: #1F2937;
    --text-2: #6B7280;
    --text-3: #9CA3AF;
    --border: #E5E0D5;
    --border-strong: #D6CFC0;
    --brand: #1B3A2F;
    --brand-soft: #EAF0EC;
    --accent: #B45309;
    --accent-strong: #92400E;
    --accent-soft: #FDF3E3;
    --success: #1B7A4A;
    --success-soft: #E8F5EC;

    --radius: 14px;
    --radius-sm: 10px;
    --radius-btn: 12px;

    --shadow-card: 0 1px 3px rgba(27, 58, 47, .06), 0 4px 14px rgba(27, 58, 47, .05);
    --elev-2: 0 1px 2px rgba(27, 58, 47, .10), 0 2px 6px rgba(27, 58, 47, .08);
    --elev-3: 0 2px 4px rgba(27, 58, 47, .10), 0 8px 20px rgba(27, 58, 47, .10);
    --motion: cubic-bezier(.2, 0, 0, 1);

    --col: 1160px;
    --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --display: 'Outfit', 'Inter', system-ui, sans-serif;
    --arabic: 'Amiri', 'Outfit', 'Inter', system-ui, sans-serif;
}

/* ---------- 3. Base ---------- */

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 1rem;
    line-height: 1.6;
    font-variant-numeric: tabular-nums;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1,
h2,
h3 {
    font-family: var(--display);
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--brand);
    margin: 0;
    text-wrap: balance;
}

p {
    margin: 0;
    text-wrap: pretty;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

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

hr {
    border: 0;
    margin: 0;
}

a {
    color: var(--brand);
    text-decoration: none;
}

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

.wrap {
    width: 100%;
    max-width: var(--col);
    margin-inline: auto;
    padding-inline: 24px;
}

.skip {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--surface);
    color: var(--brand);
    padding: 12px 18px;
    z-index: 99;
    border-radius: 0 0 var(--radius-btn) 0;
}

.skip:focus {
    left: 0;
}

.rule {
    border-top: 1px solid var(--border);
}

/* ---------- 4. Buttons and links ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--sans);
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1;
    padding: 14px 22px;
    border-radius: var(--radius-btn);
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 180ms var(--motion), box-shadow 180ms var(--motion),
        background-color 180ms var(--motion), border-color 180ms var(--motion);
}

.btn--primary {
    background: var(--accent);
    color: #FFFFFF;
    box-shadow: var(--elev-2);
}

.btn--primary:hover {
    background: var(--accent-strong);
    box-shadow: var(--elev-3);
    transform: translateY(-1px);
}

.btn--ghost {
    background: var(--surface);
    color: var(--brand);
    border-color: var(--border-strong);
}

.btn--ghost:hover {
    border-color: var(--brand);
    transform: translateY(-1px);
}

.link {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--brand);
    transition: color 150ms var(--motion);
}

.link:hover {
    color: var(--accent-strong);
}

/* ---------- 5. Nav ---------- */

.nav {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
}

.nav__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 72px;
}

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

.brand__mark {
    width: 36px;
    height: 36px;
}

.brand__name {
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: -0.01em;
    color: var(--brand);
}

/* The single Arabic phrase on the page. Amiri is the intended face; the
   bundled file has no Arabic coverage, so any glyph it lacks falls through
   the stack (see the font-face note at the top of this file). */
.brand__arabic {
    font-family: var(--arabic);
    font-size: 1.125rem;
    line-height: 1;
    color: var(--text-2);
    padding-left: 2px;
}

.nav__links {
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav__links .btn {
    padding: 12px 18px;
    font-size: 0.875rem;
}

/* ---------- 6. Hero ---------- */

.hero {
    padding: 72px 0 88px;
}

.hero__inner {
    display: grid;
    grid-template-columns: 1.06fr 0.94fr;
    gap: 64px;
    align-items: start;
}

.hero__h1 {
    font-size: clamp(2.25rem, 4.4vw, 3.5rem);
    line-height: 1.08;
    max-width: 15ch;
}

.hero__sub {
    margin-top: 22px;
    font-size: 1.125rem;
    line-height: 1.65;
    color: var(--text-2);
    max-width: 50ch;
}

.hero__cta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.facts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 24px;
    margin-top: 36px;
    padding-top: 26px;
    border-top: 1px solid var(--border);
}

/* These three carry the trust argument, so they get full-strength text
   rather than the secondary grey (which sits at 4.5:1 on this background). */
.facts__item {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 0.9375rem;
    color: var(--text);
}

.facts__item::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--brand-soft);
    box-shadow: inset 0 0 0 1.5px var(--brand);
    flex: none;
}

/* The one amber figure on the page. */
.figure-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 30px 30px 26px;
}

.figure-card__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.figure-card__label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-2);
}

.figure-card__value {
    margin-top: 14px;
    font-family: var(--display);
    font-weight: 600;
    font-size: clamp(3rem, 4.6vw, 4rem);
    line-height: 1;
    letter-spacing: -0.01em;
    color: var(--accent);
}

.figure-card__meta {
    margin-top: 12px;
    font-size: 0.875rem;
    color: var(--text-2);
}

.figure-card .rule {
    margin: 24px 0 20px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--success-soft);
    color: var(--success);
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    flex: none;
}

.hawl__row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
}

.hawl__title {
    font-family: var(--display);
    font-weight: 600;
    font-size: 1rem;
    color: var(--brand);
}

.hawl__count {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text);
}

.hawl__bar {
    margin-top: 12px;
    height: 6px;
    border-radius: 999px;
    background: var(--surface-2);
    overflow: hidden;
}

.hawl__fill {
    display: block;
    height: 100%;
    width: 58.6%;
    border-radius: 999px;
    background: var(--brand);
}

.hawl__note {
    margin-top: 12px;
    font-size: 0.875rem;
    color: var(--text-2);
}

/* ---------- 7. Bands and section rhythm ---------- */

.band {
    padding: 88px 0;
}

.band--shot {
    padding-top: 0;
}

.band--trust {
    background: var(--surface-2);
}

/* ---------- 8. Screenshot frame ---------- */

.frame {
    margin: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.frame img {
    width: 100%;
}

.frame__cap {
    margin-top: 16px;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-2);
}

/* ---------- 9. Trust ---------- */

.trust {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 56px;
    align-items: start;
}

.trust__lede h2 {
    font-size: clamp(1.75rem, 2.8vw, 2.25rem);
    line-height: 1.15;
}

.trust__lede p {
    margin-top: 18px;
    font-size: 1.0625rem;
    color: var(--text-2);
}

.trust__item {
    display: grid;
    grid-template-columns: 48px 1fr;
    gap: 18px;
    padding: 22px 0;
    border-top: 1px solid var(--border-strong);
}

.trust__item:first-child {
    border-top: 0;
    padding-top: 0;
}

.trust__num {
    font-family: var(--display);
    font-weight: 600;
    font-size: 0.875rem;
    letter-spacing: 0.02em;
    color: var(--text-3);
    padding-top: 3px;
}

.trust__item h3 {
    font-size: 1.125rem;
    line-height: 1.35;
}

.trust__item p {
    margin-top: 8px;
    font-size: 0.9375rem;
    color: var(--text-2);
    max-width: 58ch;
}

/* ---------- 10. Feature rows ---------- */

.feature {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 64px;
    align-items: center;
}

/* Mirrored row: the copy takes the narrow track so the media keeps the wide
   one when order moves it into the second column. */
.feature--rev {
    grid-template-columns: 0.85fr 1.15fr;
}

.feature--rev .feature__media {
    order: 2;
}

.feature__copy h2 {
    font-size: clamp(1.75rem, 2.8vw, 2.25rem);
    line-height: 1.15;
}

.feature__copy>p {
    margin-top: 18px;
    font-size: 1.0625rem;
    color: var(--text-2);
}

.cat-list {
    margin-top: 24px;
    display: grid;
    gap: 0;
    border-top: 1px solid var(--border);
}

.cat-list li {
    padding: 11px 0 11px 22px;
    position: relative;
    font-size: 0.9375rem;
    border-bottom: 1px solid var(--border);
}

.cat-list li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: 19px;
    width: 7px;
    height: 7px;
    border-radius: 2px;
    background: var(--brand-soft);
    box-shadow: inset 0 0 0 1.5px var(--brand);
}

.feature__foot {
    margin-top: 22px;
    font-size: 0.9375rem;
    color: var(--text-2);
}

.spec {
    margin-top: 26px;
    border-top: 1px solid var(--border);
}

.spec__row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 18px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.spec__row dt {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--brand);
}

.spec__row dd {
    font-size: 0.9375rem;
    color: var(--text-2);
}

/* ---------- 11. Duo panels (deliberately unequal) ---------- */

.duo {
    display: grid;
    grid-template-columns: 1.32fr 1fr;
    gap: 32px;
    align-items: stretch;
}

.panel {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-card);
    padding: 34px;
    display: grid;
    gap: 28px;
    grid-template-rows: auto 1fr;
}

/* The wide panel's frame bleeds to the card edges, so it supplies its own
   bottom radius rather than relying on the card's overflow. */
.panel--wide {
    padding-bottom: 0;
}

.panel--wide .frame--inset {
    border-radius: var(--radius) var(--radius) 0 0;
    border-bottom: 0;
    border-left: 0;
    border-right: 0;
    box-shadow: none;
    align-self: end;
}

.panel--narrow .frame--inset {
    align-self: end;
}

.panel__copy h2 {
    font-size: 1.5rem;
    line-height: 1.2;
}

.panel__copy p {
    margin-top: 14px;
    font-size: 0.9375rem;
    color: var(--text-2);
}

.panel__foot {
    margin-top: 18px;
    font-size: 0.875rem;
    color: var(--text-3);
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.tag {
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    background: var(--brand-soft);
    color: var(--brand);
}

.plain-list {
    margin-top: 20px;
    display: grid;
    gap: 10px;
}

.plain-list li {
    position: relative;
    padding-left: 20px;
    font-size: 0.9375rem;
    color: var(--text-2);
}

.plain-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    width: 8px;
    height: 1.5px;
    background: var(--border-strong);
}

/* ---------- 12. Open source band ---------- */

.band--brand {
    background: var(--brand);
    color: var(--brand-soft);
}

.brandband {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 64px;
    align-items: center;
}

.brandband h2 {
    color: #FFFFFF;
    font-size: clamp(1.75rem, 2.8vw, 2.25rem);
    line-height: 1.15;
}

.brandband__copy p {
    margin-top: 18px;
    font-size: 1.0625rem;
    color: rgba(234, 240, 236, .82);
    max-width: 54ch;
    line-height: 1.7;
}

.brandband__label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(234, 240, 236, .85);
}

.brandband__repo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
    font-size: 1.0625rem;
    font-weight: 500;
    color: #FFFFFF;
    border-bottom: 1px solid rgba(234, 240, 236, .55);
    padding-bottom: 6px;
    text-decoration: none;
}

/* Mark inherits currentColor, so it tracks the link's own hover/focus. */
.brandband__repoicon {
    flex: none;
    display: block;
}

.brandband__repo:hover,
.brandband__repo:focus-visible {
    border-color: #FFFFFF;
}

/* Self-host specifics: dark-surface variant of the spec list. */
.spec--dark {
    margin-top: 26px;
    border-top-color: rgba(234, 240, 236, .22);
}

.spec--dark .spec__row {
    border-bottom-color: rgba(234, 240, 236, .22);
    grid-template-columns: 116px 1fr;
    gap: 16px;
}

.spec--dark dt {
    color: #FFFFFF;
    font-weight: 500;
}

.spec--dark dd {
    color: rgba(234, 240, 236, .82);
}

/* ---------- 13. Closing CTA ---------- */

.band--cta {
    padding-bottom: 104px;
}

.cta {
    max-width: 680px;
}

.cta h2 {
    font-size: clamp(1.75rem, 2.8vw, 2.25rem);
    line-height: 1.15;
}

.cta p {
    margin-top: 18px;
    font-size: 1.0625rem;
    color: var(--text-2);
}

.cta__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-top: 32px;
}

/* ---------- 14. Footer ---------- */

.footer {
    border-top: 1px solid var(--border);
    padding: 56px 0 48px;
}

.footer__inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px 32px;
}

.footer__brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
}

.footer__name {
    font-family: var(--display);
    font-weight: 600;
    font-size: 1.0625rem;
    color: var(--brand);
}

.footer__links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
}

.footer__links a {
    font-size: 0.875rem;
    color: var(--text-2);
    transition: color 150ms var(--motion);
}

.footer__links a:hover {
    color: var(--brand);
}

.footer__legal {
    margin-left: auto;
    font-size: 0.8125rem;
    color: var(--text-3);
}

.footer__legal span {
    display: block;
}

@media (max-width: 620px) {
    .footer__legal {
        margin-left: 0;
    }
}

/* ---------- 15. Page-load stagger ---------- */

.reveal {
    opacity: 0;
    transform: translateY(10px);
    animation: rise 520ms var(--motion) both;
}

.reveal.d1 {
    animation-delay: 90ms;
}

.reveal.d2 {
    animation-delay: 180ms;
}

.reveal.d3 {
    animation-delay: 270ms;
}

.reveal.d4 {
    animation-delay: 360ms;
}

@keyframes rise {
    to {
        opacity: 1;
        transform: none;
    }
}

/* ponytail: hero reveals are above the fold, so CSS animation on load is
   enough; no IntersectionObserver needed. Add one if more sections move
   above the fold. */

@media (prefers-reduced-motion: reduce) {

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

    .reveal {
        opacity: 1;
        transform: none;
    }

    .btn:hover {
        transform: none;
    }
}

/* ---------- 16. Responsive ---------- */

@media (max-width: 1040px) {
    .hero__inner {
        gap: 48px;
    }

    .hero {
        padding: 56px 0 72px;
    }

    .band {
        padding: 72px 0;
    }

    .trust,
    .feature,
    .brandband {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .feature--rev .feature__media {
        order: 0;
    }

    .feature__copy {
        order: 2;
    }

    .duo {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}

@media (max-width: 860px) {
    .hero__inner {
        grid-template-columns: 1fr;
        gap: 44px;
    }

    .hero__h1 {
        max-width: 18ch;
    }

    .trust__lede p,
    .hero__sub,
    .feature__copy>p,
    .brandband__copy p {
        max-width: none;
    }
}

@media (max-width: 620px) {
    .wrap {
        padding-inline: 20px;
    }

    .band {
        padding: 60px 0;
    }

    .hero {
        padding: 40px 0 56px;
    }

    .nav__inner {
        min-height: 64px;
    }

    .brand__name {
        font-size: 1.125rem;
    }

    .nav__links {
        gap: 12px;
    }

    .nav__links .link {
        display: none;
    }

    .hero__sub {
        font-size: 1.0625rem;
    }

    .hero__cta {
        gap: 10px;
    }

    .hero__cta .btn {
        width: 100%;
    }

    .figure-card {
        padding: 24px 22px 22px;
    }

    .panel {
        padding: 26px 22px;
    }

    .panel--wide {
        padding-bottom: 0;
    }

    .trust__item {
        grid-template-columns: 34px 1fr;
        gap: 12px;
    }

    .footer__links {
        gap: 12px 22px;
    }

    .footer__links a {
        padding: 6px 0;
        font-size: 0.9375rem;
    }

    .spec__row {
        grid-template-columns: 1fr;
        gap: 4px;
    }
}

@media (max-width: 380px) {
    .facts {
        gap: 8px 16px;
    }

    .facts__item {
        font-size: 0.8125rem;
    }
}
