.ifh {
    /* Mengikuti variabel warna website (:root di add.css), dengan fallback */
    --ifh-brown: var(--brown1, #3f2924);
    --ifh-beige: var(--green1, #cac8a8);
    --ifh-mint: var(--blue3, #90d9b6);
    --ifh-cream: #efeee5;
    --ifh-white: var(--white1, #ffffff);
    --ifh-grey: var(--grey1, #656466);
    --ifh-head: 'ave-b', 'Avenir Next Condensed', 'Arial Narrow', sans-serif;
    --ifh-body: 'inter-r', Inter, system-ui, sans-serif;
    --ifh-body-sb: 'inter-sb', Inter, system-ui, sans-serif;
    font-family: var(--ifh-body);
    background: var(--ifh-white);
    color: var(--ifh-brown);
    padding: clamp(60px, 8vw, 110px) 20px;
    overflow: hidden;
}

.ifh *,
.ifh *::before,
.ifh *::after {
    box-sizing: border-box;
}

/* ---------- Header ---------- */
.ifh__head {
    max-width: 760px;
    margin: 0 auto clamp(44px, 6vw, 80px);
    text-align: center;
}

.ifh__eyebrow {
    display: inline-block;
    font-family: var(--ifh-head);
    font-size: 16px;
    letter-spacing: .12em;
    text-transform: uppercase;
    background: var(--ifh-beige);
    color: var(--ifh-brown);
    padding: 4px 11px;
}

.ifh .ifh__title {
    font-family: var(--ifh-head);
    font-weight: bold;
    text-transform: uppercase;
    font-size: clamp(36px, 5vw, 50px);
    line-height: 1.1;
    margin: 16px 0 14px;
    padding: 0;
    color: var(--ifh-brown);
}

.ifh__sub {
    margin: 0;
    font-size: clamp(14px, 1.5vw, 18px);
    line-height: 1.6;
    color: var(--ifh-brown);
    opacity: .85;
}

/* ---------- Timeline ---------- */
.ifh__timeline {
    margin: 0 auto;
    max-width: 1180px;
    position: relative;
}

.ifh__timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 2px;
    transform: translateX(-50%);
    background: var(--ifh-beige);
}

.ifh__progress {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 0;
    transform: translateX(-50%);
    background: var(--ifh-brown);
    transition: height .15s linear;
}

.ifh__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.ifh__item {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 90px;
    align-items: center;
    margin-bottom: clamp(40px, 6vw, 70px);
}

.ifh__item:last-child {
    margin-bottom: 0;
}

/* Dot */
.ifh__dot {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    width: 18px;
    height: 18px;
    background: var(--ifh-white);
    border: 2px solid var(--ifh-brown);
    z-index: 2;
    transition: background .4s ease, box-shadow .4s ease;
}

.ifh__item.is-visible .ifh__dot {
    background: var(--ifh-brown);
    box-shadow: 0 0 0 6px var(--ifh-cream);
}

.ifh__item--latest.is-visible .ifh__dot {
    background: var(--ifh-mint);
    border-color: var(--ifh-brown);
    box-shadow: 0 0 0 6px rgba(144, 217, 182, .35);
}

/* Big year */
.ifh__year {
    font-family: var(--ifh-head);
    font-weight: bold;
    font-size: clamp(80px, 11vw, 150px);
    line-height: .9;
    color: transparent;
    -webkit-text-stroke: 2px var(--ifh-beige);
    text-align: right;
    user-select: none;
    transition: color .6s ease;
}

.ifh__item.is-visible .ifh__year {
    color: var(--ifh-cream);
    -webkit-text-stroke-color: var(--ifh-brown);
}

.ifh__item--latest.is-visible .ifh__year {
    color: var(--ifh-mint);
}

/* Card */
.ifh__card {
    background: var(--ifh-cream);
    padding: clamp(24px, 3vw, 36px);
    position: relative;
    border-top: 4px solid var(--ifh-brown);
    transition: transform .35s ease, box-shadow .35s ease;
}

.ifh__item--latest .ifh__card {
    border-top-color: var(--ifh-mint);
}

.ifh__card::before {
    content: "";
    position: absolute;
    top: 50%;
    left: -8px;
    width: 16px;
    height: 16px;
    background: var(--ifh-cream);
    transform: translateY(-50%) rotate(45deg);
}

/* Selang-seling kiri/kanan di desktop */
.ifh__item:nth-child(even) .ifh__year {
    order: 2;
    text-align: left;
}

.ifh__item:nth-child(even) .ifh__card {
    order: 1;
}

.ifh__item:nth-child(even) .ifh__card::before {
    left: auto;
    right: -8px;
}

.ifh__card-year {
    display: none;
}

.ifh__tag {
    display: inline-block;
    font-family: var(--ifh-head);
    font-size: 15px;
    letter-spacing: .06em;
    text-transform: uppercase;
    background: var(--ifh-beige);
    color: var(--ifh-brown);
    padding: 4px 11px;
    margin-bottom: 14px;
}

.ifh__tag--latest {
    background: var(--ifh-mint);
}

.ifh .ifh__theme {
    font-family: var(--ifh-head);
    font-weight: bold;
    text-transform: uppercase;
    font-size: clamp(24px, 2.6vw, 32px);
    line-height: 1.15;
    margin: 0 0 12px;
    padding: 0;
    color: var(--ifh-brown);
}

.ifh__desc {
    margin: 0;
    font-size: 15px;
    line-height: 1.65;
    color: var(--ifh-brown);
}

/* Statistik selalu satu baris; ukuran angka mengikuti lebar kartu */
.ifh__card {
    container-type: inline-size;
}

.ifh__stats {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(min-content, 1fr);
    gap: clamp(10px, 3cqi, 20px);
    margin: 22px 0 0;
    padding: 20px 0 0;
    border-top: 1px solid var(--ifh-beige);
    overflow-x: auto;
    scrollbar-width: none;
    /* cadangan untuk layar sangat sempit */
}

.ifh__stats::-webkit-scrollbar {
    display: none;
}

.ifh__stat dt {
    font-family: var(--ifh-head);
    font-weight: bold;
    line-height: 1;
    color: var(--ifh-brown);
    white-space: nowrap;
    font-size: 26px;
    font-size: clamp(14px, 5.6cqi, 32px);
}

.ifh__stat dd {
    margin: 6px 0 0;
    font-family: var(--ifh-body-sb);
    color: var(--ifh-grey);
    line-height: 1.3;
    font-size: 12px;
    font-size: clamp(9px, 2.6cqi, 12px);
}

/* Animasi muncul saat scroll */
.ifh__item .ifh__card,
.ifh__item .ifh__year {
    opacity: 0;
    transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1), color .6s ease, box-shadow .35s ease;
}

.ifh__item .ifh__card {
    transform: translateX(40px);
}

.ifh__item .ifh__year {
    transform: translateX(-40px);
}

.ifh__item:nth-child(even) .ifh__card {
    transform: translateX(-40px);
}

.ifh__item:nth-child(even) .ifh__year {
    transform: translateX(40px);
}

.ifh__item.is-visible .ifh__card,
.ifh__item.is-visible .ifh__year {
    opacity: 1;
    transform: none;
}

.ifh__item.is-visible .ifh__card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -24px rgba(63, 41, 36, .45);
}

/* ---------- Tablet & Mobile ---------- */
@media (max-width: 860px) {

    .ifh__timeline::before,
    .ifh__progress {
        left: 10px;
        transform: none;
    }

    .ifh__item,
    .ifh__item:nth-child(even) {
        grid-template-columns: 1fr;
        padding-left: 42px;
    }

    .ifh__dot {
        left: 11px;
        top: 30px;
        width: 16px;
        height: 16px;
    }

    .ifh__year {
        display: none;
    }

    .ifh__item:nth-child(even) .ifh__card {
        order: 0;
    }

    .ifh__card::before,
    .ifh__item:nth-child(even) .ifh__card::before {
        top: 38px;
        left: -8px;
        right: auto;
        transform: rotate(45deg);
    }

    .ifh__card-year {
        display: block;
        font-family: var(--ifh-head);
        font-weight: bold;
        font-size: 48px;
        line-height: 1;
        color: var(--ifh-brown);
        margin-bottom: 10px;
    }

    .ifh__item .ifh__card,
    .ifh__item:nth-child(even) .ifh__card {
        transform: translateY(30px);
    }
}

@media (max-width: 420px) {
    .ifh {
        padding-left: 16px;
        padding-right: 16px;
    }

    .ifh__item,
    .ifh__item:nth-child(even) {
        padding-left: 34px;
    }

    .ifh__desc {
        font-size: 14px;
    }

    .ifh__card {
        padding: 22px 18px;
    }
}

@media (prefers-reduced-motion: reduce) {

    .ifh__item .ifh__card,
    .ifh__item .ifh__year {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .ifh__progress {
        transition: none;
    }
}