/* Hero & Header Styles */

/* Header (Fixed) */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 2vw var(--padding-x);
    z-index: 1001;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    mix-blend-mode: difference;
    color: #fff;
    /* Inverts on light bg */
}

/* When nav is open, disable blend mode for proper visibility */
body.nav-open .header {
    mix-blend-mode: normal;
    color: var(--color-text-light);
}

.logo-container {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1;
    overflow: hidden;
    height: 1.5em;
    /* Constrain height for morphing context */
}

/* The morphing wrapper */
.logo-wrapper {
    display: flex;
    gap: 0.1em;
}

.logo-char {
    display: inline-block;
    will-change: transform, opacity;
}

.logo-full-text {
    display: inline-flex;
    white-space: nowrap;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 var(--padding-x);
    border-bottom: 1px solid var(--color-line-dark);
    overflow: hidden;
    /* Clip the ken burns image */
}

.hero-bg-visual {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../assets/img/hero-bg.png');
    background-size: cover;
    background-position: center;
    opacity: 0.15;
    /* Subtle tint behind text */
    z-index: -1;
    filter: blur(20px);
    /* Abstract dreaminess */
    animation: kenBurns 20s infinite alternate ease-in-out;
}

@keyframes kenBurns {
    0% {
        transform: scale(1) translate(0, 0);
    }

    100% {
        transform: scale(1.2) translate(-2%, -2%);
    }
}

.hero-title-giant {
    font-family: var(--font-serif);
    font-size: 14vw;
    line-height: 0.9;
    color: var(--color-text-main);
    text-transform: uppercase;
    /* Breathing Animation */
    animation: breatheTypography 8s infinite alternate ease-in-out;
}

@keyframes breatheTypography {
    0% {
        letter-spacing: -0.02em;
    }

    100% {
        letter-spacing: 0.02em;
    }
}

/* Slot Machine Effect helper */
.logo-char-inner {
    display: inline-block;
}

.hero-row {
    display: flex;
    overflow: hidden;
    /* For reveal animation */
}

.hero-row.center {
    justify-content: center;
    color: var(--color-accent);
    /* Tint the middle word */
    font-style: italic;
}

.hero-row.right {
    justify-content: flex-end;
}

.hero-word {
    transform: translateY(100%);
    /* Start hidden */
}

.hero-footer {
    position: absolute;
    bottom: 30px;
    left: var(--padding-x);
    right: var(--padding-x);
    display: flex;
    justify-content: space-between;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--color-text-main);
    opacity: 0.6;
}

/* =========================================
   Mobile Adaptation (Phase 2)
   ========================================= */
@media (max-width: 768px) {

    /* Header: Simpler Layout */
    .header {
        padding: 20px var(--padding-x);
    }

    .logo-container {
        font-size: 1.2rem;
        /* Smaller logo */
    }

    /* Hero Title: Stacked & Smaller */
    .hero-title-giant {
        font-size: 18vw;
        /* Larger relative size on mobile */
        line-height: 1;
    }

    .hero-row {
        justify-content: flex-start !important;
        /* Force left align or stack */
    }

    .hero-footer {
        flex-direction: column;
        gap: 10px;
        bottom: 20px;
    }
}