:root {
    --toolbar-height: 80px;
    --hero-side-pad: clamp(24px, 6vw, 88px);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    color: #122033;
}

.glass {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.toolbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--toolbar-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 0 20px;
    z-index: 1000;
    border-radius: 0;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.brand-name {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: white;
}

.toolbar-nav {
    display: flex;
    align-items: center;
    gap: 16px;
}

.toolbar-link {
    color: rgba(255, 255, 255, 0.94);
    text-decoration: none;
    font-size: 0.98rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    border-bottom: 1px solid transparent;
    transition: color 180ms ease, border-color 180ms ease;
}

.toolbar-link:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.9);
}

.login-toggle {
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
    font: inherit;
}

.login-menu-wrap {
    position: relative;
}

.login-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 190px;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.28);
    box-shadow: 0 10px 30px rgba(9, 27, 49, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: grid;
    gap: 2px;
    opacity: 0;
    transform: translateY(-4px);
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease;
}

.login-menu-wrap.is-open .login-menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.login-menu-item {
    display: block;
    text-decoration: none;
    color: #0f2849;
    font-size: 0.93rem;
    font-weight: 600;
    line-height: 1.25;
    padding: 9px 10px;
    border-radius: 8px;
}

.login-menu-item:hover {
    background: rgba(56, 130, 246, 0.12);
}

.toolbar.section3-active .toolbar-link {
    color: #122033;
}

.toolbar.section3-active .brand-name {
    color: #122033;
}

.toolbar.section3-active .toolbar-link:hover {
    color: #000000;
    border-color: rgba(0, 0, 0, 0.7);
}

.toolbar-cta {
    text-decoration: none;
    color: #0f2e57;
    background: linear-gradient(145deg, #f6fbff 0%, #d8ebff 100%);
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    transition: transform 180ms ease, filter 180ms ease, box-shadow 180ms ease;
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.2);
}

.toolbar-cta:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

.hero {
    position: relative;
    height: 100vh;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0.15) 45%, rgba(0, 0, 0, 0.05) 100%);
    z-index: 1;
}

.hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding: var(--hero-side-pad);
    pointer-events: none;
}

.hero-line {
    margin: 0;
    color: #ffffff;
    text-shadow: 0 2px 18px rgba(0, 0, 0, 0.4);
    font-size: clamp(1.9rem, 5vw, 4.4rem);
    line-height: 1.05;
    font-weight: 700;
    max-width: 14ch;
    opacity: 0;
}

.hero-secondary {
    position: absolute;
    z-index: 3;
    left: 0;
    right: 0;
    top: calc(var(--toolbar-height) + clamp(18px, 4vw, 52px));
    bottom: clamp(24px, 5vw, 68px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(20px, 5vw, 56px) var(--hero-side-pad);
    opacity: 0;
}

.hero-secondary-content {
    width: 100%;
    color: #f9fbff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: clamp(20px, 3vw, 60px);
}

.hero-secondary-content h2 {
    margin: 0 0 10px;
}

.hero-secondary-content p {
    margin: 0;
}

.flexRow {
    display: flex;
    flex-direction: row;
}

.flexColumn {
    display: flex;
    flex-direction: column;
}
.flexFill {
    flex: 1;
}

#section2_message {
    display: flex;
    flex-direction: column;
    gap: 14px;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
    flex: 1 1 auto;
    max-width: min(52vw, 760px);
}

.section2-heading {
    margin: 0;
    font-size: clamp(1.9rem, 5vw, 4.4rem);
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.section2-stage {
    display: block;
}

.section2-copy {
    margin: 0;
    font-size: clamp(1rem, 1.45vw, 1.28rem);
    line-height: 1.45;
    max-width: 38ch;
    color: rgba(245, 249, 255, 0.94);
}

#screenCards {
    position: relative;
    flex: 0 0 auto;
    width: min(40vw, 560px);
    aspect-ratio: 1.48;
}

