/* GENERATED from nx-case-study.css by scripts/i18n/rtl.mjs — do not edit */
/* ==========================================================================
   nx-case-study.css — top-tier case studies (/portfolio/<slug> with a 'case'
   array in _projects-data.php; body from includes/portfolio/case-study.php).
   Loaded only on those pages, on top of the inline .nx-cs styles in
   pages/portfolio/_detail.php. Uses the page's --tint.
   Rules kept: no global border-box (scoped below), full neutral hairlines
   only (no coloured edge strokes, TKT-0009), overflow-x: clip, not hidden.
   ========================================================================== */

.nx-csx { overflow-x: clip; }
.nx-csx, .nx-csx * { box-sizing: border-box; }

/* ── Hero additions (outcome headline + meta line) ───────────────────────── */
.nx-cs-outcome {
    margin: 20px 0 0; max-width: 34ch;
    font-family: var(--nx-font-display); font-weight: 500;
    font-size: clamp(1.15rem, 2.1vw, 1.7rem); line-height: 1.3; letter-spacing: -.012em;
    color: rgba(255,255,255,.9); text-wrap: balance;
}
.nx-cs-meta {
    display: flex; flex-wrap: wrap; gap: 6px 0; margin: 18px 0 0; padding: 0; list-style: none;
    font-family: var(--nx-font-mono); font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.72);
}
.nx-cs-meta li { display: inline-flex; align-items: center; }
.nx-cs-meta li + li::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--tint); margin: 0 12px; }
/* Case heroes put text over a real screenshot: a stronger, left-weighted veil
   keeps the outcome headline readable on light screenshots. */
.nx-cs-hero.nx-cs-hero--case.has-img::after {
    background:
        linear-gradient(-90deg, rgba(0,0,0,.86) 0%, rgba(0,0,0,.62) 46%, rgba(0,0,0,.30) 100%),
        linear-gradient(-180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.10) 40%, rgba(0,0,0,.82) 100%);
}
@media (max-width: 760px) {
    .nx-cs-hero.nx-cs-hero--case.has-img::after {
        background: linear-gradient(-180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.62) 35%, rgba(0,0,0,.90) 70%, rgba(0,0,0,.95) 100%);
    }
}
.nx-cs-hero .nx-cs-logo--icon { height: clamp(44px, 6.4vh, 64px); border-radius: 14px; }
.nx-cs-hero--case .nx-cs-crumb { margin-top: 22px; }

@media (max-height: 760px) and (min-width: 761px) {
    .nx-cs-hero--case .nx-cs-title { font-size: clamp(2.4rem, 5.6vw, 4.4rem); }
    .nx-cs-hero--case .nx-cs-logo { margin-bottom: 16px; }
    .nx-cs-hero--case .nx-cs-eyebrow { margin-bottom: 12px; }
}
@media (max-width: 420px) {
    .nx-cs-meta { font-size: 10.5px; letter-spacing: .08em; }
    .nx-cs-meta li + li::before { margin: 0 8px; }
}

/* ── Shared section bits ─────────────────────────────────────────────────── */
.nx-csx-wrap { max-width: 1180px; margin-inline: auto; padding-inline: clamp(20px, 5vw, 64px); }
.nx-csx-sec { padding: clamp(56px, 8vw, 112px) 0 0; }
.nx-csx-eyebrow {
    display: flex; align-items: center; gap: 12px; margin: 0 0 16px;
    font-family: var(--nx-font-mono); font-size: 12px; letter-spacing: .22em; text-transform: uppercase; color: var(--nx-color-text-muted);
}
.nx-csx-eyebrow span { color: var(--tint); }
.nx-csx-h2 {
    font-family: var(--nx-font-display); font-weight: 600; color: var(--nx-color-text);
    font-size: clamp(1.7rem, 3.4vw, 2.7rem); line-height: 1.08; letter-spacing: -.03em;
    margin: 0; text-wrap: balance; max-width: 22ch;
}
.nx-csx-head { margin: 0 0 clamp(26px, 4vw, 44px); }
.nx-csx p { color: var(--nx-color-text-muted); line-height: 1.75; font-size: 1.06rem; margin: 0 0 16px; }

