/* =========================================================
   DESIGN TOKENS (from Figma Platform24)
   ========================================================= */
:root {
    color-scheme: dark;
    --bg: #0D0D0D;
    --bg-lifted: #1B1D22;
    --bg-medium: #282A31;
    --bg-card: #1A1D22;
    --bg-overlay: rgba(13, 13, 13, 0.95);

    --gold: #C9A84C;
    --gold-light: #E4CA7A;
    --gold-dark: #75603E;
    --gold-brown: #231F18;

    --gradient-gold: linear-gradient(90deg, #FFEE9F 0%, #E1B047 100%);
    --gradient-gold-radial: radial-gradient(circle at 97% 100%, #FFEE9F 22%, #E1B047 48%, #D5AB60 100%);
    --gradient-hero-bg: linear-gradient(135deg, #2A2D35 0%, #1A1D24 100%);

    --text: #FFFFFF;
    --text-muted: #96A1BF;
    --text-dim: #4E4A44;

    --border: rgba(255, 255, 255, 0.06);
    --border-gold: rgba(201, 168, 76, 0.3);
    --border-card: #2A2E38;
    --border-arch: #414652;
    --color-white-6: #FFFFFF0F;

    --r-xs: 4px;
    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 16px;
    --r-xl: 24px;
    --r-round: 999px;

    --s-1: 8px;
    --s-2: 16px;
    --s-3: 18px;
    --s-4: 32px;
    --s-5: 48px;
    --s-6: 80px;
    --s-7: 128px;

    --container-max: 1280px;
    --container-pad: 80px;
    --nav-height: 72px;

    --shadow-card: 0 4px 6px -4px rgba(0,0,0,0.2), 0 10px 15px -3px rgba(0,0,0,0.25);
    --shadow-gold: 0 8px 24px rgba(225, 176, 71, 0.25);
}

/* =========================================================
   RESET & BASE
   ========================================================= */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: 'Inter', 'IBM Plex Sans Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 32px;
    letter-spacing: 0;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* =========================================================
   LAYOUT PRIMITIVES
   ========================================================= */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-pad);
}

section {
    padding: var(--s-6) 0;
    position: relative;
}

/* =========================================================
   TYPOGRAPHY
   ========================================================= */
.eyebrow {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: var(--s-2);
}

.section-title {
    font-family: 'Inter', sans-serif;
    font-size: clamp(32px, 4.5vw, 50px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.37px;
    color: var(--text);
    margin-bottom: var(--s-3);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    height: 3px;
    width: 80px;
    background: var(--gradient-gold);
    border-radius: var(--r-xs);
    margin-top: var(--s-2);
}


.section-sub {
    font-size: 20px;
    font-weight: 400;
    line-height: 32px;
    letter-spacing: 0;
    color: var(--text-muted);
    max-width: 720px;
    margin-bottom: var(--s-5);
}

.gold-text {
    background: var(--gradient-gold);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn-gold,
.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--s-1);
    padding: 18px 40px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    border-radius: var(--r-md);
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
    white-space: nowrap;
}

.btn-gold {
    background: var(--gradient-gold-radial);
    color: #1A1A1A;
    font-weight: 700;
    border: none;
    box-shadow: 0 4px 14px rgba(225, 176, 71, 0.2);
}

.btn-gold.with-arrow::after {
    content: '→';
    margin-left: 6px;
    font-weight: 600;
}

.btn-gold:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-gold);
}

.btn-outline {
    background: #2E313A;
    color: var(--text);
    border-color: #414652;
}

.btn-outline:hover {
    border-color: var(--gold);
    background: #363944;
    transform: translateY(-1px);
}

/* Gold-bordered outline — secondary accent variant */
.btn-outline-gold {
    background: transparent;
    color: var(--gold-light);
    border-color: var(--gold);
}

.btn-outline-gold:hover {
    background: rgba(201, 168, 76, 0.08);
    color: var(--gold-light);
    border-color: var(--gold-light);
    transform: translateY(-1px);
}

/* =========================================================
   NAV (HEADER)
   ========================================================= */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: var(--bg-overlay);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-pad);
    height: var(--nav-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-4);
}

.logo {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-img {
    height: 34px;
    width: auto;
    display: block;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--s-4);
    flex: 1;
    justify-content: center;
}

.nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    transition: color .2s ease;
    padding: 8px 0;
}

.nav-links a:hover { color: var(--text); }

.nav-links a.active {
    color: var(--gold);
}

/* Language switcher (EN / AR) */
.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--r-sm);
    padding: 3px;
    flex-shrink: 0;
}
.lang-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 5px 10px;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    border-radius: 6px;
    transition: background .15s ease, color .15s ease;
}
.lang-btn:hover {
    color: var(--text);
}
.lang-btn.is-active {
    background: rgba(212, 165, 58, 0.15);
    color: var(--gold-light);
}

.nav-cta {
    flex-shrink: 0;
    padding: 10px 22px;
    font-size: 14px;
    border-radius: var(--r-sm);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 38px;
    height: 34px;
    padding: 9px 7px;
    border: 1px solid var(--color-white-6);
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--gold);
    border-radius: 1px;
    transition: background .2s ease;
}

.nav-toggle:hover span { background: var(--gold-light); }

/* =========================================================
   MOBILE MENU (drawer)
   ========================================================= */
.mobile-menu {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
}

.mobile-menu.is-open { display: block; }

.mobile-menu-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    animation: modal-fade .2s ease-out;
}

.mobile-menu-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 86%;
    max-width: 380px;
    background: #1B1D22;
    border-left: 1px solid var(--color-white-6);
    padding: 80px 32px 32px;
    overflow-y: auto;
    animation: menu-slide .28s ease-out;
    scrollbar-width: thin;
    scrollbar-color: var(--border-arch) transparent;
}

.mobile-menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 38px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--color-white-6);
    border-radius: 8px;
    background: transparent;
    color: var(--gold);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color .2s ease, border-color .2s ease;
}

.mobile-menu-close:hover {
    color: var(--gold-light);
    border-color: var(--gold);
}

.mobile-menu-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-menu-links li + li {
    border-top: 1px solid var(--color-white-6);
}

.mobile-menu-links a {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 22px 4px;
    font-size: 18px;
    font-weight: 500;
    color: var(--text);
    text-decoration: none;
    transition: color .2s ease;
}

.mobile-menu-links a:hover,
.mobile-menu-links a.active {
    color: var(--gold);
}

.mobile-menu-links a.active .mobile-menu-num {
    color: var(--gold-light);
}

.mobile-menu-num {
    font-size: 12px;
    font-weight: 500;
    color: var(--gold);
    letter-spacing: 0.06em;
    min-width: 20px;
}

@keyframes menu-slide {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

/* =========================================================
   HERO
   ========================================================= */
.hero {
    padding: calc(var(--nav-height) + var(--s-6)) 0 var(--s-6);
    position: relative;
    overflow: hidden;
    background: var(--bg-lifted);
}

.hero-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-pad);
    position: relative;
    z-index: 2;
}

