/* ============================================================
   Section 01 — Navbar + Hero
   Figma frame: "Desktop - 5" / "hero section"
   ============================================================ */

/* ─── Tokens (scoped to .nl- prefix to avoid collisions) ─── */
:root {
    --nl-bg-deep: #141C31;
    --nl-bg-card: #0F172A;
    --nl-blue: #3B82F6;
    --nl-blue-hover: #2563EB;
    --nl-cyan: #00BCFF;
    --nl-cyan-accent: #00A6F4;
    --nl-cyan-light: #B8E6FE;
    --nl-white: #FFFFFF;
    --nl-text-muted: #919193;
    --nl-text-dim: #90A1B9;
    --nl-text-prompt: #62748E;
    --nl-text-nav: #D3D3D3;
    --nl-font: 'Plus Jakarta Sans', sans-serif;
    --nl-font-alt: 'Inter', sans-serif;
    --nl-radius-pill: 999px;
    --nl-radius-card: 11px;
    --nl-radius-terminal: 10px;
}

/* ─── Navbar ─── */
.nl-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(20, 28, 49, 0.25);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

.nl-header.scrolled {
    background: rgba(20, 28, 49, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.06);
}

.nl-nav {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px clamp(20px, 5vw, 94px);
    position: relative;
    z-index: 1;
}

.nl-nav__logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nl-nav__logo img {
    width: clamp(100px, 15vw, 136px);
    height: auto;
}

.nl-nav__links {
    display: flex;
    gap: clamp(16px, 3vw, 32px);
}

.nl-nav__links a {
    color: var(--nl-text-nav);
    text-decoration: none;
    font-family: var(--nl-font-alt);
    font-size: clamp(12px, 1.1vw, 14px);
    font-weight: 500;
    line-height: 20px;
    letter-spacing: -0.2px;
    transition: color 0.2s ease;
}

.nl-nav__links a:hover {
    color: var(--nl-blue);
    opacity: 1;
}

.nl-nav__actions {
    display: flex;
    align-items: center;
    gap: clamp(16px, 3vw, 32px);
}

.nl-btn-login {
    display: inline-flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.66);
    font-family: var(--nl-font-alt);
    font-size: clamp(14px, 1.1vw, 16px);
    font-weight: 500;
    line-height: 24px;
    letter-spacing: -0.3px;
    padding: 10px 14px;
    text-decoration: none;
    background: transparent;
    transform: translateZ(0) scale(1);
    transition: color 0.24s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

.nl-btn-login:hover {
    color: #C0CDE0;
    background: transparent;
    transform: scale(1.045);
    opacity: 1;
}

.nl-btn-demo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: clamp(8px, 1vw, 10px) clamp(14px, 1.2vw, 18px);
    border-radius: var(--nl-radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    font-family: var(--nl-font-alt);
    font-size: clamp(14px, 1.1vw, 16px);
    font-weight: 500;
    line-height: 24px;
    letter-spacing: -0.3px;
    cursor: pointer;
    text-decoration: none;
    transform: translateZ(0);
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.nl-btn-demo:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    transform: translateY(-1px);
}

.nl-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    background: var(--nl-blue);
    color: var(--nl-white);
    padding: clamp(8px, 1vw, 10px) clamp(16px, 1.4vw, 20px);
    border-radius: var(--nl-radius-pill);
    font-family: var(--nl-font-alt);
    font-size: clamp(14px, 1.1vw, 16px);
    font-weight: 500;
    line-height: 24px;
    letter-spacing: -0.3px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transform: translateZ(0);
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 0 0 rgba(59, 130, 246, 0);
}

.nl-btn-primary::before {
    content: "";
    position: absolute;
    inset: -7px -11px;
    border-radius: 999px;
    background: radial-gradient(60% 85% at 50% 50%, rgba(59, 130, 246, 0.46) 0%, rgba(59, 130, 246, 0) 100%);
    filter: blur(8px);
    opacity: 0.4;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: -1;
}

.nl-btn-primary:hover {
    background: var(--nl-blue-hover);
    opacity: 1;
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.34);
}

.nl-btn-primary:hover::before {
    opacity: 0.9;
    transform: scale(1.05);
}

.nl-btn-primary:active {
    transform: translateY(0);
}

/* Mobile menu toggle */
.nl-nav__mobile-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    gap: 4px;
}

