* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    width: 100%;
    height: 100%;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    width: 100%;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    background-color: #1a1a1a;
}

.bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    pointer-events: none;
    z-index: 0;
    /* Prevent video from stretching on mobile */
    min-width: 100%;
    min-height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in;
}

.bg-video-placeholder {
    opacity: 1;
    z-index: 0;
}

.bg-video-main {
    opacity: 0;
    z-index: 1;
}

.bg-video-main.loaded {
    opacity: 1;
}

.bg-gray-overlay {
    position: fixed;
    inset: 0;
    background-color: rgb(31, 31, 31);
    opacity: 0.15;
    pointer-events: none;
    z-index: 2;
}

.bg-grain-overlay {
    position: fixed;
    inset: 0;
    background-image: url("https://lovable.dev/_next/static/media/grain.1ccdda41.png");
    background-size: 100px 100px;
    background-repeat: repeat;
    background-position: left top;
    opacity: 1;
    background-blend-mode: overlay;
    mix-blend-mode: overlay;
    pointer-events: none;
    z-index: 3;
}

.content {
    position: relative;
    z-index: 4;
    min-height: 100vh;
    min-height: -webkit-fill-available;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem;
    padding-top: max(2rem, env(safe-area-inset-top));
    padding-bottom: max(2rem, env(safe-area-inset-bottom));
    padding-left: max(2rem, env(safe-area-inset-left));
    padding-right: max(2rem, env(safe-area-inset-right));
    box-sizing: border-box;
}

.hero-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(100% - 4rem);
    max-width: 100%;
    opacity: 0;
    animation: heroFadeIn 600ms ease-out 200ms forwards;
}

.hero-text {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: bold;
    font-size: clamp(2.5rem, 8vw, 6rem);
    color: white;
    text-align: center;
    margin: 0;
    line-height: 1.2;
    letter-spacing: -0.02em;
    word-wrap: break-word;
    overflow-wrap: break-word;
    padding: 0 1rem;
    max-width: 100%;
}

.page-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 4;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 0 1.5rem max(32px, env(safe-area-inset-bottom));
    pointer-events: none;
    opacity: 0;
    animation: heroFadeIn 600ms ease-out 200ms forwards;
}

.page-footer > * {
    pointer-events: auto;
}

.page-footer .subtle-menu {
    pointer-events: auto;
    z-index: 10001;
}

.footer-logo {
    max-width: 154px; /* ~70% of previous 220px */
    width: 22vw; /* ~70% of previous 32vw */
    height: auto;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .content {
        padding: 1rem;
        padding-top: max(1rem, env(safe-area-inset-top));
        padding-bottom: max(1rem, env(safe-area-inset-bottom));
        padding-left: max(1rem, env(safe-area-inset-left));
        padding-right: max(1rem, env(safe-area-inset-right));
    }
    
    .hero-container {
        width: calc(100% - 2rem);
    }
    
    .hero-text {
        font-size: clamp(2rem, 10vw, 4rem);
        letter-spacing: -0.03em;
        padding: 0 0.75rem;
    }
    
    .page-footer {
        padding: 0 1.5rem max(24px, env(safe-area-inset-bottom));
    }
    
    .footer-logo {
        max-width: 120px;
        width: 30vw;
    }
}

/* iPhone specific adjustments */
@supports (-webkit-touch-callout: none) {
    body {
        min-height: -webkit-fill-available;
    }
    
    .content {
        min-height: -webkit-fill-available;
    }
}