.hero-tagline {
    font-size: clamp(18px, 2vw, 26px);
    font-weight: 400;
    line-height: 1.4;
    color: var(--text);
    margin-bottom: var(--s-3);
}

.hero h1 {
    font-size: clamp(40px, 6.5vw, 80px);
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.03em;
    margin-bottom: 0;
    color: var(--text);
}

.hero h2 {
    font-size: clamp(24px, 3.2vw, 40px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.01em;
    color: var(--text);
    margin-bottom: var(--s-3);
}

.hero-sub {
    font-size: 20px;
    font-weight: 400;
    line-height: 32px;
    letter-spacing: 0;
    color: var(--text-muted);
    max-width: 640px;
    margin-bottom: var(--s-4);
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2);
}

.hero-bg-image {
    position: absolute;
    right: -60px;
    bottom: -35%;
    width: 100%;
    max-width: 1200px;
    opacity: 0.85;
    z-index: 1;
    pointer-events: none;
    user-select: none;
    will-change: transform;
    -webkit-mask-image: linear-gradient(to bottom right, transparent 0%, black 30%);
    mask-image: linear-gradient(to bottom right, transparent 0%, black 30%);
}

/* =========================================================
   ABOUT
   ========================================================= */
.about { background: var(--bg-medium); }

.about-box {
    background: #2E313A;
    border: 1px solid #414652;
    border-radius: var(--r-xl);
    padding: 50px 40px;
    margin: 0 -40px;
}

.about-box .eyebrow { margin-bottom: var(--s-1); }

.about-text p {
    font-size: 20px;
    font-weight: 400;
    line-height: 32px;
    letter-spacing: 0;
    color: var(--text-muted);
    margin-bottom: var(--s-2);
}

.about-text p:last-child { margin-bottom: 0; }

.about-text strong {
    color: var(--text);
    font-weight: 600;
}

/* Accordion inside About */
.accordion {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: var(--s-5);
}

.accordion-item {
    background: #1B1D22;
    border: 1px solid #414652;
    border-radius: 12px;
    scroll-margin-top: calc(var(--nav-height) + 16px);
    overflow: hidden;
    transition: border-color .3s ease, background .3s ease;
}

.accordion-item[data-open] {
    border-color: var(--gold);
    background: #1D1F25;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--s-2);
    width: 100%;
    padding: 24px 28px;
    background: transparent;
    border: none;
    cursor: pointer;
    user-select: none;
    text-align: left;
    transition: background .2s ease;
    font-family: inherit;
}

.accordion-header:hover { background: rgba(201, 168, 76, 0.04); }

.accordion-header:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: -2px;
}

.accordion-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
    transition: color .2s ease;
}

.accordion-item[data-open] .accordion-title { color: var(--gold-light); }

.accordion-icon {
    position: relative;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border: 1px solid var(--color-white-6);
    border-radius: 50%;
    transition: background .3s ease, border-color .3s ease;
}

.accordion-item[data-open] .accordion-icon {
    background: var(--gradient-gold-radial);
    border-color: transparent;
}

.accordion-icon::before,
.accordion-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    background: var(--gold);
    border-radius: 1px;
    transition: transform .3s cubic-bezier(0.4, 0, 0.2, 1), opacity .3s ease, background .3s ease;
}

.accordion-icon::before {
    width: 12px;
    height: 2px;
    margin: -1px 0 0 -6px;
}

.accordion-icon::after {
    width: 2px;
    height: 12px;
    margin: -6px 0 0 -1px;
}

.accordion-item[data-open] .accordion-icon::before,
.accordion-item[data-open] .accordion-icon::after {
    background: #1A1A1A;
}

.accordion-item[data-open] .accordion-icon::after {
    transform: rotate(90deg);
    opacity: 0;
}

/* Smooth height animation via grid-template-rows trick */
.accordion-body-wrap {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .4s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-item[data-open] .accordion-body-wrap {
    grid-template-rows: 1fr;
}

.accordion-body {
    overflow: hidden;
    min-height: 0;
}

.accordion-body > p,
.accordion-body > div {
    padding: 0 28px;
    font-size: 16px;
    line-height: 26px;
    color: var(--text-muted);
}

.accordion-body > p:first-child { padding-top: 4px; }
.accordion-body > p:last-child { padding-bottom: 24px; }
.accordion-body p + p { margin-top: var(--s-2); }

.accordion-image {
    display: block;
    width: 100%;
    height: auto;
    margin: var(--s-3) 28px 24px;
    max-width: calc(100% - 56px);
    border-radius: 10px;
}

/* =========================================================
   ARCHITECTURE DIAGRAM (accordion)
   Inline SVG schema with 4 flow tabs (All / Decentralised /
   Centralised / Integrated). Each node and arrow carries a
   data-flow attribute listing flows it belongs to; CSS dims
   non-matching elements when a specific tab is active.
   ========================================================= */
.arch-diagram {
    margin: var(--s-3) 28px 24px;
    max-width: calc(100% - 56px);
}

/* Browser-style tab strip — active tab merges into panel below */
.arch-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-bottom: -1px;        /* overlap panel's top border */
    position: relative;
    z-index: 1;
}

.arch-tab {
    background: rgba(20, 24, 33, 0.6);
    border: 1px solid var(--gold);
    border-bottom-color: transparent;
    border-radius: 8px 8px 0 0;
    color: var(--text-muted);
    padding: 11px 22px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    font-family: inherit;
    margin-inline-end: -1px;     /* overlap neighbour's side border (LTR & RTL) */
    position: relative;
    transition: background .15s ease, color .15s ease;
}
.arch-tab:hover {
    background: rgba(40, 46, 56, 0.85);
    color: var(--text);
}
.arch-tab.is-active {
    background: #0c0e14;          /* same as panel — visually merges */
    color: var(--gold-light);
    z-index: 2;
}
/* Active tab covers the 1px panel border underneath via the overlap */
.arch-tab.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: #0c0e14;
}

/* Content panel — holds SVG + legend.
   Border is a vertical gradient: solid gold at the top (so it joins
   the tab strip cleanly) and fades to muted on the way down. */
