/* =============================================
   Category History / Timeline Section
   ============================================= */

.cat-history {
    position: relative;
    padding: 96px 24px 112px;
    background: #F5F0EA;
    overflow: hidden;
}

.cat-history__bg-texture {
    display: none;
}

.cat-history__inner {
    position: relative;
    max-width: 1140px;
    margin: 0 auto;
}

/* ── INTRO ──────────────────────────────────────────────── */

.cat-history__intro {
    display: grid;
    grid-template-columns: 1fr 1.25fr;
    gap: 72px;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 1px solid rgba(17, 18, 20, 0.1);
}

.cat-history__eyebrow {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: #FF6A00;
    margin-bottom: 22px;
}

.cat-history__title {
    font-size: clamp(42px, 5.5vw, 72px);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -.035em;
    color: #111214;
    margin: 0 0 40px;
}

/* Stats row */
.cat-history__stats {
    display: flex;
    gap: 36px;
    padding-top: 36px;
    border-top: 1px solid rgba(17, 18, 20, 0.1);
}

.cat-history__stat-val {
    display: block;
    font-size: clamp(26px, 3vw, 36px);
    font-weight: 800;
    color: #111214;
    line-height: 1;
    letter-spacing: -.02em;
}

.cat-history__stat-val sup {
    font-size: .52em;
    color: #FF6A00;
    vertical-align: super;
}

.cat-history__stat-label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(17, 18, 20, 0.4);
    margin-top: 8px;
}

/* Joe photo + overlapping card */
.cat-history__intro-media {
    position: relative;
    padding-bottom: 28px;
}

.cat-history__joe-img {
    width: 100%;
    height: 460px;
    object-fit: cover;
    object-position: center top;
    border-radius: 4px;
    display: block;
}

.cat-history__founder-card {
    position: absolute;
    bottom: 0;
    left: -28px;
    max-width: 400px;
    background: rgba(17, 18, 20, 0.94);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255, 106, 0, 0.22);
    border-radius: 4px;
    padding: 20px 22px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.cat-history__founder-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(255, 106, 0, 0.4);
}

.cat-history__founder-info {
    flex: 1;
    min-width: 0;
}

.cat-history__founder-quote {
    font-size: 13px;
    line-height: 1.68;
    color: rgba(237, 227, 213, 0.75);
    font-style: italic;
    margin: 0 0 10px;
    padding: 0;
    border: none;
}

.cat-history__founder-name {
    font-size: 12px;
    font-weight: 700;
    color: #EDE3D5;
    margin: 0;
}

.cat-history__founder-role {
    font-size: 10px;
    color: rgba(237, 227, 213, 0.4);
    letter-spacing: .05em;
    margin: 3px 0 0;
}

/* ── TIMELINE ───────────────────────────────────────────── */

.cat-history__timeline {
    position: relative;
}

/* Vertical center line */
.cat-history__tl-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    transform: translateX(-50%);
    background: linear-gradient(
        to bottom,
        rgba(255, 106, 0, 0.7)  0%,
        rgba(255, 106, 0, 0.25) 60%,
        rgba(255, 106, 0, 0.04) 100%
    );
    pointer-events: none;
}

