:root {
    --bg-color: #050505;
    --text-primary: rgba(255, 255, 255, 0.9);
    --text-secondary: rgba(255, 255, 255, 0.6);
    --accent-lime: #BFFF00;
    --accent-cyan: #00FFFF;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body,
html {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-main);
    overscroll-behavior: none;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Typography */
h1 {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 800;
    letter-spacing: -0.05em;
    line-height: 1;
    margin-bottom: 1rem;
}

h2 {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

p {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 400;
    color: var(--text-secondary);
    line-height: 1.6;
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
}

.glow-text {
    text-shadow: 0 0 40px rgba(191, 255, 0, 0.3), 0 0 80px rgba(0, 255, 255, 0.15);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 1rem;
    left: 50%;
    width: 95%;
    max-width: 1200px;
    border-radius: 100px;

    /* Using grid for perfect centering */
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;

    padding: 0.8rem 1.5rem;
    z-index: 100;
    opacity: 0;
    transform: translate(-50%, -20px);
    transition: opacity 0.5s ease, transform 0.5s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid transparent;
}

.navbar.visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

.navbar.scrolled {
    background: rgba(5, 5, 5, 0.65);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.nav-brand {
    justify-self: start;
    font-weight: 600;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.nav-links {
    justify-self: center;
    display: none;
    gap: 2.5rem;
}

@media (min-width: 900px) {
    .nav-links {
        display: flex;
    }
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 400;
    transition: color 0.2s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-cta {
    justify-self: end;
}

.nav-cta,
.cta-button.primary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid transparent;
    background-image: linear-gradient(var(--bg-color), var(--bg-color)), linear-gradient(to right, var(--accent-lime), var(--accent-cyan));
    background-origin: border-box;
    background-clip: padding-box, border-box;
    padding: 0.7rem 1.4rem;
    border-radius: 2rem;
    font-size: 0.95rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.nav-cta:hover,
.cta-button.primary:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(191, 255, 0, 0.25);
}

/* Scrolly Wrapper */
.scrolly-wrapper {
    height: 800vh;
    /* Smooth, long read 8 viewport heights */
    position: relative;
}

/* Canvas Container */
.canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

#hero-canvas {
    width: 100vw;
    height: 100vh;
    object-fit: contain;
    /* ensures complete image is seen */
    will-change: transform;
}

.radial-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60vw;
    height: 60vh;
    background: radial-gradient(circle, rgba(191, 255, 0, 0.04) 0%, rgba(0, 255, 255, 0.02) 40%, rgba(5, 5, 5, 0) 70%);
    z-index: -2;
    pointer-events: none;
}

/* Text Overlays */
.text-overlays {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    z-index: 10;
}

.text-section {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) translateY(40px);
    opacity: 0;
    width: 100%;
    padding: 0 8vw;
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, transform;
}

.text-section.active {
    opacity: 1;
    transform: translateY(-50%) translateY(0);
    pointer-events: auto;
}

.text-section.fade-up {
    transform: translateY(-50%) translateY(-40px);
}

.centered {
    text-align: center;
}

.left-aligned {
    text-align: left;
    padding-right: 50vw;
    /* Keep text on left */
}

.right-aligned {
    text-align: right;
    padding-left: 50vw;
    /* Keep text on right */
}

@media (max-width: 900px) {
    .left-aligned {
        padding-right: 8vw;
        text-align: center;
    }

    .right-aligned {
        padding-left: 8vw;
        text-align: center;
    }

    /* Make navbar stack on very small screens or reduce padding */
    .navbar {
        padding: 1rem;
    }

    .nav-brand {
        font-size: 1rem;
    }

    .nav-cta {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }
}

.cta-group {
    margin-top: 2.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.cta-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 3px;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.cta-link:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
}

/* Contact Section */
.contact-section {
    position: relative;
    z-index: 20;
    background-color: var(--bg-color);
    padding: 8rem 2rem;
    display: flex;
    justify-content: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-container {
    max-width: 600px;
    width: 100%;
    text-align: center;
}

.contact-container h2 {
    margin-bottom: 1rem;
}

.contact-container p {
    margin-bottom: 3rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem 1.5rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
}

.contact-form button {
    margin-top: 1rem;
    align-self: center;
    width: 100%;
}