/* ===== GLOBAL RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-bg: #030303;
    --color-text: #e0e0e0;
    --color-text-dim: #a0a0a0;
    --color-text-dark: #1a1a1a;
    --color-red: #d90429;
    --color-red-hover: #ef233c;
    --color-border: #2a2a2a;
    --color-white: #ffffff;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;

    /* --- Custom Scrollbar (Firefox) --- */
    scrollbar-width: thin;
    scrollbar-color: var(--color-red) var(--color-bg);
}

body {
    font-family: var(--font-main);
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
}

/* --- Custom Scrollbar (Chrome, Safari, Edge) --- */
body::-webkit-scrollbar {
    width: 12px;
}
body::-webkit-scrollbar-track {
    background: var(--color-bg);
}
body::-webkit-scrollbar-thumb {
    background-color: var(--color-red);
    border-radius: 20px;
    border: 3px solid var(--color-bg);
}

.container {
    width: 100%;
    max-width: 1200px; /* Max width for large desktops */
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;  /* 24px */
    padding-right: 1.5rem; /* 24px */
}

img, svg {
    display: block;
    max-width: 100%;
}

a {
    color: var(--color-red);
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover {
    color: var(--color-red-hover);
}

/* ===== LOADING SCREEN ===== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem; /* 24px */
}

.loader-logo {
    width: 80px;
    height: 80px;
    /* Breathing animation */
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.95);
    }
}

.loader-bar-container {
    width: 150px;
    height: 4px;
    background-color: var(--color-border);
    border-radius: 2px;
    overflow: hidden;
}

.loader-bar {
    width: 40%;
    height: 100%;
    background-color: var(--color-red);
    border-radius: 2px;
    /* Indeterminate loading bar animation */
    animation: loader-bar-anim 1.5s infinite ease-in-out;
}

@keyframes loader-bar-anim {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(250%); /* 150px / 40% = 375, but we want it to go *past* */
    }
}


/* --- JS Pre-Animation State --- */
/* Hide elements that will be animated in by GSAP */
/* This prevents FOUC (Flash of Unstyled Content) */
#site-header,
#hero-section {
    opacity: 0;
}


/* ===== SITE HEADER ===== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: transparent;
    border-bottom: 1px solid transparent; /* Placeholder for scroll effect */
    transition: background-color 0.3s ease, border-color 0.3s ease;
    padding-top: 1rem;
    padding-bottom: 1rem;
    
    /* This opacity is now controlled by the 
    pre-animation state above and the GSAP timeline.
    */
    /* opacity: 0; */ 
}

/* Add a class on scroll */
.site-header.scrolled {
    background-color: rgba(3, 3, 3, 0.85); /* Slightly transparent bg */
    border-color: var(--color-border);
    backdrop-filter: blur(10px);
}

.site-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem; /* 12px */
    text-decoration: none;
    color: var(--color-text);
}

.logo-svg {
    width: 40px;
    height: 40px;
}

.logo-text {
    font-size: 1.25rem; /* 20px */
    font-weight: 600;
}

.nav-links {
    display: none; /* Hidden on mobile by default */
    align-items: center;
    gap: 1rem; /* 16px - Reduced gap for more links */
    list-style: none;
}

/* Medium screens and up (tablets/desktops) */
@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }
}

.nav-link {
    font-size: 0.95rem; /* 15px */
    font-weight: 500;
    color: var(--color-text-dim);
    text-decoration: none;
    padding: 0.5rem;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--color-white);
}

.nav-link-button {
    font-size: 0.9rem; /* 14px */
    font-weight: 600;
    color: var(--color-white);
    background-color: var(--color-red);
    text-decoration: none;
    padding: 0.6rem 1.25rem; /* 10px 20px */
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    white-space: nowrap; /* Prevent buttons from wrapping text */
}

.nav-link-button:hover {
    background-color: var(--color-red-hover);
    transform: scale(1.05);
}

.nav-mobile-btn {
    display: block; /* Show on mobile */
    background: none;
    border: none;
    color: var(--color-white);
    cursor: pointer;
}

/* Medium screens and up (tableis/desktops) */
@media (min-width: 768px) {
    .nav-mobile-btn {
        display: none; /* Hide on desktop */
    }
}


