/* ═══════════════════════════════════════════════════════════════════════════
   AVI-SPL Lab — avispllab.us
   Brand: Nightshade #0A1D5F, Cobalt #0972CE, Turquoise #37C1CE
   Typography: IBM Plex Sans (body), Salmond-like (headlines via weight+caps)
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
    --nightshade: #0A1D5F;
    --nightshade-deep: #060F35;
    --cobalt: #0972CE;
    --turquoise: #37C1CE;
    --hyacinth: #792481;
    --poppy: #F89021;
    --white: #FFFFFF;
    --grey: #D9D8D6;
    --sky: #ACE2E2;
    --dark-teal: #11847D;
    --text-primary: #E8ECF4;
    --text-muted: #8B9DC3;
    --surface: rgba(10, 29, 95, 0.4);
    --surface-hover: rgba(9, 114, 206, 0.15);
    --border: rgba(55, 193, 206, 0.12);
    --border-hover: rgba(55, 193, 206, 0.3);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--nightshade-deep);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    position: relative;
}

/* ── Ambient background ─────────────────────────────────────────────────── */

.ambient {
    position: fixed;
    inset: -20%;
    background:
        radial-gradient(ellipse 60% 50% at 20% 20%, rgba(9, 114, 206, 0.08) 0%, transparent 70%),
        radial-gradient(ellipse 50% 60% at 80% 80%, rgba(55, 193, 206, 0.06) 0%, transparent 70%),
        radial-gradient(ellipse 40% 40% at 50% 50%, rgba(121, 36, 129, 0.04) 0%, transparent 70%);
    z-index: 0;
    pointer-events: none;
    transition: transform 0.3s ease-out;
}

.grid-overlay {
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(55, 193, 206, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(55, 193, 206, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: 0;
    pointer-events: none;
}

/* ── Navigation ─────────────────────────────────────────────────────────── */

.nav {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 2.5rem;
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(20px);
    background: rgba(6, 15, 53, 0.6);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-logo {
    height: 28px;
    width: auto;
    opacity: 0.95;
}

.nav-divider {
    width: 1px;
    height: 20px;
    background: var(--border-hover);
}

.nav-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    color: var(--turquoise);
    text-transform: uppercase;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: color 0.2s;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--turquoise);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--white);
}

.nav-link:hover::after {
    width: 100%;
}

/* ── Hero ────────────────────────────────────────────────────────────────── */

.hero {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 2rem;
    max-width: 900px;
    margin: 0 auto;
    width: 100%;
}

.hero-badge {
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.25em;
    color: var(--turquoise);
    text-transform: uppercase;
    padding: 0.4rem 1rem;
    border: 1px solid var(--border);
    border-radius: 100px;
    margin-bottom: 2rem;
    background: rgba(55, 193, 206, 0.05);
}

.hero-title {
    font-size: clamp(3.5rem, 10vw, 7rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    line-height: 0.9;
    color: var(--white);
    margin-bottom: 1rem;
    /* Subtle text depth */
    text-shadow:
        0 0 80px rgba(9, 114, 206, 0.3),
        0 0 160px rgba(55, 193, 206, 0.1);
}

.hero-sub {
    font-size: 1.1rem;
    font-weight: 300;
    color: var(--text-muted);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 3rem;
}

/* ── Arrow device ────────────────────────────────────────────────────────── */

.arrow-device {
    margin-bottom: 3rem;
    opacity: 0.4;
}

.arrow-svg {
    width: 200px;
    height: 40px;
    color: var(--turquoise);
}

.arrow-1 {
    animation: arrow-drift 3s ease-in-out infinite;
}

.arrow-2 {
    animation: arrow-drift 3s ease-in-out infinite 0.5s;
}

@keyframes arrow-drift {
    0%, 100% { opacity: 0.3; transform: translateX(0); }
    50% { opacity: 1; transform: translateX(6px); }
}

/* ── Portal cards ────────────────────────────────────────────────────────── */

.portals {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    width: 100%;
    max-width: 700px;
}

.portal {
    position: relative;
    padding: 2.5rem 2rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s ease;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.portal::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(9, 114, 206, 0.06) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
}

.portal:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow:
        0 8px 32px rgba(9, 114, 206, 0.1),
        0 0 0 1px rgba(55, 193, 206, 0.1);
}

.portal:hover::before {
    opacity: 1;
}

.portal-icon {
    position: relative;
    z-index: 1;
    width: 40px;
    height: 40px;
    margin-bottom: 1.25rem;
    color: var(--turquoise);
}

.portal-icon svg {
    width: 100%;
    height: 100%;
}

.portal-title {
    position: relative;
    z-index: 1;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--white);
    margin-bottom: 0.75rem;
}

.portal-desc {
    position: relative;
    z-index: 1;
    font-size: 0.85rem;
    font-weight: 300;
    line-height: 1.6;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.portal-cta {
    position: relative;
    z-index: 1;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cobalt);
    transition: color 0.2s;
}

.portal:hover .portal-cta {
    color: var(--turquoise);
}

.cta-arrow {
    display: inline-block;
    transition: transform 0.2s;
}

.portal:hover .cta-arrow {
    transform: translateX(4px);
}

/* ── Footer ──────────────────────────────────────────────────────────────── */

.footer {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 2.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.75rem;
    color: var(--text-muted);
    backdrop-filter: blur(20px);
    background: rgba(6, 15, 53, 0.6);
}

.footer-links {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.footer-links a {
    color: var(--text-muted);
    transition: color 0.2s;
    display: flex;
    align-items: center;
}

.footer-links a:hover {
    color: var(--turquoise);
}

.footer-links svg {
    width: 18px;
    height: 18px;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

@media (max-width: 640px) {
    .nav {
        padding: 1rem 1.25rem;
    }

    .nav-right {
        gap: 1.25rem;
    }

    .hero {
        padding: 3rem 1.25rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .portals {
        grid-template-columns: 1fr;
    }

    .footer {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1.25rem;
    }
}

/* ── Load animation ──────────────────────────────────────────────────────── */

@keyframes fade-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.hero-badge { animation: fade-up 0.6s ease both 0.1s; }
.hero-title { animation: fade-up 0.6s ease both 0.2s; }
.hero-sub { animation: fade-up 0.6s ease both 0.3s; }
.arrow-device { animation: fade-up 0.6s ease both 0.4s; }
.portals { animation: fade-up 0.6s ease both 0.5s; }
