/* =============================================================
   Innovatech — Design System
   Bold & colourful · electric-blue accent · no build step
   ============================================================= */

/* ---------- Tokens ---------- */
:root {
    /* Brand palette */
    --blue: #2563ff;
    --blue-strong: #1642d8;
    --blue-soft: #5b8bff;
    --violet: #7c3aed;
    --cyan: #06d5e0;
    --pink: #ff4d8d;
    --amber: #ffb020;
    --emerald: #10c98f;

    /* Neutrals */
    --ink: #0a0e1f;
    --ink-2: #141a30;
    --slate: #4a5069;
    --muted: #7a819b;
    --line: #e7e9f3;
    --bg: #ffffff;
    --bg-soft: #f5f6fc;
    --bg-tint: #eef1ff;
    --white: #ffffff;

    /* Gradients */
    --grad-primary: linear-gradient(120deg, #2563ff 0%, #7c3aed 55%, #ff4d8d 110%);
    --grad-blue: linear-gradient(120deg, #2563ff 0%, #06d5e0 100%);
    --grad-violet: linear-gradient(120deg, #7c3aed 0%, #2563ff 100%);
    --grad-sunset: linear-gradient(120deg, #ff4d8d 0%, #ffb020 100%);
    --grad-text: linear-gradient(100deg, #2563ff 0%, #7c3aed 45%, #ff4d8d 100%);

    /* Shape & depth */
    --r-sm: 10px;
    --r: 16px;
    --r-lg: 24px;
    --r-xl: 34px;
    --shadow-sm: 0 2px 8px rgba(16, 24, 64, .06);
    --shadow: 0 18px 40px -18px rgba(37, 99, 255, .35);
    --shadow-lg: 0 40px 80px -30px rgba(31, 25, 80, .45);
    --ring: 0 0 0 4px rgba(37, 99, 255, .18);

    /* Type */
    --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
    --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

    /* Layout */
    --container: 1200px;
    --nav-h: 76px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
    font-size: 17px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
ul { list-style: none; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.08; font-weight: 700; letter-spacing: -.02em; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.section { padding: clamp(64px, 9vw, 128px) 0; position: relative; overflow-x: clip; }
.section--tight { padding: clamp(48px, 6vw, 84px) 0; }
.center { text-align: center; }
.stack > * + * { margin-top: 1rem; }

.eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--font-display);
    font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
    color: var(--blue);
    padding: 7px 14px; border-radius: 999px;
    background: var(--bg-tint);
    border: 1px solid rgba(37, 99, 255, .18);
}
.eyebrow--light { color: #cdd6ff; background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .22); }

.section-title { font-size: clamp(2rem, 4.4vw, 3.4rem); }
.section-lead { color: var(--slate); font-size: 1.12rem; max-width: 60ch; }
.center .section-lead { margin-inline: auto; }
.gradient-text {
    background: var(--grad-text);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
    --btn-bg: var(--grad-primary);
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    font-family: var(--font-display); font-weight: 600; font-size: 1rem;
    padding: 15px 26px; border-radius: 999px;
    color: #fff; background-image: var(--btn-bg);
    box-shadow: var(--shadow); position: relative;
    transition: transform .25s cubic-bezier(.2,.7,.3,1), box-shadow .25s, filter .25s;
    white-space: nowrap;
}
.btn:hover { transform: translateY(-3px); box-shadow: 0 26px 50px -18px rgba(37, 99, 255, .6); filter: saturate(1.1); }
.btn:active { transform: translateY(-1px); }
.btn svg { width: 20px; height: 20px; }
.btn--block { display: flex; width: 100%; }
.btn--lg { padding: 18px 34px; font-size: 1.08rem; }
.btn--ghost {
    background: #fff; color: var(--ink); box-shadow: var(--shadow-sm);
    border: 1px solid var(--line);
}
.btn--ghost:hover { box-shadow: var(--shadow-sm); border-color: rgba(37,99,255,.4); color: var(--blue); }
.btn--glass {
    background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.28);
    box-shadow: none; backdrop-filter: blur(8px);
}
.btn--glass:hover { background: rgba(255,255,255,.2); box-shadow: none; }
.btn--outline { background: transparent; border: 1.5px solid var(--blue); color: var(--blue); box-shadow: none; }
.btn--outline:hover { background: var(--blue); color: #fff; box-shadow: var(--shadow); }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; filter: grayscale(.2); }

.link-arrow { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--blue); }
.link-arrow svg { width: 18px; height: 18px; transition: transform .25s; }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- Navbar ---------- */
.nav {
    position: fixed; inset: 0 0 auto 0; height: var(--nav-h); z-index: 90;
    display: flex; align-items: center;
    transition: background .3s, box-shadow .3s, backdrop-filter .3s;
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; width: 100%; }
.nav.is-scrolled {
    background: rgba(255, 255, 255, .82);
    backdrop-filter: saturate(1.4) blur(14px);
    box-shadow: 0 1px 0 rgba(16, 24, 64, .06), 0 12px 30px -22px rgba(16, 24, 64, .5);
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 700; font-size: 1.28rem; letter-spacing: -.02em; white-space: nowrap; }
.brand__mark {
    width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
    background: var(--grad-primary); color: #fff; box-shadow: var(--shadow);
    font-size: 1.1rem; font-weight: 700; flex: none;
}
.brand__mark img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }
.nav--solid .brand, .nav.is-scrolled .brand { color: var(--ink); }
.nav__links { display: flex; align-items: center; gap: 6px; }
.nav__link {
    padding: 9px 14px; border-radius: 999px; font-weight: 500; color: var(--ink);
    transition: background .2s, color .2s; position: relative;
}
.nav__link:hover { background: var(--bg-tint); color: var(--blue); }
.nav__actions { display: flex; align-items: center; gap: 10px; }

/* transparent state (over hero) */
.nav--transparent:not(.is-scrolled) .brand,
.nav--transparent:not(.is-scrolled) .nav__link { color: #fff; }
.nav--transparent:not(.is-scrolled) .nav__link:hover { background: rgba(255,255,255,.14); color: #fff; }

/* Language switcher */
.lang { position: relative; }
.lang__toggle {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 12px; border-radius: 999px; font-weight: 600; font-size: .92rem;
    border: 1px solid var(--line); background: #fff; color: var(--ink); box-shadow: var(--shadow-sm);
}
.nav--transparent:not(.is-scrolled) .lang__toggle { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.28); color: #fff; }
.lang__toggle svg { width: 15px; height: 15px; opacity: .7; transition: transform .2s; }
.lang.is-open .lang__toggle svg { transform: rotate(180deg); }
.lang__menu {
    position: absolute; right: 0; top: calc(100% + 10px); min-width: 176px;
    background: #fff; border-radius: var(--r); box-shadow: var(--shadow-lg); border: 1px solid var(--line);
    padding: 8px; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: .22s;
    z-index: 100;
}
.lang.is-open .lang__menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang__item { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 10px; font-weight: 500; width: 100%; }
.lang__item:hover { background: var(--bg-tint); }
.lang__item.is-active { color: var(--blue); font-weight: 700; }
.lang__item .flag { font-size: 1.15rem; }

.burger { display: none; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: #fff; }
.burger span { display: block; width: 20px; height: 2px; background: var(--ink); margin: 4px auto; border-radius: 2px; transition: .25s; }
.nav--transparent:not(.is-scrolled) .burger { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.28); }
.nav--transparent:not(.is-scrolled) .burger span { background: #fff; }

/* ---------- Hero (video banner) ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; color: #fff; overflow: hidden; isolation: isolate; }
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media video, .hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__canvas { width: 100%; height: 100%; display: block; filter: blur(2px); }
.hero__overlay {
    position: absolute; inset: 0; z-index: -1;
    background:
        radial-gradient(120% 120% at 18% 12%, rgba(37, 99, 255, .28), transparent 48%),
        radial-gradient(120% 120% at 85% 88%, rgba(124, 58, 237, .28), transparent 48%),
        linear-gradient(180deg, rgba(6, 8, 22, .28) 0%, rgba(6, 8, 22, .16) 42%, rgba(6, 8, 22, .62) 100%);
}
.hero__inner { padding-top: calc(var(--nav-h) + 40px); padding-bottom: 72px; max-width: 900px; }
.hero h1 { font-size: clamp(2.6rem, 6.6vw, 5.2rem); letter-spacing: -.03em; text-shadow: 0 2px 40px rgba(4, 6, 20, .45); }
.hero__sub { font-size: clamp(1.05rem, 1.8vw, 1.4rem); color: rgba(255, 255, 255, .9); max-width: 60ch; margin-top: 22px; text-shadow: 0 1px 20px rgba(4, 6, 20, .5); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 38px; }
.hero__stats { display: flex; flex-wrap: wrap; gap: 34px; margin-top: 56px; }
.hero__stat b { font-family: var(--font-display); font-size: 2rem; display: block; }
.hero__stat span { color: rgba(255, 255, 255, .7); font-size: .92rem; }
.hero__scroll {
    position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 2;
    display: inline-flex; flex-direction: column; align-items: center; gap: 8px;
    color: rgba(255,255,255,.75); font-size: .78rem; letter-spacing: .16em; text-transform: uppercase;
}
.hero__scroll .mouse { width: 26px; height: 42px; border: 2px solid rgba(255,255,255,.5); border-radius: 14px; position: relative; }
.hero__scroll .mouse::after { content: ""; position: absolute; top: 8px; left: 50%; width: 4px; height: 8px; background: #fff; border-radius: 3px; transform: translateX(-50%); animation: scrollpip 1.6s infinite; }
@keyframes scrollpip { 0% { opacity: 0; top: 8px; } 40% { opacity: 1; } 80% { opacity: 0; top: 20px; } 100% { opacity: 0; } }
/* Hide the scroll cue where the hero is tight, so it never touches the CTAs. */
@media (max-width: 640px), (max-height: 780px) { .hero__scroll { display: none; } }
.hero__badge {
    display: inline-flex; align-items: center; gap: 9px; padding: 8px 16px; border-radius: 999px;
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.24); backdrop-filter: blur(6px);
    font-size: .9rem; font-weight: 500; margin-bottom: 26px;
}
.hero__badge .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 0 4px rgba(16,201,143,.28); }

/* ---------- Decorative blobs ---------- */
.blob { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .5; z-index: 0; pointer-events: none; }
.blob--blue { background: var(--blue); }
.blob--violet { background: var(--violet); }
.blob--pink { background: var(--pink); }
.blob--cyan { background: var(--cyan); }

/* ---------- Intro / logos ---------- */
.intro-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.intro-visual { position: relative; }
.intro-visual__card {
    border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg); border: 1px solid var(--line);
    background: #fff; aspect-ratio: 4 / 3;
}
.intro-visual__card img, .intro-visual__card video { width: 100%; height: 100%; object-fit: cover; }
.floaty { position: absolute; background: #fff; border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 14px 18px; display: flex; align-items: center; gap: 12px; font-weight: 600; }
.floaty .ic { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; color: #fff; }
.floaty small { display: block; color: var(--muted); font-weight: 500; font-size: .8rem; }
.floaty--tl { top: -22px; left: -22px; animation: float 6s ease-in-out infinite; }
.floaty--br { bottom: -22px; right: -22px; animation: float 6s ease-in-out infinite 1.5s; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

/* ---------- Features ---------- */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.feature-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 30px;
    box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
    transition: transform .3s, box-shadow .3s, border-color .3s;
}
.feature-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--grad-primary); transform: scaleX(0); transform-origin: left; transition: transform .35s; }
.feature-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: transparent; }
.feature-card:hover::before { transform: scaleX(1); }
.feature-card__icon {
    width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; color: #fff;
    margin-bottom: 20px; box-shadow: var(--shadow);
}
.feature-card__icon svg { width: 28px; height: 28px; }
.feature-card h3 { font-size: 1.3rem; margin-bottom: 10px; }
.feature-card p { color: var(--slate); }
.c-blue { background: var(--grad-blue); }
.c-violet { background: var(--grad-violet); }
.c-sunset { background: var(--grad-sunset); }
.c-emerald { background: linear-gradient(120deg, #10c98f, #06d5e0); }
.c-amber { background: linear-gradient(120deg, #ffb020, #ff4d8d); }
.c-pink { background: linear-gradient(120deg, #ff4d8d, #7c3aed); }

/* ---------- Video gallery ---------- */
.videos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.video-card {
    position: relative; border-radius: var(--r-lg); overflow: hidden; cursor: pointer;
    aspect-ratio: 16 / 10; background: var(--ink-2); box-shadow: var(--shadow);
    transition: transform .35s, box-shadow .35s;
}
.video-card:hover { transform: translateY(-6px) scale(1.012); box-shadow: var(--shadow-lg); }
.video-card__poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.video-card:hover .video-card__poster { transform: scale(1.07); }
.video-card__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,14,31,.05) 30%, rgba(10,14,31,.85) 100%); }
.video-card__body { position: absolute; inset: auto 0 0 0; padding: 20px; color: #fff; z-index: 2; }
.video-card__body h3 { font-size: 1.16rem; }
.video-card__body p { color: rgba(255,255,255,.75); font-size: .9rem; margin-top: 3px; }
.video-card__play {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 2;
    width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center;
    background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.4); backdrop-filter: blur(6px);
    transition: transform .3s, background .3s;
}
.video-card:hover .video-card__play { transform: translate(-50%, -50%) scale(1.12); background: var(--blue); border-color: transparent; }
.video-card__play svg { width: 26px; height: 26px; color: #fff; margin-left: 3px; }
.video-card__tag { position: absolute; top: 14px; left: 14px; z-index: 2; padding: 6px 12px; border-radius: 999px; background: var(--grad-primary); color: #fff; font-size: .74rem; font-weight: 700; letter-spacing: .04em; }
.video-card__time { position: absolute; top: 14px; right: 14px; z-index: 2; padding: 5px 10px; border-radius: 8px; background: rgba(10,14,31,.6); color: #fff; font-size: .78rem; font-weight: 600; }

/* Video modal */
.vmodal { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; padding: 24px; }
.vmodal.is-open { display: flex; }
.vmodal__backdrop { position: absolute; inset: 0; background: rgba(6, 8, 22, .82); backdrop-filter: blur(6px); animation: fade .3s; }
.vmodal__dialog { position: relative; width: min(1000px, 100%); z-index: 2; animation: pop .35s cubic-bezier(.2,.8,.3,1); }
.vmodal__frame { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-lg); background: #000; }
.vmodal__frame iframe, .vmodal__frame video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.vmodal__close { position: absolute; top: -52px; right: 0; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.3); color: #fff; display: grid; place-items: center; }
.vmodal__close:hover { background: rgba(255,255,255,.28); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.94) translateY(12px); } }

/* ---------- How it works ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; counter-reset: step; }
.step { background: var(--ink); color: #fff; border-radius: var(--r-lg); padding: 34px 30px; position: relative; overflow: hidden; }
.step::after { counter-increment: step; content: "0" counter(step); position: absolute; top: 16px; right: 22px; font-family: var(--font-display); font-size: 3.4rem; font-weight: 700; opacity: .12; }
.step__ic { width: 54px; height: 54px; border-radius: 15px; background: var(--grad-primary); display: grid; place-items: center; margin-bottom: 20px; }
.step__ic svg { width: 26px; height: 26px; color: #fff; }
.step h3 { font-size: 1.28rem; margin-bottom: 10px; }
.step p { color: rgba(255,255,255,.72); }
.step--accent { background: var(--grad-primary); }
.step--accent p { color: rgba(255,255,255,.85); }
.step--accent .step__ic { background: rgba(255,255,255,.18); }

/* ---------- CTA band ---------- */
.cta-band { position: relative; overflow: hidden; border-radius: var(--r-xl); padding: clamp(44px, 6vw, 84px); color: #fff; background: var(--ink); isolation: isolate; }
.cta-band__glow { position: absolute; inset: 0; z-index: -1; background: radial-gradient(90% 140% at 12% 10%, rgba(37,99,255,.7), transparent 45%), radial-gradient(90% 140% at 90% 90%, rgba(255,77,141,.6), transparent 45%), radial-gradient(120% 120% at 60% 40%, rgba(124,58,237,.55), transparent 55%); }
.cta-band h2 { font-size: clamp(2rem, 4.4vw, 3.2rem); max-width: 22ch; }
.cta-band p { color: rgba(255,255,255,.82); margin-top: 14px; font-size: 1.12rem; max-width: 52ch; }
.cta-band .btn { margin-top: 30px; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: rgba(255,255,255,.7); padding: 72px 0 32px; }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer .brand { color: #fff; }
.footer__about { max-width: 34ch; margin-top: 18px; font-size: .96rem; }
.footer h4 { color: #fff; font-family: var(--font-display); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 16px; }
.footer__links li + li { margin-top: 10px; }
.footer__links a:hover { color: #fff; }
.socials { display: flex; gap: 10px; margin-top: 20px; }
.socials a { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); transition: .25s; }
.socials a:hover { background: var(--blue); border-color: transparent; transform: translateY(-3px); }
.socials svg { width: 19px; height: 19px; color: #fff; }
.footer__bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .88rem; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) {
    .reveal { opacity: 1; transform: none; transition: none; }
    * { scroll-behavior: auto !important; }
}

/* ---------- Flash / alerts ---------- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 15px 18px; border-radius: var(--r); font-weight: 500; margin-bottom: 18px; }
.alert svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.alert--success { background: #e7fbf3; color: #0a7a58; border: 1px solid #b6f0da; }
.alert--error { background: #fdecef; color: #c0264a; border: 1px solid #f6c8d3; }
.alert--info { background: var(--bg-tint); color: var(--blue-strong); border: 1px solid rgba(37,99,255,.2); }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; font-size: .8rem; font-weight: 700; letter-spacing: .01em; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge--pending { background: #fff5e6; color: #b9770a; }
.badge--in_review { background: #e8f0ff; color: #1a56db; }
.badge--completed { background: #e7fbf3; color: #0a7a58; }

/* Hero fallback background (when no video/poster is configured) */
.hero { background: linear-gradient(140deg, #070b1c 0%, #131034 46%, #0b1740 100%); }

/* ---------- Mobile menu ---------- */
.mobile-menu {
    position: fixed; inset: var(--nav-h) 0 0 0; z-index: 80; background: #fff;
    padding: 24px; display: flex; flex-direction: column; gap: 6px;
    transform: translateX(100%); transition: transform .32s cubic-bezier(.2,.7,.3,1);
    overflow-y: auto; box-shadow: var(--shadow-lg);
}
.mobile-menu.is-open { transform: translateX(0); }
.mobile-menu a, .mobile-menu button { padding: 14px 12px; border-radius: 12px; font-weight: 600; font-size: 1.1rem; text-align: left; width: 100%; }
.mobile-menu a:hover { background: var(--bg-tint); color: var(--blue); }
.mobile-menu hr { border: 0; border-top: 1px solid var(--line); margin: 10px 0; }
.mobile-menu__langs { display: flex; gap: 8px; margin-top: 14px; }
.mobile-menu__langs a { flex: 1; text-align: center; border: 1px solid var(--line); border-radius: 10px; padding: 10px; font-size: .95rem; }
.mobile-menu__langs a.is-active { background: var(--blue); color: #fff; border-color: transparent; }
.burger.is-active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger.is-active span:nth-child(2) { opacity: 0; }
.burger.is-active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Toasts ---------- */
.toast-wrap { position: fixed; top: calc(var(--nav-h) + 12px); right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 10px; max-width: min(400px, calc(100vw - 40px)); }
.toast {
    display: flex; align-items: center; gap: 11px; padding: 14px 16px; border-radius: var(--r);
    background: #fff; box-shadow: var(--shadow-lg); font-weight: 500; border: 1px solid var(--line);
    transition: opacity .35s, transform .35s; animation: toastin .4s cubic-bezier(.2,.8,.3,1);
}
@keyframes toastin { from { opacity: 0; transform: translateX(120%); } }
.toast svg { width: 20px; height: 20px; flex: none; }
.toast span { flex: 1; }
.toast button { color: var(--muted); display: grid; place-items: center; }
.toast button svg { width: 16px; height: 16px; }
.toast--success { border-left: 4px solid var(--emerald); }
.toast--success > svg:first-child { color: var(--emerald); }
.toast--error { border-left: 4px solid var(--pink); }
.toast--error > svg:first-child { color: var(--pink); }
.toast--info { border-left: 4px solid var(--blue); }
.toast--info > svg:first-child { color: var(--blue); }

/* ---------- Forms ---------- */
.form-card { background: #fff; border-radius: var(--r-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--line); padding: clamp(26px, 4vw, 44px); }
.field { margin-bottom: 18px; }
.label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 8px; }
.label .req { color: var(--pink); }
.input, textarea.input, select.input {
    width: 100%; padding: 13px 15px; border: 1.5px solid var(--line); border-radius: 12px;
    background: #fff; transition: border-color .2s, box-shadow .2s; font-size: 1rem;
}
.input::placeholder { color: #aab; }
.input:focus { border-color: var(--blue); box-shadow: var(--ring); outline: none; }
textarea.input { resize: vertical; min-height: 108px; }
.input--error { border-color: #e0264a; }
.field__error { color: #c0264a; font-size: .85rem; margin-top: 6px; }
.field__hint { color: var(--muted); font-size: .85rem; margin-top: 6px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.checkbox { display: flex; align-items: center; gap: 10px; font-size: .95rem; cursor: pointer; }
.checkbox input { width: 18px; height: 18px; accent-color: var(--blue); }
.form-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 8px; flex-wrap: wrap; }

/* ---------- Auth layout (split screen) ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth__aside { position: relative; overflow: hidden; color: #fff; background: var(--ink); display: flex; flex-direction: column; justify-content: space-between; padding: 48px; isolation: isolate; }
.auth__aside-glow { position: absolute; inset: 0; z-index: -1; background: radial-gradient(90% 90% at 15% 15%, rgba(37,99,255,.75), transparent 45%), radial-gradient(90% 90% at 90% 85%, rgba(255,77,141,.6), transparent 45%), radial-gradient(120% 120% at 60% 50%, rgba(124,58,237,.6), transparent 55%); }
.auth__aside h2 { font-size: clamp(1.9rem, 3vw, 2.7rem); max-width: 16ch; }
.auth__aside p { color: rgba(255,255,255,.8); margin-top: 16px; max-width: 40ch; }
.auth__points { display: flex; flex-direction: column; gap: 16px; margin-top: 30px; }
.auth__point { display: flex; align-items: center; gap: 12px; font-weight: 500; }
.auth__point .ic { width: 40px; height: 40px; border-radius: 11px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); display: grid; place-items: center; flex: none; }
.auth__point .ic svg { width: 20px; height: 20px; }
.auth__main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--bg-soft); }
.auth__box { width: 100%; max-width: 460px; }
.auth__box.auth__box--wide { max-width: 620px; }
.auth__logo { display: inline-flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 700; font-size: 1.3rem; margin-bottom: 26px; }
.auth h1 { font-size: 1.9rem; }
.auth__sub { color: var(--slate); margin-top: 8px; margin-bottom: 26px; }
.auth__alt { text-align: center; margin-top: 22px; color: var(--slate); }
.auth__alt a { color: var(--blue); font-weight: 600; }

/* ---------- Portal (institution dashboard) ---------- */
.portal { display: grid; grid-template-columns: 272px 1fr; min-height: 100vh; background: var(--bg-soft); }
.portal__side { background: var(--ink); color: #fff; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 26px 20px; }
.portal__brand { display: inline-flex; align-items: center; gap: 11px; font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; color: #fff; margin-bottom: 34px; padding: 0 8px; }
.side-nav { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.side-nav a { display: flex; align-items: center; gap: 13px; padding: 12px 14px; border-radius: 12px; color: rgba(255,255,255,.72); font-weight: 500; transition: .2s; }
.side-nav a svg { width: 20px; height: 20px; }
.side-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.side-nav a.is-active { background: var(--grad-primary); color: #fff; box-shadow: var(--shadow); }
.portal__side-foot { border-top: 1px solid rgba(255,255,255,.1); padding-top: 18px; margin-top: 18px; }
.portal__user { display: flex; align-items: center; gap: 12px; padding: 6px 8px 16px; }
.portal__avatar { width: 42px; height: 42px; border-radius: 12px; background: var(--grad-primary); display: grid; place-items: center; font-weight: 700; flex: none; }
.portal__user small { display: block; color: rgba(255,255,255,.55); font-size: .8rem; }
.portal__side .side-logout { display: flex; align-items: center; gap: 13px; padding: 12px 14px; border-radius: 12px; color: rgba(255,255,255,.72); font-weight: 500; width: 100%; text-align: left; }
.portal__side .side-logout:hover { background: rgba(255,255,255,.08); color: #fff; }
.portal__side .side-logout svg { width: 20px; height: 20px; }

.portal__main { padding: 34px clamp(20px, 4vw, 48px) 60px; }
.portal__topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 30px; flex-wrap: wrap; }
.portal__topbar h1 { font-size: 1.8rem; }
.portal__topbar p { color: var(--slate); margin-top: 4px; }
.portal__mobilebar { display: none; }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 30px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; box-shadow: var(--shadow-sm); display: flex; align-items: center; gap: 16px; }
.stat-card__ic { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; color: #fff; flex: none; }
.stat-card__ic svg { width: 24px; height: 24px; }
.stat-card b { font-family: var(--font-display); font-size: 1.9rem; line-height: 1; display: block; }
.stat-card span { color: var(--muted); font-size: .9rem; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.panel__head { padding: 22px 26px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.panel__head h2 { font-size: 1.24rem; }
.panel__head p { color: var(--slate); font-size: .92rem; margin-top: 2px; }
.panel__body { padding: 26px; }

/* Data table */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; min-width: 620px; }
.table th { text-align: left; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.table td { padding: 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr:hover td { background: var(--bg-soft); }
.table .ref { font-family: var(--font-display); font-weight: 600; color: var(--blue); }
.table .muted { color: var(--muted); font-size: .88rem; }

/* Dropzone / uploader */
.dropzone {
    border: 2px dashed #c7cdea; border-radius: var(--r-lg); padding: 40px 24px; text-align: center;
    background: var(--bg-tint); cursor: pointer; transition: border-color .25s, background .25s;
}
.dropzone:hover, .dropzone.is-drag { border-color: var(--blue); background: #e6ecff; }
.dropzone__ic { width: 64px; height: 64px; border-radius: 18px; background: var(--grad-primary); display: grid; place-items: center; margin: 0 auto 16px; box-shadow: var(--shadow); }
.dropzone__ic svg { width: 30px; height: 30px; color: #fff; }
.dropzone h3 { font-size: 1.1rem; }
.dropzone p { color: var(--slate); margin-top: 6px; font-size: .95rem; }
.dropzone__sub { color: var(--muted); font-size: .84rem; margin-top: 4px; }
.file-pill { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.file-pill__ic { width: 44px; height: 44px; border-radius: 11px; background: var(--bg-tint); color: var(--blue); display: grid; place-items: center; flex: none; }
.file-pill b { display: block; font-size: .96rem; word-break: break-all; }
.file-pill small { color: var(--muted); }
.file-pill__remove { margin-left: auto; color: var(--muted); }

.progress { height: 10px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 8px; }
.progress__bar { height: 100%; width: 0; background: var(--grad-primary); border-radius: 999px; transition: width .2s; }
.upload-status { display: flex; justify-content: space-between; font-size: .85rem; color: var(--slate); margin-top: 8px; }

.empty { text-align: center; padding: 50px 24px; }
.empty__ic { width: 72px; height: 72px; border-radius: 20px; background: var(--bg-tint); color: var(--blue); display: grid; place-items: center; margin: 0 auto 18px; }
.empty__ic svg { width: 34px; height: 34px; }
.empty h3 { font-size: 1.2rem; }
.empty p { color: var(--slate); margin-top: 6px; max-width: 40ch; margin-inline: auto; }

.detail-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; align-items: start; }
.kv { display: flex; flex-direction: column; gap: 14px; }
.kv__row { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.kv__row:last-child { border-bottom: 0; padding-bottom: 0; }
.kv__row .k { color: var(--muted); font-size: .9rem; }
.kv__row .v { font-weight: 600; text-align: right; word-break: break-word; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .intro-grid { grid-template-columns: 1fr; }
    .features-grid, .videos-grid, .steps { grid-template-columns: repeat(2, 1fr); }
    .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .nav__links { display: none; }
    .nav__link--login, .nav__actions .btn { display: none; }
    .burger { display: block; }
    .auth { grid-template-columns: 1fr; }
    .auth__aside { display: none; }
    .portal { grid-template-columns: 1fr; }
    .portal__side { display: none; }
    .portal__mobilebar { display: flex; align-items: center; justify-content: space-between; background: var(--ink); color: #fff; padding: 14px 18px; position: sticky; top: 0; z-index: 40; }
    .portal__mobilebar .brand { color: #fff; font-size: 1.1rem; }
    .stat-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .video-card__body { margin-bottom: 5px !important; }
    body { font-size: 16px; }
    .features-grid, .videos-grid, .steps { grid-template-columns: 1fr; }
    .footer__grid { grid-template-columns: 1fr; }
    .hero__cta { flex-direction: column; align-items: stretch; }
    .hero__cta .btn { width: 100%; }
    .toast-wrap { left: 16px; right: 16px; max-width: none; }
}

/* ---------- Contact page ---------- */
.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 5vw, 64px); align-items: start; }
.contact-info { display: flex; flex-direction: column; gap: 14px; margin-top: 34px; }
.contact-info__item { display: flex; align-items: center; gap: 14px; font-weight: 600; color: var(--ink); }
.contact-info__item small { display: block; color: var(--muted); font-weight: 500; font-size: .82rem; }
.contact-info__ic { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; color: #fff; flex: none; box-shadow: var(--shadow-sm); }
.contact-info__ic svg { width: 20px; height: 20px; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

/* =============================================================
   RTL (Arabic)
   ============================================================= */
[dir="rtl"] {
    --font-display: "Cairo", "Segoe UI", system-ui, sans-serif;
    --font-body: "Cairo", "Segoe UI", system-ui, sans-serif;
}
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3, [dir="rtl"] h4 { letter-spacing: 0; }

/* Directional arrows follow the reading direction */
[dir="rtl"] .ui-icon--arrow-right { transform: scaleX(-1); }
[dir="rtl"] .link-arrow:hover .ui-icon--arrow-right { transform: scaleX(-1) translateX(4px); }

/* Floating / edge-anchored UI mirrors to the opposite side */
[dir="rtl"] .lang__menu { right: auto; left: 0; }
[dir="rtl"] .toast-wrap { right: auto; left: 20px; }
[dir="rtl"] .vmodal__close { right: auto; left: 0; }
[dir="rtl"] .step::after { right: auto; left: 22px; }
[dir="rtl"] .video-card__tag { left: auto; right: 14px; }
[dir="rtl"] .video-card__time { right: auto; left: 14px; }
[dir="rtl"] .feature-card::before { transform-origin: right; }
[dir="rtl"] .floaty--tl { left: auto; right: -22px; }
[dir="rtl"] .floaty--br { right: auto; left: -22px; }

/* Mobile drawer slides in from the left in RTL */
[dir="rtl"] .mobile-menu { transform: translateX(-100%); }
[dir="rtl"] .mobile-menu.is-open { transform: translateX(0); }
[dir="rtl"] .mobile-menu a, [dir="rtl"] .mobile-menu button { text-align: right; }

/* Toast enters from the near edge */
[dir="rtl"] .toast { animation-name: toastin-rtl; }
@keyframes toastin-rtl { from { opacity: 0; transform: translateX(-120%); } }

/* ============================================================= 
   Chapters (overview + impact sections)
   ============================================================= */
.chapter--alt { background: var(--bg-soft); }
.chapter__wrap { max-width: 900px; margin-inline: auto; }

.chapter__head { max-width: 820px; margin-inline: auto; text-align: center; display: flex; flex-direction: column; align-items: center; position: relative; z-index: 1; }
.chapter__icon { width: 66px; height: 66px; border-radius: 18px; display: grid; place-items: center; color: #fff; box-shadow: var(--shadow); margin-bottom: 20px; }
.chapter__icon svg { width: 30px; height: 30px; }
.chapter__num { position: absolute; top: -18px; inset-inline-end: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(4rem, 12vw, 8rem); line-height: 1; color: var(--ink); opacity: .05; z-index: -1; pointer-events: none; }
.chapter__headline { font-size: clamp(1.7rem, 3.6vw, 2.7rem); letter-spacing: -.02em; margin-top: 14px; max-width: 22ch; }

.chapter__body { max-width: 760px; margin: 40px auto 0; }

/* Rich text */
.rich { text-align: start; color: var(--slate); font-size: 1.08rem; line-height: 1.78; }
.rich p { margin-bottom: 1.15em; }
.rich p:last-child { margin-bottom: 0; }
.rich--lead { font-size: 1.14rem; }
.rich--lead p:first-child { font-size: 1.22rem; color: var(--ink); font-weight: 500; }
.rich .ch-point { background: var(--bg-tint); border-inline-start: 4px solid var(--blue); border-radius: 12px; padding: 15px 20px; margin: 16px 0; color: var(--ink); }
.rich .ch-point strong { color: var(--blue-strong); font-weight: 700; }
.chapter--alt .rich .ch-point { background: #fff; }
.ch-code { font-family: "Space Grotesk", ui-monospace, monospace; background: rgba(37, 99, 255, .1); color: var(--blue-strong); padding: 1px 8px; border-radius: 7px; font-size: .9em; font-weight: 600; white-space: nowrap; }

@media (max-width: 640px) {
    .rich { font-size: 1.02rem; }
    .chapter__num { font-size: 4.5rem; }
}

/* =============================================================
   Impact cards (home) + Chapter pages
   ============================================================= */
.nav__link.is-current { color: var(--blue); background: var(--bg-tint); }
.nav--transparent:not(.is-scrolled) .nav__link.is-current { background: rgba(255,255,255,.2); color: #fff; }

/* Impact cards grid */
.impact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.impact-card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 30px; box-shadow: var(--shadow-sm); overflow: hidden; transition: transform .3s, box-shadow .3s, border-color .3s; color: var(--ink); }
.impact-card::before { content: ""; position: absolute; inset-block-start: 0; inset-inline: 0; height: 4px; background: var(--grad-primary); transform: scaleX(0); transform-origin: left; transition: transform .35s; }
[dir="rtl"] .impact-card::before { transform-origin: right; }
.impact-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.impact-card:hover::before { transform: scaleX(1); }
.impact-card__num { position: absolute; top: 16px; inset-inline-end: 22px; font-family: var(--font-display); font-weight: 700; font-size: 2.2rem; color: var(--ink); opacity: .06; }
.impact-card__icon { width: 56px; height: 56px; border-radius: 15px; display: grid; place-items: center; color: #fff; box-shadow: var(--shadow); margin-bottom: 16px; }
.impact-card__icon svg { width: 26px; height: 26px; }
.impact-card__eyebrow { font-family: var(--font-display); font-size: .76rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); }
.impact-card h3 { font-size: 1.24rem; margin-top: 6px; line-height: 1.16; }
.impact-card p { color: var(--slate); font-size: .98rem; margin-top: 8px; flex: 1; }
.impact-card__more { display: inline-flex; align-items: center; gap: 7px; margin-top: 18px; font-weight: 600; color: var(--blue); }
.impact-card__more svg { width: 18px; height: 18px; transition: transform .25s; }
.impact-card:hover .impact-card__more svg { transform: translateX(4px); }
[dir="rtl"] .impact-card:hover .impact-card__more .ui-icon--arrow-right { transform: scaleX(-1) translateX(4px); }

/* Chapter page hero */
.page-hero { position: relative; overflow: hidden; color: #fff; background: var(--ink); padding: calc(var(--nav-h) - 9px) 0 62px; isolation: isolate; }
.page-hero__glow { position: absolute; inset: 0; z-index: -1; background:
    radial-gradient(70% 130% at 12% -10%, color-mix(in srgb, var(--accent) 55%, transparent), transparent 55%),
    radial-gradient(70% 130% at 92% 110%, color-mix(in srgb, var(--accent) 42%, transparent), transparent 52%),
    linear-gradient(180deg, #090d1e 0%, #12132f 100%); }
.page-hero__back { display: inline-flex; align-items: center; gap: 8px; color: rgba(255,255,255,.72); font-weight: 600; font-size: .92rem; margin-bottom: 28px; }
.page-hero__back:hover { color: #fff; }
.page-hero__inner { max-width: 820px; }
.page-hero__icon { width: 64px; height: 64px; border-radius: 17px; display: grid; place-items: center; color: #fff; box-shadow: var(--shadow); margin-bottom: 20px; }
.page-hero__icon svg { width: 30px; height: 30px; }
.page-hero h1 { font-size: clamp(2rem, 4.8vw, 3.4rem); margin-top: 14px; max-width: 20ch; }
.page-hero__pos { display: inline-block; direction: ltr; margin-top: 22px; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: rgba(255,255,255,.5); }
.page-hero__pos i { font-style: normal; opacity: .5; margin: 0 5px; }

/* Prev / next pager */
.page-nav { display: flex; justify-content: space-between; gap: 16px; padding-top: 26px; border-top: 1px solid var(--line); }
.page-nav__link { display: flex; flex-direction: column; gap: 3px; padding: 15px 22px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; box-shadow: var(--shadow-sm); transition: .25s; max-width: 47%; }
.page-nav__link:hover { border-color: transparent; box-shadow: var(--shadow); transform: translateY(-2px); }
.page-nav__link small { color: var(--muted); font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.page-nav__link b { color: var(--ink); font-family: var(--font-display); }
.page-nav__link--next { text-align: end; align-items: flex-end; }

@media (max-width: 1024px) { .impact-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) {
    .impact-grid { grid-template-columns: 1fr; }
    .page-nav { flex-direction: column; }
    .page-nav__link { max-width: none; }
    .page-nav__link--next { text-align: start; align-items: flex-start; }
}

/* ===================== BRAND WATERMARK ("P vs NP" everywhere, light) ===================== */
.section { isolation: isolate; }
.section::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='320'%20height='210'%3E%3Ctext%20x='160'%20y='118'%20fill='%230f172a'%20fill-opacity='.05'%20font-family='Space%20Grotesk,Arial,sans-serif'%20font-size='40'%20font-weight='700'%20text-anchor='middle'%20transform='rotate(-20%20160%20105)'%3EP%20vs%20NP%3C/text%3E%3C/svg%3E");
    background-size: 320px 210px;
}
.hero::after,
.page-hero::after {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='320'%20height='210'%3E%3Ctext%20x='160'%20y='118'%20fill='%23ffffff'%20fill-opacity='.07'%20font-family='Space%20Grotesk,Arial,sans-serif'%20font-size='40'%20font-weight='700'%20text-anchor='middle'%20transform='rotate(-20%20160%20105)'%3EP%20vs%20NP%3C/text%3E%3C/svg%3E");
    background-size: 320px 210px;
}

/* ===================== BANNER ANIMATION LAYERS ===================== */
.page-hero__canvas {
    position: absolute; inset: 0; width: 100%; height: 100%;
    z-index: -1; display: block; pointer-events: none;
    filter: blur(.4px);
}
.page-hero__scrim {
    position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(180deg, rgba(9,12,28,.30) 0%, rgba(9,12,28,.18) 45%, rgba(9,12,28,.48) 100%);
}
.hero__canvas { filter: blur(1px); }

/* ===================== FOOTER LANGUAGE LINKS ===================== */
.footer__langs a { display: inline-flex; align-items: center; gap: 8px; }
.footer__langs a.is-active { color: #fff; font-weight: 600; }
.footer__langs .flag { font-size: 1.05em; line-height: 1; }

/* ===================== LANGUAGE CODE CHIP (AR / DE / EN) ===================== */
.langcode {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 22px; padding: 1px 4px; border-radius: 5px;
    border: 1px solid; border-color: color-mix(in srgb, currentColor 32%, transparent);
    font-family: var(--font-display); font-size: .66rem; font-weight: 700; letter-spacing: .05em;
}

/* ===================== VIDEOS PAGE + TWO-BUTTON CTA ===================== */
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.cta-band__actions .btn { margin-top: 0; }

.page-hero__lead { color: rgba(255, 255, 255, .72); margin-top: 16px; max-width: 54ch; font-size: 1.1rem; }

.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 32px; margin-top: 8px; }
.video-card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--shadow-sm); transition: box-shadow .25s, transform .25s; }
.video-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.video-card__player { aspect-ratio: 16 / 9; background: #0a0e1f; }
.video-card__player video { width: 100%; height: 100%; object-fit: contain; display: block; }
.video-card__body { margin-bottom: 68px; background-color: #0000003d; }
.video-card__body h3 { font-size: 1.3rem; }
.video-card__body p { color: #ffffff; margin-top: 10px; }

/* ===================== POST-CONTENT ACTION BUTTONS ===================== */
.page-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 44px; }

/* ===================== LARGER FOOTER LOGO ===================== */
.footer .brand { font-size: 1.5rem; gap: 14px; }
.footer .brand__mark { width: 64px; height: 64px; border-radius: 16px; font-size: 1.5rem; }
.footer .brand__mark img { border-radius: 16px; }

/* ===================== LOGO LIGHTBOX + BRAND SPLIT ===================== */
.brand__name { color: inherit; }
.brand__mark--zoom { padding: 0; cursor: zoom-in; overflow: hidden; }
.brand__mark--zoom:hover { filter: brightness(1.06); }
.logo-lightbox {
    position: fixed; inset: 0; z-index: 200;
    display: flex; align-items: center; justify-content: center; padding: 24px;
    background: rgba(6, 8, 22, .84); backdrop-filter: blur(6px);
    opacity: 0; visibility: hidden; transition: opacity .22s ease, visibility .22s ease;
}
.logo-lightbox.is-open { opacity: 1; visibility: visible; }
.logo-lightbox img {
    max-width: min(90vw, 560px); max-height: 84vh; border-radius: 20px;
    box-shadow: 0 40px 90px -20px rgba(0, 0, 0, .7); background: #fff;
    transform: scale(.94); transition: transform .22s ease;
}
.logo-lightbox.is-open img { transform: scale(1); }
.logo-lightbox__close {
    position: absolute; top: 22px; inset-inline-end: 26px;
    width: 44px; height: 44px; border-radius: 50%; border: 0;
    background: rgba(255, 255, 255, .14); color: #fff; font-size: 1.9rem; line-height: 1;
    display: grid; place-items: center; cursor: pointer; transition: background .2s;
}
.logo-lightbox__close:hover { background: rgba(255, 255, 255, .26); }

/* ===================== BANNER = SITE TITLE ONLY (content descended) ===================== */
.page-hero--brand { display: flex; align-items: center; justify-content: center; /*min-height: 56vh;*/ text-align: center; }
.page-hero--brand .container { width: 100%; max-width: none; }
.page-hero__brand {
    display: block;
    font-family: var(--font-display); font-weight: 700;
    font-size: 15vw; line-height: .95; letter-spacing: .15em;
    white-space: nowrap;
    text-align: center;
    color: var(--accent, #ff5d5d);
    text-shadow: 4px 6px 20px var(--accent, red);
}

/* Page title + intro, moved below the banner */
.chapter__head { max-width: 820px; margin-bottom: 36px; }
.chapter__head .eyebrow { margin-top: 4px; }
.chapter__title { font-size: clamp(2rem, 4.6vw, 3.2rem); margin-top: 14px; max-width: 24ch; }

/* ===================== RICH CONTENT: subheadings + ASCII flow diagram ===================== */
.rich h3 { color: var(--ink); font-family: var(--font-display); font-size: 1.4rem; line-height: 1.2; margin: 1.7em 0 .6em; }
.ch-diagram {
    direction: ltr; text-align: start;
    font-family: ui-monospace, "Cascadia Code", "Courier New", monospace;
    background: #0b0f22; color: #cdd6ff;
    border: 1px solid rgba(255, 255, 255, .08); border-radius: 14px;
    padding: 22px 24px; margin: 22px 0;
    font-size: .9rem; line-height: 1.55; overflow-x: auto; white-space: pre;
}

.fixed-button {
  position: fixed;
  bottom: 20px;
  inset-inline-end: 20px;
  z-index: 1000;
  transition: bottom 0.1s ease; /* Pour un mouvement fluide */
}

/* Classe activée par JavaScript quand le footer est visible */
.fixed-button.at-footer {
  position: absolute;
  bottom: 20px; /* Devient relatif au parent si le parent entoure la page, ou ajusté via JS */
}