.screenCard {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.screenCard:nth-child(1) { z-index: 5; }
.screenCard:nth-child(2) { z-index: 4; }
.screenCard:nth-child(3) { z-index: 3; }
.screenCard:nth-child(4) { z-index: 2; }
.screenCard:nth-child(5) { z-index: 1; }

.section3 {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 100vh;
    padding: clamp(28px, 5vw, 56px) var(--hero-side-pad) 72px;
    background: linear-gradient(165deg, #e9f2ff 0%, #f2faf8 48%, #fff6ec 100%);
}

.section3::before,
.section3::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    pointer-events: none;
    z-index: 0;
}

.section3::before {
    width: clamp(220px, 28vw, 420px);
    height: clamp(220px, 28vw, 420px);
    top: clamp(-100px, -8vw, -48px);
    right: clamp(-120px, -9vw, -56px);
    background: radial-gradient(circle at 30% 30%, rgba(66, 133, 244, 0.28) 0%, rgba(66, 133, 244, 0) 72%);
}

.section3::after {
    width: clamp(260px, 32vw, 460px);
    height: clamp(260px, 32vw, 460px);
    bottom: clamp(-160px, -10vw, -68px);
    left: clamp(-150px, -11vw, -60px);
    background: radial-gradient(circle at 65% 35%, rgba(34, 197, 94, 0.2) 0%, rgba(34, 197, 94, 0) 70%);
}

.section3-content {
    position: relative;
    z-index: 1;
    max-width: 1200px;
    margin: 0 auto;
    background: transparent;
}

.section3 h2 {
    margin: 0 0 12px;
    font-size: clamp(2rem, 4.2vw, 3.1rem);
    line-height: 1.1;
    color: #0d2b54;
}

.section3 p {
    margin: 0;
    font-size: clamp(1rem, 1.4vw, 1.25rem);
    line-height: 1.5;
    color: #294765;
}

.section3-intro {
    margin-bottom: clamp(18px, 2.2vw, 30px);
    max-width: 52ch;
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(14px, 2.3vw, 24px);
}

.portal-card {
    --accent-rgb: 58, 111, 239;
    background: linear-gradient(160deg, rgba(var(--accent-rgb), 0.13) 0%, #ffffff 40%);
    border: 1px solid rgba(var(--accent-rgb), 0.22);
    border-top: 4px solid rgba(var(--accent-rgb), 0.85);
    border-radius: 16px;
    padding: clamp(16px, 2vw, 24px);
    box-shadow: 0 10px 24px rgba(13, 40, 72, 0.08);
    transition: transform 220ms ease, box-shadow 220ms ease, border-color 220ms ease;
    transform-origin: center;
}

.portal-card:nth-child(2) { --accent-rgb: 14, 165, 233; }
.portal-card:nth-child(3) { --accent-rgb: 16, 185, 129; }
.portal-card:nth-child(4) { --accent-rgb: 245, 158, 11; }

.portal-card:hover {
    transform: translateY(-5px);
    border-color: rgba(var(--accent-rgb), 0.45);
    box-shadow: 0 16px 32px rgba(var(--accent-rgb), 0.2);
}

.portal-card h3 {
    margin: 0 0 12px;
    font-size: clamp(1.12rem, 1.9vw, 1.48rem);
    color: #10243d;
}

.portal-card ul {
    margin: 0;
    padding-left: 20px;
    color: #263b52;
    line-height: 1.55;
}

.portal-card li::marker {
    color: rgba(var(--accent-rgb), 0.95);
}

.portal-card li + li {
    margin-top: 8px;
}

.section4 {
    padding: clamp(36px, 5vw, 74px) var(--hero-side-pad);
    background: linear-gradient(180deg, #0d2b54 0%, #123a6f 100%);
}

.section4-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    gap: clamp(18px, 2.4vw, 30px);
}

.section4-copy h2 {
    margin: 0 0 10px;
    color: #f3f8ff;
    font-size: clamp(1.9rem, 3.6vw, 2.8rem);
    line-height: 1.12;
}

.section4-copy p {
    margin: 0;
    color: rgba(236, 244, 255, 0.92);
    font-size: clamp(1rem, 1.32vw, 1.2rem);
    line-height: 1.52;
    max-width: 62ch;
}

.section4-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(12px, 2vw, 20px);
}

.section4-card {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(182, 214, 255, 0.3);
    border-radius: 14px;
    padding: clamp(14px, 1.9vw, 22px);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.section4-card h3 {
    margin: 0 0 8px;
    font-size: clamp(1.12rem, 1.8vw, 1.36rem);
    color: #ffffff;
}

.section4-card p {
    margin: 0;
    font-size: clamp(0.96rem, 1.18vw, 1.08rem);
    line-height: 1.5;
    color: rgba(233, 242, 255, 0.9);
}

.section4-cta {
    display: grid;
    gap: 16px;
    background: rgba(5, 19, 40, 0.42);
    border: 1px solid rgba(172, 204, 246, 0.34);
    border-radius: 16px;
    padding: clamp(16px, 2.2vw, 28px);
}

.section4-cta-copy h3 {
    margin: 0 0 8px;
    color: #ffffff;
    font-size: clamp(1.3rem, 2.2vw, 1.8rem);
}

.section4-cta-copy p {
    margin: 0;
    color: rgba(230, 240, 255, 0.9);
    line-height: 1.5;
}

.demo-form {
    display: grid;
    gap: 12px;
}

.demo-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.demo-form label {
    display: grid;
    gap: 6px;
    color: rgba(238, 246, 255, 0.96);
    font-size: 0.95rem;
}

.demo-form input,
.demo-form textarea {
    width: 100%;
    border: 1px solid rgba(177, 206, 244, 0.42);
    background: rgba(255, 255, 255, 0.97);
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
    color: #10243d;
}

.demo-form input:focus,
.demo-form textarea:focus {
    outline: none;
    border-color: #93c5fd;
    box-shadow: 0 0 0 2px rgba(147, 197, 253, 0.28);
}

.demo-form textarea {
    resize: vertical;
    min-height: 108px;
}

.demo-submit {
    justify-self: start;
    border: 0;
    border-radius: 10px;
    padding: 10px 16px;
    background: linear-gradient(145deg, #4f9dff 0%, #2d7fe8 100%);
    color: #ffffff;
    font-size: 0.98rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
    box-shadow: 0 8px 20px rgba(45, 127, 232, 0.32);
}

.demo-submit:hover {
    transform: translateY(-2px);
    filter: brightness(1.03);
    box-shadow: 0 12px 24px rgba(45, 127, 232, 0.4);
}

.demo-submit:disabled,
.demo-submit:disabled:hover {
    cursor: not-allowed;
    opacity: 0.78;
    transform: none;
    filter: none;
    box-shadow: none;
}

.demo-status {
    display: none;
    margin: 2px 0 0;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.94rem;
    line-height: 1.45;
}

.demo-status.is-visible {
    display: block;
}

.demo-status.is-success {
    color: #dfffea;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(52, 211, 153, 0.45);
}

.demo-status.is-error {
    color: #ffe3e3;
    background: rgba(220, 38, 38, 0.24);
    border: 1px solid rgba(252, 165, 165, 0.44);
}

.site-footer {
    padding: clamp(24px, 3.2vw, 42px) var(--hero-side-pad) clamp(28px, 3.8vw, 46px);
    background: #08182f;
}

.site-footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    gap: 14px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-brand .brand-name {
    color: #e8f1ff;
}

.footer-copy {
    margin: 0;
    color: rgba(214, 226, 244, 0.9);
    font-size: 1rem;
    line-height: 1.5;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 18px;
}

.footer-links a {
    color: #cce0ff;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: color 180ms ease, border-color 180ms ease;
}

.footer-links a:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.85);
}

@media (max-width: 900px) {
    .hero-line {
        font-size: clamp(2.4rem, 10.5vw, 3.8rem);
        line-height: 1.02;
        max-width: 12ch;
    }

    .section2-heading {
        font-size: clamp(2.4rem, 10.5vw, 3.8rem);
        line-height: 1.02;
    }

    .toolbar {
        padding: 0 14px;
    }

    .toolbar-nav {
        gap: 12px;
    }

    .toolbar-link {
        font-size: 0.9rem;
    }

    .toolbar-cta {
        padding: 7px 12px;
        font-size: 0.84rem;
    }

    .hero-secondary {
        top: calc(var(--toolbar-height) + 18px);
        bottom: 18px;
        left: 0;
        right: 0;
        padding: 20px 14px;
    }

    .hero-secondary-content {
        justify-content: center;
        flex-direction: column;
        gap: 16px;
    }

    #screenCards {
        width: min(72vw, 340px);
    }

    #section2_message {
        align-items: center;
        text-align: center;
        max-width: 100%;
        margin-bottom: 14px;
    }

    .section3 {
        padding: 24px 14px 44px;
    }

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

    .section4 {
        padding: 28px 14px 34px;
    }

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

    .demo-form-row {
        grid-template-columns: 1fr;
    }

    .site-footer {
        padding: 24px 14px 32px;
    }
}

@media (max-width: 640px) {
    .brand-name {
        display: none;
    }

    .toolbar-nav {
        gap: 10px;
    }

    .login-menu {
        right: -6px;
        min-width: 176px;
    }
}

#scroll_message {
    width: 338px;
    color: white;
    font-size: 20px;
    padding: 24px;
    height: 80px;
    border-radius: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-left: auto;
    margin-right: auto;
}

#scroll_message_row{
    position: absolute;
    bottom:10px;
    width: 100%;
    display: none;
}

#scroll_message img {
    width: 40px;
    height: 40px;
    flex: 0 0 14px;
    display: block;
}

@media (prefers-reduced-motion: reduce) {
    .portal-card,
    .demo-submit {
        transition: none;
    }
}
