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

body {
    font-family: Helvetica, Arial, sans-serif;
    overflow: hidden;
    width: 100%;
    height: 100vh;
    background-color: #f5f5f5;
}

/* 3-zone layout: top marquee / image / bottom marquee */
.page-layout {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100vh;
    position: relative;
}

/* Marquee zones - flex to fill available space */
.marquee-zone {
    flex: 1 1 0;
    min-height: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    color: #333;
    font-weight: bold;
    white-space: nowrap;
    pointer-events: none;
}

/* Hide marquee zones when too small (< 30px) */
.marquee-zone {
    display: none;
}

@media (min-height: 700px) {
    .marquee-zone {
        display: flex;
    }
}

/* Image zone - takes only the space needed */
.image-zone {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    max-height: 100vh;
    position: relative;
}

/* Image wrapper - shrink-wraps to image dimensions */
.image-wrapper {
    position: relative;
    display: inline-block;
    max-width: 100%;
    max-height: 100vh;
}

.main-image {
    display: block;
    max-width: 100%;
    max-height: 100vh;
    width: auto;
    height: auto;
}

/* Clickable stud areas - positioned relative to image wrapper */
.stud {
    position: absolute;
    width: 4%;
    height: 0;
    padding-bottom: 4%;
    cursor: pointer;
    z-index: 50;
    bottom: 3%;
    pointer-events: auto;
}

.stud-left {
    left: 2%;
}

.stud-center {
    left: 50%;
    transform: translateX(-50%);
}

.stud-right {
    right: 2%;
}

/* Scrolling text content */
.scroll-content {
    display: inline-block;
    font-size: clamp(24px, 8vh, 100px);
    line-height: 1;
    padding-right: 50px;
}

.marquee-top .scroll-content {
    animation: scrollLeft 30s linear infinite;
}

.marquee-bottom .scroll-content {
    animation: scrollRight 30s linear infinite;
}

@keyframes scrollLeft {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes scrollRight {
    0% {
        transform: translateX(-50%);
    }
    100% {
        transform: translateX(0);
    }
}

/* Overlays */
.overlay {
    position: fixed;
    opacity: 0;
    pointer-events: none;
    transition: opacity 1s ease-in-out;
    z-index: 100;
}

.overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

/* Contact overlay - anchored to image, top right */
.contact-overlay {
    position: absolute;
    top: 5%;
    right: 5%;
    font-size: 18px;
}

.contact-overlay a {
    color: #333;
    text-decoration: none;
}

.contact-overlay a:hover {
    text-decoration: underline;
}

/* Inside pages overlay */
.inside-pages-overlay {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 80%;
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 8px;
}

/* Purpose overlay - anchored to image, left side */
.purpose-overlay {
    position: absolute;
    top: 20%;
    left: 5%;
    max-width: 45%;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}
