@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,700&family=Figtree:wght@400;500;600;700&display=swap');

:root {
    --hiw-gold: #FFD700;
    --hiw-ink: #f4f0e8;
    --hiw-muted: rgba(244, 240, 232, 0.72);
    --hiw-line: rgba(255, 255, 255, 0.12);
    --hiw-display: 'Fraunces', Georgia, serif;
    --hiw-body: 'Figtree', system-ui, sans-serif;
    --hiw-cta-height: 5.75rem;
    --hiw-layer-1: #8fd99a;
    --hiw-layer-2: #f0d66a;
    --hiw-layer-3: #f0a35e;
}

.hiw {
    --hiw-nav-offset: 4.5rem;
    color: var(--hiw-ink);
    font-family: var(--hiw-body);
    min-height: calc(100vh - var(--hiw-nav-offset));
    display: flex;
    flex-direction: column;
    padding-bottom: calc(var(--hiw-cta-height) + 1.25rem);
    box-sizing: border-box;
}

.hiw__stage {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.25rem;
    width: 100%;
}

.hiw-layer {
    --hiw-accent: var(--hiw-layer-1);
    --hiw-accent-soft: color-mix(in srgb, var(--hiw-accent) 18%, transparent);
    --hiw-accent-border: color-mix(in srgb, var(--hiw-accent) 55%, transparent);
    width: min(100%, 72rem);
    text-align: center;
}

.hiw-layer--green {
    --hiw-accent: var(--hiw-layer-1);
}

.hiw-layer--yellow {
    --hiw-accent: var(--hiw-layer-2);
}

.hiw-layer--orange {
    --hiw-accent: var(--hiw-layer-3);
}

.hiw-layer[hidden] {
    display: none !important;
}

.hiw-layer.is-entering {
    animation: hiw-swap-in 0.45s ease both;
}

.hiw-layer.is-leaving {
    animation: hiw-swap-out 0.28s ease both;
}

.hiw-layer__label {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--hiw-accent);
    margin-bottom: 1.5rem;
}

.hiw-flow {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: center;
    gap: 0.85rem 0.65rem;
    margin: 0 auto 2rem;
}

.hiw-flow__step {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    width: 14rem;
    min-height: 9.75rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--hiw-accent-border);
    border-radius: 0.7rem;
    background: var(--hiw-accent-soft);
    text-align: left;
    box-sizing: border-box;
}

.hiw-flow__title {
    font-family: var(--hiw-display);
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    font-weight: 600;
    line-height: 1.25;
    color: var(--hiw-ink);
    margin: 0 0 0.55rem;
}

.hiw-flow__desc {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.45;
    color: var(--hiw-muted);
    flex: 1;
}

.hiw-flow__arrow {
    align-self: center;
    color: var(--hiw-accent);
    font-size: 1.35rem;
    line-height: 1;
    user-select: none;
}

.hiw-more__btn {
    appearance: none;
    background: transparent;
    border: 1px solid var(--hiw-accent-border);
    color: var(--hiw-ink);
    font-family: var(--hiw-body);
    font-size: 1rem;
    font-weight: 600;
    padding: 0.8rem 1.35rem;
    border-radius: 0.55rem;
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.hiw-more__btn:hover,
.hiw-more__btn:focus-visible {
    transform: translateY(-1px);
    border-color: var(--hiw-accent);
    color: var(--hiw-accent);
    background: var(--hiw-accent-soft);
    outline: none;
}

.hiw-finale {
    margin-top: 0.25rem;
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
}

.hiw-finale__text {
    margin: 0 0 1.1rem;
    font-size: 1.08rem;
    line-height: 1.55;
    color: var(--hiw-muted);
}

.hiw-finale__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.8rem 1.45rem;
    border-radius: 0.55rem;
    font-weight: 600;
    font-size: 1.02rem;
    text-decoration: none;
    background: var(--hiw-accent);
    color: #1a1508;
    border: 1px solid var(--hiw-accent);
    transition: transform 0.2s ease, filter 0.2s ease;
}

.hiw-finale__btn:hover {
    transform: translateY(-1px);
    filter: brightness(1.08);
    color: #1a1508;
}

.hiw-cta {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem 1.5rem;
    flex-wrap: wrap;
    min-height: var(--hiw-cta-height);
    padding: 0.9rem 1.25rem;
    text-align: center;
    background: rgba(12, 11, 10, 0.88);
    border-top: 1px solid var(--hiw-line);
    backdrop-filter: blur(10px);
}

.hiw.is-finale .hiw-cta {
    display: none;
}

.hiw.is-finale {
    padding-bottom: 2rem;
}

.hiw-cta__title {
    font-family: var(--hiw-display);
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    font-weight: 600;
    margin: 0;
    color: var(--hiw-ink);
}

.hiw-cta__actions {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
    justify-content: center;
}

.hiw-cta__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.7rem 1.25rem;
    border-radius: 0.55rem;
    font-weight: 600;
    font-size: 0.98rem;
    text-decoration: none;
    background: var(--hiw-gold);
    color: #1a1508;
    border: 1px solid var(--hiw-gold);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.hiw-cta__btn:hover {
    transform: translateY(-1px);
    background: #ffe44d;
    color: #1a1508;
}

.hiw-cta__login {
    color: var(--hiw-muted);
    font-size: 0.92rem;
    text-decoration: none;
}

.hiw-cta__login:hover {
    color: var(--hiw-gold);
}

/* Keep site footer from colliding with the fixed bar */
body:has(.hiw:not(.is-finale)) .footer {
    margin-bottom: var(--hiw-cta-height);
}

@keyframes hiw-swap-in {
    from {
        opacity: 0;
        transform: translateX(28px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes hiw-swap-out {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-18px);
    }
}

@media (max-width: 767.98px) {
    .hiw-flow {
        flex-direction: column;
        gap: 0.55rem;
        align-items: center;
    }

    .hiw-flow__step {
        max-width: 20rem;
        width: 100%;
        min-height: 0;
    }

    .hiw-flow__arrow {
        transform: rotate(90deg);
    }

    .hiw-cta {
        flex-direction: column;
        gap: 0.65rem;
        --hiw-cta-height: 7.5rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hiw-layer.is-entering,
    .hiw-layer.is-leaving {
        animation: none !important;
    }

    .hiw-more__btn:hover,
    .hiw-cta__btn:hover,
    .hiw-finale__btn:hover {
        transform: none;
    }
}
