/* ==========================================================================
   Moshklty — one page, two directions.
   Everything below uses CSS logical properties (inline-start/end, margin-inline)
   so the Arabic RTL layout falls out of `dir="rtl"` without a second stylesheet.
   ========================================================================== */

/* --------------------------------------------------------------- tokens -- */
:root {
    --bg: #080b13;
    --bg-raised: #0b0f1a;
    --surface: rgba(255, 255, 255, 0.035);
    --surface-hover: rgba(255, 255, 255, 0.06);
    --line: rgba(255, 255, 255, 0.09);
    --line-strong: rgba(255, 255, 255, 0.17);

    --text: #edf1f8;
    --text-soft: #b7c1d4;
    --muted: #8593ab;

    --teal: #2ce0b0;
    --cyan: #25c8f0;
    --blue: #3b74ff;
    --ink: #04121b;

    /* One error family — every validation/danger surface draws from these. */
    --danger-text: #ffb4b4;
    --danger-soft: rgba(255, 138, 138, 0.85);
    --danger-bg: rgba(255, 105, 105, 0.1);
    --danger-border: rgba(255, 122, 122, 0.38);

    --gradient: linear-gradient(115deg, var(--teal), var(--cyan) 52%, var(--blue));
    --gradient-soft: linear-gradient(115deg, rgba(44, 224, 176, 0.16), rgba(59, 116, 255, 0.16));

    --radius-sm: 12px;
    --radius: 18px;
    --radius-lg: 26px;

    --shell: 1180px;
    --gutter: clamp(1.15rem, 4vw, 2.5rem);
    --header-height: 74px;

    --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-display: "Plus Jakarta Sans", var(--font-sans);

    --ease: cubic-bezier(0.22, 0.68, 0.35, 1);
}

/* Arabic gets a typeface designed for it, and the brand gradient mirrors with the layout. */
[dir="rtl"] {
    --font-sans: "IBM Plex Sans Arabic", "Tajawal", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
    --font-display: var(--font-sans);
    --gradient: linear-gradient(245deg, var(--teal), var(--cyan) 52%, var(--blue));
}

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

html {
    /* Without this, UA-rendered surfaces (select dropdowns, autofill,
       scrollbars) come up light-on-white inside the dark theme. */
    color-scheme: dark;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-block-start: calc(var(--header-height) + 18px);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* A calm field of light behind the whole page rather than a flat black. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(58rem 34rem at 78% -8%, rgba(59, 116, 255, 0.16), transparent 62%),
        radial-gradient(44rem 30rem at 6% 6%, rgba(44, 224, 176, 0.11), transparent 60%),
        var(--bg);
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: -0.02em;
    margin: 0;
}

[dir="rtl"] h1,
[dir="rtl"] h2,
[dir="rtl"] h3 {
    letter-spacing: 0;
    line-height: 1.35;
}

/* IBM Plex Sans Arabic tops out at 700 — asking for 800 gets a synthesized
   faux-bold exactly where the Arabic voice matters most. */
[dir="rtl"] .hero__title,
[dir="rtl"] .brand__name,
[dir="rtl"] .step__number,
[dir="rtl"] .statement strong {
    font-weight: 700;
}

p {
    margin: 0;
}

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

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

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

svg.icon {
    width: 1.25rem;
    height: 1.25rem;
    flex: none;
}

/* Class display rules (e.g. .chat__intake { display: flex }) must never beat
   the hidden attribute — JS drives chat intake/thread swaps through it. */
[hidden] {
    display: none !important;
}

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

::selection {
    background: rgba(44, 224, 176, 0.3);
}

.skip-link {
    position: absolute;
    inset-block-start: -100%;
    inset-inline-start: 1rem;
    z-index: 200;
    padding: 0.75rem 1.15rem;
    background: var(--bg-raised);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-sm);
}

.skip-link:focus {
    inset-block-start: 1rem;
}