.nl-nav__mobile-toggle span {
    width: 24px;
    height: 2px;
    background: var(--nl-white);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Mobile dropdown */
.nl-nav__mobile-dropdown {
    display: block;
    position: absolute;
    top: calc(100% + 8px);
    right: 20px;
    width: 200px;
    max-height: 80vh;
    overflow-y: auto;
    background: #0a1628;
    border: 1px solid #303842;
    border-radius: 12px;
    padding: 16px 0;
    z-index: 1001;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    opacity: 0;
    transform: translateY(-10px);
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
}

.nl-nav__mobile-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    right: 24px;
    width: 12px;
    height: 12px;
    background: #0a1628;
    border: 1px solid #303842;
    border-bottom: none;
    border-right: none;
    transform: rotate(45deg);
}

.nl-nav__mobile-dropdown.active {
    opacity: 1 !important;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
}

.nl-nav__mobile-dropdown a {
    display: block;
    padding: 12px 20px;
    color: var(--nl-white);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    border-radius: 6px;
    margin: 0 8px;
}

.nl-nav__mobile-dropdown a:hover {
    color: var(--nl-blue);
    background: rgba(59, 130, 246, 0.1);
    opacity: 1;
}

.nl-nav__mobile-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #303842;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-left: 8px;
    margin-right: 8px;
}

.nl-nav__mobile-actions .nl-btn-login {
    text-align: center;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    background: transparent;
    border: 1px solid #303842;
}

.nl-nav__mobile-actions .nl-btn-primary {
    font-size: 12px;
    padding: 8px 16px;
    border-radius: 6px;
}

/* ─── Hero background ─── */
.nl-hero-bg {
    background-color: var(--nl-bg-deep);
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* Grid overlay — Figma "grid lines" layer */
.nl-hero-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to right, rgba(255, 255, 255, 0.09) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.09) 1px, transparent 1px);
    background-size: 80px 80px;
    pointer-events: none;
    z-index: 1;
    -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 0%, transparent 80%);
    mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, black 0%, transparent 80%);
}

/* Dot pattern — Figma "Pattern" layer */
.nl-hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 13px 13px;
    pointer-events: none;
    z-index: 1;
    -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 45%, black 0%, transparent 75%);
    mask-image: radial-gradient(ellipse 60% 50% at 50% 45%, black 0%, transparent 75%);
}