/* Challenge / approach: heading left, story right */
.nx-csx-split {
    display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(22px, 5vw, 80px);
    padding-top: clamp(30px, 4vw, 44px); border-top: 1px solid var(--nx-color-line);
}
.nx-csx-split__body p:last-child { margin-bottom: 0; }
.nx-csx-split__body p:first-child { color: var(--nx-color-text); font-size: clamp(1.1rem, 1.6vw, 1.24rem); line-height: 1.6; }
@media (max-width: 860px) { .nx-csx-split { grid-template-columns: minmax(0, 1fr); } }

/* What we built */
.nx-csx-built { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 1.6vw, 20px); }
@media (max-width: 1020px) { .nx-csx-built { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .nx-csx-built { grid-template-columns: minmax(0, 1fr); } }
.nx-csx-built__item {
    min-width: 0; padding: clamp(20px, 2.2vw, 28px); border-radius: 16px;
    border: 1px solid var(--nx-color-line); background: var(--nx-color-surface);
    transition: background .35s ease, transform .35s var(--nx-ease-out, ease);
}
.nx-csx-built__item:hover { background: var(--nx-color-surface-2, #121316); transform: translateY(-3px); }
.nx-csx-built__item h3 { font-family: var(--nx-font-display); font-weight: 600; font-size: 1.12rem; line-height: 1.25; color: var(--nx-color-text); margin: 0 0 10px; }
.nx-csx-built__item p { font-size: .97rem; line-height: 1.6; margin: 0; }

/* Highlights (real screenshots) */
.nx-csx-shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 1.8vw, 24px); }
.nx-csx-shot { margin: 0; min-width: 0; }
.nx-csx-shot--wide { grid-column: 1 / -1; }
.nx-csx-shot__frame {
    overflow: hidden; border-radius: clamp(12px, 1.6vw, 18px);
    border: 1px solid var(--nx-color-line); background: var(--nx-color-surface-2, #121316);
    box-shadow: 0 30px 80px -30px rgba(0,0,0,.8);
}
.nx-csx-shot__frame img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; transition: transform .7s var(--nx-ease-out, ease); }
.nx-csx-shot:hover .nx-csx-shot__frame img { transform: scale(1.025); }
.nx-csx-shot figcaption { margin: 12px 2px 0; font-size: .92rem; line-height: 1.5; color: var(--nx-color-text-muted); }
@media (max-width: 700px) { .nx-csx-shots { grid-template-columns: minmax(0, 1fr); } }

/* Lead screenshot (no film): opens the story right after the lede */
.nx-csx-lead { margin-top: clamp(36px, 5vw, 72px); margin-bottom: 0; }
.nx-csx-lead .nx-csx-shot__frame img { aspect-ratio: 16 / 9; }
.nx-csx-lead figcaption { margin: 12px 2px 0; font-size: .92rem; line-height: 1.5; color: var(--nx-color-text-muted); text-align: center; }

/* Results */
.nx-csx-results__grid {
    list-style: none; margin: 0; padding: 0;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: clamp(12px, 1.6vw, 20px);
}
.nx-csx-result {
    display: flex; flex-direction: column; gap: 12px; min-width: 0;
    padding: clamp(22px, 2.6vw, 32px); border-radius: 18px; border: 1px solid var(--nx-color-line);
    background:
        radial-gradient(90% 80% at 0% 0%, color-mix(in srgb, var(--tint) 13%, transparent), transparent 70%),
        var(--nx-color-surface);
}
.nx-csx-result__v {
    font-family: var(--nx-font-display); font-weight: 700; color: var(--nx-color-text);
    font-size: clamp(1.9rem, 3.4vw, 2.8rem); line-height: 1; letter-spacing: -.035em; overflow-wrap: anywhere;
}
.nx-csx-result__l { color: var(--nx-color-text-muted); font-size: .98rem; line-height: 1.55; }
.nx-csx-status {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: clamp(22px, 3vw, 32px) 0 0 !important;
    font-size: 1rem !important; color: var(--nx-color-text) !important;
}
.nx-csx-status__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--tint); box-shadow: 0 0 12px var(--tint); flex: 0 0 auto; }
.nx-csx-status a { color: var(--nx-color-text); text-decoration: underline; text-decoration-color: var(--tint); text-underline-offset: 4px; overflow-wrap: anywhere; }

