@import url('https://fonts.googleapis.com/css2?family=Istok+Web:wght@400;700&display=swap');

:root {
    --primary-color:    #252525;
    --secondary-color:  #987864;
    --light-color:      #DBDBDB;
    --home-bg-color:    #FCFCFC;
}

/* ══════════════════════════════════════════════════════
   Page title section
══════════════════════════════════════════════════════ */

.about-header {
    min-height: 50vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 2rem;
}

h2 {
    font-size: 50px;
    font-weight: bold;
    text-transform: uppercase;
}

.top-line {
    height: 3px;
    width: 20em;
    margin: 35px 0 0;
    background-color: var(--secondary-color);
}

/* ══════════════════════════════════════════════════════
   Timeline wrapper + center track
══════════════════════════════════════════════════════ */

.timeline {
    position: relative;
    padding-top: 80px;
    padding-bottom: 120px;
    overflow-x: hidden;   /* clip translate animations so they never expand page width */
}

.timeline-track {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background-color: var(--secondary-color);
    transform: translateX(-50%);
    z-index: 0;
}

/* ══════════════════════════════════════════════════════
   Year dot
══════════════════════════════════════════════════════ */

.year-dot {
    position: relative;          /* overridden per entry type */
    z-index: 10;
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--secondary-color);
    color: #fff;
    font-family: 'Istok Web', Arial, sans-serif;
    font-weight: bold;
    font-size: 13px;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 0 0 6px rgba(152, 120, 100, 0.20),
                0 8px 24px rgba(152, 120, 100, 0.35);
}