/* ----------------------------------------------------------- primitives -- */
.shell {
    width: 100%;
    max-width: var(--shell);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.shell--narrow {
    max-width: 840px;
}

.section {
    padding-block: clamp(4.5rem, 9vw, 7.5rem);
    position: relative;
}

.section__head {
    max-width: 62ch;
    margin-block-end: clamp(2.5rem, 5vw, 3.75rem);
}

.section__title {
    font-size: clamp(1.85rem, 1.1rem + 2.6vw, 3rem);
    margin-block-start: 0.75rem;
    text-wrap: balance;
}

.section__lead {
    margin-block-start: 1.1rem;
    color: var(--text-soft);
    font-size: clamp(1.02rem, 0.98rem + 0.3vw, 1.15rem);
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--teal);
}

[dir="rtl"] .eyebrow {
    letter-spacing: 0;
    text-transform: none;
    font-size: 0.9rem;
}

.eyebrow::before {
    content: "";
    inline-size: 1.75rem;
    block-size: 2px;
    border-radius: 2px;
    background: var(--gradient);
}

.gradient-text {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ------------------------------------------------------------- buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.72rem 1.3rem;
    border: 1px solid transparent;
    border-radius: 999px;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    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);
}

.btn--sm {
    padding: 0.55rem 1.05rem;
    font-size: 0.88rem;
}

.btn--lg {
    padding: 0.95rem 1.7rem;
    font-size: 1.02rem;
}

.btn--block {
    width: 100%;
}

.btn--primary {
    background: var(--gradient);
    color: var(--ink);
    box-shadow: 0 12px 30px -14px rgba(44, 224, 176, 0.75);
}

.btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 38px -14px rgba(44, 224, 176, 0.85);
}

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

.btn--ghost:hover {
    background: var(--surface-hover);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn__arrow {
    display: inline-flex;
    transition: transform 0.18s var(--ease);
}

.btn__arrow svg {
    width: 1.05rem;
    height: 1.05rem;
}

[dir="rtl"] .btn__arrow svg {
    transform: scaleX(-1);
}

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

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

/* -------------------------------------------------------------- header --- */
.site-header {
    position: sticky;
    inset-block-start: 0;
    z-index: 100;
    background: rgba(8, 11, 19, 0.72);
    backdrop-filter: blur(14px);
    border-block-end: 1px solid transparent;
    transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease);
}

.site-header.is-scrolled {
    border-block-end-color: var(--line);
    background: rgba(8, 11, 19, 0.9);
}

.site-header__inner {
    /* Six nav links + the CTA outgrew the 1180px shell cap; the header row may
       span the full viewport (minus gutters) while page content stays capped. */
    max-width: none;
    min-height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    flex: none;
}

.brand__mark {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    border: 1px solid var(--line);
}

.brand__text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand__name {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -0.01em;
}

.brand__tagline {
    font-size: 0.7rem;
    color: var(--muted);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex: 1;
    justify-content: space-between;
}

.site-nav__list {
    display: flex;
    align-items: center;
    gap: 1.6rem;
}

.site-nav__link {
    font-size: 0.93rem;
    color: var(--text-soft);
    padding-block: 0.4rem;
    position: relative;
    white-space: nowrap;
    transition: color 0.18s var(--ease);
}

.site-nav__link::after {
    content: "";
    position: absolute;
    inset-block-end: 0;
    inset-inline-start: 0;
    inline-size: 0;
    block-size: 2px;
    border-radius: 2px;
    background: var(--gradient);
    transition: inline-size 0.22s var(--ease);
}

.site-nav__link:hover,
.site-nav__link.is-active {
    color: var(--text);
}

.site-nav__link:hover::after,
.site-nav__link.is-active::after {
    inline-size: 100%;
}

.site-nav__actions {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    padding: 3px;
    gap: 2px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
}

.lang-switch__item {
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.83rem;
    font-weight: 600;
    color: var(--muted);
    transition: color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.lang-switch__item:hover {
    color: var(--text);
}

.lang-switch__item.is-active {
    background: var(--surface-hover);
    color: var(--text);
}

/* Fingers need ~44px; mice don't. Grow the small header controls only where
   the pointer is coarse so the compact desktop header keeps its proportions. */
@media (pointer: coarse) {
    .site-nav__link {
        padding-block: 0.75rem;
    }

    .lang-switch__item {
        padding-block: 0.6rem;
    }
}

.nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    inline-size: 42px;
    block-size: 42px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
}