/* ===== HERO SECTION ===== */
.hero-section {
    min-height: 100vh; /* Full viewport height */
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 8rem; /* Account for header height */
    padding-bottom: 4rem;
    text-align: center;
    overflow: hidden; /* Prevent animations from spilling */

    /* This opacity is now controlled by the 
    pre-animation state above and the GSAP timeline.
    */
    /* opacity: 0; */ 
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem; /* 32px */
    position: relative;
    z-index: 2;
}

.hero-headline {
    font-size: 3rem; /* 48px */
    font-weight: 900;
    letter-spacing: -0.025em; /* Tighter letter spacing */
    line-height: 1.2;
    max-width: 800px;
}

.text-red {
    color: var(--color-red);
}

/* Tablet screens */
@media (min-width: 640px) {
    .hero-headline {
        font-size: 4.5rem; /* 72px */
    }
}

/* Desktop screens */
@media (min-width: 1024px) {
    .hero-headline {
        font-size: 5.5rem; /* 88px */
    }
}

.hero-subheadline {
    font-size: 1.125rem; /* 18px */
    color: var(--color-text-dim);
    max-width: 600px;
    line-height: 1.7;
}

@media (min-width: 640px) {
    .hero-subheadline {
        font-size: 1.25rem; /* 20px */
    }
}

.hero-buttons {
    display: flex;
    flex-direction: column; /* Stack on mobile */
    gap: 1rem; /* 16px */
    width: 100%;
}

/* Small screens and up */
@media (min-width: 640px) {
    .hero-buttons {
        flex-direction: row; /* Side-by-side on desktop */
        justify-content: center;
        width: auto;
    }
}


/* ===== CUSTOM ANIMATED BUTTONS ===== */
.btn {
    position: relative;
    display: inline-block;
    padding: 0.8rem 2rem; /* 13px 32px */
    font-size: 1rem; /* 16px */
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    border: 2px solid;
    overflow: hidden;
    transition: color 0.4s ease, transform 0.2s ease;
    transform: translateZ(0); /* Force hardware acceleration */
    text-align: center;
}

.btn:hover {
    transform: scale(1.03); /* Subtle hover lift */
}

/* Primary Button (Red) */
.btn-primary {
    background-color: var(--color-red);
    border-color: var(--color-red);
    color: var(--color-white);
}

.btn-primary:hover {
    color: var(--color-white);
    background-color: var(--color-red-hover);
    border-color: var(--color-red-hover);
}

/* Secondary Button (Outline) */
.btn-secondary {
    background-color: transparent;
    border-color: var(--color-border);
    color: var(--color-text-dim);
}

.btn-secondary:hover {
    color: var(--color-white);
    border-color: var(--color-white);
}

/* Shine Effect for Buttons */
.btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent 20%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 80%
    );
    animation: shine 4s infinite linear;
}

.btn-secondary .btn-shine {
    background: linear-gradient(
        120deg,
        transparent 20%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 80%
    );
    animation-duration: 5s; /* Slower for secondary */
}

@keyframes shine {
    0% {
        left: -100%;
    }
    50% {
        left: 100%;
    }
    100% {
        left: 100%;
    }
}

.btn-text {
    position: relative; /* Ensure text is above shine */
    z-index: 2;
}


/* ===== PLACEHOLDER SECTIONS ===== */
.placeholder-section {
    /* Using 100vh just for testing scroll. */
    /* We can change this when we add real content. */
    min-height: 50vh; 
    padding-top: 6rem;
    padding-bottom: 6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-bottom: 1px solid var(--color-border);
}

.section-headline {
    font-size: 3rem;
    font-weight: 900;
    color: var(--color-white);
    margin-bottom: 0.5rem;
}

.section-subheadline {
    font-size: 1.25rem;
    color: var(--color-text-dim);
}


/* ===== SITE FOOTER ===== */
.site-footer {
    padding: 4rem 0;
    background-color: #080808; /* Slightly lighter than pure black */
    border-top: 1px solid var(--color-border);
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2.5rem;
}

