/* ==========================================================================
   Anan Early Years – About Us
   Builds on style.css (tokens, header, footer, buttons, eyebrows, titles)
   ========================================================================== */

/* ---------- Who we are ---------- */
.who-visual {
    position: relative;
    padding: 0 12% 16% 0;
}

.who-main,
.who-small {
    margin: 0;
    overflow: hidden;
}

.who-main {
    aspect-ratio: 4 / 3.2;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.who-main img,
.who-small img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.who-main img {
    object-position: 50% 60%;
}

.who-small {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 50%;
    aspect-ratio: 4 / 3;
    border-radius: 24px;
    border: 8px solid var(--cream);
    box-shadow: var(--shadow);
}

.who-badge {
    position: absolute;
    left: -14px;
    bottom: 4%;
    width: 132px;
    height: 132px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #fff;
    box-shadow: var(--shadow);
}

.who-badge-text {
    position: absolute;
    inset: 5px;
    width: calc(100% - 10px);
    animation: spin 18s linear infinite;
}

.who-badge-text text {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .14em;
    fill: var(--purple-deep);
}

.who-badge-mark {
    width: 54px;
}

.who-points {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    list-style: none;
    padding: 0;
    margin: 28px 0 0;
}

.who-points li {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 18px;
    border-radius: 20px;
    background: #fff;
    box-shadow: var(--shadow-sm);
    font-size: 13.5px;
    line-height: 1.45;
}

.who-points i {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #fff;
    background: var(--c);
}

.who-points strong {
    display: block;
    font-size: 15px;
    color: var(--ink);
    margin-bottom: 2px;
}

@media (max-width: 575px) {
    .who-points {
        grid-template-columns: 1fr;
    }

    .who-points li {
        flex-direction: row;
        align-items: center;
    }

    .who-points i {
        flex-shrink: 0;
    }

    .who-badge {
        width: 104px;
        height: 104px;
        left: -6px;
    }
}

/* ---------- Journey timeline ---------- */
.legacy {
    background: #fff;
    border-radius: 60px 60px 0 0;
}

.timeline {
    position: relative;
    max-width: 1020px;
    margin: 0 auto;
}

.tl-line {
    position: absolute;
    top: 10px;
    bottom: 10px;
    left: 50%;
    width: 4px;
    margin-left: -2px;
    border-radius: 4px;
    background: var(--line);
    overflow: hidden;
}

.tl-fill {
    display: block;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, var(--purple), var(--pink), var(--orange), var(--teal));
    transform-origin: top;
    transform: scaleY(0);
}

.tl-item {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 88px 1fr;
    align-items: center;
    margin-bottom: 46px;
}

.tl-item:last-child {
    margin-bottom: 0;
}

.tl-dot {
    grid-column: 2;
    grid-row: 1;
    justify-self: center;
    position: relative;
    z-index: 1;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 24px;
    color: var(--c);
    background: #fff;
    border: 5px solid color-mix(in srgb, var(--c) 28%, #fff);
    transition: background .5s, color .5s, scale .5s var(--ease);
}

.tl-item.active .tl-dot {
    background: var(--c);
    color: #fff;
    scale: 1.08;
}

.tl-card {
    grid-row: 1;
    padding: 26px 30px;
    border-radius: 24px;
    background: var(--cream);
    border: 1px solid var(--line);
    transition: box-shadow .5s, border-color .5s;
}

.tl-item.active .tl-card {
    border-color: transparent;
    box-shadow: var(--shadow);
}

/* Items are the 2nd–5th children (the line is the 1st) */
.tl-item:nth-child(even) .tl-card {
    grid-column: 1;
    text-align: right;
}

.tl-item:nth-child(odd) .tl-card {
    grid-column: 3;
}

.tl-year {
    display: block;
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--c);
    margin-bottom: 6px;
}

.tl-card h3 {
    font-size: 1.2rem;
    margin-bottom: 6px;
}

.tl-card p {
    margin: 0;
}

@media (max-width: 767px) {
    .tl-line {
        left: 36px;
    }

    .tl-item {
        grid-template-columns: 72px 1fr;
        column-gap: 18px;
        align-items: start;
    }

    .tl-dot {
        grid-column: 1;
    }

    .tl-item:nth-child(even) .tl-card,
    .tl-item:nth-child(odd) .tl-card {
        grid-column: 2;
        text-align: left;
    }

    .tl-card {
        padding: 22px;
    }
}

/* ---------- Vision & Mission ---------- */
.vm {
    position: relative;
    overflow: hidden;
    padding: 130px 0;
    color: rgba(255, 255, 255, .82);
    background:
        radial-gradient(45% 45% at 90% 20%, rgba(240, 138, 176, .28), transparent 70%),
        radial-gradient(45% 45% at 5% 80%, rgba(123, 184, 174, .25), transparent 70%),
        linear-gradient(135deg, #34175a, #57288a);
}

.vm .section-title {
    color: #fff;
    margin-bottom: 18px;
}

.vm-bigword {
    position: absolute;
    font-size: 19vw;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.04em;
    white-space: nowrap;
    color: transparent;
    -webkit-text-stroke: 1.5px rgba(255, 255, 255, .08);
    pointer-events: none;
    user-select: none;
}

.vm-bigword-1 { top: 2%; left: -3%; }
.vm-bigword-2 { bottom: 2%; right: -3%; }

.vm-row {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 80px;
    align-items: center;
    margin-bottom: 130px;
    scroll-margin-top: 120px;
}

.vm-row:last-child {
    margin-bottom: 0;
}

.vm-row-reverse .vm-media {
    order: 2;
}

.vm-media {
    position: relative;
    width: 100%;
    max-width: 460px;
    aspect-ratio: 1;
    margin: 0 auto;
}

.vm-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px dashed rgba(255, 255, 255, .22);
    animation: spin 40s linear infinite;
}