.arch-panel {
    background:
        linear-gradient(#0c0e14, #0c0e14) padding-box,
        linear-gradient(180deg, var(--gold) 0%, var(--gold) 3%, rgba(201, 168, 76, 0.3) 12%, #2b2925 30%) border-box;
    border: 1px solid transparent;
    border-radius: 0 8px 8px 8px;
    padding: 20px;
    position: relative;
}

.arch-svg {
    display: block;
    width: 100%;
    height: auto;
    font-family: 'Inter', sans-serif;
}

/* Section header chevrons */
.arch-chevron {
    fill: rgba(249, 225, 140, 0.04);
    stroke: var(--gold-dark);
    stroke-width: 1;
}
.arch-chevron-title {
    font-size: 18px;
    font-weight: 600;
    fill: var(--gold-light);
    text-anchor: middle;
}
.arch-chevron-subtitle {
    font-size: 14px;
    fill: #a89a72;
    text-anchor: middle;
}

/* Vertical dashed dividers between sections */
.arch-separator {
    stroke: #75603e;
    stroke-width: 1;
    stroke-dasharray: 4 5;
    opacity: 0.6;
}

/* Node boxes — fill + stroke per tier (so banks vs exchanges read
   distinctly without relying on flow color) */
.arch-box {
    stroke-width: 1;
    transition: opacity .25s ease;
}
/* Tier palette — picked to harmonize with the Lifecycle diagram:
   bank uses the lifecycle "visited" blue, murabex the lifecycle "current"
   gold. Ledger and exchanges sit between them. */
.arch-box[data-tier="bank"]      { fill: rgba(74, 123, 255, 0.80);  stroke: #4A7BFF; }
.arch-box[data-tier="murabex"]   { fill: rgba(225, 176, 71, 0.95);  stroke: #E1B047; }
.arch-box[data-tier="ledger"]    { fill: rgba(93, 198, 232, 0.70);  stroke: #5dc6e8; }
.arch-box[data-tier="exchange"]  { fill: rgba(163, 133, 255, 0.70); stroke: #a385ff; }

/* Node text — both lines styled identically (label and sublabel are
   equally weighted in the diagram). White on most tiles, dark on Murabex
   (gold) tiles for contrast. */
.arch-label,
.arch-sublabel {
    font-size: 18px;
    font-weight: 700;
    fill: #ffffff;
    text-anchor: middle;
}
.arch-label-gold,
.arch-node[data-node^="murabex"] .arch-sublabel {
    fill: #1a1a1a;
}

/* Per-flow dimming: when a specific tab is active, fade out anything
   whose data-flow doesn't include that flow. data-flow="all" is on
   every element by default, so the All tab leaves everything visible. */
.arch-node, .arch-arrow {
    transition: opacity .25s ease;
}
.arch-diagram[data-active-flow="decentralised"] .arch-node:not([data-flow~="decentralised"]),
.arch-diagram[data-active-flow="decentralised"] .arch-arrow:not([data-flow~="decentralised"]),
.arch-diagram[data-active-flow="centralised"]  .arch-node:not([data-flow~="centralised"]),
.arch-diagram[data-active-flow="centralised"]  .arch-arrow:not([data-flow~="centralised"]),
.arch-diagram[data-active-flow="integrated"]   .arch-node:not([data-flow~="integrated"]),
.arch-diagram[data-active-flow="integrated"]   .arch-arrow:not([data-flow~="integrated"]) {
    opacity: 0.18;
}

/* Legend */
.arch-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #1f242e;
    font-size: 12px;
    color: var(--text-muted);
}
.arch-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.arch-legend-line {
    display: inline-block;
    width: 28px;
    height: 2px;
    border-radius: 1px;
}
.arch-legend-centralised   { background: #d4a53a; }
.arch-legend-decentralised { background: #5dc6d6; }
.arch-legend-integrated    { background: #a385ff; }

/* Horizontal scroll wrapper — kicks in only when SVG min-width exceeds
   the available width on narrow screens. Tabs/legend stay full-width. */
.arch-svg-scroll {
    overflow-x: auto;
    margin: 0 -4px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-arch) transparent;
}
.arch-svg-scroll::-webkit-scrollbar { height: 6px; }
.arch-svg-scroll::-webkit-scrollbar-thumb {
    background: var(--border-arch);
    border-radius: 3px;
}

@media (max-width: 768px) {
    .arch-diagram {
        margin: var(--s-3) 0 16px;
        max-width: 100%;
    }
    .arch-panel {
        padding: 14px;
    }
    .arch-svg {
        min-width: 720px;
    }
    .arch-tab {
        padding: 8px 14px;
        font-size: 14px;
    }
}

/* =========================================================
   LIFECYCLE
   ========================================================= */
.configuration { background: var(--bg-lifted); }

.lifecycle { background: var(--bg-medium); }

.lifecycle .section-sub { max-width: 100%; }
.configuration .section-sub { max-width: 100%; }

.lifecycle-scroll {
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--border-arch) transparent;
}

.lifecycle-scroll::-webkit-scrollbar {
    height: 8px;
}

.lifecycle-scroll::-webkit-scrollbar-track {
    background: rgba(201, 168, 76, 0.04);
    border-radius: 4px;
}

.lifecycle-scroll::-webkit-scrollbar-thumb {
    background: var(--border-arch);
    border-radius: 4px;
    transition: background .2s ease;
}

.lifecycle-scroll::-webkit-scrollbar-thumb:hover {
    background: var(--gold);
}

.lifecycle-legend {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: var(--s-3);
    padding: 10px 16px;
    background: rgba(201, 168, 76, 0.03);
    border: 1px solid rgba(201, 168, 76, 0.1);
    border-radius: 6px;
}

.lc-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-muted);
}

.lc-legend-box {
    width: 18px;
    height: 12px;
    border-radius: 3px;
    border: 1px solid;
    flex-shrink: 0;
}

.lc-legend-visited {
    background: #1A2048;
    border-color: #4A7BFF;
}

.lc-legend-current {
    background: #E1B047;
    border-color: #E1B047;
}

.lc-legend-pending {
    background: rgba(201, 168, 76, 0.03);
    border-color: rgba(201, 168, 76, 0.15);
}

.lc-legend-line-dashed {
    display: inline-block;
    width: 22px;
    height: 0;
    border-top: 1px dashed #75603E;
    flex-shrink: 0;
}

/* UI preview — collapsible marquee inside lifecycle section */
.ui-preview {
    margin-top: var(--s-4);
}

.ui-preview summary {
    cursor: pointer;
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    color: var(--gold-light);
    font-size: 14px;
    font-weight: 500;
    background: rgba(201, 168, 76, 0.06);
    border: 1px solid rgba(201, 168, 76, 0.25);
    border-radius: var(--r-sm);
    transition: background .2s ease, border-color .2s ease;
}

.ui-preview summary::-webkit-details-marker { display: none; }
.ui-preview summary::marker { content: ""; }

.ui-preview summary::after {
    content: "▾";
    font-size: 11px;
    transition: transform .2s ease;
}

.ui-preview[open] summary::after {
    transform: rotate(180deg);
}

.ui-preview summary:hover {
    background: rgba(201, 168, 76, 0.1);
    border-color: var(--gold);
}

.ui-marquee {
    margin-top: var(--s-3);
    margin-bottom: var(--s-3);
    overflow: hidden;
    position: relative;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 5%, #000 95%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, #000 5%, #000 95%, transparent 100%);
}

.ui-marquee-track {
    display: flex;
    gap: 16px;
    width: max-content;
    animation: ui-marquee-scroll 50s linear infinite;
}

.ui-marquee:hover .ui-marquee-track {
    animation-play-state: paused;
}

@keyframes ui-marquee-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

[dir="rtl"] .ui-marquee-track {
    animation-name: ui-marquee-scroll-rtl;
}

@keyframes ui-marquee-scroll-rtl {
    from { transform: translateX(0); }
    to   { transform: translateX(50%); }
}

.ui-card {
    height: 240px;
    width: auto;
    flex-shrink: 0;
    display: block;
    border-radius: var(--r-md);
    border: 1px solid var(--border-card);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

@media (prefers-reduced-motion: reduce) {
    .ui-marquee-track { animation: none; }
}

@media (max-width: 720px) {
    .ui-card { height: 180px; }
    .ui-marquee-track { animation-duration: 35s; }
}

/* =========================================================
   CAPABILITIES / KEY FEATURES
   ========================================================= */
.features { background: var(--bg); }

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: var(--border-card);
    border: 1px solid var(--border-card);
    border-radius: var(--r-lg);
    overflow: hidden;
}

.f-card {
    background: var(--bg-card);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    transition: background .3s ease, box-shadow .3s ease;
}

.f-card:hover {
    background: #22252C;
    box-shadow: inset 0 0 0 1px var(--gold);
    z-index: 1;
}

/* round outer corners so hover outline follows the container curve (desktop: 3 cols, 12 cards) */
.f-card:first-child { border-top-left-radius: calc(var(--r-lg) - 1px); }
.f-card:nth-child(3) { border-top-right-radius: calc(var(--r-lg) - 1px); }
.f-card:nth-child(10) { border-bottom-left-radius: calc(var(--r-lg) - 1px); }
.f-card:last-child { border-bottom-right-radius: calc(var(--r-lg) - 1px); }

.f-card:hover h3 {
    color: var(--gold);
}

.f-card h3 {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text);
    transition: color .3s ease;
}

.f-card p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-muted);
    font-weight: 400;
}

/* =========================================================
   WHY MURABEX — gold cards with dark text
   ========================================================= */
.why-section {
    background: var(--bg);
    text-align: center;
}

.why-title {
    font-size: clamp(44px, 7vw, 80px);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.02em;
    background: var(--gradient-gold-radial);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    margin-bottom: var(--s-3);
    text-align: center;
}

.why-sub {
    font-size: 20px;
    font-weight: 400;
    line-height: 32px;
    letter-spacing: 0;
    color: var(--text-muted);
    max-width: 820px;
    margin: 0 auto var(--s-5);
}

.why-slider { position: relative; }

/* Pagination dots — hidden on desktop, revealed in mobile media queries. */
.why-slider-dots,
.features-slider-dots { display: none; }

/* Each dot is a button — JS injects them. Desktop fallback styling for
   completeness even though the container is hidden. */
.slider-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: rgba(201, 168, 76, 0.25);
    cursor: pointer;
    transition: background .2s ease, width .2s ease;
    -webkit-tap-highlight-color: transparent;
}
.slider-dot.is-active {
    background: var(--gold);
    width: 22px;
    border-radius: 4px;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--s-2);
    text-align: left;
}