.footer-column {
    flex: 1;
    min-width: 170px; /* Adjusted min-width */
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.footer-column-main {
    flex: 2; /* Give more space to the main column */
    min-width: 300px;
    display: flex;
    flex-direction: column;
    gap: 1.25rem; /* Consistent gap */
}

.footer-tagline {
    color: var(--color-text-dim);
    font-size: 0.95rem; /* Slightly larger */
    line-height: 1.6;
    max-width: 400px; /* Constrain line length */
}

.footer-heading {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-white);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--color-text-dim);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--color-white);
}

.footer-socials {
    display: flex;
    align-items: center;
    gap: 1.5rem; /* 24px */
}

.social-link {
    color: var(--color-text-dim);
    font-size: 1.75rem; /* 28px */
    transition: color 0.3s ease, transform 0.3s ease;
}

.social-link:hover {
    color: var(--color-white);
    transform: scale(1.1);
}

.footer-copyright-text {
    color: var(--color-text-dim);
    font-size: 0.9rem;
    margin-top: 0.5rem; /* Space from socials */
}

/* ===== 'ShinyText' CSS (from your sample) ===== */
.shiny-text {
    color: #b5b5b5a4; /* Adjust this color to change intensity/style */
    background: linear-gradient(
        120deg,
        rgba(255, 255, 255, 0) 40%,
        rgba(255, 255, 255, 0.8) 50%,
        rgba(255, 255, 255, 0) 60%
    );
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    display: inline-block;
    animation: shine-text 5s linear infinite;
}

@keyframes shine-text {
    0% {
        background-position: 100%;
    }
    100% {
        background-position: -100%;
    }
}

.shiny-text.disabled {
    animation: none;
}


/* ===== 'GradientText' CSS (from your sample - ready to use) ===== */
.animated-gradient-text {
    position: relative;
    display: inline-block;
}

.animated-gradient-text .text-content {
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    animation: gradient-move linear infinite;
}

@keyframes gradient-move {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}


/* ===== 'FallingText' CSS (from your sample - ready to use) ===== */
.falling-text-container {
    position: relative;
    overflow: hidden;
    cursor: grab;
}

.falling-text-container:active {
    cursor: grabbing;
}

.falling-text-target {
    line-height: 1.4;
    visibility: hidden; /* Hide the template text */
}

.falling-text-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Styles for the actual *falling* words */
.falling-text-container .word {
    position: absolute;
    transform-origin: center center;
    will-change: left, top, transform;
    display: inline-block;
    color: var(--color-text);
    /* Make them unselectable */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.falling-text-container .word.highlighted {
    color: var(--color-red);
}


/* ===== 'TrueFocus' CSS (from your sample - ready to use) ===== */
.focus-container {
    position: relative;
    display: flex;
    gap: 1em;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.focus-word {
    position: relative;
    font-size: 3rem;
    font-weight: 900;
    cursor: pointer;
    transition:
        filter 0.3s ease,
        color 0.3s ease;
}

.focus-word.active {
    filter: blur(0);
}

.focus-frame {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    box-sizing: content-box;
    border: none;
}

.corner {
    position: absolute;
    width: 1rem;
    height: 1rem;
    border: 3px solid var(--border-color, #fff);
    filter: drop-shadow(0px 0px 4px var(--border-color, #fff));
    border-radius: 3px;
    transition: none;
}

.top-left {
    top: -10px;
    left: -10px;
    border-right: none;
    border-bottom: none;
}

.top-right {
    top: -10px;
    right: -10px;
    border-left: none;
    border-bottom: none;
}

.bottom-left {
    bottom: -10px;
    left: -10px;
    border-right: none;
    border-top: none;
}

.bottom-right {
    bottom: -10px;
    right: -10px;
    border-left: none;
    border-top: none;
}


/* ===== 'ScrollFloat' CSS (from your sample - ready to use) ===== */
.scroll-float {
    overflow: hidden;
}

.scroll-float-text {
    display: inline-block;
    font-size: clamp(1.6rem, 8vw, 10rem);
    font-weight: 900;
    text-align: center;
    line-height: 1.5;
}

.scroll-float .char {
    display: inline-block;
}


/* ===== 'ScrollReveal' CSS (from your sample - ready to use) ===== */
.scroll-reveal {
    margin: 20px 0;
}

.scroll-reveal-text {
    font-size: clamp(1.6rem, 4vw, 3rem);
    line-height: 1.5;
    font-weight: 600;
}

.scroll-reveal .word {
    display: inline-block;
}