/**
 * LostWindow Hero Section - Split Layout Design
 * Left: Navy text panel | Right: Rotating lifestyle images
 * Guarantees text legibility with solid background
 */

/* ========================================
   CSS Custom Properties
   ======================================== */
:root {
    --hero-ink: #0d1117;
    --hero-gold: #c4a35a;
    --hero-terracotta: #c67b5c;
    --hero-cream: #faf9f7;
    --hero-white: #ffffff;
    --hero-height: 70vh;
    --hero-min-height: 520px;
    --hero-transition: 1.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   Hero Section - Full Width Container
   ======================================== */
.lw-hero {
    position: relative;
    width: 100%;
    height: var(--hero-height);
    min-height: var(--hero-min-height);
    display: flex;
    background-color: var(--hero-ink);
}

/* ========================================
   Hero Inner - Split Layout Grid
   ======================================== */
.lw-hero-inner {
    position: relative;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 45% 55%;
}

/* ========================================
   Left Panel - Text Content (Navy)
   ======================================== */
.lw-hero-content-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--hero-ink);
    padding: 60px;
    z-index: 2;
}

/* Decorative gold accent line on right edge */
.lw-hero-content-panel::after {
    content: '';
    position: absolute;
    top: 15%;
    right: 0;
    width: 1px;
    height: 70%;
    background: linear-gradient(
        to bottom,
        transparent,
        var(--hero-gold) 20%,
        var(--hero-gold) 80%,
        transparent
    );
    opacity: 0.4;
}

/* ========================================
   Right Panel - Image Slideshow
   ======================================== */
.lw-hero-image-panel {
    position: relative;
    overflow: hidden;
}

/* ========================================
   Rotating Background Images
   ======================================== */
.lw-hero-slides {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.lw-hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity var(--hero-transition);
    will-change: opacity;
}

.lw-hero-slide.active {
    opacity: 1;
}

.lw-hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    /* Subtle Ken Burns zoom */
    animation: heroKenBurns 15s ease-in-out infinite alternate;
}

.lw-hero-slide:nth-child(even) img {
    animation-direction: alternate-reverse;
}

@keyframes heroKenBurns {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.12);
    }
}

/* ========================================
   Content Container (inside left panel)
   ======================================== */
.lw-hero-container {
    width: 420px;
    max-width: 90%;
    text-align: left;
}

.lw-hero-content {
    opacity: 0;
    animation: heroFadeIn 1s ease-out 0.2s forwards;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Typography
   ======================================== */

/* Eyebrow - Gold accent */
.lw-hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-family: 'Jost', -apple-system, sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--hero-gold);
    margin-bottom: 28px;
}

.lw-hero-eyebrow::before {
    content: '';
    width: 40px;
    height: 1px;
    background: var(--hero-gold);
}

/* Main Heading - White */
.lw-hero-title {
    font-family: 'Bodoni Moda', 'Playfair Display', Georgia, serif;
    font-size: clamp(34px, 4vw, 52px);
    font-weight: 400;
    line-height: 1.15;
    color: var(--hero-white);
    margin: 0 0 8px 0;
}

/* Typewriter Line - Gold Italic */
.lw-hero-typed-line {
    font-family: 'Bodoni Moda', 'Playfair Display', Georgia, serif;
    font-size: clamp(34px, 4vw, 52px);
    font-weight: 400;
    font-style: italic;
    line-height: 1.15;
    color: var(--hero-gold);
    margin: 0 0 28px 0;
    min-height: 1.2em;
    white-space: nowrap;
    display: block;
    width: 100%;
}

.lw-typewriter-text {
    display: inline;
}

.lw-typewriter-cursor {
    display: inline-block;
    width: 3px;
    height: 0.75em;
    background-color: var(--hero-gold);
    margin-left: 4px;
    animation: heroBlink 1s step-end infinite;
    vertical-align: baseline;
    position: relative;
    top: 0.05em;
}

@keyframes heroBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* Description - Soft white */
.lw-hero-description {
    font-family: 'Jost', -apple-system, sans-serif;
    font-size: 17px;
    font-weight: 300;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.75);
    margin: 0 0 36px 0;
    max-width: 420px;
}

/* CTA Button - Gold */
.lw-hero-btn {
    display: inline-block;
    padding: 16px 36px;
    font-family: 'Jost', -apple-system, sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--hero-ink);
    background: linear-gradient(135deg, var(--hero-gold) 0%, #d4b36a 100%);
    border: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.lw-hero-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25), transparent);
    transition: left 0.5s ease;
}

.lw-hero-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(196, 163, 90, 0.35);
    color: var(--hero-ink);
}

.lw-hero-btn:hover::before {
    left: 100%;
}

