/* Reset, typography, layout primitives and shared section patterns. */
*, *::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;
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.rtl { font-family: "Cairo", var(--font-body); line-height: 1.8; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
:target { scroll-margin-top: calc(var(--header-h) + 16px); }

:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--primary) 60%, transparent);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
    margin: 0 0 .5em;
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -.02em;
    color: var(--ink);
    text-wrap: balance;
}
body.rtl h1, body.rtl h2, body.rtl h3, body.rtl h4 {
    font-family: "Cairo", var(--font-display);
    letter-spacing: 0;
    line-height: 1.35;
}

h1 { font-size: clamp(2.2rem, 3.4vw + .8rem, 3.6rem); letter-spacing: -.03em; }
h2 { font-size: clamp(1.75rem, 2.6vw + .8rem, 2.75rem); }
h3 { font-size: 1.2rem; letter-spacing: -.01em; }

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

.lead {
    max-width: 58ch;
    font-size: clamp(1.05rem, .4vw + 1rem, 1.25rem);
    line-height: 1.6;
    color: var(--muted);
}

.sr-only, .dm-sr {
    position: absolute; 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; z-index: 200; inset-block-start: 8px; inset-inline-start: 8px;
    padding: 10px 16px; border-radius: var(--radius-sm);
    background: var(--ink); color: var(--paper); font-weight: 600;
    transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* ---------- Layout ---------- */
.container { width: min(var(--container), 100% - 2 * var(--gutter)); margin-inline: auto; }

.section { padding-block: clamp(56px, 9vw, 112px); }
.section--tint { background: var(--paper-2); }

.section-head { max-width: 62ch; margin-block-end: clamp(32px, 5vw, 56px); }
.section-head h2 { margin-block-end: .4em; }
.section-head p { margin: 0; font-size: 1.1rem; color: var(--muted); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center p { margin-inline: auto; }

.page-label {
    margin-block-end: 6px;
    font-size: .85rem;
    font-weight: 700;
    color: var(--primary);
}

/* ---------- Window frame around product screenshots ---------- */
.device {
    margin: 0;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
}
.device__bar {
    display: flex; align-items: center; gap: 14px;
    height: 38px; padding-inline: 14px;
    background: var(--surface-2);
    border-block-end: 1px solid var(--line);
}
.device__dots { display: inline-flex; gap: 6px; }
.device__dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.device__title {
    flex: 1; max-width: 320px; margin-inline: auto; padding: 3px 12px;
    border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
    font-size: .75rem; line-height: 1.5; text-align: center; color: var(--muted);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    transform: translateX(-24px);
}
body.rtl .device__title { transform: translateX(24px); }
.device img { width: 100%; height: auto; }
.device--zoomable img { cursor: zoom-in; }

/* ---------- Small shared patterns ---------- */
.tick-list { display: grid; gap: 12px; margin: 0 0 28px; padding: 0; list-style: none; }
.tick-list li { display: flex; align-items: flex-start; gap: 12px; }
.tick-list svg {
    flex: none; width: 22px; height: 22px; margin-block-start: 2px; padding: 4px;
    border-radius: 50%; background: var(--success-soft); color: var(--success);
}

/* product identity (logo + name), used on the home page panel and the product page */
.product-id { display: flex; align-items: center; gap: 12px; margin-block-end: 20px; }
.product-id img { width: 48px; height: 48px; padding: 4px; border-radius: 12px; background: #fff; border: 1px solid var(--line); }
.product-id span { display: grid; line-height: 1.3; }
.product-id b { font-family: var(--font-display); font-size: 1.15rem; color: var(--ink); }
.product-id small { font-size: .85rem; color: var(--muted); }
.product-id--lg img { width: 64px; height: 64px; border-radius: 16px; }
.product-id--lg b { font-size: 1.35rem; }

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
[dir="rtl"] .icon-dir { transform: scaleX(-1); }

.error-page { min-height: 55vh; display: grid; align-items: center; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
