/* Handler — homepage */

:root {
    --bg: #000;
    --ink: #f4f7ff;
    --muted: rgba(226, 234, 255, 0.68);
    --faint: rgba(226, 234, 255, 0.42);
    --blue: #017aff;
    --blue-soft: #4a9bf0;
    --glint: #a1ecff;
    --plum: #22001d;
    --line: rgba(161, 236, 255, 0.14);
    --glass: rgba(8, 12, 28, 0.42);
    --glass-strong: rgba(6, 9, 22, 0.66);
    --radius: 22px;
    --container: 1180px;
    --gutter: clamp(16px, 4vw, 40px);
    --sans: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
    --display: "Archivo", "Arial Black", system-ui, sans-serif;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 88px;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
}

::selection {
    background: var(--blue);
    color: #fff;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
}

/* ---------- Background ---------- */

.nebula {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.nebula.nebula-fallback canvas {
    opacity: 0.35;
}

/* Keeps text legible over the fluid while letting the colour through. */
.nebula-veil {
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(120% 80% at 50% 0%, transparent 40%, rgba(0, 0, 0, 0.55) 100%),
        linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.25) 100%);
}

main,
.footer,
.nav {
    position: relative;
    z-index: 2;
}

/* Content wrappers let pointer events through to the window listener
   anyway; nothing extra needed here. */

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6em;
    padding: 0.8em 1.4em;
    border-radius: 999px;
    border: 1px solid transparent;
    font: 700 0.95rem/1 var(--sans);
    letter-spacing: 0.01em;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
        background 0.25s, border-color 0.25s, color 0.25s;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:focus-visible,
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--glint);
    outline-offset: 3px;
}

.btn-lg {
    padding: 1.05em 1.75em;
    font-size: 1rem;
}

.btn-sm {
    padding: 0.65em 1.15em;
    font-size: 0.85rem;
}

.btn-primary {
    background: linear-gradient(135deg, #2a92ff 0%, var(--blue) 55%, #0052d6 100%);
    color: #fff;
    box-shadow: 0 0 0 1px rgba(161, 236, 255, 0.25) inset, 0 10px 30px -8px rgba(1, 122, 255, 0.7);
}

.btn-primary:hover {
    box-shadow: 0 0 0 1px rgba(161, 236, 255, 0.45) inset, 0 16px 44px -8px rgba(1, 122, 255, 0.9);
}

.btn-primary .fa-arrow-right {
    transition: transform 0.35s var(--ease);
}

.btn-primary:hover .fa-arrow-right {
    transform: translateX(3px);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.18);
    color: var(--ink);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-ghost:hover {
    border-color: rgba(161, 236, 255, 0.55);
    background: rgba(161, 236, 255, 0.08);
}

.btn-light {
    background: #fff;
    color: #031531;
}

.btn-light:hover {
    box-shadow: 0 16px 40px -10px rgba(255, 255, 255, 0.5);
}

/* ---------- Navigation ---------- */

.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    padding: 18px 0;
    transition: padding 0.4s var(--ease);
}

.nav-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--gutter);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.nav::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(3, 6, 16, 0.55);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border-bottom: 1px solid var(--line);
    opacity: 0;
    transition: opacity 0.4s var(--ease);
    z-index: -1;
}

.nav.is-scrolled {
    padding: 10px 0;
}

.nav.is-scrolled::before {
    opacity: 1;
}

.brand img {
    width: 150px;
    height: auto;
    margin: -18px 0;
    filter: drop-shadow(0 0 18px rgba(1, 122, 255, 0.35));
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links a:not(.btn) {
    display: block;
    padding: 0.5em 0.9em;
    border-radius: 999px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--muted);
    transition: color 0.2s, background 0.2s;
}

.nav-links a:not(.btn):hover,
.nav-links a.active {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.06);
}

.nav-links .btn {
    margin-left: 8px;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.04);
    cursor: pointer;
    position: relative;
}