.w-card {
    background: var(--gradient-gold-radial);
    border: 1px solid var(--border-arch);
    border-radius: var(--r-lg);
    padding: var(--s-4);
    display: flex;
    flex-direction: column;
    transition: transform .3s ease, box-shadow .3s ease;
    position: relative;
    overflow: hidden;
}

.w-icon { margin-bottom: 32px; }
.w-card h4 { margin-bottom: 12px; }

.w-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(225, 176, 71, 0.3);
}

.w-card-wide { grid-column: span 3; }

.w-icon {
    width: 56px;
    height: 56px;
    display: block;
    flex-shrink: 0;
}

.w-card h4 {
    font-size: 22px;
    font-weight: 700;
    color: #1A1A1A;
    line-height: 1.3;
}

.w-card p {
    font-size: 15px;
    line-height: 1.55;
    color: #1A1A1A;
    opacity: 0.85;
}

/* =========================================================
   WHO IT'S FOR — audience cards
   ========================================================= */
.who-section {
    background: var(--bg);
}

.audience-box {
    background: var(--bg-lifted);
    border: 1px solid #2E313A;
    border-radius: 10px;
    overflow: hidden;
}

.audience-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
}

.audience-card {
    padding: 32px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #2E313A;
    position: relative;
    transition: background .3s ease, box-shadow .3s ease;
}

.audience-icon { margin-bottom: 32px; }
.audience-card h4 { margin-bottom: 12px; }

.audience-card:last-child { border-right: none; }

.audience-card:hover {
    background: #22252C;
    box-shadow: inset 0 0 0 1px var(--gold);
    z-index: 1;
}

/* desktop: 4 cols → only outer-left & outer-right cards round */
.audience-card:first-child {
    border-top-left-radius: 9px;
    border-bottom-left-radius: 9px;
}
.audience-card:last-child {
    border-top-right-radius: 9px;
    border-bottom-right-radius: 9px;
}

.audience-icon {
    width: 48px;
    height: 48px;
    display: block;
}

.audience-card h4 {
    font-size: 20px;
    font-weight: 600;
    color: var(--gold);
    line-height: 1.3;
}

.audience-card p {
    font-size: 16px;
    line-height: 26px;
    color: var(--text-muted);
}

/* =========================================================
   TECHNOLOGY / ARCHITECTURE DIAGRAM
   ========================================================= */
/* =========================================================
   TEAM
   ========================================================= */
.team {
    background: #1C1D22;
    position: relative;
    overflow: hidden;
}

.team-intro {
    position: relative;
    margin-bottom: var(--s-4);
}

/* ADGM building image as a section-level background — absolutely placed
   on the right starting near the section title and faded toward the text
   side so the copy on the left stays readable. Mirrored for RTL. */
.team-bg-image {
    position: absolute;
    top: var(--s-3);
    right: 0;
    width: 60%;
    max-width: 820px;
    z-index: 0;
    pointer-events: none;
    user-select: none;
    opacity: 0.95;
    -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 35%);
    mask-image: linear-gradient(to right, transparent 0%, #000 35%);
}

[dir="rtl"] .team .section-title {
    max-width: 50%;
    margin-inline-start: auto;
}

[dir="rtl"] .team-intro-text {
    margin-inline-start: auto;
}

.team .container {
    position: relative;
    z-index: 1;
}

.team-intro-text {
    max-width: 50%;
}

.team-intro-text h3 {
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: var(--s-2);
}

.team-intro-text p {
    font-size: 17px;
    line-height: 1.65;
    color: var(--text-muted);
    margin-bottom: var(--s-2);
}

.team-intro-text p:last-child { margin-bottom: 0; }

