/* Font Face Declarations */
@font-face {
    font-family: 'Lato';
    src: url('../fonts/Lato/Lato-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Lato';
    src: url('../fonts/Lato/Lato-Light.ttf') format('truetype');
    font-weight: 300;
    font-style: normal;
}

@font-face {
    font-family: 'Lato';
    src: url('../fonts/Lato/Lato-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'Lato';
    src: url('../fonts/Lato/Lato-Black.ttf') format('truetype');
    font-weight: 900;
    font-style: normal;
}

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

h1 {
    font-size: 1rem;
}

/* Visually hidden class for SEO-friendly H1 */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

body {
    font-family: 'Lato', 'Arial', sans-serif;
    background-color: #000;
    color: #fff;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Navigation */
.nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1000;
    padding: 2rem;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 300;
    transition: opacity 0.3s ease;
}

.nav-link:hover {
    opacity: 0.7;
}

/* SVG Background */
.svg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

/* Elliptical vignette to focus the center text area while keeping edges barely visible */
.svg-container::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    /* Transparent center, fading to near-black edges (not fully black) */
    background: radial-gradient(ellipse at center,
            rgba(0, 0, 0, 0) 0%,
            rgba(0, 0, 0, 0) 32%,
            rgba(0, 0, 0, 0.35) 45%,
            rgba(0, 0, 0, 0.7) 65%,
            rgba(0, 0, 0, 0.9) 100%);
}

#starry-night {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Ensure SVG covers entire viewport */
    min-height: 100vh;
}

/* Main content */
.main-content {
    position: relative;
    z-index: 1;
    min-height: 1600vh;
    /* Extended height for 7 hero sections plus services */
}

/* Logo section */
.logo-section {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 2rem;
}

.logo-container {
    text-align: center;
}

.logo {
    max-width: 600px;
    width: 80vw;
    height: auto;
    opacity: 0;
    animation: logoFadeIn 2s ease forwards;
}

@keyframes logoFadeIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Hero sections */
.hero-section {
    height: 200vh;
    /* Much taller to allow for sticky behavior */
    position: relative;
    padding: 0 2rem;
}

.hero-text {
    position: sticky;
    top: 50vh;
    transform: translateY(-50%);
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    padding: 3rem;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.hero-statement {
    font-size: clamp(1.8rem, 4.5vw, 3.5rem);
    font-weight: 300;
    line-height: 1.4;
    margin: 0;
    font-family: 'Lato', sans-serif;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 0, 0, 0.6);
    color: #ffffff;
}

.hero-section.visible .hero-text {
    opacity: 1;
}

/* Text and keyword styling */
.typing-text {
    display: inline;
    opacity: 1;
}

.typing-text.visible {
    opacity: 1;
}

/* Emphasized keywords */
.keyword {
    font-weight: 700;
    font-size: 1.1em;
}

/* Services section - Final destination that fills viewport */
.services {
    height: 100vh;
    position: fixed;
    bottom: -100vh;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(20px);
    transition: bottom 1.5s ease;
    z-index: 10;
}

.services.visible {
    bottom: 0;
}

.services-content {
    max-width: 800px;
    text-align: center;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    padding: 3rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Services content styling moved above */

.services-title {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 300;
    margin-bottom: 2rem;
    font-family: 'Lato', sans-serif;
}

.services-intro {
    font-size: clamp(1.1rem, 2.5vw, 1.5rem);
    margin-bottom: 3rem;
    opacity: 0.9;
    font-family: 'Lato', sans-serif;
}

/* Call to action */
.cta {
    margin-top: 3rem;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2rem;
    border: 2px solid #fff;
    color: #fff;
    text-decoration: none;
    font-size: 1.2rem;
    font-weight: 300;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background-color: #fff;
    color: #000;
}

/* Responsive design */
@media (max-width: 768px) {
    .nav {
        padding: 1rem;
    }

    .logo {
        max-width: 400px;
    }

    .hero-section {
        padding: 0 1rem;
    }

    .hero-text {
        padding: 2rem 1.5rem;
    }

    .services {
        padding: 2rem 1rem;
    }

}

@media (max-width: 480px) {

    /* Ensure SVG covers entire screen on very small devices */
    body {
        overflow-x: hidden;
        overflow-y: auto;
    }

}

/* No-JavaScript fallback styles */
.js-disabled .hero-text {
    opacity: 1 !important;
    position: static !important;
    transform: none !important;
    top: auto !important;
}

.js-disabled .hero-section {
    height: auto !important;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.js-disabled .services {
    position: static !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 50vh;
    background: rgba(0, 0, 0, 0.9);
}

.js-disabled .main-content {
    min-height: auto !important;
}

/* Default keyword styling for no-JS */
.js-disabled .keyword {
    color: #008282;
    text-shadow: 0 0 8px currentColor, 2px 2px 8px rgba(0, 0, 0, 0.9);
}

.js-disabled .keyword:nth-of-type(even) {
    color: #c31d4b;
}

/* SVG animation styles */
/* Apply stroke drawing baseline only to paths we animate via stroke */
.svg-path.stroke-animated {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: stroke-dashoffset 0.1s linear;
}