.year-dot-today {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* ══════════════════════════════════════════════════════
   Full-width entries  (2012 · 2019 · TODAY)
══════════════════════════════════════════════════════ */

.entry-full {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 80px 0;
    gap: 0;
}

.entry:first-of-type {
    margin-top: 60px;
}

/* Year dot in normal flow → centered by flex parent */
.entry-full .year-dot {
    position: relative;
    left: auto;
    transform: none;
    margin: 28px 0;           /* space above and below the card */
}

/* Card container */
.full-card {
    position: relative;
    width: 78%;
    height: 520px;
    border-radius: 18px;
    overflow: hidden;
    box-shadow:
        0 4px 12px rgba(0,0,0,0.12),
        0 20px 60px rgba(0,0,0,0.18);
}

/* ── Parallax image layer ── */

.parallax-img {
    position: absolute;
    inset: -120px 0;          /* extra height for parallax travel */
    background-size: cover;
    background-position: center;
    will-change: transform;
    transition: transform 0.05s linear;
}

/* ── Text overlay ── */

.card-overlay {
    position: absolute;
    inset: 0;
    display: flex;
}

.overlay-half {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px 44px;
}

.overlay-right {
    background: rgba(37, 37, 37, 0.72);
    color: #fff;
    backdrop-filter: blur(2px);
}

.overlay-left {
    /* Just a subtle gradient so the card doesn't look cut in half */
    background: linear-gradient(to right, rgba(0,0,0,0.30) 0%, transparent 100%);
    color: #fff;
    justify-content: flex-end;
    padding-bottom: 44px;
}

.overlay-left h3 {
    font-size: 28px;
    font-weight: bold;
    text-transform: uppercase;
    line-height: 1.1;
}

.overlay-right h3 {
    font-size: 22px;
    font-weight: bold;
    text-transform: uppercase;
    line-height: 1.2;
    margin-bottom: 16px;
}

.overlay-right p {
    font-size: 13px;
    line-height: 1.7;
    opacity: 0.9;
}

/* ══════════════════════════════════════════════════════
   Split entries  (2016 · 2020)
══════════════════════════════════════════════════════ */

.entry-split {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 80px 8%;
    gap: 0;
}

/* Keep text vertically centred against the tall image */
.split-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Year dot absolutely centered on the line */
.entry-split .year-dot {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

/* Columns */
.split-col {
    flex: 1;
}

/* Left column: content faces the center → right-align text */
.split-left {
    padding-right: 7%;
    text-align: right;
}

/* Right column: content faces out from center → left-align text */
.split-right {
    padding-left: 7%;
    text-align: left;
}

/* Headings in split items */
.entry-split h3 {
    font-size: 22px;
    font-weight: bold;
    text-transform: uppercase;
    line-height: 1.2;
    margin-bottom: 18px;
    color: var(--primary-color);
}

.entry-split p {
    font-size: 14px;
    line-height: 1.7;
    color: #555;
}

/* Image wrappers in split columns */
.split-img-wrap {
    border-radius: 14px;
    overflow: hidden;
    box-shadow:
        0 4px 12px rgba(0,0,0,0.10),
        0 16px 40px rgba(0,0,0,0.14);
}

.split-img-wrap img {
    display: block;
    width: 100%;
    height: 480px;
    object-fit: cover;
}

/* ══════════════════════════════════════════════════════
   Slide animations — driven by .is-visible on .entry
   All transitions are bidirectional: removing .is-visible
   reverses the animation so items disappear when scrolled
   out of view in either direction.
══════════════════════════════════════════════════════ */

/* Shared timing curve */
:root {
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ── Year dot ──────────────────────────────────────── */

/* Both entry types: start collapsed */
.year-dot {
    opacity: 0;
    scale: 0.3;
    transition:
        opacity  0.5s  var(--ease-out-expo),
        scale    0.5s  cubic-bezier(0.34, 1.56, 0.64, 1); /* spring bounce */
}

/* Absolute dot (entry-split): keep translate-center, animate via scale only */
.entry-split .year-dot {
    transform: translate(-50%, -50%); /* positioning only — never overridden */
}

.entry.is-visible .year-dot {
    opacity: 1;
    scale: 1;
}

/* ── Full-width card ───────────────────────────────── */

.full-card {
    opacity: 0;
    translate: 0 50px;
    transition:
        opacity  0.8s  var(--ease-out-expo),
        translate 0.8s var(--ease-out-expo);
}

.entry.is-visible .full-card {
    opacity: 1;
    translate: 0 0;
}

/* ── Split columns ─────────────────────────────────── */

.split-left {
    opacity: 0;
    translate: -70px 0;
    transition:
        opacity  0.75s var(--ease-out-expo),
        translate 0.75s var(--ease-out-expo);
}

.split-right {
    opacity: 0;
    translate: 70px 0;
    transition:
        opacity  0.75s var(--ease-out-expo) 0.15s,  /* staggered */
        translate 0.75s var(--ease-out-expo) 0.15s;
}

.entry.is-visible .split-left,
.entry.is-visible .split-right {
    opacity: 1;
    translate: 0 0;
}

/* ══════════════════════════════════════════════════════
   Responsive
══════════════════════════════════════════════════════ */

@media (max-width: 860px) {

    /* ── Titles ── */
    h2 {
        font-size: 34px;
    }

    .top-line {
        width: min(20em, 80vw);
    }

    /* ── Timeline track: keep centered ── */
    .timeline-track {
        left: 50%;
        transform: translateX(-50%);
    }

    /* ── Full-width cards ── */
    .full-card {
        width: 92%;
        height: 380px;
    }

    /* Card overlay: single column on mobile */
    .card-overlay {
        flex-direction: column;
    }

    .overlay-left {
        display: none;
    }

    .overlay-right {
        flex: 1;
        padding: 28px 24px;
        background: rgba(37, 37, 37, 0.78);
    }

    .overlay-right h3 { font-size: 18px; }
    .overlay-right p  { font-size: 13px; }

    /* ── Full entries ── */
    .entry-full {
        padding: 60px 0;
        min-height: auto;
    }

    /* ── Split entries: stack vertically, centred on the track ── */
    .entry-split {
        flex-direction: column;
        align-items: center;       /* keep everything on the centre line */
        padding: 60px 5%;
        gap: 0;                    /* gaps handled per-child below */
        min-height: auto;
    }

    /* Year dot: back in normal flow, centred */
    .entry-split .year-dot {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        margin: 0 auto 0;
    }

    /* Content blocks sit on top of the track — give them a solid background
       and enough width so the line is hidden behind them */
    .split-col {
        position: relative;
        z-index: 2;
        width: min(420px, 88vw);
        background: var(--home-bg-color);
        border-radius: 12px;
        padding: 24px 20px;
        text-align: center;
        margin: 8px 0;
    }

    /* Reset directional padding from desktop */
    .split-left  { padding-right: 20px; text-align: center; }
    .split-right { padding-left:  20px; text-align: center; }

    .split-img-wrap img {
        height: 240px;
    }

    .entry-split h3 { font-size: 18px; }
    .entry-split p  { font-size: 13px; }
}
