/* Minimal Reset */
*,
*:before,
*:after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: #f5f5f5;
    overflow-x: hidden;
    font-size: 20px;
    font-family: "din", sans-serif;
}

/* Mobile */
@media (max-width: 800px) {
    body {
        font-size: 18px;
    }
}

/* Horizon background - pinned behind all other layers */
#horizon {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: auto;
    background-image: url("../images/horizon.webp");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;
    aspect-ratio: 16/9; /* Adjust this to match your horizon image's aspect ratio */

    /* start keyframe and animation*/
    opacity: 0;
    animation: fadeIn 1s ease-in forwards;
}

/* Page sections - each takes full screen */
.page {
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

@supports (height: 100svh) {
    .page {
        height: 100svh;
    }
}

@media (min-width: 800px) {
    .page {
        min-height: 600px;
    }
}

/* First page (hero) is visible by default */
#hero {
    opacity: 1 !important;
}

/* Other pages start invisible and fade in */
.page:not(#hero) {
    opacity: 0;
    transition: opacity 1s ease-out;
}

/* Fade-in class has higher specificity */
.page.fade-in {
    opacity: 1 !important;
}

/* Content flows from center */
.page > * {
    text-align: center;
}

/* Signup message styling */
.signup-message {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    font-size: 0.9rem;
    text-align: center;
    animation: fadeIn 0.3s ease-in;
}

.signup-message.success {
    background-color: #d4edda;
    color: #155724;
}

.signup-message.error {
    background-color: #f8d7da;
    color: #721c24;
}

/* Hero page specific layout */
#hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* Scroll hint styling */
.scroll-hint {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    z-index: 10;
    pointer-events: none;
    transition: opacity 0.5s ease-in-out;
}

.scroll-hint.visible {
    opacity: 1;
    animation: pulseHint 2s ease-in-out infinite;
}

.scroll-hint.visible .scroll-hint-arrow {
    animation: bounceArrow 1.5s ease-in-out infinite;
}

.scroll-hint-arrow {
    font-size: 1.8rem;
    color: #666;
}

@keyframes pulseHint {
    0%,
    100% {
        transform: translateX(-50%) scale(0.9);
    }
    50% {
        transform: translateX(-50%) scale(1.1);
    }
}

@keyframes bounceArrow {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-4px);
    }
}

#hero h2 {
    width: 600px;
    max-width: 80vw;
    position: absolute;
    top: 75%;
    left: 50%;
    transform: translate(-50%, -50%);
    letter-spacing: -0.03em;
    font-size: 1.6em;
    font-weight: normal;

    /* start keyframe and animation*/
    opacity: 0;
    animation: fadeIn 2s ease-in forwards;
    animation-delay: 1s;
}

/* Mobile */
@media (max-width: 800px) {
    #hero h2 {
        font-size: 1.1em;
    }
}

#gotendai-logo-wrapper {
    width: 600px;
    height: auto;
    max-width: 61.8vw;
    display: block;
    margin: 0 auto;
}

/* Gotendai logo styling */
#gotendai-logo {
    width: 100%;
    height: auto;

    /* start keyframe and animation*/
    opacity: 0;
    transform: scale(0.75);
    animation:
        fadeIn 1s ease-in forwards,
        scaleUp 2s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    animation-delay: 0.2s, 0.2s;
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleUp {
    0% {
        transform: scale(0.75);
    }
    to {
        transform: scale(1);
    }
}

/* Feature article styling */
.feature-article {
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
}

/* Mobile */
@media (max-width: 800px) {
    .feature-article {
        max-width: 90vw;
    }
}

.feature-article img {
    width: 100%;
    max-width: 480px;
    height: auto;
    display: block;
    margin: 0 auto 1.5rem auto;
    transition: transform 0.3s ease;
}

.feature-article .caption {
    margin: 0 auto 0.5rem auto;
    max-width: 480px;
}

.feature-article .aqualike {
    margin-top: 1.5rem;
}

/* Signup and contact styling */
#signup,
#contact {
    text-align: center;
}

#signup {
    margin-bottom: 8em;
}

/* Signup form styling */
.signup-form {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
}

/* Email input styling */
.email-input {
    padding: 0.618em 1.382em;
    border-radius: 2em;
    border: 2px solid #ccc;
    background-color: white;
    font-family: "din", sans-serif;
    font-size: inherit;
    outline: none;
    transition: border-color 0.3s ease;
}

.email-input:focus {
    border-color: #5890bf;
}

.email-input::placeholder {
    color: #999;
}

/* Aquatic button styling */
.aqualike {
    display: inline-block;
    padding: 0.618em 1.382em;
    border-radius: 2em;
    position: relative;
    text-decoration: none;

    /* Label */
    font-family: "din-rounded", sans-serif;
    letter-spacing: -0.01em;
    color: #fff;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;

    /* Aqua styling */
    background-color: rgba(60, 132, 198, 1);
    box-shadow: rgba(66, 140, 240, 0.15) 0px 10px 16px;

    cursor: pointer;

    transition: 0.4s ease-out;
}

button.aqualike {
    font-size: 20px;
    border: none;
}

@media (max-width: 800px) {
    button.aqualike {
        font-size: 18px;
    }
}

.aqualike::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0.618em;
    right: 0.618em;
    border-radius: 8px;
    height: 1px;
    padding: 10px 0;
    background-color: rgba(255, 255, 255, 0.05);
    background-image: linear-gradient(0deg, rgba(255, 255, 255, 0.3) 0%, rgba(255, 255, 255, 0) 95%);
}

.aqualike:hover {
    background-color: rgba(90, 162, 228, 1);
    padding: 0.618em 1.618em;
}

#footer {
    position: fixed;
    z-index: 10;
    bottom: 1em;
    left: 1em;
    font-size: 0.76em;
    opacity: 0.5;
}