.team-intro-text strong {
    color: var(--gold-light);
    font-weight: 600;
}

.team-placeholder {
    font-size: 14px !important;
    font-style: italic;
    color: var(--text-dim) !important;
    border-left: 2px solid var(--gold-dark);
    padding-left: 12px;
    margin-top: var(--s-3) !important;
}

[dir="rtl"] .team-placeholder {
    border-left: none;
    border-right: 2px solid var(--gold-dark);
    padding-left: 0;
    padding-right: 12px;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--s-2);
    margin-top: var(--s-7);
}

.team-card {
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    border-radius: var(--r-lg);
    padding: var(--s-3);
    text-align: center;
    transition: border-color .25s ease, transform .25s ease;
}

.team-card:hover {
    border-color: var(--gold-dark);
    transform: translateY(-2px);
}

.team-avatar {
    width: 140px;
    height: 140px;
    margin: 0 auto var(--s-2);
    border-radius: 50%;
    overflow: hidden;
}

.team-avatar svg,
.team-avatar img {
    width: 100%;
    height: 100%;
    display: block;
}

.team-avatar img {
    object-fit: cover;
    object-position: center 25%;
}

.team-card h4 {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 2px;
}

.team-card p {
    font-size: 13px;
    color: var(--text-muted);
    margin: 0;
}

.team-linkedin {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    color: var(--text-muted);
    transition: color .2s ease;
}

.team-linkedin svg {
    width: 20px;
    height: 20px;
    display: block;
}

.team-linkedin:hover {
    color: var(--gold);
}

@media (max-width: 900px) {
    /* Stack section as flex column so the building image can be reordered
       to sit after the people grid on mobile. */
    .team {
        display: flex;
        flex-direction: column;
    }
    .team-intro {
        min-height: 0;
    }
    .team-intro-text {
        max-width: 100%;
    }
    .team-bg-image {
        order: 2;
        position: static;
        width: 100%;
        max-width: 100%;
        margin-top: var(--s-4);
        opacity: 0.9;
        -webkit-mask-image: none;
        mask-image: none;
    }
    [dir="rtl"] .team-bg-image {
        left: auto;
        right: auto;
        -webkit-mask-image: none;
        mask-image: none;
    }
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .team-intro-text h3 { font-size: 22px; }
    .team-intro-text p { font-size: 16px; }
}

@media (max-width: 480px) {
    .team-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   CTA (Ready to Transform)
   ========================================================= */
.cta-section {
    background: var(--bg-medium);
    text-align: center;
}

.cta-title {
    font-size: clamp(36px, 6vw, 72px);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.02em;
    max-width: 900px;
    margin: 0 auto var(--s-2);
    background: var(--gradient-gold-radial);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.cta-sub {
    font-size: 20px;
    font-weight: 400;
    line-height: 32px;
    letter-spacing: 0;
    color: var(--text-muted);
    margin-bottom: var(--s-4);
}

.cta-box {
    position: relative;
    border: 1px solid var(--border-arch);
    border-radius: var(--r-xl);
    padding: 64px;
    overflow: hidden;
    background: var(--bg);
}

.cta-bg-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 110%;
    object-fit: cover;
    opacity: 0.3;
    z-index: 0;
    pointer-events: none;
    user-select: none;
}

.cta-box > .cta-steps,
.cta-box > .cta-buttons {
    position: relative;
    z-index: 1;
}

.cta-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--s-2);
    margin-bottom: var(--s-4);
    text-align: left;
}

.cta-step {
    padding: var(--s-3);
    background: rgba(26, 29, 34, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--border-card);
    border-radius: var(--r-lg);
    transition: border-color .3s ease, transform .3s ease;
}

.cta-step:hover {
    border-color: var(--gold);
    transform: translateY(-2px);
}

.cta-step-num {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: var(--gradient-gold-radial);
    color: #1A1A1A;
    font-weight: 700;
    font-size: 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.cta-step h4 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}

.cta-step p {
    font-size: 14px;
    line-height: 20px;
    color: var(--text-muted);
}

.cta-buttons {
    display: flex;
    justify-content: center;
}

/* =========================================================
   FOOTER
   ========================================================= */
footer {
    background: var(--bg);
    padding: var(--s-4) 0;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--s-4);
    padding-bottom: var(--s-3);
    border-bottom: 1px solid var(--border);
}

.footer-links {
    display: flex;
    gap: var(--s-4);
}

.footer-links a {
    font-size: 14px;
    color: var(--text-muted);
    transition: color .2s ease;
}

.footer-links a:hover { color: var(--gold); }

.footer-bottom {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding-top: var(--s-3);
    padding-bottom: var(--s-2);
    flex-wrap: wrap;
    text-align: center;
}

.footer-socials {
    display: flex;
    gap: var(--s-2);
}

.footer-socials a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: color .2s ease;
}

.footer-socials a:hover {
    color: var(--gold);
}

.footer-socials a svg {
    width: 24px;
    height: 24px;
    display: block;
}

.footer-copy {
    font-size: 13px;
    color: var(--text-muted);
}

.footer-address {
    font-size: 13px;
    color: var(--text-muted);
    max-width: 720px;
    line-height: 1.5;
}

.footer-address a {
    color: inherit;
    text-decoration: none;
    transition: color .2s ease;
}

.footer-address a:hover {
    color: var(--gold-light);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* =========================================================
   MODAL
   ========================================================= */
.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--s-3);
}

.modal.is-open { display: flex; }

body.modal-open { overflow: hidden; }

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    animation: modal-fade .2s ease-out;
}

.modal-dialog {
    position: relative;
    background: var(--bg-lifted);
    border: 1px solid var(--border-arch);
    border-radius: var(--r-xl);
    padding: var(--s-5) var(--s-4);
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: modal-slide .25s ease-out;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.modal-dialog::-webkit-scrollbar { display: none; }

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-card);
    background: var(--bg-lifted);
    color: var(--text-muted);
    font-size: 24px;
    line-height: 1;
    border-radius: var(--r-sm);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: color .2s ease, border-color .2s ease, background .2s ease;
}

.modal-close:hover {
    color: var(--gold);
    border-color: var(--gold);
    background: rgba(201, 168, 76, 0.05);
}

.modal-title {
    font-family: 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--text);
    margin-bottom: 8px;
    padding-right: 40px;
}

.modal-sub {
    font-size: 15px;
    line-height: 1.55;
    color: var(--text-muted);
    margin-bottom: var(--s-3);
}

#nutshell-form-1CAaDV {
    min-height: 280px;
}

/* Nutshell form (Emotion-hashed classes — Murabex dark/gold theme).
   All selectors anchor on the wrapper div #nutshell-form-1CAaDV (we control
   it in HTML) so they survive Nutshell's internal DOM changes. */
#nutshell-form-1CAaDV,
#nutshell-form-1CAaDV * {
    font-family: 'Inter', sans-serif !important;
    box-sizing: border-box;
}

