:root {
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.85);
    --text-tertiary: rgba(255, 255, 255, 0.6);
    --text-faded: rgba(255, 182, 193, 0.7);
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.15);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
    font-weight: 400;
}

/* Background Video */
.background-video {
    position: fixed;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: -2;
    object-fit: cover;
    opacity: 1;
    transition: opacity 1s ease;
    pointer-events: none;
    background: transparent;
}

/* Hide video if it fails to load (set by JS) */
.background-video.error {
    opacity: 0;
    display: none;
}

/* Video overlay - translucent gradient */
.video-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(180deg, rgba(10, 26, 46, 0.7) 0%, rgba(26, 47, 74, 0.6) 25%, rgba(15, 61, 62, 0.65) 50%, rgba(0, 119, 182, 0.6) 75%, rgba(0, 180, 216, 0.55) 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 1s ease;
}

/* Show overlay when video is playing */
body.video-playing .video-overlay {
    opacity: 1;
}

/* Enhanced Animated Northern Lights Gradient Background */
.gradient-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    background: linear-gradient(180deg, #0a1a2e 0%, #1a2f4a 25%, #0f3d3e 50%, #0077b6 75%, #00b4d8 100%);
    transition: opacity 1s ease;
}

/* Hide gradient when video is playing - use body class */
body.video-playing .gradient-background,
body.video-playing .gradient-background::before,
body.video-playing .gradient-background::after,
body.video-playing .aurora-layer {
    opacity: 0;
    pointer-events: none;
}

/* Show gradient as fallback when video is not available */
@supports not (object-fit: cover) {
    .background-video {
        display: none;
    }
}

.gradient-background::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(ellipse 80% 40% at 20% 30%, rgba(0, 180, 216, 0.55) 0%, transparent 50%),
        radial-gradient(ellipse 70% 35% at 80% 50%, rgba(6, 214, 160, 0.5) 0%, transparent 50%),
        radial-gradient(ellipse 60% 30% at 50% 70%, rgba(72, 202, 228, 0.45) 0%, transparent 50%),
        radial-gradient(ellipse 90% 45% at 10% 60%, rgba(0, 119, 182, 0.5) 0%, transparent 55%);
    animation: aurora-wave-1 25s ease-in-out infinite;
    will-change: transform;
    backface-visibility: hidden;
}

.gradient-background::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(ellipse 75% 38% at 70% 20%, rgba(18, 138, 178, 0.55) 0%, transparent 55%),
        radial-gradient(ellipse 65% 32% at 30% 80%, rgba(6, 255, 165, 0.5) 0%, transparent 50%),
        radial-gradient(ellipse 85% 42% at 90% 40%, rgba(0, 180, 216, 0.45) 0%, transparent 52%),
        radial-gradient(ellipse 70% 36% at 40% 50%, rgba(144, 224, 239, 0.4) 0%, transparent 48%);
    animation: aurora-wave-2 30s ease-in-out infinite;
    animation-delay: -8s;
    will-change: transform;
    backface-visibility: hidden;
}

@keyframes aurora-wave-1 {
    0% {
        transform: translate(0, 0) rotate(0deg) scaleX(1) scaleY(1);
    }
    20% {
        transform: translate(150px, -80px) rotate(12deg) scaleX(1.15) scaleY(0.95);
    }
    40% {
        transform: translate(-120px, 120px) rotate(-8deg) scaleX(0.95) scaleY(1.1);
    }
    60% {
        transform: translate(140px, -60px) rotate(15deg) scaleX(1.08) scaleY(0.97);
    }
    80% {
        transform: translate(-100px, 100px) rotate(-12deg) scaleX(0.97) scaleY(1.08);
    }
    100% {
        transform: translate(0, 0) rotate(0deg) scaleX(1) scaleY(1);
    }
}

@keyframes aurora-wave-2 {
    0% {
        transform: translate(0, 0) rotate(0deg) scaleX(1) scaleY(1);
    }
    25% {
        transform: translate(-140px, 80px) rotate(-15deg) scaleX(0.9) scaleY(1.15);
    }
    50% {
        transform: translate(120px, -100px) rotate(18deg) scaleX(1.18) scaleY(0.92);
    }
    75% {
        transform: translate(-110px, 70px) rotate(-14deg) scaleX(0.94) scaleY(1.12);
    }
    100% {
        transform: translate(0, 0) rotate(0deg) scaleX(1) scaleY(1);
    }
}

.aurora-layer {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(ellipse 60% 28% at 60% 25%, rgba(144, 224, 239, 0.4) 0%, transparent 45%),
        radial-gradient(ellipse 55% 26% at 25% 75%, rgba(0, 180, 216, 0.35) 0%, transparent 43%),
        radial-gradient(ellipse 70% 33% at 85% 55%, rgba(6, 214, 160, 0.3) 0%, transparent 47%);
    animation: aurora-wave-3 35s ease-in-out infinite;
    animation-delay: -12s;
    will-change: transform;
    backface-visibility: hidden;
}

@keyframes aurora-wave-3 {
    0% {
        transform: translate(0, 0) rotate(0deg) scaleX(1) scaleY(1);
    }
    30% {
        transform: translate(150px, -90px) rotate(12deg) scaleX(1.15) scaleY(0.92);
    }
    60% {
        transform: translate(-130px, 110px) rotate(-8deg) scaleX(0.88) scaleY(1.12);
    }
    90% {
        transform: translate(100px, -70px) rotate(10deg) scaleX(1.08) scaleY(0.96);
    }
    100% {
        transform: translate(0, 0) rotate(0deg) scaleX(1) scaleY(1);
    }
}

/* Navigation */
.nav {
    position: relative;
    padding: 2rem 0;
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 3rem;
}