/* Each timeline row */
.cat-history__item {
    display: grid;
    grid-template-columns: 1fr 64px 1fr;
    grid-template-areas: "text dot img";
    margin-bottom: -72px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.cat-history__item:last-child {
    margin-bottom: 0;
}

/* Each successive item slides on top of the previous */
.cat-history__item:nth-child(1) { z-index: 1; }
.cat-history__item:nth-child(2) { z-index: 2; }
.cat-history__item:nth-child(3) { z-index: 3; }
.cat-history__item:nth-child(4) { z-index: 4; }
.cat-history__item:nth-child(5) { z-index: 5; }
.cat-history__item:nth-child(6) { z-index: 6; }
.cat-history__item:nth-child(7) { z-index: 7; }
.cat-history__item:nth-child(8) { z-index: 8; }

/* Right variant: image on left, text on right */
.cat-history__item--right {
    grid-template-areas: "img dot text";
}

/* Grid areas */
.cat-history__item-text     { grid-area: text; }
.cat-history__item-dot-col  { grid-area: dot;  }
.cat-history__item-img-wrap { grid-area: img;  }

/* Text: gap from center line, no gap on image side */
.cat-history__item--left .cat-history__item-text {
    padding-right: 36px;
    text-align: right;
}
.cat-history__item--right .cat-history__item-text {
    padding-left: 36px;
    text-align: left;
}

/* Center dot column */
.cat-history__item-dot-col {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

.cat-history__item-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #FF6A00;
    box-shadow:
        0 0 0 4px rgba(255, 106, 0, 0.15),
        0 0 0 8px rgba(255, 106, 0, 0.06);
    flex-shrink: 0;
}

/* Year label */
.cat-history__year {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #FF6A00;
    margin-bottom: 10px;
}

/* Description text — needs opaque bg so it doesn't expose the image underneath */
.cat-history__item-text {
    background: #F5F0EA;
    padding-top: 16px;
    padding-bottom: 16px;
}

.cat-history__text {
    font-size: 14px;
    line-height: 1.74;
    color: #4A4540;
    margin: 0;
}

/* Image card — full width, shadow shows depth between overlapping cards */
.cat-history__item-img-wrap {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    background: #d8d0c8;
    box-shadow: 0 -10px 36px rgba(17, 18, 20, 0.16), 0 4px 16px rgba(17, 18, 20, 0.08);
}

/* Gradient fade at bottom of image for smooth overlap transition */
.cat-history__item-img-wrap::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent, rgba(245, 240, 234, 0.55));
    pointer-events: none;
}

.cat-history__item-img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
    border-radius: 4px;
    transition: transform 0.6s cubic-bezier(.25, .46, .45, .94);
}

.cat-history__item-img-wrap:hover .cat-history__item-img {
    transform: scale(1.05);
}

/* Ghost year text overlaid on image */
.cat-history__item-year-bg {
    position: absolute;
    bottom: -6px;
    right: 10px;
    font-size: 64px;
    font-weight: 900;
    line-height: 1;
    letter-spacing: -.04em;
    color: rgba(255, 255, 255, 0.38);
    pointer-events: none;
    user-select: none;
}

/* ── SCROLL REVEAL ──────────────────────────────────────── */

.js-ch-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.js-ch-reveal.js-ch-reveal--left {
    transform: translateX(-44px);
}

.js-ch-reveal.js-ch-reveal--right {
    transform: translateX(44px);
}

.js-ch-reveal.ch-visible {
    opacity: 1;
    transform: none;
}

/* ── RESPONSIVE ─────────────────────────────────────────── */

@media (max-width: 1020px) {
    .cat-history__founder-card {
        left: 0;
        max-width: 100%;
    }
}

@media (max-width: 900px) {
    .cat-history {
        padding: 64px 24px 80px;
    }
    .cat-history__intro {
        grid-template-columns: 1fr;
        gap: 48px;
        padding-bottom: 64px;
        margin-bottom: 64px;
    }
    .cat-history__intro-media {
        padding-bottom: 0;
    }
    .cat-history__founder-card {
        position: static;
        margin-top: 12px;
        max-width: 100%;
    }

    /* Single-column timeline */
    .cat-history__tl-line { display: none; }
    .cat-history__item,
    .cat-history__item--right {
        display: block;
        margin-bottom: 24px;
        padding-left: 24px;
        border-left: 1px solid rgba(255, 106, 0, 0.3);
        position: relative;
    }
    .cat-history__item::before {
        content: '';
        position: absolute;
        left: -4px;
        top: 8px;
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #FF6A00;
        box-shadow: 0 0 0 3px rgba(255, 106, 0, 0.15);
    }
    .cat-history__item-dot-col { display: none; }
    .cat-history__item-img-wrap {
        margin-bottom: 16px;
    }
    .cat-history__item-text,
    .cat-history__item--left .cat-history__item-text,
    .cat-history__item--right .cat-history__item-text {
        padding: 0;
        text-align: left;
        background: transparent;
    }
    .cat-history__item-img { height: 200px; }

    .js-ch-reveal.js-ch-reveal--left,
    .js-ch-reveal.js-ch-reveal--right {
        transform: translateY(20px);
    }
}

@media (max-width: 600px) {
    .cat-history { padding: 48px 16px 64px; }
    .cat-history__stats { gap: 24px; flex-wrap: wrap; }
    .cat-history__joe-img { height: 280px; }
    .cat-history__title { margin-bottom: 28px; }
}