.nav-toggle__icon[data-icon="close"] {
    display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon[data-icon="menu"] {
    display: none;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__icon[data-icon="close"] {
    display: inline-flex;
}

/* ---------------------------------------------------------------- hero --- */
.hero {
    position: relative;
    padding-block: clamp(3rem, 6vw, 5.5rem) clamp(2.5rem, 5vw, 4rem);
    overflow: hidden;
}

.hero__aura {
    position: absolute;
    inset-block-start: -30%;
    inset-inline-end: -15%;
    inline-size: min(70rem, 120%);
    aspect-ratio: 1;
    background: radial-gradient(circle, rgba(37, 200, 240, 0.14), transparent 62%);
    pointer-events: none;
}

.hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    align-items: center;
    gap: clamp(2rem, 5vw, 4.5rem);
    position: relative;
}

.hero__title {
    /* Sized for "Your company's problem." — the old 5.1rem cap fit the shorter
       headline; this one wraps into single-word lines above ~4.2rem. */
    font-size: clamp(2.4rem, 1.2rem + 4.4vw, 4.2rem);
    font-weight: 800;
    margin-block: 1.1rem 1.5rem;
    text-wrap: balance;
}

.hero__title-line {
    display: block;
}

.hero__lead {
    font-size: clamp(1.08rem, 1rem + 0.45vw, 1.28rem);
    color: var(--text);
    max-width: 54ch;
}

.hero__body {
    margin-block-start: 1rem;
    color: var(--muted);
    max-width: 56ch;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-block-start: 2.1rem;
}

.hero__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem 1.4rem;
    margin-block-start: 2.2rem;
    padding-block-start: 1.6rem;
    border-block-start: 1px solid var(--line);
}

.hero__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.88rem;
    color: var(--text-soft);
}

.hero__badge-icon {
    display: inline-flex;
    color: var(--teal);
}

.hero__badge-icon svg {
    width: 1rem;
    height: 1rem;
    stroke-width: 2.4;
}

.hero__visual {
    display: flex;
    justify-content: center;
}

.hero__orb {
    position: relative;
    inline-size: min(100%, 27rem);
    border-radius: var(--radius-lg);
    padding: 6px;
    background: linear-gradient(150deg, rgba(44, 224, 176, 0.55), rgba(59, 116, 255, 0.35) 60%, transparent);
    box-shadow: 0 40px 90px -40px rgba(37, 200, 240, 0.6);
    animation: float 9s ease-in-out infinite;
}

.hero__orb img {
    border-radius: calc(var(--radius-lg) - 6px);
    width: 100%;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* ------------------------------------------------------------- problem --- */
/* Two columns on a wide screen: four quotes read as a 2x2 block, never 3 + 1 orphan. */
.pain-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
    gap: 1.1rem;
}

.pain {
    position: relative;
    padding: 1.75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
    transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.pain::before {
    content: "";
    position: absolute;
    inset-block: 0;
    inset-inline-start: 0;
    inline-size: 3px;
    background: var(--gradient);
    opacity: 0.55;
}

/* No lift here: these cards are not clickable, and motion that promises
   interaction is a lie. A quiet border shift keeps the surface alive. */
.pain:hover {
    border-color: var(--line-strong);
}

.pain__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: 2.6rem;
    block-size: 2.6rem;
    border-radius: var(--radius-sm);
    background: var(--gradient-soft);
    border: 1px solid var(--line);
    color: var(--teal);
    margin-block-end: 1.1rem;
}

.pain__quote {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.05rem, 1rem + 0.4vw, 1.2rem);
    font-weight: 600;
    line-height: 1.5;
    color: var(--text);
}

.pain__cost {
    margin-block-start: 1rem;
    padding-block-start: 1rem;
    border-block-start: 1px dashed var(--line);
    font-size: 0.92rem;
    color: var(--muted);
}

.pain__cost-label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--danger-soft);
    margin-block-end: 0.3rem;
}

[dir="rtl"] .pain__cost-label {
    letter-spacing: 0;
    text-transform: none;
    font-size: 0.82rem;
}

.statement {
    margin-block-start: clamp(2.5rem, 5vw, 3.5rem);
    padding: clamp(1.75rem, 4vw, 2.75rem);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: linear-gradient(140deg, rgba(44, 224, 176, 0.07), rgba(59, 116, 255, 0.05));
    font-family: var(--font-display);
    font-size: clamp(1.15rem, 1rem + 0.9vw, 1.65rem);
    font-weight: 600;
    line-height: 1.5;
    text-align: center;
}