.nav-toggle span {
    position: absolute;
    left: 12px;
    right: 12px;
    height: 1.5px;
    background: var(--ink);
    transition: transform 0.35s var(--ease), top 0.35s var(--ease);
}

.nav-toggle span:first-child {
    top: 17px;
}

.nav-toggle span:last-child {
    top: 25px;
}

.nav.is-open .nav-toggle span:first-child {
    top: 21px;
    transform: rotate(45deg);
}

.nav.is-open .nav-toggle span:last-child {
    top: 21px;
    transform: rotate(-45deg);
}

@media (max-width: 860px) {
    .nav-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: calc(100% + 8px);
        left: var(--gutter);
        right: var(--gutter);
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 10px;
        border-radius: 18px;
        border: 1px solid var(--line);
        background: rgba(4, 7, 18, 0.88);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        opacity: 0;
        transform: translateY(-8px);
        pointer-events: none;
        transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
    }

    .nav.is-open .nav-links {
        opacity: 1;
        transform: none;
        pointer-events: auto;
    }

    .nav-links a:not(.btn) {
        padding: 0.85em 1em;
        font-size: 1rem;
    }

    .nav-links .btn {
        margin: 6px 0 0;
        justify-content: center;
    }

    .brand img {
        width: 128px;
    }
}

/* ---------- Hero ---------- */

.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 120px 0 0;
}

.hero-inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 28px;
    padding: 7px 14px 7px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    color: var(--muted);
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--glint);
    box-shadow: 0 0 0 0 rgba(161, 236, 255, 0.6);
    animation: pulse 2.4s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(161, 236, 255, 0.55); }
    70% { box-shadow: 0 0 0 10px rgba(161, 236, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(161, 236, 255, 0); }
}

.hero-title {
    margin: 0;
    font-family: var(--display);
    font-size: clamp(2.5rem, 8.2vw, 6.8rem);
    font-weight: 900;
    font-stretch: 115%;
    line-height: 0.92;
    letter-spacing: -0.03em;
    text-transform: uppercase;
    text-shadow: 0 4px 60px rgba(0, 0, 0, 0.5);
}

em {
    font-style: normal;
    font-weight: inherit;
    background: linear-gradient(100deg, var(--glint) 0%, #6cc2ff 45%, var(--blue) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-title em {
    display: inline-block;
}

.hero-lead {
    max-width: 34rem;
    margin: 28px 0 40px;
    font-size: clamp(1.02rem, 1.6vw, 1.2rem);
    color: var(--muted);
}

.hero-lead strong {
    color: var(--ink);
    font-weight: 600;
    letter-spacing: 0.06em;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.marquee {
    position: relative;
    margin-top: 72px;
    padding: 20px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    overflow: hidden;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}

.marquee-track {
    display: flex;
    align-items: center;
    gap: 32px;
    width: max-content;
    animation: marquee 38s linear infinite;
}

.marquee-track span {
    font-family: var(--display);
    font-size: clamp(1rem, 1.8vw, 1.35rem);
    font-weight: 800;
    font-stretch: 115%;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: rgba(244, 247, 255, 0.82);
    white-space: nowrap;
}

.marquee-track i {
    font-style: normal;
    color: var(--blue-soft);
    font-size: 0.9rem;
}

@keyframes marquee {
    to { transform: translateX(-50%); }
}

.scroll-cue {
    position: absolute;
    right: var(--gutter);
    bottom: 120px;
    width: 26px;
    height: 42px;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 14px;
}

.scroll-cue span {
    position: absolute;
    top: 8px;
    left: 50%;
    width: 3px;
    height: 8px;
    margin-left: -1.5px;
    border-radius: 2px;
    background: var(--glint);
    animation: cue 1.8s var(--ease) infinite;
}

@keyframes cue {
    0% { opacity: 0; transform: translateY(0); }
    30% { opacity: 1; }
    100% { opacity: 0; transform: translateY(14px); }
}

@media (max-width: 860px) {
    .scroll-cue {
        display: none;
    }
}

/* ---------- Sections ---------- */

.section {
    padding: clamp(80px, 12vw, 150px) 0;
}

.section-head {
    max-width: 58rem;
    margin-bottom: 56px;
}

.kicker {
    margin: 0 0 18px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--glint);
}

.section-title {
    margin: 0 0 24px;
    font-family: var(--display);
    font-size: clamp(2rem, 4.6vw, 3.6rem);
    font-weight: 850;
    font-stretch: 110%;
    line-height: 1.02;
    letter-spacing: -0.03em;
}

.muted {
    color: var(--muted);
    margin: 0 0 18px;
    max-width: 38rem;
}

/* About */

.about {
    display: grid;
    grid-template-columns: 1fr 1.05fr;
    gap: clamp(40px, 6vw, 80px);
    align-items: center;
}

.about-visual {
    position: relative;
}

.about-visual img {
    position: relative;
    width: 100%;
    filter: drop-shadow(0 40px 60px rgba(0, 0, 0, 0.6));
}

.glow {
    position: absolute;
    inset: 10% 5%;
    background: radial-gradient(closest-side, rgba(1, 122, 255, 0.55), transparent);
    filter: blur(40px);
}

@media (max-width: 900px) {
    .about {
        grid-template-columns: 1fr;
    }
}

/* Cards */

.bento {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(240px, auto);
    gap: 16px;
}

.card {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--glass);
    backdrop-filter: blur(16px) saturate(130%);
    -webkit-backdrop-filter: blur(16px) saturate(130%);
    transition: transform 0.5s var(--ease), border-color 0.4s;
}