/* ========================================
   Slide Navigation Dots
   ======================================== */
.lw-hero-dots {
    position: absolute;
    bottom: 30px;
    right: 30px;
    z-index: 4;
    display: flex;
    gap: 10px;
}

.lw-hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.lw-hero-dot.active,
.lw-hero-dot:hover {
    background: var(--hero-white);
    transform: scale(1.2);
}

/* ========================================
   Scroll Indicator (on left panel)
   ======================================== */
.lw-hero-scroll {
    position: absolute;
    bottom: 30px;
    left: 60px;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 12px;
}

.lw-hero-scroll-text {
    font-family: 'Jost', -apple-system, sans-serif;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
}

.lw-hero-scroll-icon {
    width: 20px;
    height: 32px;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    position: relative;
}

.lw-hero-scroll-icon::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 6px;
    background: var(--hero-gold);
    border-radius: 2px;
    animation: heroScrollBounce 2s ease-in-out infinite;
}

@keyframes heroScrollBounce {
    0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
    50% { transform: translateX(-50%) translateY(8px); opacity: 0.3; }
}

/* Hide overlay (not needed in split layout) */
.lw-hero-overlay {
    display: none;
}

/* ========================================
   Responsive - Tablet
   ======================================== */
@media (max-width: 1024px) {
    :root {
        --hero-height: 65vh;
        --hero-min-height: 480px;
    }

    .lw-hero-inner {
        grid-template-columns: 50% 50%;
    }

    .lw-hero-content-panel {
        padding: 40px 35px;
    }

    .lw-hero-title,
    .lw-hero-typed-line {
        font-size: clamp(28px, 3.5vw, 40px);
    }

    .lw-hero-description {
        font-size: 16px;
    }

    .lw-hero-scroll {
        left: 40px;
    }
}

/* ========================================
   Responsive - Mobile (Stack Layout)
   ======================================== */
@media (max-width: 768px) {
    :root {
        --hero-height: auto;
        --hero-min-height: auto;
    }

    .lw-hero {
        height: auto;
        min-height: auto;
        flex-direction: column;
    }

    .lw-hero-inner {
        display: flex;
        flex-direction: column;
    }

    /* Image panel on top for mobile */
    .lw-hero-image-panel {
        order: 1;
        height: 38vh;
        min-height: 240px;
    }

    .lw-hero-slide img {
        object-position: center;
    }

    /* Content panel below */
    .lw-hero-content-panel {
        order: 2;
        padding: 50px 30px 60px;
    }

    .lw-hero-content-panel::after {
        display: none;
    }

    .lw-hero-container {
        max-width: 100%;
        text-align: center;
    }

    .lw-hero-eyebrow {
        justify-content: center;
        margin-bottom: 20px;
    }

    .lw-hero-eyebrow::before {
        display: none;
    }

    .lw-hero-title,
    .lw-hero-typed-line {
        font-size: clamp(30px, 7vw, 38px);
    }

    .lw-hero-typed-line {
        margin-bottom: 20px;
    }

    .lw-hero-description {
        font-size: 15px;
        margin: 0 auto 30px;
        max-width: 100%;
    }

    .lw-hero-btn {
        padding: 14px 32px;
        font-size: 12px;
    }

    /* Dots overlay on image */
    .lw-hero-dots {
        bottom: auto;
        top: calc(38vh - 40px);
        right: 20px;
    }

    /* Hide scroll indicator on mobile */
    .lw-hero-scroll {
        display: none;
    }

    /* Reduce animation for performance */
    @keyframes heroKenBurns {
        0% { transform: scale(1); }
        100% { transform: scale(1.03); }
    }
}

/* ========================================
   Responsive - Small Mobile
   ======================================== */
@media (max-width: 480px) {
    .lw-hero-image-panel {
        height: 32vh;
        min-height: 200px;
    }

    .lw-hero-content-panel {
        padding: 40px 24px 50px;
    }

    .lw-hero-title,
    .lw-hero-typed-line {
        font-size: clamp(26px, 8vw, 32px);
    }

    .lw-hero-description {
        font-size: 14px;
        line-height: 1.6;
    }

    .lw-hero-btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }

    .lw-hero-dots {
        top: calc(32vh - 35px);
        gap: 8px;
    }

    .lw-hero-dot {
        width: 8px;
        height: 8px;
    }
}

/* ========================================
   Prefers Reduced Motion
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    .lw-hero-slide img {
        animation: none;
    }

    .lw-hero-scroll-icon::before {
        animation: none;
    }

    .lw-hero-content {
        animation: none;
        opacity: 1;
        transform: none;
    }

    .lw-hero-slide {
        transition: opacity 0.5s ease;
    }
}