.statement strong {
    display: block;
    font-weight: 800;
    margin-block-end: 0.45rem;
}

.statement span {
    color: var(--text-soft);
    font-weight: 500;
    font-size: 0.85em;
}

/* ------------------------------------------------------------ services --- */
.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17.5rem), 1fr));
    gap: 1.1rem;
}

.service {
    display: flex;
    flex-direction: column;
    padding: 1.85rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    transition: border-color 0.25s var(--ease), background-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.service:hover {
    border-color: var(--line-strong);
}

.service--wide {
    grid-column: 1 / -1;
    background: linear-gradient(140deg, rgba(44, 224, 176, 0.08), rgba(59, 116, 255, 0.06));
}

.service__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: 3rem;
    block-size: 3rem;
    border-radius: var(--radius-sm);
    background: var(--gradient);
    color: var(--ink);
    margin-block-end: 1.3rem;
}

.service__icon svg {
    width: 1.5rem;
    height: 1.5rem;
    stroke-width: 1.8;
}

.service__title {
    font-size: 1.22rem;
    margin-block-end: 0.7rem;
}

.service__body {
    color: var(--text-soft);
    font-size: 0.96rem;
}

.service__list {
    margin-block-start: 1.4rem;
    padding-block-start: 1.3rem;
    border-block-start: 1px solid var(--line);
    display: grid;
    gap: 0.65rem;
}

.service--wide .service__list {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
    gap: 0.65rem 1.75rem;
}

.service__list li {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.service__check {
    display: inline-flex;
    color: var(--teal);
    margin-block-start: 0.2rem;
}

.service__check svg {
    width: 0.95rem;
    height: 0.95rem;
    stroke-width: 2.6;
}

/* ------------------------------------------------------------- process --- */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
    gap: 1.1rem;
    counter-reset: step;
}

.step {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 1.75rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
}

.step__marker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-block-end: 1.25rem;
}

.step__number {
    font-family: var(--font-display);
    font-size: 2.1rem;
    font-weight: 800;
    line-height: 1;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: 0.9;
}

.step__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: 2.4rem;
    block-size: 2.4rem;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--gradient-soft);
    color: var(--cyan);
}

.step__title {
    font-size: 1.12rem;
    margin-block-end: 0.6rem;
}

.step__body {
    color: var(--text-soft);
    font-size: 0.93rem;
}

/* auto pushes the timing badge to the card floor, so it lines up across all four steps. */
.step__meta {
    margin-block-start: auto;
    padding-block-start: 1.1rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--teal);
}

/* ----------------------------------------------------------------- why --- */
.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
    gap: 1.1rem 2.5rem;
}

.why {
    display: flex;
    gap: 1rem;
    padding-block: 1.2rem;
    border-block-start: 1px solid var(--line);
}

.why__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: 2.6rem;
    block-size: 2.6rem;
    flex: none;
    border-radius: var(--radius-sm);
    background: var(--gradient-soft);
    border: 1px solid var(--line);
    color: var(--teal);
}

.why__title {
    font-size: 1.05rem;
    margin-block-end: 0.35rem;
}

.why__body {
    color: var(--muted);
    font-size: 0.92rem;
}

/* Between the nav collapse (1380) and truly wide screens, the grown-up brand
   tagline is the one thing that no longer fits next to six links — drop it. */
@media (min-width: 1380px) and (max-width: 1439px) {
    .brand__tagline {
        display: none;
    }
}

/* ------------------------------------------------------------- stories --- */
.story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
    gap: 1.1rem;
}

.story {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.6rem 1.5rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    transition: border-color 0.2s var(--ease);
}

.story:hover {
    border-color: var(--line-strong);
}

.story__tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    align-self: start;
    padding: 0.35rem 0.8rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--bg-raised);
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 600;
}

.story__tag-icon {
    display: inline-flex;
    color: var(--teal);
}

.story__tag-icon svg.icon {
    width: 1rem;
    height: 1rem;
}

.story__quote {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.12rem;
    font-weight: 600;
    line-height: 1.45;
    text-wrap: balance;
}