.card:hover {
    border-color: rgba(161, 236, 255, 0.35);
}

.card h3 {
    margin: 0 0 10px;
    font-size: 1.3rem;
    font-weight: 800;
    font-stretch: 108%;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.card-feature {
    grid-column: span 2;
    grid-row: span 2;
    min-height: 520px;
}

.card-feature img,
.card-image img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 1.2s var(--ease);
}

.card-feature:hover img,
.card-image:hover img {
    transform: scale(1.05);
}

.card-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 28px;
    background: linear-gradient(180deg, transparent, rgba(2, 4, 14, 0.75) 35%, rgba(2, 4, 14, 0.95));
}

.card-feature .card-overlay {
    padding: 36px;
}

.card-feature h3 {
    font-size: clamp(1.6rem, 2.6vw, 2.1rem);
}


.card-image {
    min-height: 240px;
}

.card-image .card-overlay {
    padding: 22px;
}

.card-image h3 {
    font-size: 1.1rem;
}

.card-glass {
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.icon {
    width: 48px;
    height: 48px;
    margin-bottom: auto;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(1, 122, 255, 0.35), rgba(161, 236, 255, 0.12));
    border: 1px solid rgba(161, 236, 255, 0.25);
    color: var(--glint);
    font-size: 1.1rem;
}

.card-glass .icon + h3 {
    margin-top: 40px;
}

.tag {
    display: inline-block;
    margin-bottom: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(161, 236, 255, 0.3);
    background: rgba(1, 122, 255, 0.18);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--glint);
}

@media (max-width: 960px) {
    .bento {
        grid-template-columns: repeat(2, 1fr);
    }

    .card-feature {
        grid-row: auto;
        min-height: 460px;
    }
}

@media (max-width: 620px) {
    .bento {
        grid-template-columns: 1fr;
    }

    .card-feature {
        grid-column: auto;
    }

    .card-image {
        min-height: 260px;
    }
}

/* Video */

.video-wrap {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: clamp(40px, 6vw, 72px);
    align-items: center;
}

.video-frame {
    position: relative;
    padding: 10px;
    border-radius: calc(var(--radius) + 6px);
    border: 1px solid var(--line);
    background: var(--glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 40px 100px -30px rgba(1, 122, 255, 0.55);
}

.video-frame iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: var(--radius);
    background: #000;
}

.checks {
    list-style: none;
    padding: 0;
    margin: 28px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.checks li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.04);
    font-size: 0.9rem;
    font-weight: 500;
}

