/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Neue Montreal', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: #FFFFF9;
    color: #000;
    overflow: hidden;
    min-height: 100vh;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.container {
    width: 1400px;
    height: 920px;
    position: relative;
    transform: scale(min(calc(100vw / 1400), calc(100vh / 920)));
    transform-origin: center center;
}

/* Header */
.header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 32px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

.logo {
    height: 24px;
    width: auto;
    display: block;
}

.cta-button {
    font-family: 'Neue Montreal', sans-serif;
    background-color: #000;
    color: #fff;
    border: none;
    padding: 15px 30px;
    border-radius: 6px;
    font-size: 20px;
    font-weight: 400;
    letter-spacing: -1px;
    cursor: pointer;
    transition: transform 0.2s ease, background-color 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.cta-button:hover {
    transform: scale(1.02);
    background-color: #404040;
}

/* Hero Text */
.hero-text {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1400px;
    max-width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 100px;
    pointer-events: none;
    z-index: 10;
}

/* Main Content */
.main-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-left,
.hero-right {
    font-family: 'Editorial New', Georgia, serif;
    font-size: 70px;
    font-weight: 300;
    letter-spacing: -3.5px;
    line-height: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.hero-left {
    text-align: left;
    margin-left: 0;
}

.hero-right {
    text-align: right;
    margin-right: 0;
    white-space: pre-wrap;
}

/* Invoices Container */
.invoices-container {
    position: relative;
    width: 500px;
    height: 600px;
    margin: 0 auto;
}

/* Invoice Base Styles */
.invoice {
    position: fixed;
    width: 344px;
    height: 488px;
    overflow: hidden;
    will-change: transform;
    transform: translate3d(0, 0, 0);
}

.invoice-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Invoice 1 - Top (responsive with clamp) */
.invoice-1 {
    top: clamp(60px, 9vh, 100px);
    left: 50%;
    margin-left: -172px;
    transform: rotate(15deg);
    z-index: 4;
    opacity: 0;
    animation: slideUpRotate1 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards, fadeInFast 0.4s ease forwards;
}

/* Invoice 2 - Middle */
.invoice-2 {
    top: clamp(100px, 13vh, 140px);
    left: 50%;
    margin-left: -172px;
    transform: rotate(-15deg);
    z-index: 3;
    opacity: 0;
    animation: slideUpRotate2 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.2s forwards, fadeInFast 0.4s ease 0.2s forwards;
}

/* Invoice 3 - Lower */
.invoice-3 {
    bottom: clamp(60px, 10vh, 135px);
    left: 50%;
    margin-left: -172px;
    transform: rotate(15deg);
    z-index: 2;
    opacity: 0;
    animation: slideUpRotate3 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.4s forwards, fadeInFast 0.4s ease 0.4s forwards;
}

/* Invoice 4 - Bottom */
.invoice-4 {
    bottom: clamp(-150px, -9vh, -80px);
    left: 50%;
    margin-left: -172px;
    transform: rotate(-15deg);
    z-index: 1;
    opacity: 0;
    animation: slideUpRotate4 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.6s forwards, fadeInFast 0.4s ease 0.6s forwards;
}

/* Footer */
.footer {
    font-family: 'Neue Montreal', sans-serif;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 30px 38px;
    font-size: 16px;
    color: #b3b3a8;
    letter-spacing: -0.32px;
    z-index: 100;
}

.footer-left {
    font-weight: 400;
    color: #000;
}

.footer-left br {
    display: none;
}

.footer-right {
    font-weight: 400;
}

.footer-right a {
    color: #b3b3a8;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-right a:hover {
    color: #000;
}

/* Responsive Design - Automatic scaling based on 1400px reference */
/* No media queries needed - everything scales proportionally */

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Invoice animations - Optimized with transform only */
@keyframes slideUpRotate1 {
    from {
        transform: translateY(calc(100vh - 80px)) rotate(0deg);
    }
    to {
        transform: translateY(0) rotate(15deg);
    }
}

@keyframes slideUpRotate2 {
    from {
        transform: translateY(calc(100vh - 120px)) rotate(0deg);
    }
    to {
        transform: translateY(0) rotate(-15deg);
    }
}

@keyframes slideUpRotate3 {
    from {
        transform: translateY(650px) rotate(0deg);
    }
    to {
        transform: translateY(0) rotate(15deg);
    }
}

@keyframes slideUpRotate4 {
    from {
        transform: translateY(615px) rotate(0deg);
    }
    to {
        transform: translateY(0) rotate(-15deg);
    }
}

/* Fast fade in animation for invoices */
@keyframes fadeInFast {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.header {
    animation: fadeInUp 0.6s ease forwards;
}

.hero-left {
    animation: fadeInUp 0.8s ease 0.2s forwards;
    opacity: 0;
}

.hero-right {
    animation: fadeInUp 0.8s ease 0.3s forwards;
    opacity: 0;
}

.footer {
    animation: fadeInUp 0.6s ease 0.8s forwards;
    opacity: 0;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    body {
        overflow: hidden;
        align-items: flex-start;
        height: 100vh;
    }

    /* Container reorganization for mobile */
    .container {
        display: flex;
        flex-direction: column;
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        transform: none;
        overflow: hidden;
    }

    /* Header */
    .header {
        position: relative;
        padding: 32px 24px;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        order: 1;
    }

    .logo {
        width: 140px;
        height: auto;
    }

    .cta-button {
        position: static;
        width: auto;
        height: auto;
        font-size: 18px;
        padding: 14px 24px;
        letter-spacing: -0.9px;
        white-space: nowrap;
    }

    /* Hero Text */
    .hero-text {
        padding: 0 32px;
        flex-direction: column;
        gap: 0;
        position: static;
        margin-top: 32px;
        order: 2;
        width: 100%;
        height: auto;
        align-items: center;
        justify-content: center;
        left: auto;
        transform: none;
        flex-shrink: 0;
    }

    .hero-left,
    .hero-right {
        font-size: 58px;
        letter-spacing: -2.9px;
        width: 100%;
        text-align: center;
        position: static !important;
        line-height: 0.95;
        display: block;
        margin-left: 0 !important;
        margin-right: 0 !important;
        white-space: normal;
    }

    .hero-left {
        margin-bottom: 0;
    }

    .hero-right {
        margin-top: 0;
    }

    /* Footer text as subtitle on mobile */
    .footer {
        position: static;
        order: 3;
        padding: 8px 20px 16px 20px;
        justify-content: center;
        flex-shrink: 0;
    }

    .footer-left {
        font-size: 18px;
        letter-spacing: -0.36px;
        max-width: 280px;
        line-height: 1.4;
        text-align: center;
        color: #737373;
    }

    .footer-left br {
        display: block;
    }

    .footer-right {
        display: none;
    }

    /* Main content (invoices) */
    .main-content {
        position: static;
        order: 4;
        flex: 1;
        display: flex;
        align-items: flex-start;
        justify-content: center;
        padding: 30px 0 0 0;
        overflow: hidden;
    }

    /* Invoices - Stack them vertically in mobile */
    .invoices-container {
        position: relative;
        width: 100%;
        height: 280px;
        max-width: 320px;
        margin: 0 auto;
    }

    .invoice {
        width: 232px;
        height: 328px;
        position: absolute;
        left: 50%;
        margin-left: -116px;
    }

    .invoice-1 {
        top: 0;
        transform: rotate(12deg);
        z-index: 4;
    }

    .invoice-2 {
        top: 60px;
        transform: rotate(-8deg);
        z-index: 3;
    }

    .invoice-3 {
        top: 120px;
        transform: rotate(10deg);
        z-index: 2;
    }

    .invoice-4 {
        top: 180px;
        transform: rotate(-12deg);
        z-index: 1;
    }
}