.story__built {
    color: var(--text-soft);
    font-size: 0.92rem;
}

.story__built-label {
    display: block;
    margin-block-end: 0.3rem;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--teal);
}

[dir="rtl"] .story__built-label {
    letter-spacing: 0;
    text-transform: none;
    font-size: 0.85rem;
}

.story__results {
    display: grid;
    gap: 0.5rem;
    margin-block-start: auto;
    padding-block-start: 1rem;
    border-block-start: 1px solid var(--line);
}

.story__result {
    display: flex;
    gap: 0.55rem;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.story__result-icon {
    display: inline-flex;
    flex: none;
    margin-block-start: 0.15rem;
    color: var(--teal);
}

.story__result-icon svg.icon {
    width: 1rem;
    height: 1rem;
}

/* ----------------------------------------------------------------- faq --- */
.faq-list {
    display: grid;
    gap: 0.75rem;
}

.faq {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease);
}

.faq[open] {
    border-color: var(--line-strong);
    background: var(--surface-hover);
}

.faq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.15rem 1.4rem;
    cursor: pointer;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.02rem;
    list-style: none;
}

.faq__question::-webkit-details-marker {
    display: none;
}

.faq__sign {
    position: relative;
    inline-size: 1.1rem;
    block-size: 1.1rem;
    flex: none;
}

.faq__sign::before,
.faq__sign::after {
    content: "";
    position: absolute;
    inset-block-start: 50%;
    inset-inline-start: 0;
    inline-size: 100%;
    block-size: 2px;
    border-radius: 2px;
    background: var(--teal);
    transform: translateY(-50%);
    transition: transform 0.22s var(--ease), opacity 0.22s var(--ease);
}

.faq__sign::after {
    transform: translateY(-50%) rotate(90deg);
}

.faq[open] .faq__sign::after {
    transform: translateY(-50%) rotate(0deg);
    opacity: 0;
}

.faq__answer {
    padding: 0 1.4rem 1.35rem;
    color: var(--text-soft);
    font-size: 0.95rem;
    max-width: 68ch;
}

/* ------------------------------------------------------------- contact --- */
.contact {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: clamp(2rem, 5vw, 4rem);
    align-items: start;
}

.contact__direct {
    margin-block-start: 2.5rem;
}

.contact__direct-title {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
    margin-block-end: 1rem;
}

[dir="rtl"] .contact__direct-title {
    letter-spacing: 0;
    text-transform: none;
    font-size: 0.92rem;
}

.contact__channels {
    display: grid;
    gap: 0.6rem;
}

.channel {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 0.9rem 1.1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--surface);
    transition: border-color 0.2s var(--ease), background-color 0.2s var(--ease), transform 0.2s var(--ease);
}

.channel:hover {
    border-color: var(--line-strong);
    background: var(--surface-hover);
    transform: translateY(-2px);
}

/* The location row is information, not a link — no lift, no hover promise. */
.channel--static {
    margin: 0;
}

.channel--static:hover {
    border-color: var(--line);
    background: var(--surface);
    transform: none;
}

.channel__icon {
    display: inline-flex;
    color: var(--teal);
}

.channel__label {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
}

.channel__value {
    display: block;
    font-size: 0.85rem;
    color: var(--muted);
}

.contact__panel {
    padding: clamp(1.5rem, 3vw, 2.25rem);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: rgba(11, 15, 26, 0.75);
    box-shadow: 0 40px 80px -50px rgba(0, 0, 0, 0.9);
}

.form__row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr));
    gap: 1rem;
}

.form__banner {
    padding: 0.85rem 1.1rem;
    margin-block-end: 1.25rem;
    border: 1px solid var(--danger-border);
    border-radius: var(--radius-sm);
    background: var(--danger-bg);
    color: var(--danger-text);
    font-size: 0.92rem;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-block-end: 1rem;
}

.field__label {
    display: flex;
    align-items: baseline;
    gap: 0.45rem;
    font-size: 0.87rem;
    font-weight: 600;
    color: var(--text-soft);
}

.field__optional {
    font-weight: 400;
    font-size: 0.78rem;
    color: var(--muted);
}

