/**
 * Hero component
 */

/* Remove top padding on front page so hero is flush with header */
body.home .site-main {
    padding-block-start: 0;
}

.hero {
    position: relative;
    width: 100vw;
    margin-left: calc(50% - 50vw);
    min-height: clamp(30rem, 70vh, 48rem);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero__media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Gradient overlay: body bg color at bottom → transparent at top */
.hero__media::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(to top, var(--color-bg) 0%, rgba(255, 255, 255, 0.6) 50%, rgba(255, 255, 255, 0.3) 100%);
    pointer-events: none;
}

.hero__content {
    position: relative;
    z-index: 2;
    max-width: 44rem;
    padding: var(--space-2xl) var(--gutter);
    text-align: center;
}

.hero__title {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: var(--size-display-xl);
    font-weight: 400;
    line-height: var(--leading-display);
    color: #3d2e1e;
    letter-spacing: -0.01em;
}

.hero__description {
    margin-top: var(--space-l);
    font-size: var(--size-step-0);
    font-weight: 600;
    font-style: italic;
    line-height: var(--leading-relaxed);
    color: #3d2e1e;
}

.hero__actions {
    margin-top: var(--space-l);
}

.hero__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875em 2.25em;
    font-size: var(--size-step-0);
    font-weight: 600;
    color: #fff;
    background-color: var(--color-primary-600);
    border: none;
    border-radius: 0.5rem;
    text-decoration: none;
    cursor: pointer;
    transition: opacity var(--transition-base);
}

.hero__cta:hover {
    opacity: 0.9;
    color: #fff;
}

.hero__cta:focus-visible {
    outline: 2px solid var(--color-primary-400);
    outline-offset: 2px;
}

/* ================================================================
   Homepage — gentle page-load entrance
   ================================================================ */

@keyframes hero-enter {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
}

body.home .hero__title,
body.home .hero__description,
body.home .hero__actions {
    animation: hero-enter 1.1s cubic-bezier(0.4, 0, 0, 1) both;
}

body.home .hero__title       { animation-delay: 50ms; }
body.home .hero__description { animation-delay: 250ms; }
body.home .hero__actions     { animation-delay: 450ms; }

@media (prefers-reduced-motion: reduce) {
    body.home .hero__title,
    body.home .hero__description,
    body.home .hero__actions {
        animation: none;
    }
}