.nx-csx-stack { margin: clamp(28px, 4vw, 44px) 0 0; }
.nx-csx-stack__k { font-family: var(--nx-font-mono); font-size: 11px !important; letter-spacing: .2em; text-transform: uppercase; margin: 0 0 12px !important; }
.nx-csx-stack ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.nx-csx-stack li {
    padding: 8px 14px; border-radius: 999px; border: 1px solid var(--nx-color-line);
    font-family: var(--nx-font-mono); font-size: 12px; letter-spacing: .06em; color: var(--nx-color-text-muted);
}

/* Client quote (renders only when approved) — no coloured rule */
.nx-csx-quote__fig { margin: 0 auto; text-align: center; }
.nx-csx-quote blockquote { margin: 0; }
.nx-csx-quote blockquote p {
    max-width: 30ch; margin: 0 auto !important;
    font-family: var(--nx-font-serif); font-style: italic; font-weight: 400;
    font-size: clamp(1.5rem, 3.2vw, 2.5rem) !important; line-height: 1.32 !important; color: var(--nx-color-text) !important;
}
.nx-csx-quote blockquote p::before { content: "\201C"; }
.nx-csx-quote blockquote p::after { content: "\201D"; }
.nx-csx-quote figcaption { margin-top: 22px; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.nx-csx-quote figcaption strong { color: var(--nx-color-text); font-weight: 600; }
.nx-csx-quote figcaption span { font-family: var(--nx-font-mono); font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--nx-color-text-muted); }

@media (prefers-reduced-motion: reduce) {
    .nx-csx-built__item, .nx-csx-shot__frame img { transition: none; }
    .nx-csx-built__item:hover, .nx-csx-shot:hover .nx-csx-shot__frame img { transform: none; }
}

/* ── Flagship hero on tablets and phones (Elite Motors): the device stage sits
   under the text, so it is sized from the space left in the first screen
   (hero fits one screen, Tarek 2026-11-17). --fs-text = text block + paddings. */
@media (max-width: 900px) {
    .nx-cs-hero--flagship.nx-cs-hero--case { --fs-text: 600px; padding-top: clamp(96px, 12vh, 120px); gap: 20px; }
    .nx-cs-hero--flagship.nx-cs-hero--case .nx-fs-stage {
        width: min(100%, max(150px, calc((100svh - var(--fs-text)) * 16 / 13)));
        justify-self: center;
    }
}
@media (max-width: 600px) {
    .nx-cs-hero--flagship.nx-cs-hero--case { --fs-text: 465px; padding-bottom: 28px; }
    .nx-cs-hero--flagship.nx-cs-hero--case .nx-cs-crumb { display: none; }
    .nx-cs-hero--flagship.nx-cs-hero--case .nx-cs-flag { margin-bottom: 14px; }
    .nx-cs-hero--flagship.nx-cs-hero--case .nx-cs-logo { height: 36px; margin-bottom: 14px; }
    .nx-cs-hero--flagship.nx-cs-hero--case .nx-cs-title { font-size: clamp(2.3rem, 11vw, 2.9rem); }
    .nx-cs-hero--flagship.nx-cs-hero--case .nx-cs-outcome { font-size: 1.08rem; margin-top: 14px; }
    .nx-cs-hero--flagship.nx-cs-hero--case .nx-cs-meta { margin-top: 12px; }
}
@media (max-width: 600px) and (max-height: 700px) {
    .nx-cs-hero--flagship.nx-cs-hero--case .nx-cs-flag { display: none; }
    .nx-cs-hero--flagship.nx-cs-hero--case { --fs-text: 425px; }
}