.field__input {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    font-family: inherit;
    font-size: 0.97rem;
    transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.field__input::placeholder {
    color: rgba(133, 147, 171, 0.75);
}

.field__input:hover {
    border-color: var(--line-strong);
}

.field__input:focus {
    outline: none;
    border-color: rgba(44, 224, 176, 0.7);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 0 3px rgba(44, 224, 176, 0.14);
}

.field__textarea {
    resize: vertical;
    min-height: 8rem;
    line-height: 1.6;
}

.field__select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238593ab' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9.5 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-size: 1.05rem;
    background-position: right 1rem center;
    padding-inline-end: 2.75rem;
}

[dir="rtl"] .field__select {
    background-position: left 1rem center;
}

.field__select option {
    background: var(--bg-raised);
    color: var(--text);
}

.field__error {
    font-size: 0.82rem;
    color: var(--danger-text);
    min-height: 0;
}

.field__error:empty {
    display: none;
}

/* Off-screen but still focusable-by-bots; never shown to a person. */
.form__trap {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.form__note {
    margin-block-start: 1rem;
    font-size: 0.82rem;
    color: var(--muted);
    text-align: center;
}

.form.is-submitting .btn--primary {
    opacity: 0.65;
    pointer-events: none;
}

.thanks {
    text-align: center;
    padding-block: 1.5rem;
}

.thanks__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: 3.4rem;
    block-size: 3.4rem;
    border-radius: 50%;
    background: var(--gradient);
    color: var(--ink);
    margin-block-end: 1.25rem;
}

.thanks__icon svg {
    width: 1.6rem;
    height: 1.6rem;
    stroke-width: 2.6;
}

.thanks__title {
    font-size: 1.5rem;
    margin-block-end: 0.7rem;
}

.thanks__body {
    color: var(--text-soft);
    max-width: 40ch;
    margin-inline: auto;
    margin-block-end: 1.75rem;
}

/* -------------------------------------------------------------- footer --- */
.site-footer {
    border-block-start: 1px solid var(--line);
    background: rgba(6, 9, 15, 0.6);
    padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
}

.site-footer__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
    gap: 2.5rem;
}

.site-footer__blurb {
    margin-block-start: 1.25rem;
    color: var(--muted);
    font-size: 0.92rem;
    max-width: 42ch;
}

.brand--footer .brand__mark {
    width: 44px;
    height: 44px;
}

.social {
    display: flex;
    gap: 0.6rem;
    margin-block-start: 1.35rem;
}

.social__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: 2.4rem;
    block-size: 2.4rem;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--text-soft);
    transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.social__link:hover {
    color: var(--teal);
    border-color: var(--line-strong);
}

.site-footer__title {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text);
    margin-block-end: 1.1rem;
}

[dir="rtl"] .site-footer__title {
    letter-spacing: 0;
    text-transform: none;
    font-size: 0.95rem;
}

.site-footer__list {
    display: grid;
    gap: 0.6rem;
    font-size: 0.92rem;
}

.site-footer__list a {
    color: var(--muted);
    transition: color 0.18s var(--ease);
}

.site-footer__list a:hover,
.site-footer__list a.is-active {
    color: var(--text);
}

.site-footer__bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-block-start: clamp(2.5rem, 5vw, 3.5rem);
    padding-block-start: 1.5rem;
    border-block-start: 1px solid var(--line);
    font-size: 0.87rem;
    color: var(--muted);
}

.made-by__link {
    font-weight: 700;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.made-by__link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
    text-decoration-color: var(--teal);
}

/* ---------------------------------------------------------- error page --- */
.error-page {
    text-align: center;
    padding-block: clamp(3rem, 8vw, 6rem);
}

.error-page .section__lead {
    margin-inline: auto;
    margin-block-end: 2rem;
    max-width: 46ch;
}

.error-page__id {
    margin-block-start: 2rem;
    font-size: 0.82rem;
    color: var(--muted);
}