/* ─── Glow orbs (Figma Ellipse 28/29/30 + Vectors) ─── */
.nl-hero-glows {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

/* Ellipse 29 — large gradient sweep */
.nl-hero-glows__gradient {
    position: absolute;
    width: 1700px;
    height: 1700px;
    left: 5%;
    top: -580px;
    background: linear-gradient(152deg, #141C31 62%, #3B82F6 83%);
    filter: blur(230px);
    border-radius: 50%;
    transform: rotate(-52deg);
}

/* Ellipse 28 — blue core */
.nl-hero-glows__blue {
    position: absolute;
    width: 1100px;
    height: 1100px;
    left: 30%;
    top: -700px;
    background: #3B82F6;
    filter: blur(230px);
    border-radius: 50%;
}

/* Ellipse 30 — white highlight */
.nl-hero-glows__white {
    position: absolute;
    width: 950px;
    height: 950px;
    left: 55%;
    top: -750px;
    background: #FFFFFF;
    filter: blur(230px);
    border-radius: 50%;
}

/* Vector 109 — dark mask */
.nl-hero-glows__mask-1 {
    position: absolute;
    width: 1400px;
    height: 710px;
    left: 4%;
    top: -340px;
    background: linear-gradient(265deg, rgba(20, 28, 49, 0.85) 53%, transparent 100%);
    filter: blur(115px);
    transform: rotate(-73deg);
}

/* Vector 111 — dark mask */
.nl-hero-glows__mask-2 {
    position: absolute;
    width: 980px;
    height: 500px;
    left: -6%;
    top: -170px;
    background: linear-gradient(265deg, rgba(20, 28, 49, 0.85) 53%, transparent 100%);
    filter: blur(115px);
    transform: rotate(-87deg);
}

/* Vector 110 — dark mask */
.nl-hero-glows__mask-3 {
    position: absolute;
    width: 1100px;
    height: 560px;
    left: 36%;
    top: -80px;
    background: linear-gradient(74deg, rgba(20, 28, 49, 0.7) 26%, transparent 100%);
    filter: blur(80px);
    transform: rotate(-73deg);
}

/* Ellipse 61 — bottom-right blue accent */
.nl-hero-glows__accent {
    position: absolute;
    width: 1267px;
    height: 589px;
    right: -15%;
    top: 0;
    background: #3B82F6;
    opacity: 0.39;
    filter: blur(100px);
    border-radius: 50%;
}

/* ─── Hero section layout ─── */
.nl-hero {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: clamp(24px, 4.5vw, 64px);
    padding: clamp(40px, 6vw, 150px) clamp(32px, 4.5vw, 64px);
    text-align: left;
    max-width: 1440px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* ─── Hero left: copy ─── */
.nl-hero__content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 624px;
    width: 45%;
}

.nl-hero__eyebrow {
    margin: 0 0 clamp(10px, 1.2vw, 15px);
    max-width: 540px;
    font-family: var(--nl-font);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--nl-blue);
}

.nl-hero__title {
    font-family: var(--nl-font);
    font-size: clamp(36px, 4.2vw, 54px);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.04em;
    text-wrap: balance;
    color: var(--nl-white);
    max-width: 624px;
    margin: 0;
}

.nl-hero__subtitle {
    font-family: var(--nl-font);
    font-size: clamp(16px, 1.2vw, 20px);
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: -0.03em;
    color: var(--nl-text-muted);
    margin-top: clamp(18px, 2vw, 30px);
    max-width: 560px;
    text-align: left;
}

/* Bold lead sub-headline — the core promise; #2 in the hierarchy after the H1 */
.nl-hero__subtitle--lead {
    font-size: clamp(18px, 1.5vw, 21px);
    font-weight: 600;
    line-height: 1.35;
    color: #E8EDF5;
}

/* Hero chips — row 1 = workloads (blue), row 2 = trust (green).
   Each row stays on ONE line at EVERY width. If it can't fit (the 45% desktop
   text column at ~1025-1180px, or phones), it scrolls horizontally instead of
   wrapping — hidden scrollbar + a soft right-edge fade hint. */
.nl-hero__chips {
    margin-top: clamp(18px, 2vw, 26px);
    display: flex;
    flex-direction: column;
    gap: clamp(14px, 1.6vw, 18px);
    width: 100%;
}

/* Each pill row gets a short caption above it (workloads / trust) */
.nl-hero__chip-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.nl-hero__chip-label {
    margin: 0;
    font-family: var(--nl-font);
    font-size: clamp(13px, 1vw, 15px);
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: -0.01em;
    color: var(--nl-text-muted);
}

.nl-hero__chip-row {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;                 /* Firefox */
    -webkit-overflow-scrolling: touch;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent 100%);
    mask-image: linear-gradient(to right, #000 calc(100% - 26px), transparent 100%);
}

.nl-hero__chip-row::-webkit-scrollbar {
    display: none;                         /* Chrome / Safari */
}

.nl-hero__chip {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    padding: 6px 12px;
    border-radius: var(--nl-radius-pill);
    border: 1px solid rgba(59, 130, 246, 0.32);
    background: rgba(59, 130, 246, 0.08);
    color: #C7D6EE;
    font-family: var(--nl-font-alt);
    font-size: clamp(12px, 0.95vw, 14px);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

/* Trust row — reuses the "with Skyportal" success green (section-02 toggle) */
.nl-hero__chip--trust {
    border-color: rgba(34, 197, 94, 0.36);
    background: rgba(34, 197, 94, 0.10);
    color: #4ADE80;
}

.nl-hero__cta {
    margin-top: clamp(24px, 3vw, 40px);
    display: flex;
    align-items: center;
    gap: 8px;
}

.nl-hero__cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 10px 16px;
    background: var(--nl-blue);
    border-radius: var(--nl-radius-pill);
    font-family: var(--nl-font);
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    letter-spacing: -0.2px;
    color: #E8EAED;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transform: translateZ(0);
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 0 0 rgba(59, 130, 246, 0);
}

.nl-hero__cta-btn::before {
    content: "";
    position: absolute;
    inset: -9px -12px;
    border-radius: 999px;
    background: radial-gradient(60% 85% at 50% 50%, rgba(59, 130, 246, 0.52) 0%, rgba(59, 130, 246, 0) 100%);
    filter: blur(10px);
    opacity: 0.5;
    pointer-events: none;
    z-index: -1;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.nl-hero__cta-btn:hover {
    background: var(--nl-blue-hover);
    opacity: 1;
    transform: translateY(-2px) scale(1.01);
    box-shadow: 0 14px 32px rgba(37, 99, 235, 0.35);
}

.nl-hero__cta-btn:hover::before {
    opacity: 0.95;
    transform: scale(1.06);
}

.nl-hero__cta-btn:active {
    transform: translateY(0);
}

/* ─── Hero right: monitor demo animation ─── */
.nl-hero__visual {
    width: 70%;
    max-width: 980px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* Hero demo — the Skyportal monitor animation, embedded (1331×697) and
   scaled to the visual column. Plays once, then settles into a blurred
   end-card with the "From regression to verified fix." line + Replay. */
.nl-hero-demo {
    width: 100%;
    aspect-ratio: 1331 / 697;
    border-radius: var(--nl-radius-card);
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 30px 90px -30px rgba(0, 0, 0, 0.8);
}

.nl-hero-demo__iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 1331px;
    height: 697px;
    border: 0;
    transform-origin: top left;
    will-change: transform;
}

.nl-hero-demo__end {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 20px;
    text-align: center;
    background: rgba(5, 7, 12, 0.3);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.55s ease, visibility 0s linear 0.55s;
}

.nl-hero-demo.is-ended .nl-hero-demo__end {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.55s ease;
}

.nl-hero-demo__end-text {
    margin: 0;
    max-width: 80%;
    font-family: var(--nl-font);
    font-size: clamp(20px, 2.6vw, 30px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.6px;
    color: var(--nl-white);
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.55);
}

.nl-hero-demo__replay {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--nl-radius-pill);
    border: 1px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.1);
    color: var(--nl-white);
    font-family: var(--nl-font-alt);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.nl-hero-demo__replay svg {
    width: 16px;
    height: 16px;
}

.nl-hero-demo__replay:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
    .nl-hero-demo__end {
        transition: none;
    }
}