/* Outer wrapper Nutshell injects (if any) — dark background */
.css-8p2yze.css-8p2yze,
#nutshell-form-1CAaDV > div,
#nutshell-form-1CAaDV > section {
    background-color: var(--bg-lifted) !important;
    min-height: 100%;
    position: relative;
}

/* Tighten the gap between rows (Nutshell default is too large) */
#nutshell-form-1CAaDV .css-29pv05.css-29pv05 > :not(:last-child):not(.hidden-field) {
    margin-bottom: 1em !important;
}

/* Labels visually hidden (placeholder serves as visible name).
   Kept in DOM so screen readers still announce field names on focus. */
#nutshell-form-1CAaDV label,
#nutshell-form-1CAaDV .css-bh3upc {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Exception: anything inside <fieldset> stays visible.
   Marketing Permissions section uses fieldset > legend (section heading)
   + label (wraps the checkbox + agreement text). Plain text-input labels
   are NOT inside a fieldset, so they remain hidden. */
#nutshell-form-1CAaDV fieldset legend,
#nutshell-form-1CAaDV fieldset .css-bh3upc,
#nutshell-form-1CAaDV fieldset label {
    position: static !important;
    width: auto !important;
    height: auto !important;
    overflow: visible !important;
    clip: auto !important;
    white-space: normal !important;
}

#nutshell-form-1CAaDV fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

#nutshell-form-1CAaDV fieldset legend {
    color: var(--text-muted) !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    letter-spacing: 0.02em !important;
    padding-bottom: 4px !important;
}

/* Checkbox row label */
#nutshell-form-1CAaDV fieldset label {
    display: flex !important;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: var(--text) !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.4;
}

#nutshell-form-1CAaDV fieldset label input[type="checkbox"] {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Input / textarea — underline style on dark.
   !important needed because Nutshell's defaults set border + bg with
   high specificity (form #form-fields-container .css-s998u6.css-s998u6). */
#nutshell-form-1CAaDV #form-fields-container .css-s998u6.css-s998u6,
#nutshell-form-1CAaDV .css-s998u6.css-s998u6 {
    background: transparent !important;
    color: var(--text) !important;
    font-size: 15px !important;
    width: 100% !important;
    padding: 10px 0 !important;
    border: none !important;
    border-bottom: 1px solid #2E313A !important;
    border-radius: 0 !important;
    transition: border-color .2s ease;
}

#nutshell-form-1CAaDV #form-fields-container .css-s998u6.css-s998u6::placeholder,
#nutshell-form-1CAaDV .css-s998u6.css-s998u6::placeholder {
    color: var(--text-muted);
    opacity: 0.4;
}

/* Focus state */
#nutshell-form-1CAaDV input:focus,
#nutshell-form-1CAaDV textarea:focus {
    outline: none !important;
    border-bottom-color: var(--gold) !important;
}

/* Privacy / disclaimer paragraphs */
#nutshell-form-1CAaDV .css-35gckq {
    color: var(--text-muted) !important;
    font-size: 13px;
    line-height: 1.5;
}

/* React-Select (Marketing Permissions dropdown) */
#nutshell-form-1CAaDV .css-b62m3t-container {
    width: 100%;
}
#nutshell-form-1CAaDV .css-10soyvq-control {
    background: transparent !important;
    border: none !important;
    border-bottom: 1px solid #2E313A !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    min-height: 40px;
    padding: 4px 0;
}
#nutshell-form-1CAaDV .css-10soyvq-control:hover {
    border-bottom-color: var(--gold) !important;
}
#nutshell-form-1CAaDV .css-508jeu-placeholder {
    color: var(--text-muted) !important;
    opacity: 0.5;
    font-size: 15px;
}
#nutshell-form-1CAaDV .css-1u9des2-indicatorSeparator {
    display: none;
}
#nutshell-form-1CAaDV .css-8mmkcg {
    fill: var(--gold);
}
/* Dropdown menu (open state) */
#nutshell-form-1CAaDV [class*="menu"] {
    background: var(--bg-lifted) !important;
    border: 1px solid #2E313A !important;
}
#nutshell-form-1CAaDV [class*="option"] {
    color: var(--text) !important;
    background: transparent !important;
}
#nutshell-form-1CAaDV [class*="option"]:hover {
    background: rgba(201,168,76,0.08) !important;
    color: var(--gold-light) !important;
}

/* Submit button — gold gradient, supports both <input type="submit"> and <button> */
#nutshell-form-1CAaDV input[type="submit"],
#nutshell-form-1CAaDV .css-o1h3go,
#nutshell-form-1CAaDV button[type="submit"],
#nutshell-form-1CAaDV button:not([type="button"]) {
    background: var(--gradient-gold-radial) !important;
    color: #1A1A1A !important;
    border: none !important;
    border-radius: 14px !important;
    padding: 14px 36px !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    cursor: pointer !important;
    box-shadow: 0 4px 14px rgba(225, 176, 71, 0.2) !important;
    transition: transform .2s ease, box-shadow .2s ease !important;
    width: auto !important;
}

#nutshell-form-1CAaDV input[type="submit"]:hover,
#nutshell-form-1CAaDV .css-o1h3go:hover,
#nutshell-form-1CAaDV button[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-gold) !important;
}

/* Checkbox / radio — gold accent */
#nutshell-form-1CAaDV input[type="checkbox"],
#nutshell-form-1CAaDV input[type="radio"] {
    accent-color: var(--gold);
}

/* Links inside form */
#nutshell-form-1CAaDV a {
    color: var(--gold-light);
}
#nutshell-form-1CAaDV a:hover {
    color: var(--gold);
}

/* Thank-you / confirmation text after submit (Nutshell emits a <p> with
   id="1CAaDV-success-message" and class="css-15evt26"; the form's own
   stylesheet sets a brown colour and Nutshell-injected rules also set
   alignment, so we cover both via #id and the doubled-class selector). */
#nutshell-form-1CAaDV-success-message,
[id="1CAaDV-success-message"],
#nutshell-form-1CAaDV [id="1CAaDV-success-message"],
#nutshell-form-1CAaDV [id="1CAaDV-success-message"] span,
#nutshell-form-1CAaDV [id="1CAaDV-success-message"] p,
#nutshell-form-1CAaDV [id="1CAaDV-success-message"] h1,
#nutshell-form-1CAaDV [id="1CAaDV-success-message"] h2,
#nutshell-form-1CAaDV [id="1CAaDV-success-message"] h3,
#nutshell-form-1CAaDV .css-15evt26.css-15evt26,
#nutshell-form-1CAaDV .css-1ezu9eq.css-1ezu9eq {
    color: var(--text) !important;
}

#nutshell-form-1CAaDV [id="1CAaDV-success-message"] {
    text-align: center !important;
    padding: 20px 0;
    font-size: 16px;
    line-height: 1.6;
}