/* ------------------------------------------------------------- reveals --- */
.js [data-reveal] {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.js [data-reveal].is-revealed {
    opacity: 1;
    transform: none;
}

/* ---------------------------------------------------------- responsive --- */
@media (max-width: 1023px) {
    .hero__inner {
        grid-template-columns: 1fr;
    }

    .hero__visual {
        order: -1;
    }

    .hero__orb {
        inline-size: min(100%, 17rem);
    }

    .contact {
        grid-template-columns: 1fr;
    }

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

/* The full nav needs room for six links, the language pill and the CTA on one line.
   Below that it collapses — earlier than the usual tablet breakpoint, on purpose.
   Keep in step with the matching 1380px matchMedia in site.js. */
@media (max-width: 1379px) {
    .nav-toggle {
        display: inline-flex;
    }

    .site-nav {
        position: fixed;
        inset: var(--header-height) 0 auto 0;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 1.5rem;
        padding: 1.5rem var(--gutter) 2.25rem;
        /* Fully opaque on purpose: at 98% the hero's bright orb and eyebrow
           bled through legibly wherever backdrop-filter doesn't render. */
        background: var(--bg);
        border-block-end: 1px solid var(--line);
        transform: translateY(-12px);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.22s var(--ease), transform 0.22s var(--ease), visibility 0.22s;
    }

    .site-nav.is-open {
        opacity: 1;
        visibility: visible;
        transform: none;
    }

    .site-nav__list {
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
    }

    .site-nav__link {
        display: block;
        padding: 0.75rem 0;
        font-size: 1.05rem;
        border-block-end: 1px solid var(--line);
    }

    .site-nav__link::after {
        display: none;
    }

    .site-nav__actions {
        justify-content: space-between;
        flex-wrap: wrap;
    }

    /* The CTA label outgrew a shared row with the language pill on narrow
       phones; as its own full-width row it reads like a proper menu action. */
    .site-nav__actions .btn {
        flex: 1 1 100%;
    }
}

@media (max-width: 599px) {
    .site-footer__grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .statement {
        text-align: start;
    }

    .btn--lg {
        width: 100%;
    }

    .brand__tagline {
        display: none;
    }

    /* Keep the headline above the fold on a phone rather than the logo. */
    .hero__orb {
        inline-size: min(72%, 13rem);
    }
}

@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;
    }

    .js [data-reveal] {
        opacity: 1;
        transform: none;
    }
}

/* ============================================================== chat ===== */
/* A floating widget shown on every page. Scriptless browsers never see it — it
   is revealed only once <html> carries the `js` class. Logical properties keep
   it mirrored for Arabic without a second rule set. */
.chat {
    display: none;
}

.js .chat {
    display: block;
}

.chat__launcher {
    position: fixed;
    inset-block-end: clamp(1rem, 3vw, 1.75rem);
    inset-inline-end: clamp(1rem, 3vw, 1.75rem);
    z-index: 300;
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 1.15rem 0.7rem 0.95rem;
    border: 0;
    border-radius: 999px;
    background: var(--gradient);
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 16px 38px -14px rgba(44, 224, 176, 0.8);
    transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.chat__launcher:hover {
    transform: translateY(-2px);
    box-shadow: 0 22px 46px -14px rgba(44, 224, 176, 0.9);
}

.chat__launcher svg {
    width: 1.35rem;
    height: 1.35rem;
}

.chat__launcher-icon--close {
    display: none;
}

.chat.is-open .chat__launcher-icon--open {
    display: none;
}

.chat.is-open .chat__launcher-icon--close {
    display: inline-flex;
}

/* On a phone the open widget owns the screen, so the launcher just gets out of the way. */
.chat.is-open .chat__launcher-label {
    display: none;
}

.chat__panel {
    position: fixed;
    inset-block-end: calc(clamp(1rem, 3vw, 1.75rem) + 3.6rem);
    inset-inline-end: clamp(1rem, 3vw, 1.75rem);
    z-index: 300;
    display: flex;
    flex-direction: column;
    inline-size: min(24rem, calc(100vw - 2rem));
    max-block-size: min(34rem, calc(100vh - 6rem));
    background: var(--bg-raised);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-lg);
    box-shadow: 0 32px 80px -30px rgba(0, 0, 0, 0.85);
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    transform: translateY(14px) scale(0.98);
    transform-origin: bottom right;
    transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s var(--ease);
}

[dir="rtl"] .chat__panel {
    transform-origin: bottom left;
}

.chat.is-open .chat__panel {
    visibility: visible;
    opacity: 1;
    transform: none;
}

.chat__header {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.9rem 1rem;
    background: var(--gradient-soft);
    border-block-end: 1px solid var(--line);
}