/* ─── Animations ─── */
@keyframes nl-fadeInUp {
    from { opacity: 0; transform: translate3d(0, 30px, 0); }
    to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes nl-fadeInDown {
    from { opacity: 0; transform: translate3d(0, -20px, 0); }
    to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes nl-scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

.nl-anim-fade-up { animation: nl-fadeInUp 0.7s ease-out both; }

.nl-anim-fade-down { animation: nl-fadeInDown 0.6s ease-out both; }

.nl-anim-scale-in { animation: nl-scaleIn 0.8s ease-out both; }

.nl-delay-200 { animation-delay: 0.2s; }

.nl-delay-400 { animation-delay: 0.4s; }

.nl-delay-500 { animation-delay: 0.5s; }

.nl-delay-600 { animation-delay: 0.6s; }

.nl-delay-700 { animation-delay: 0.7s; }

/* ─── Responsive ─── */
@media (max-width: 1024px) {
    .nl-hero {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: clamp(20px, 5vw, 37px) 20px;
    }

    .nl-hero__content {
        width: 100%;
        max-width: 624px;
        align-items: center;
    }

    .nl-hero__subtitle {
        text-align: left;
    }

    /* Match the pill rows (left-aligned) so the captions don't float centered */
    .nl-hero__chip-label {
        text-align: left;
    }

    .nl-hero__eyebrow {
        text-align: center;
    }

    .nl-hero__cta {
        justify-content: flex-start;
        align-self: flex-start;
    }

    .nl-hero__visual {
        width: 100%;
        max-width: 680px;
        justify-content: center;
        margin-top: clamp(22px, 5vw, 40px);
    }

    .nl-nav__links,
    .nl-nav__actions {
        display: none;
    }

    .nl-nav__mobile-toggle {
        display: flex;
    }

    .nl-nav {
        padding: 20px 40px;
    }
}

@media (max-width: 768px) {
    .nl-nav {
        padding: 15px 20px;
    }

}

@media (max-width: 640px) {
    .nl-hero {
        padding-top: 20px;
    }

    .nl-hero__cta {
        justify-content: flex-start;
        align-self: flex-start;
    }

}

@media (prefers-reduced-motion: reduce) {
    .nl-anim-fade-up,
    .nl-anim-fade-down,
    .nl-anim-scale-in {
        animation: none;
        opacity: 1;
        transform: none;
    }

}

