/* Hero Section */
.hero {
    height: 100vh;
    width: 100%;
    overflow: visible;
    position: relative;
    margin-top: min(10vh, 180px);
}

.hero-background {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: scale-down;
}

.hero-images {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding-bottom: 215px;
}

.hero-image {
    position: absolute;
    width: 100%;
    height: 100%;
    max-width: 1024px;
    max-height: 1024px;
    object-fit: scale-down;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease-in-out, visibility 0s 1s;
    overflow: visible;
}

.hero-image.active {
    opacity: 1;
    visibility: visible;
    transition: opacity 1s ease-in-out, visibility 0s;
}

.hero-text {
    position: absolute;
    bottom: 23%;
    left: 5%;
    z-index: 5;
    animation: slideUpHeroText 2.0s ease-out forwards;
    animation-delay: 0.5s;
    opacity: 0;
    transform: translateY(98vh);
    will-change: transform, opacity;
}

@keyframes slideUpHeroText {
    0% {
        transform: translateY(98vh);
        opacity: 0.01;
    }
    100% {
        transform: translateY(0);
        opacity: 0.90;
    }
}

.hero-title {
    font-family: 'Instrument Sans', sans-serif;
    font-size: clamp(3.5rem, 10vw, 12rem);
    line-height: 0.8;
    letter-spacing: -0.08em;
    color: var(--black);
    text-shadow: 1px 1px 2px var(--black), 0 2px 10px var(--yellow), 1px 0 5px var(--green);
    font-weight: 200;
    padding-bottom: 10px;
    transition: opacity 0.5s ease, transform 0.5s ease;
    will-change: opacity, transform;
}

.hero-title.changing,
.hero-subtitle.changing {
    opacity: 0;
    transform: translateY(-10px);
}

.hero-subtitle {
    font-family: 'Redaction', serif;
    font-size: clamp(3.5rem, 10vw, 12rem);
    line-height: 0.8;
    letter-spacing: -0.03em;
    color: var(--black);
    text-shadow: 1px 1px 2px var(--black), 0 2px 10px var(--yellow), 1px 0 5px var(--green);
    font-weight: 200;
    padding-bottom: 10px;
    transition: opacity 0.5s ease, transform 0.5s ease;
    will-change: opacity, transform;
}

.hero-subtitle.state-alternate {
    transform: translateY(5px);
    padding-bottom: 50px;
}

.download-buttons {
    position: absolute;
    bottom: 35%;
    right: 5%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 101;
    width: min(25vw, 170px);
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(40vw, 178px);
    height: min(8vh, 51px);
    border: 2px solid var(--black);
    background: var(--yellow);
    font-family: 'Instrument Sans', sans-serif;
    font-weight: 300;
    font-size: min(4vw, 16px);
    color: var(--black);
    cursor: pointer;
    transition: background-color 0.3s;
    position: relative;
    overflow: hidden;
}

.btn img {
    width: min(35vw, 170px);
    height: min(6.5vh, 45px);
}

.btn:hover {
    background-color: var(--black);
    color: var(--yellow);
}

.btn-coming-soon .btn-hover-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--black);
    color: var(--yellow);
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.btn-coming-soon:hover .btn-hover-text,
.btn-coming-soon:focus-visible .btn-hover-text {
    transform: translateY(0);
}

.btn-coming-soon:hover img,
.btn-coming-soon:hover .btn-text,
.btn-coming-soon:focus-visible img,
.btn-coming-soon:focus-visible .btn-text {
    opacity: 0;
}

.btn-text {
    transition: opacity 0.3s ease;
}

.btn-pc-text {
    font-size: min(5vw, 25px);
}

/* Rotation Toggle Button */
.rotation-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--yellow-transparent);
    border: 2px solid var(--black);
    border-radius: 50%;
    color: var(--black);
    cursor: pointer;
    margin-top: 0;
    transition: all 0.3s ease;
    opacity: 0.7;
    padding: 0;

    /* Position Absolute to avoid shifting text */
    position: absolute;
    bottom: -60px;
    left: 0;
}

/* Desktop positioning: Left of text (only when enough margin exists) */
@media (min-width: 1200px) {
    .rotation-toggle {
        bottom: auto;
        top: 50%;
        left: -55px;
        /* Center vertically using margin to avoid transform conflicts */
        margin-top: -20px;
        transform: none;
    }
}

.rotation-toggle:hover {
    background-color: var(--black);
    color: var(--yellow);
    opacity: 1;
    transform: scale(1.1);
}

.rotation-toggle:focus-visible {
    opacity: 1;
    outline: 2px solid var(--black);
    outline-offset: 4px;
    background-color: var(--yellow);
    color: var(--black);
}

.rotation-toggle svg {
    display: block;
}

.icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

/* Tooltip for Rotation Toggle */
.rotation-toggle .tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
    background-color: var(--black);
    color: var(--yellow);
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
    font-family: 'Instrument Sans', sans-serif;
    font-weight: 500;
    z-index: 10;
    /* Ensure text is readable against hero image if it overflows */
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.rotation-toggle:hover .tooltip,
.rotation-toggle:focus-visible .tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-12px);
}

/* Second Image Section */
.second-image {
    width: 100%;
    height: 100vh;
    position: relative;
    overflow: visible;
}

.second-image picture,img {
    width: 100%;
    height: 100%;
    object-fit: scale-down;
}
/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .hero-text {
        animation: none;
        opacity: 0.90;
        bottom: 23%;
        transform: none;
    }

    /* Reverted: Allow hero image transition even in reduced motion */
    .hero-subtitle,
    .btn,
    .btn-text,
    .btn-coming-soon .btn-hover-text,
    .rotation-toggle {
        transition: none !important;
    }

    .rotation-toggle {
        opacity: 1;
    }

    .rotation-toggle:hover {
        transform: none;
    }
}
