/* ===== HERO BASE ===== */
.hero-panel {
    min-height: 100dvh;
    display: flex;
    align-items: stretch;
    justify-content: center;

    padding: clamp(1rem, 2vh, 2rem) clamp(1rem, 2vw, 2rem) 0;

    overflow: hidden;
    position: relative;
}

.hero-stage {
    width: 100%;
    max-width: var(--content-max-width);
    position: relative;

    display: grid;
    grid-template-columns: 1fr;
    align-items: end;
    justify-items: center;
}

/* ===== DESKTOP LAYOUT ===== */
@media (min-width: 900px) {
    .hero-stage {
        grid-template-columns: 1.15fr 1fr;
        align-items: end;
        justify-items: center;
    }
}

/* ===== PORTRAIT ===== */
.portrait-area {
    position: relative;
    width: clamp(260px, min(42vw, 58vh), 650px);
    aspect-ratio: 1;
    justify-self: center;
    align-self: end;
    animation: fadeInUp 1s ease forwards;
}

.portrait-area::before,
.portrait-area::after {
    content: '';
    position: absolute;
    inset: 0;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: opacity 1.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.portrait-area::before {
    background-image: url("../assets/images/shape.svg");
    opacity: 1;
}

.portrait-area::after {
    background-image: url("../assets/images/Property_1_Default.svg");
    opacity: 0;
}

.portrait-area:hover::before {
    opacity: 0;
}

.portrait-area:hover::after {
    opacity: 1;
}

.portrait-photo {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    height: 115%;
    width: auto;
    z-index: 1;
    pointer-events: none;
    user-select: none;
    transition: transform 0.6s cubic-bezier(0.19, 1, 0.22, 1);
}

.portrait-area:hover .portrait-photo {
    transform: translateX(-50%) scale(1.02);
}

/* ===== TEXT ===== */
.hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: clamp(0.6rem, 2vh, 2rem);
    padding-top: clamp(0px, calc((100vh - 700px) * 0.55), 10rem);
    width: 100%;
    justify-self: stretch;
    align-self: center;
    color: #ffffff;

    animation: fadeInUp 1.2s ease forwards;
}

.hero-copy a:hover {
    color: inherit;
    opacity: 1;
    transform: none;
}

@media (min-width: 1000px) {
    .hero-copy {
        align-items: flex-start;
        text-align: left;
    }
}

@media (max-width: 900px) {
    .hero-copy {
        align-items: center;
        text-align: center;
    }
}

/* ===== HERO META ===== */
.hero-meta {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    opacity: 0;
    animation: fadeIn 1s ease forwards 0.6s;
}

/* ===== BRAND ===== */
.brand-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.brand-logo {
    width: 50px;
    transition: transform 0.35s ease;
    transform-origin: center;
}

.brand-block:hover .brand-logo {
    transform: rotateY(32deg);
}

.brand-caption {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 9px;
    line-height: 1;
    text-align: center;
}

.brand-caption-name {
    color: #ffffff !important;
    font-size: 14px;
}

.brand-caption-role {
    color: var(--accent);
    font-size: 12px;
}

/* ===== HEADLINE ===== */
.headline-wrap {
    text-align: inherit;
    width: 100%;
}

.headline-wrap h1 {
    font-family: "Anta", sans-serif;
    font-size: clamp(2rem, min(6vw, 10vh), 5.8rem);
    line-height: 0.9;
    font-weight: 400;
    letter-spacing: 0.02em;
    color: #ffffff;
    text-align: center;
}

.headline-wrap h1 span {
    display: block;
}

/* ===== JOB TITLE ===== */
.job-title {
    font-family: "Josefin Sans", sans-serif;
    margin-top: clamp(0.5rem, 1.5vh, 1.5rem);
    font-size: clamp(0.75rem, min(2vw, 2.4vh), 2rem);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: 0.18em;
    color: var(--text-main);
    opacity: 0.85;
    text-align: center;
}

/* ===== SOCIAL ===== */
.social-rail {
    display: flex;
    flex-direction: column;
    gap: clamp(0.6rem, 1.2vh, 1.2rem);
    align-items: center;
    align-self: flex-end;
}

.social-rail a {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.social-rail a:hover {
    transform: scale(1.15);
    opacity: 1;
}

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
    margin-top: clamp(1rem, calc(1rem + (100vh - 700px) * 0.55), 10rem);
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;

    opacity: 0;
    animation: fadeInUp 1s ease forwards 1.2s;
    transition: background 0.25s ease, transform 0.25s ease;
}

.scroll-indicator img {
    width: 38px;
    transition: transform 0.25s ease;
}

.scroll-indicator:hover {
    background: rgba(142, 191, 224, 0.12);
    transform: translateY(2px);
}

.scroll-indicator:hover img {
    transform: translateY(3px);
}

/* ===== MOBILE MENU TOGGLE ===== */
.mobile-menu-toggle {
    display: none;
}

@media (max-width: 999px) {
    .mobile-menu-panel {
        top: clamp(5rem, 14svh, 10rem);
        left: 50%;
        right: auto;
        z-index: 18;
    }
}

/* ===== BRAND / SOCIAL IN HERO-STAGE (JS-injected at max-height 400px) ===== */
.hero-stage > .brand-block {
    position: absolute;
    top: 0.6rem;
    left: clamp(0.6rem, 2vw, 1.5rem);
    transform: none;
}

.hero-stage > .social-rail {
    position: absolute;
    top: 0.6rem;
    right: clamp(0.6rem, 2vw, 1.5rem);
    align-self: auto;
}

/* ===== SHORT VIEWPORT ===== */
@media (max-height: 730px) {
    .portrait-photo {
        height: clamp(230px, min(42vw, 58vh), 650px);
    }

    .portrait-area {
        margin-top: 4vw;
    }
}

/* ===== SHORT VIEWPORT + MOBILE ===== */
@media (max-height: 730px) and (max-width: 800px) {
    .portrait-photo {
        height: clamp(230px, min(42vw, 58vh), 650px);
    }

    .portrait-area {
        margin-top: 4vw;
    }
}

/* ===== LANDSCAPE / SHORT VIEWPORT ===== */
@media (max-height: 400px) {
    .brand-logo {
        width: 28px;
    }

    .brand-caption-name {
        font-size: 10px;
    }

    .brand-caption-role {
        font-size: 9px;
    }

    .social-icon {
        width: 20px;
        height: 20px;
    }

    .social-rail {
        gap: 4px;
    }

    .scroll-indicator {
        width: 30px;
    }
}

/* ===== MOBILE LAYOUT ≤ 900px ===== */
@media (max-width: 900px) {
    /* hero-copy's animation leaves transform:translateY(0) which creates a containing block,
       preventing brand-block from anchoring to hero-stage — reset it here */
    .hero-copy {
        animation: none;
        opacity: 1;
        transform: none;
        padding-top: 0;
    }

    .hero-meta {
        position: static;
    }

    .brand-block {
        position: absolute;
        top: 0;
        left: 0;
        transform: none;
    }

    .social-rail {
        display: none;
    }

    .portrait-area {
        width: clamp(200px, min(42vw, 58vh), 650px);
        margin-top: 4vw;
    }

    .portrait-photo {
        left: 49%;
        border-radius: 0 0 6rem 5rem;
    }

    .mobile-menu-toggle {
        display: block;
        position: absolute;
        top: 0;
        right: 0;
        z-index: 20;
    }

}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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