.checks svg,
.checks i {
    color: var(--glint);
    font-size: 0.8rem;
}

@media (max-width: 900px) {
    .video-wrap {
        grid-template-columns: 1fr;
    }
}

/* CTA */

.cta {
    position: relative;
    overflow: hidden;
    padding: clamp(48px, 8vw, 96px) clamp(24px, 6vw, 80px);
    border-radius: 32px;
    text-align: center;
    border: 1px solid rgba(161, 236, 255, 0.25);
    background:
        radial-gradient(80% 120% at 50% 0%, rgba(1, 122, 255, 0.55), transparent 70%),
        linear-gradient(180deg, rgba(2, 30, 80, 0.55), rgba(5, 8, 25, 0.75));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.cta h2 {
    margin: 0 auto 18px;
    max-width: 18ch;
    font-family: var(--display);
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 900;
    font-stretch: 112%;
    line-height: 1;
    letter-spacing: -0.03em;
}

.cta em {
    background: none;
    color: var(--glint);
}

.cta p {
    max-width: 34rem;
    margin: 0 auto 36px;
    color: var(--muted);
}

/* Contact */

.contacts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.contact {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 28px;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    text-decoration: none;
    transition: transform 0.45s var(--ease), border-color 0.3s, background 0.3s;
}

.contact:hover {
    transform: translateY(-4px);
    border-color: rgba(161, 236, 255, 0.4);
    background: rgba(1, 50, 120, 0.35);
}

.contact > svg:first-child,
.contact > i:first-child {
    font-size: 1.4rem;
    align-self: flex-start;
    color: var(--glint);
    margin-bottom: 28px;
}

.contact .label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--faint);
}

.contact .value {
    font-size: 1.1rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.contact .go {
    position: absolute;
    top: 28px;
    right: 28px;
    font-size: 0.85rem;
    color: var(--faint);
    transition: color 0.3s, transform 0.4s var(--ease);
}

.contact:hover .go {
    color: var(--glint);
    transform: translate(2px, -2px);
}

@media (max-width: 860px) {
    .contacts {
        grid-template-columns: 1fr;
    }
}

/* ---------- Footer ---------- */

.footer {
    padding: 48px 0 40px;
    border-top: 1px solid var(--line);
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.footer img {
    width: 130px;
    height: auto;
    margin: -14px 0;
}

.footer p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--faint);
}

.social {
    display: flex;
    gap: 10px;
}

.social a {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1px solid var(--line);
    color: var(--muted);
    transition: color 0.25s, border-color 0.25s, background 0.25s, transform 0.35s var(--ease);
}

.social a:hover {
    color: #fff;
    border-color: rgba(161, 236, 255, 0.5);
    background: rgba(1, 122, 255, 0.25);
    transform: translateY(-2px);
}

@media (max-width: 620px) {
    .footer-inner {
        flex-direction: column;
        text-align: center;
    }
}

/* ---------- Toasts (Django messages) ---------- */

.toasts {
    position: fixed;
    top: 96px;
    left: 50%;
    z-index: 60;
    width: min(92vw, 440px);
    transform: translateX(-50%);
    display: grid;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(161, 236, 255, 0.35);
    background: rgba(3, 20, 50, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 20px 50px -20px rgba(1, 122, 255, 0.8);
    animation: toast-in 0.6s var(--ease) both;
    transition: opacity 0.4s, transform 0.4s var(--ease);
}

.toast > svg,
.toast > i {
    color: var(--glint);
    flex: none;
}

.toast span {
    flex: 1;
    font-size: 0.95rem;
}

.toast.is-hiding {
    opacity: 0;
    transform: translateY(-10px);
}

.toast-close {
    border: 0;
    background: none;
    color: var(--muted);
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

@keyframes toast-in {
    from { opacity: 0; transform: translateY(-14px); }
}

/* ---------- Reveal on scroll ---------- */

.js .reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
    transition-delay: var(--d, 0s);
}

.js .reveal.is-in {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .js .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .marquee-track,
    .dot,
    .scroll-cue span {
        animation: none;
    }
}