/* Hide modal title + subtitle once Nutshell shows the success message */
.modal-dialog:has(#nutshell-form-1CAaDV [id="1CAaDV-success-message"]) .modal-title,
.modal-dialog:has(#nutshell-form-1CAaDV [id="1CAaDV-success-message"]) .modal-sub {
    display: none;
}

/* Error / validation messages */
#nutshell-form-1CAaDV [class*="error"],
#nutshell-form-1CAaDV [role="alert"] {
    color: #FF7070;
    font-size: 13px;
    margin-top: 4px;
}

@keyframes modal-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes modal-slide {
    from { opacity: 0; transform: translateY(12px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1200px) {
    :root {
        --container-pad: 40px;
    }
    .features-grid,
    .why-grid { grid-template-columns: repeat(2, 1fr); }
    .w-card-wide { grid-column: span 2; }
    .audience-grid { grid-template-columns: repeat(2, 1fr); }
    .audience-card:nth-child(even) { border-right: none; }
    .audience-card:nth-child(1),
    .audience-card:nth-child(2) { border-bottom: 1px solid #2E313A; }

    /* tablet/mobile: 2×2 → each corner card rounds its outer corner only */
    .audience-card:nth-child(1) { border-bottom-left-radius: 0; }
    .audience-card:nth-child(2) { border-top-right-radius: 9px; }
    .audience-card:nth-child(3) { border-bottom-left-radius: 9px; }
    .audience-card:nth-child(4) { border-top-right-radius: 0; }

    /* features grid corners: 2 cols → 1, 2, 11, 12 */
    .f-card:nth-child(3),
    .f-card:nth-child(10) { border-top-right-radius: 0; border-bottom-left-radius: 0; }
    .f-card:nth-child(2) { border-top-right-radius: calc(var(--r-lg) - 1px); }
    .f-card:nth-child(11) { border-bottom-left-radius: calc(var(--r-lg) - 1px); }
}

/* Switch to burger menu before the desktop nav links start to wrap. */
@media (max-width: 1100px) {
    .nav-links { display: none; }
    .nav-cta { display: none; }
    .lang-switch:not(.lang-switch--mobile) { display: none; }
    .nav-toggle { display: flex; }
    .lang-switch--mobile {
        margin-top: var(--s-3);
        align-self: flex-start;
    }
}

@media (max-width: 900px) {
    :root {
        --container-pad: 24px;
        --s-6: 64px;
        --s-7: 96px;
    }

    .about-box { background: transparent; border: none; padding: 0; margin: 0; }

    .cta-box { padding: 20px; }
    .cta-steps { grid-template-columns: 1fr; gap: 10px; }

    /* CTA steps on mobile: number + title in row 1, description on its own full-width row */
    .cta-step {
        display: grid;
        grid-template-columns: auto 1fr;
        column-gap: 12px;
        row-gap: 12px;
        align-items: center;
    }
    .cta-step-num {
        margin-bottom: 0;
        width: 34px;
        height: 34px;
        font-size: 15px;
    }
    .cta-step h4 {
        margin-bottom: 0;
    }
    .cta-step p {
        grid-column: 1 / -1;
    }

    /* features → horizontal slider, 2 cards per view, snap on swipe */
    .features-slider {
        position: relative;
    }
    .features-slider-dots {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: 14px;
    }
    .features-grid {
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: calc(50% - 0.5px);
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: rgba(201, 168, 76, 0.35) transparent;
    }
    .features-grid::-webkit-scrollbar {
        height: 5px;
    }
    .features-grid::-webkit-scrollbar-track {
        background: transparent;
        margin: 0 20px;
    }
    .features-grid::-webkit-scrollbar-thumb {
        background: rgba(201, 168, 76, 0.35);
        border-radius: 3px;
    }
    .f-card { scroll-snap-align: start; padding: 20px; }

    /* no hover in carousel mode — avoids sticky hover on touch */
    .f-card:hover {
        background: var(--bg-card);
        box-shadow: none;
        z-index: auto;
    }
    .f-card:hover h3 { color: var(--text); }

    /* single-row corners: reset all mid-card radii, round only first & last */
    .f-card:nth-child(2),
    .f-card:nth-child(3),
    .f-card:nth-child(10),
    .f-card:nth-child(11) { border-top-right-radius: 0; border-bottom-left-radius: 0; }
    .f-card:first-child {
        border-top-left-radius: calc(var(--r-lg) - 1px);
        border-bottom-left-radius: calc(var(--r-lg) - 1px);
    }
    .f-card:last-child {
        border-top-right-radius: calc(var(--r-lg) - 1px);
        border-bottom-right-radius: calc(var(--r-lg) - 1px);
    }

    .why-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .w-card-wide { grid-column: span 2; }
    .w-card { padding: 18px; }
    .w-icon { width: 44px; height: 44px; }
    .w-card h4 { font-size: 18px; }
    .w-card p { font-size: 14px; }

    .audience-card { padding: 16px; }
    .audience-icon { width: 40px; height: 40px; }
    .audience-card h4 { font-size: 18px; }
    .audience-card p { font-size: 14px; line-height: 22px; }

    .hero-bg-image {
        opacity: 0.65;
        width: 100%;
        height: 55vw;
        max-width: none;
        right: 0;
        left: 0;
        top: auto;
        bottom: -5px;
        object-fit: cover;
        object-position: center top;
        -webkit-mask-image: linear-gradient(to top, black 55%, transparent);
        mask-image: linear-gradient(to top, black 55%, transparent);
    }

    .footer-top { flex-direction: column; text-align: center; }
    .footer-bottom { flex-direction: column; text-align: center; }
}

@media (max-width: 410px) {
    .why-grid { grid-template-columns: 1fr; }
    .w-card-wide { grid-column: auto; }

    /* Who It's For: 1 column at very narrow widths */
    .audience-grid { grid-template-columns: 1fr; }
    .audience-card { border-right: none; border-bottom: 1px solid #2E313A; }
    .audience-card:last-child { border-bottom: none; }

    /* corners for 4-row single column */
    .audience-card:nth-child(1) {
        border-top-left-radius: 9px;
        border-top-right-radius: 9px;
        border-bottom-left-radius: 0;
    }
    .audience-card:nth-child(2) { border-top-right-radius: 0; }
    .audience-card:nth-child(3) { border-bottom-left-radius: 0; }
    .audience-card:nth-child(4) {
        border-bottom-left-radius: 9px;
        border-bottom-right-radius: 9px;
        border-top-right-radius: 0;
    }
}

@media (max-width: 560px) {
    .hero-buttons { flex-direction: column; align-items: stretch; }
    .btn-gold, .btn-outline { width: 100%; }

    /* features slider: 2 cards stacked vertically per page, with peek of next column */
    .features-grid {
        grid-template-rows: repeat(2, auto);
        grid-auto-columns: 88%;
    }

    /* corners for 2×6 layout: only 1 (top-left), 2 (bottom-left), 11 (top-right), 12 (bottom-right) */
    .f-card:first-child { border-bottom-left-radius: 0; }
    .f-card:nth-child(2) { border-bottom-left-radius: calc(var(--r-lg) - 1px); }
    .f-card:nth-child(11) { border-top-right-radius: calc(var(--r-lg) - 1px); }
    .f-card:last-child { border-top-right-radius: 0; }

    /* why → horizontal carousel, peek of next card hints at more content */
    .why-grid {
        display: grid;
        grid-template-columns: none;
        grid-auto-flow: column;
        grid-auto-columns: min(88%, 320px);
        gap: 12px;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .why-grid::-webkit-scrollbar { display: none; }
    .w-card {
        scroll-snap-align: start;
        min-width: 0;
        transition: none;
    }
    .w-card:hover,
    .w-card:active {
        transform: none;
        box-shadow: none;
    }
    .w-card-wide { grid-column: auto; }

    .why-slider-dots {
        display: flex;
        justify-content: center;
        gap: 8px;
        margin-top: 14px;
    }
}

/* =========================================================
   RTL OVERRIDES (Arabic version)
   ========================================================= */
[dir="rtl"] body,
[dir="rtl"] {
    font-family: 'IBM Plex Sans Arabic', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Keep the SVG diagrams flowing left-to-right even in RTL layout —
   the arrows and pipeline stages read naturally that way regardless of
   language. The surrounding tabs and legend still inherit RTL so they
   sit on the inline-end side. */
[dir="rtl"] .arch-panel {
    border-radius: 8px 0 8px 8px;
}

[dir="rtl"] .arch-svg-scroll,
[dir="rtl"] .lifecycle-scroll,
[dir="rtl"] #lifecycle-svg {
    direction: ltr;
}

/* Section title underline anchors to the start edge in both directions
   (it relies on margin-top + width:80px, which works in RTL by default). */

/* Audience grid: borders sit on the inline-end side, not always physical right. */
[dir="rtl"] .audience-card {
    border-right: none;
    border-left: 1px solid #2E313A;
}
[dir="rtl"] .audience-card:last-child {
    border-left: none;
}

/* Modal close button: pin to the inline-end (logical right). */
[dir="rtl"] .modal-close {
    right: auto;
    left: 16px;
}

/* When the modal dialog opts out of RTL (dir="ltr"), keep the close button on the right. */
[dir="rtl"] .modal-dialog[dir="ltr"] .modal-close {
    right: 16px;
    left: auto;
}

/* Hero CTA arrow: flip the chevron so it points toward the inline-end. */
[dir="rtl"] .btn-gold.with-arrow::after,
[dir="rtl"] .with-arrow::after {
    transform: scaleX(-1);
}


/* Accordion chevron: keep its expand/collapse motion intuitive. */
[dir="rtl"] .accordion-icon {
    margin-left: 0;
    margin-right: auto;
}

/* Flip explicit text-align:left so card content aligns to the start edge in RTL. */
[dir="rtl"] .accordion-header,
[dir="rtl"] .why-grid,
[dir="rtl"] .cta-steps {
    text-align: right;
}

/* Features grid corner radii: original CSS rounds physical corners on
   positions 1/3/10/12. In RTL the grid lays out right-to-left, so each
   card's outer corner is on the opposite physical side — swap them. */
[dir="rtl"] .f-card:first-child {
    border-top-left-radius: 0;
    border-top-right-radius: calc(var(--r-lg) - 1px);
}
[dir="rtl"] .f-card:nth-child(3) {
    border-top-right-radius: 0;
    border-top-left-radius: calc(var(--r-lg) - 1px);
}
[dir="rtl"] .f-card:nth-child(10) {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: calc(var(--r-lg) - 1px);
}
[dir="rtl"] .f-card:last-child {
    border-bottom-right-radius: 0;
    border-bottom-left-radius: calc(var(--r-lg) - 1px);
}

@media (max-width: 1200px) {
    /* Tablet 2-col: corners sit on positions 1, 2, 11, 12. */
    [dir="rtl"] .f-card:nth-child(3),
    [dir="rtl"] .f-card:nth-child(10) {
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }
    [dir="rtl"] .f-card:nth-child(2) {
        border-top-right-radius: 0;
        border-top-left-radius: calc(var(--r-lg) - 1px);
    }
    [dir="rtl"] .f-card:nth-child(11) {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: calc(var(--r-lg) - 1px);
    }
}

@media (max-width: 900px) {
    /* Mobile single-row carousel: first-child sits at the right edge in RTL. */
    [dir="rtl"] .f-card:nth-child(2),
    [dir="rtl"] .f-card:nth-child(3),
    [dir="rtl"] .f-card:nth-child(10),
    [dir="rtl"] .f-card:nth-child(11) {
        border-top-left-radius: 0;
        border-top-right-radius: 0;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }
    [dir="rtl"] .f-card:first-child {
        border-top-left-radius: 0;
        border-bottom-left-radius: 0;
        border-top-right-radius: calc(var(--r-lg) - 1px);
        border-bottom-right-radius: calc(var(--r-lg) - 1px);
    }
    [dir="rtl"] .f-card:last-child {
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
        border-top-left-radius: calc(var(--r-lg) - 1px);
        border-bottom-left-radius: calc(var(--r-lg) - 1px);
    }
}

@media (max-width: 560px) {
    /* Narrow 2-row × 6-col layout: corners on positions 1, 2, 11, 12. */
    [dir="rtl"] .f-card:first-child {
        border-bottom-right-radius: 0;
    }
    [dir="rtl"] .f-card:nth-child(2) {
        border-bottom-left-radius: 0;
        border-bottom-right-radius: calc(var(--r-lg) - 1px);
    }
    [dir="rtl"] .f-card:nth-child(11) {
        border-top-right-radius: 0;
        border-top-left-radius: calc(var(--r-lg) - 1px);
    }
    [dir="rtl"] .f-card:last-child {
        border-top-left-radius: 0;
    }
}

/* Mobile-menu numbering: numbers should sit before the label in reading order. */
[dir="rtl"] .mobile-menu-num {
    margin-left: 12px;
    margin-right: 0;
}

@keyframes menu-slide-rtl {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}

@media (max-width: 900px) {
    /* Mobile drawer slides in from the inline-end (visual left in RTL). */
    [dir="rtl"] .mobile-menu-panel {
        right: auto;
        left: 0;
        border-left: none;
        border-right: 1px solid var(--color-white-6);
        animation-name: menu-slide-rtl;
    }
    [dir="rtl"] .mobile-menu-close {
        right: auto;
        left: 20px;
    }
    [dir="rtl"] .audience-card:nth-child(even) {
        border-left: none;
    }
    [dir="rtl"] .audience-card {
        border-right: none;
    }
}