.chat__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: 2.4rem;
    block-size: 2.4rem;
    flex: none;
    border-radius: 50%;
    background: var(--gradient);
    color: var(--ink);
}

.chat__avatar svg {
    width: 1.3rem;
    height: 1.3rem;
}

.chat__heading {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    margin-inline-end: auto;
}

.chat__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
}

.chat__subtitle {
    font-size: 0.8rem;
    color: var(--muted);
}

.chat__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: 2.75rem;
    block-size: 2.75rem;
    flex: none;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--text-soft);
    cursor: pointer;
    transition: background-color 0.18s var(--ease), color 0.18s var(--ease);
}

.chat__close:hover {
    background: var(--surface-hover);
    color: var(--text);
}

/* ---- intake ---- */
.chat__intake {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1.15rem 1.1rem 1.3rem;
    overflow-y: auto;
}

.chat__intro {
    color: var(--text-soft);
    font-size: 0.92rem;
    line-height: 1.55;
}

.chat__field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.chat__label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-soft);
}

.chat__input {
    inline-size: 100%;
    padding: 0.7rem 0.85rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--text);
    font: inherit;
    transition: border-color 0.18s var(--ease), background-color 0.18s var(--ease);
}

.chat__input:focus {
    outline: none;
    border-color: var(--teal);
    background: var(--surface-hover);
    box-shadow: 0 0 0 3px rgba(44, 224, 176, 0.14);
}

.chat__note {
    font-size: 0.78rem;
    color: var(--muted);
    text-align: center;
}

.chat__error {
    margin: 0;
    padding: 0.6rem 0.75rem;
    background: var(--danger-bg);
    border: 1px solid var(--danger-border);
    border-radius: var(--radius-sm);
    color: var(--danger-text);
    font-size: 0.85rem;
}

/* ---- thread ---- */
.chat__thread {
    display: flex;
    flex-direction: column;
    min-block-size: 0;
    flex: 1;
}

.chat__messages {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 1.1rem 1rem;
    overflow-y: auto;
    flex: 1;
}

.chat__bubble {
    max-inline-size: 82%;
    padding: 0.6rem 0.85rem;
    border-radius: var(--radius);
    font-size: 0.92rem;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.chat__bubble--visitor {
    align-self: flex-end;
    background: var(--gradient);
    color: var(--ink);
    border-end-end-radius: 6px;
}

.chat__bubble--agent,
.chat__bubble--system {
    align-self: flex-start;
    background: var(--surface-hover);
    border: 1px solid var(--line);
    color: var(--text);
    border-end-start-radius: 6px;
}

.chat__bubble--system {
    color: var(--text-soft);
}

.chat__composer {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    padding: 0.75rem;
    border-block-start: 1px solid var(--line);
    background: var(--bg);
}

.chat__composer-input {
    flex: 1;
    resize: none;
    max-block-size: 7rem;
    padding: 0.6rem 0.8rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    color: var(--text);
    font: inherit;
    line-height: 1.45;
}

.chat__composer-input:focus {
    outline: none;
    border-color: var(--teal);
    background: var(--surface-hover);
    box-shadow: 0 0 0 3px rgba(44, 224, 176, 0.14);
}

.chat__send {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    inline-size: 2.6rem;
    block-size: 2.6rem;
    flex: none;
    border: 0;
    border-radius: 50%;
    background: var(--gradient);
    color: var(--ink);
    cursor: pointer;
    transition: transform 0.18s var(--ease), opacity 0.18s var(--ease);
}

.chat__send:hover {
    transform: translateY(-1px);
}

.chat__send:disabled {
    opacity: 0.5;
    cursor: default;
    transform: none;
}

[dir="rtl"] .chat__send svg {
    transform: scaleX(-1);
}

.chat.is-busy .chat__send,
.chat.is-busy [data-chat-submit] {
    opacity: 0.6;
    pointer-events: none;
}

/* A phone gets the panel as a near-sheet so the keyboard has room. */
@media (max-width: 30rem) {
    .chat__panel {
        inset: auto 0.5rem calc(clamp(1rem, 3vw, 1.75rem) + 3.6rem) 0.5rem;
        inline-size: auto;
        max-block-size: min(32rem, calc(100vh - 5.5rem));
    }
}