.vm-img {
    position: absolute;
    inset: 8%;
    margin: 0;
    overflow: hidden;
    border: 8px solid rgba(255, 255, 255, .14);
    border-radius: 58% 42% 46% 54% / 52% 44% 56% 48%;
    animation: morph 14s ease-in-out infinite;
}

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

.vm-icon {
    position: absolute;
    right: 4%;
    bottom: 10%;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 32px;
    color: #2b1745;
    background: var(--c);
    box-shadow: 0 0 0 10px color-mix(in srgb, var(--c) 25%, transparent), 0 20px 40px -12px rgba(0, 0, 0, .5);
    animation: floaty 5s ease-in-out infinite;
}

.vm-lead {
    font-size: 1.15rem;
    color: rgba(255, 255, 255, .9);
}

.vm-quote {
    margin: 26px 0 0;
    padding: 24px 28px;
    border-radius: 22px;
    background: rgba(255, 255, 255, .08);
    border-left: 4px solid var(--yellow);
    font-size: 1.05rem;
    line-height: 1.6;
}

.vm-quote i {
    margin-right: 10px;
    color: var(--yellow);
}

.vm-quote strong {
    color: var(--yellow);
}

.vm-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 28px 0 0;
}

.vm-chips li {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 40px;
    font-weight: 600;
    color: #fff;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .15);
    cursor: default;
    transition: background .35s, color .35s, border-color .35s, translate .35s var(--ease);
}

.vm-chips i {
    color: var(--c);
    transition: color .35s;
}

.vm-chips li:hover {
    background: var(--c);
    border-color: var(--c);
    color: #2b1745;
    translate: 0 -4px;
}

.vm-chips li:hover i {
    color: inherit;
}

@media (max-width: 991px) {
    .vm {
        padding: 90px 0;
    }

    .vm-row {
        grid-template-columns: 1fr;
        gap: 40px;
        margin-bottom: 90px;
    }

    .vm-row-reverse .vm-media {
        order: 0;
    }

    .vm-media {
        max-width: 340px;
    }

    .vm-icon {
        width: 68px;
        height: 68px;
        font-size: 26px;
    }
}

/* ---------- Core belief ---------- */
.belief-pin {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 110px 0;
    overflow: hidden;
}

.belief-inner {
    position: relative;
    isolation: isolate;
    max-width: 1020px;
    margin: 0 auto;
    text-align: center;
}

.belief-inner::before {
    content: "\201C";
    position: absolute;
    top: -110px;
    left: 50%;
    transform: translateX(-50%);
    z-index: -1;
    font-family: Georgia, serif;
    font-size: 16rem;
    line-height: 1;
    color: var(--purple-soft);
}

.belief-quote {
    margin: 0;
    font-size: clamp(1.8rem, 4.3vw, 3.7rem);
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -.02em;
    color: var(--ink);
}

.belief-quote mark {
    background: none;
    color: inherit;
    padding: 0;
}

.belief-quote mark .bw {
    background: var(--rainbow);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.belief-quote .bw {
    display: inline-block;
}

.belief-sub {
    margin: 28px auto 0;
    max-width: 620px;
    font-size: 1.15rem;
}

.belief-photo {
    position: absolute;
    left: 4%;
    bottom: 10%;
    width: 170px;
    aspect-ratio: 1;
    margin: 0;
    border-radius: 50%;
    overflow: hidden;
    border: 8px solid #fff;
    box-shadow: var(--shadow);
    animation: floaty 6s ease-in-out infinite;
}

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

.bf-s1 { top: 16%; right: 8%; width: 34px; }
.bf-s2 { top: 26%; left: 10%; width: 22px; fill: var(--orange); animation-delay: -1s; }

@media (max-width: 991px) {
    .belief-pin {
        min-height: 0;
        padding: 100px 0;
    }

    .belief-photo {
        display: none;
    }
}

/* ---------- Core values – flip cards ---------- */
.core-values {
    background: #fff;
}

.flip-card {
    display: block;
    width: 100%;
    height: 340px;
    padding: 0;
    border: 0;
    background: none;
    perspective: 1100px;
    cursor: pointer;
    text-align: center;
}

.flip-inner {
    position: relative;
    display: block;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform .8s var(--ease);
}

.flip-card.flipped .flip-inner {
    transform: rotateY(180deg);
}

@media (hover: hover) {
    .flip-card:hover .flip-inner {
        transform: rotateY(180deg);
    }
}

.flip-front,
.flip-back {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    border-radius: var(--radius);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.flip-front {
    background: color-mix(in srgb, var(--c) 12%, #fff);
    border: 1px solid color-mix(in srgb, var(--c) 25%, transparent);
}

.flip-back {
    transform: rotateY(180deg);
    background:
        radial-gradient(70% 60% at 100% 0%, rgba(255, 255, 255, .25), transparent 70%),
        var(--c);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 500;
    line-height: 1.6;
}

.flip-icon {
    width: 84px;
    height: 84px;
    margin-bottom: 20px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 32px;
    color: #fff;
    background: var(--c);
    box-shadow: 0 0 0 10px color-mix(in srgb, var(--c) 20%, transparent);
}

.flip-word {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.03em;
    color: var(--c);
}

.flip-with {
    margin-top: 8px;
    font-family: var(--script);
    font-size: 1.3rem;
    color: var(--ink);
}

.flip-hint {
    position: absolute;
    right: 20px;
    bottom: 18px;
    color: var(--c);
    opacity: .6;
}

.flip-word-sm {
    display: block;
    margin-bottom: 12px;
    font-size: 1.6rem;
    font-weight: 800;
}