.logo {
    display: inline-block;
    text-decoration: none;
    height: 3.5rem;
    line-height: 1;
    color: var(--text-primary);
}

.logo svg {
    height: 100%;
    width: auto;
    display: block;
    color: var(--text-primary);
}

.nav-links-center {
    display: flex;
    justify-content: center;
    gap: 4rem;
}

.nav-column {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 400;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    letter-spacing: -0.01em;
}

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

.nav-link.cta-button {
    background: rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-link.cta-button:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Main Content */
main {
    padding-top: 0;
    position: relative;
    z-index: 10;
}

section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4rem 3rem;
    position: relative;
}

/* Hero Section */
.hero {
    padding: 2rem 3rem 6rem;
    text-align: center;
    min-height: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-top: 0;
    align-self: flex-start;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.availability {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 3rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: #fbbf24;
    border-radius: 50%;
    animation: pulse 2s ease infinite;
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.6);
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
}

.hero-title {
    font-size: clamp(4rem, 12vw, 8rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 2rem;
    letter-spacing: -0.04em;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0;
}

.title-line {
    display: block;
    white-space: nowrap;
    line-height: 1.2;
    overflow: visible;
}

.title-line.faded {
    background: linear-gradient(90deg, rgba(144, 224, 239, 0.75) 0%, rgba(72, 202, 228, 0.7) 50%, rgba(0, 180, 216, 0.75) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 400;
    opacity: 0.85;
}

.title-line.faded:first-of-type {
    margin-bottom: -0.15em;
    transform: translateY(0.1em);
}

.title-line.faded:last-of-type {
    margin-top: -0.15em;
    transform: translateY(-0.1em);
}

.title-line.rotating-word {
    position: relative;
    display: inline-block;
    color: var(--text-primary);
    font-weight: 700;
    vertical-align: baseline;
    text-align: center;
    line-height: 1.2;
    overflow: visible;
    height: 1.2em;
}

.rotating-word .word {
    display: block;
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
    white-space: nowrap;
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%) translateY(30px);
    pointer-events: none;
    line-height: 1.2;
    text-align: center;
}

.rotating-word .word.active {
    position: absolute;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
    left: 50%;
}

.hero-description-wrapper {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.circles-graphic {
    display: flex;
    align-items: center;
    gap: -10px;
    position: relative;
    height: 60px;
}

.circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: transparent;
    position: relative;
    margin-left: -15px;
}

.circle:first-child {
    margin-left: 0;
}

.circle-1 {
    opacity: 0.4;
    z-index: 1;
}

.circle-2 {
    opacity: 0.5;
    z-index: 2;
}

.circle-3 {
    opacity: 0.6;
    z-index: 3;
}

.circle-4 {
    opacity: 0.7;
    z-index: 4;
}

.circle-5 {
    opacity: 0.9;
    z-index: 5;
    border-color: rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.circle-5 .logomark {
    width: 24px;
    height: 24px;
    color: var(--text-primary);
    flex-shrink: 0;
}

.hero-description {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    color: var(--text-secondary);
    line-height: 1.6;
    font-weight: 400;
    text-align: left;
}

.hero-description-wrapper .btn {
    white-space: nowrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 1.125rem 2.5rem;
    border-radius: 9999px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.125rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    letter-spacing: -0.01em;
}

.btn-primary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

/* Services Section */
.services {
    padding: 6rem 3rem;
}

.section-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
}

.services-content {
    text-align: left;
}

.section-title {
    font-size: clamp(3rem, 8vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.03em;
    margin-bottom: 4rem;
    color: var(--text-primary);
}

.services-list {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.service-item {
    padding-bottom: 3rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.service-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.service-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.service-description {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    font-weight: 400;
    max-width: 700px;
}

/* Stats Section */
.stats {
    padding: 6rem 3rem;
    min-height: 0;
}

.stats-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    gap: 8rem;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.stat-number {
    font-size: clamp(4rem, 10vw, 7rem);
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.04em;
    color: var(--text-primary);
}

.stat-label {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: -0.01em;
}

/* Contact Section */
.contact {
    padding: 6rem 3rem;
    min-height: 0;
}

.contact-content {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    text-align: left;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 3rem;
}

.contact-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.contact-value {
    font-size: clamp(1.125rem, 2vw, 1.5rem);
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 400;
    transition: color 0.3s ease;
    letter-spacing: -0.01em;
}

.contact-value:hover {
    color: var(--text-secondary);
}

/* Footer */
.footer {
    padding: 3rem;
    text-align: center;
    color: var(--text-tertiary);
    font-size: 0.875rem;
    font-weight: 400;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 1.5rem;
        flex-direction: column;
        gap: 1.5rem;
        align-items: center;
    }

    section {
        padding: 6rem 1.5rem;
    }

    .hero {
        padding: 10rem 1.5rem 4rem;
    }

    .hero-description-wrapper {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
        padding: 0 1rem;
    }

    .circles-graphic {
        justify-content: center;
    }

    .hero-description {
        text-align: center;
        padding: 0 0.5rem;
    }

    .hero-description-wrapper .btn {
        width: auto;
        min-width: 200px;
        justify-self: center;
    }

    .services {
        padding: 4rem 1.5rem;
    }

    .stats-container {
        flex-direction: column;
        gap: 3rem;
    }

    .services-list {
        gap: 2rem;
    }

    .service-item {
        padding-bottom: 2rem;
    }

    .contact {
        padding: 4rem 1.5rem;
    }

    .contact-content {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 1rem;
    }

    .hero-title {
        font-size: 3rem;
    }

    .section-title {
        font-size: 2.5rem;
    }

    .service-title {
        font-size: 1.75rem;
    }
}

/* Performance Optimizations */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Loading Optimization */
.gradient-background {
    will-change: filter;
}