/* Main page — donsbirthday.com */
html {
    margin: 0;
    width: 100%;
    min-height: 100%;
    min-height: 100dvh;
    background: linear-gradient(to bottom, #ffcc00, #ff6600);
}

body {
    margin: 0;
    width: 100%;
    min-height: 100%;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    font-family: 'Short Stack', cursive;
    background: linear-gradient(to bottom, #ffcc00, #ff6600);
    background-repeat: no-repeat;
    background-size: 100% 100%;
    display: flex;
    flex-direction: column;
}

.site-main {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    justify-content: safe center;
    width: 100%;
    max-width: min(92vw, 52rem);
    margin: 0 auto;
    padding-top: max(12px, env(safe-area-inset-top, 0px));
    padding-bottom: max(12px, env(safe-area-inset-bottom, 0px));
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
    box-sizing: border-box;
    text-align: center;
    gap: clamp(0.35rem, 1.2vmin + 0.25rem, 2rem);
    min-height: 100vh;
    min-height: 100dvh;
}

/* Fluid type: reads well on phones, scales up on 1080p / 1440p / ultrawide */
.birthday-text,
.second-line {
    font-size: clamp(1rem, 0.55rem + 2.1vw, 3.25rem);
    line-height: 1.15;
    flex-shrink: 0;
    max-width: min(100%, 42rem);
    padding-inline: 0.25rem;
}

.second-line {
    margin-top: 0;
}

.image-container {
    position: relative;
    flex: 0 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.birthday-image {
    display: block;
    margin: 0 auto;
    width: auto;
    height: auto;
    max-width: min(100%, 630px);
    /* Phones: keep image from eating the whole viewport */
    max-height: min(40dvh, 50vmin, 380px);
    object-fit: contain;
}

/* Tablets / desktop: let the art breathe — use more of the vertical space */
@media (min-width: 769px) {
    .birthday-text,
    .second-line {
        font-size: clamp(1.6rem, 1rem + 2.4vw, 3.75rem);
        max-width: min(100%, 48rem);
    }

    .birthday-image {
        max-height: min(58vh, 68vmin, 630px);
    }

    .site-main {
        gap: clamp(0.75rem, 1.5vh, 2.5rem);
    }
}

/* Large monitors: cap width so lines don’t stretch endlessly; bump image ceiling */
@media (min-width: 1200px) {
    .birthday-image {
        max-height: min(62vh, 70vmin, 630px);
    }
}

@media (max-width: 768px) {
    .birthday-text,
    .second-line {
        font-size: clamp(1rem, 0.65rem + 2.8vmin, 2.15rem);
    }

    .birthday-image {
        max-height: min(38dvh, 48vmin, 360px);
    }
}

/* Short viewports (landscape phone, small windows) */
@media (max-height: 520px) {
    .site-main {
        padding-top: max(8px, env(safe-area-inset-top, 0px));
        gap: clamp(0.25rem, 1.5vmin, 0.5rem);
    }

    .birthday-text,
    .second-line {
        font-size: clamp(0.85rem, 0.5rem + 2.2vmin, 1.35rem);
    }

    .birthday-image {
        max-height: min(35dvh, 45vmin, 280px);
    }
}

.easter-egg {
    position: fixed;
    bottom: max(10px, env(safe-area-inset-bottom, 0px));
    right: max(10px, env(safe-area-inset-right, 0px));
    font-size: 10px;
    text-decoration: none;
    color: #000;
    z-index: 1;
}
