/* ============================================
   6AM CARTOON / MILK ANIMATIONS
   ============================================ */

/* ---------- Milk Drop Particles ---------- */
@keyframes milkFloat {
    0%   { transform: translateY(100%) scale(0.6); opacity: 0; }
    20%  { opacity: 0.8; }
    80%  { opacity: 0.6; }
    100% { transform: translateY(-120vh) scale(1); opacity: 0; }
}

@keyframes milkWobble {
    0%, 100% { transform: translateX(0) rotate(0deg); }
    25%      { transform: translateX(6px) rotate(3deg); }
    75%      { transform: translateX(-6px) rotate(-3deg); }
}

.milk-particles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.milk-drop {
    position: absolute;
    bottom: -40px;
    width: 12px;
    height: 16px;
    background: rgba(255,255,255,0.85);
    border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%;
    animation: milkFloat 8s linear infinite;
    filter: blur(0.5px);
}

.milk-drop:nth-child(1)  { left: 5%;  animation-duration: 7s;  animation-delay: 0s;   width: 10px; height: 14px; }
.milk-drop:nth-child(2)  { left: 15%; animation-duration: 9s;  animation-delay: 2s;   width: 14px; height: 18px; }
.milk-drop:nth-child(3)  { left: 25%; animation-duration: 6s;  animation-delay: 4s;   width: 8px;  height: 11px; }
.milk-drop:nth-child(4)  { left: 35%; animation-duration: 8s;  animation-delay: 1s;   width: 12px; height: 15px; }
.milk-drop:nth-child(5)  { left: 45%; animation-duration: 10s; animation-delay: 3s;   width: 9px;  height: 12px; }
.milk-drop:nth-child(6)  { left: 55%; animation-duration: 7s;  animation-delay: 5s;   width: 13px; height: 17px; }
.milk-drop:nth-child(7)  { left: 65%; animation-duration: 9s;  animation-delay: 0.5s; width: 11px; height: 14px; }
.milk-drop:nth-child(8)  { left: 75%; animation-duration: 6s;  animation-delay: 2.5s; width: 10px; height: 13px; }
.milk-drop:nth-child(9)  { left: 85%; animation-duration: 8s;  animation-delay: 4.5s; width: 14px; height: 19px; }
.milk-drop:nth-child(10) { left: 95%; animation-duration: 7s;  animation-delay: 1.5s; width: 8px;  height: 10px; }

/* ---------- Scroll Reveal Utilities ---------- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-left.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(60px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-right.is-visible {
    opacity: 1;
    transform: translateX(0);
}

.reveal-scale {
    opacity: 0;
    transform: scale(0.85);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reveal-scale.is-visible {
    opacity: 1;
    transform: scale(1);
}

.reveal-rotate {
    opacity: 0;
    transform: rotate(-8deg) scale(0.9);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reveal-rotate.is-visible {
    opacity: 1;
    transform: rotate(0) scale(1);
}

/* Stagger children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.stagger-children.is-visible > *:nth-child(1) { transition-delay: 0.05s; opacity: 1; transform: translateY(0); }
.stagger-children.is-visible > *:nth-child(2) { transition-delay: 0.15s; opacity: 1; transform: translateY(0); }
.stagger-children.is-visible > *:nth-child(3) { transition-delay: 0.25s; opacity: 1; transform: translateY(0); }
.stagger-children.is-visible > *:nth-child(4) { transition-delay: 0.35s; opacity: 1; transform: translateY(0); }
.stagger-children.is-visible > *:nth-child(5) { transition-delay: 0.45s; opacity: 1; transform: translateY(0); }
.stagger-children.is-visible > *:nth-child(6) { transition-delay: 0.55s; opacity: 1; transform: translateY(0); }
.stagger-children.is-visible > *:nth-child(7) { transition-delay: 0.65s; opacity: 1; transform: translateY(0); }
.stagger-children.is-visible > *:nth-child(8) { transition-delay: 0.75s; opacity: 1; transform: translateY(0); }
.stagger-children.is-visible > *:nth-child(9) { transition-delay: 0.85s; opacity: 1; transform: translateY(0); }

/* ---------- Bounce & Wobble ---------- */
@keyframes bounceIn {
    0%   { opacity: 0; transform: scale(0.3) translateY(40px); }
    50%  { opacity: 1; transform: scale(1.05) translateY(-8px); }
    70%  { transform: scale(0.95) translateY(4px); }
    100% { transform: scale(1) translateY(0); }
}

.bounce-in {
    opacity: 0;
}

.bounce-in.is-visible {
    animation: bounceIn 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes wobble {
    0%   { transform: rotate(0deg); }
    15%  { transform: rotate(-5deg); }
    30%  { transform: rotate(3deg); }
    45%  { transform: rotate(-3deg); }
    60%  { transform: rotate(2deg); }
    75%  { transform: rotate(-1deg); }
    100% { transform: rotate(0deg); }
}

.wobble-hover:hover {
    animation: wobble 0.6s ease;
}

/* ---------- Counter Roll ---------- */
@keyframes countRoll {
    0%   { transform: translateY(100%); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.counter-value {
    display: inline-block;
    animation: countRoll 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* ---------- Milk Splash Pulse ---------- */
@keyframes splashPulse {
    0%   { box-shadow: 0 0 0 0 rgba(232, 168, 56, 0.5); }
    70%  { box-shadow: 0 0 0 18px rgba(232, 168, 56, 0); }
    100% { box-shadow: 0 0 0 0 rgba(232, 168, 56, 0); }
}

.splash-pulse {
    animation: splashPulse 2s infinite;
}

/* ---------- Floating Animation ---------- */
@keyframes floaty {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
}

.floaty {
    animation: floaty 3s ease-in-out infinite;
}

.floaty-delay-1 { animation-delay: 0.5s; }
.floaty-delay-2 { animation-delay: 1s; }
.floaty-delay-3 { animation-delay: 1.5s; }

/* ---------- Wave Divider ---------- */
.wave-divider {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    line-height: 0;
    overflow: hidden;
}

.wave-divider svg {
    display: block;
    width: calc(100% + 2px);
    height: 60px;
}

.page-hero > .wave-divider {
    height: 28px;
    background: var(--paper);
    -webkit-mask: url('../images/2020/12/ripped-paper-base-2.png') repeat-x center bottom / auto 100%;
    mask: url('../images/2020/12/ripped-paper-base-2.png') repeat-x center bottom / auto 100%;
    transform: rotate(180deg);
}

.page-hero > .wave-divider svg {
    display: none;
}

/* ---------- Tilt Card ---------- */
.tilt-card {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

/* ---------- Timeline Dots ---------- */
.timeline-dot {
    width: 20px;
    height: 20px;
    background: var(--gold);
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}

.timeline-dot::after {
    content: "";
    position: absolute;
    inset: -6px;
    border: 2px solid var(--gold);
    border-radius: 50%;
    opacity: 0.4;
    animation: splashPulse 2s infinite;
}

/* ---------- Step Connector ---------- */
.step-connector {
    position: relative;
}

.step-connector::before {
    content: "";
    position: absolute;
    top: 24px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold) var(--progress, 0%), var(--line) var(--progress, 0%));
    z-index: 0;
}

/* ============================================
   COW ROADMAP — Cartoon Story Road
   ============================================ */

.cow-roadmap {
    position: relative;
    padding: 100px 0 140px;
    overflow: hidden;
    background: linear-gradient(180deg, #e8f5e0 0%, #d4ecc8 100%);
}

.cow-roadmap .wrap {
    position: relative;
    z-index: 2;
}

.road-sky {
    position: absolute;
    top: 20px;
    left: 5%;
    font-size: 40px;
    opacity: 0.6;
    animation: floaty 5s ease-in-out infinite;
}

.road-sky:nth-child(2) { left: 25%; animation-delay: 1s; font-size: 28px; }
.road-sky:nth-child(3) { left: 55%; animation-delay: 2s; font-size: 34px; }
.road-sky:nth-child(4) { left: 80%; animation-delay: 0.5s; font-size: 26px; }

.road-surface {
    position: absolute;
    bottom: 70px;
    left: 5%;
    right: 5%;
    height: 14px;
    background: repeating-linear-gradient(
        90deg,
        #c9b896 0px,
        #c9b896 24px,
        #b8a684 24px,
        #b8a684 48px
    );
    background-size: 48px 100%;
    border-radius: 7px;
    border-top: 3px solid #a08b6c;
    border-bottom: 3px solid #a08b6c;
    animation: roadScroll 0.6s linear infinite;
}

@keyframes roadScroll {
    0%   { background-position: 0 0; }
    100% { background-position: 48px 0; }
}

.road-grass {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 70px;
    background: linear-gradient(180deg, #7cb85a 0%, #5a9e3d 100%);
}

.road-grass::before {
    content: "🌿🌾🌿🌾🌿🌾🌿🌾🌿🌾🌿🌾🌿🌾🌿🌾🌿🌾🌿🌾";
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    font-size: 20px;
    letter-spacing: 8px;
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
}

.cow-traveler {
    position: absolute;
    bottom: 58px;
    left: 3%;
    font-size: 84px;
    z-index: 10;
    filter: drop-shadow(0 8px 16px rgba(0,0,0,0.25));
    transform: scaleX(-1);
    will-change: left, transform;
}

.cow-traveler.walking {
    animation: cowWalk 0.35s ease-in-out infinite alternate;
}

@keyframes cowWalk {
    0%   { transform: scaleX(-1) translateY(0) rotate(0deg); }
    40%  { transform: scaleX(-1) translateY(-14px) rotate(2deg); }
    100% { transform: scaleX(-1) translateY(0) rotate(-1deg); }
}

/* Ground shadow */
.cow-traveler::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    width: 54px;
    height: 12px;
    background: rgba(0,0,0,0.15);
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: -1;
}

.cow-traveler.walking::after {
    animation: shadowBreathe 0.35s ease-in-out infinite alternate;
}

@keyframes shadowBreathe {
    0%   { transform: translateX(-50%) scale(1); opacity: 0.15; }
    40%  { transform: translateX(-50%) scale(0.6); opacity: 0.08; }
    100% { transform: translateX(-50%) scale(1); opacity: 0.15; }
}

/* Dust puff behind the cow */
.cow-traveler::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -12px;
    width: 8px;
    height: 8px;
    background: #b8a684;
    border-radius: 50%;
    opacity: 0;
    z-index: -1;
}

.cow-traveler.walking::before {
    animation: dustPuff 0.35s ease-out infinite;
}

@keyframes dustPuff {
    0%   { transform: translate(0, 0) scale(0.5); opacity: 0.6; }
    100% { transform: translate(-24px, -16px) scale(0); opacity: 0; }
}

.road-milestones {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
    position: relative;
    z-index: 5;
    padding-bottom: 80px;
}

.milestone {
    text-align: center;
    opacity: 0;
    transform: translateY(30px) scale(0.9);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.milestone.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.milestone-dot {
    width: 32px;
    height: 32px;
    background: var(--gold);
    border-radius: 50%;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #fff;
    font-weight: 800;
    box-shadow: 0 4px 14px rgba(232,168,56,0.5);
    position: relative;
}

.milestone-dot::after {
    content: "";
    position: absolute;
    inset: -8px;
    border: 3px solid var(--gold);
    border-radius: 50%;
    opacity: 0.35;
    animation: splashPulse 2.5s infinite;
}

.milestone-year {
    display: inline-block;
    background: var(--green);
    color: #fff;
    font-weight: 800;
    font-size: 12px;
    padding: 4px 14px;
    border-radius: 20px;
    margin-bottom: 10px;
}

.milestone h4 {
    font-size: 17px;
    color: var(--green-dark);
    margin: 0 0 8px;
}

.milestone p {
    font-size: 13px;
    color: var(--muted);
    line-height: 1.6;
    margin: 0;
}

.milestone-icon {
    font-size: 32px;
    margin-bottom: 10px;
    display: block;
}

/* Vertical variant for mobile */
@media (max-width: 980px) {
    .road-milestones {
        grid-template-columns: 1fr;
        gap: 40px;
        padding-bottom: 100px;
    }

    .cow-traveler {
        display: none;
    }

    .road-surface {
        left: 30px;
        right: auto;
        width: 14px;
        height: auto;
        top: 60px;
        bottom: 60px;
        background: repeating-linear-gradient(
            180deg,
            #c9b896 0px,
            #c9b896 24px,
            #b8a684 24px,
            #b8a684 48px
        );
        border-radius: 7px;
        border-left: 3px solid #a08b6c;
        border-right: 3px solid #a08b6c;
        border-top: none;
        border-bottom: none;
    }

    .milestone {
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 20px;
        text-align: left;
        align-items: center;
        padding-left: 60px;
    }

    .milestone-dot {
        margin: 0;
    }
}

/* ---------- Mobile Menu ---------- */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.mobile-menu-toggle span {
    display: block;
    width: 26px;
    height: 2.5px;
    background: var(--ink);
    border-radius: 2px;
    transition: 0.3s;
}

.mobile-menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.mobile-menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ---------- Active Nav Link ---------- */
.nav-links a.active {
    color: var(--gold);
    position: relative;
}

.nav-links a.active::after {
    content: "";
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gold);
    border-radius: 1px;
}

.nav-franchise {
    background: var(--gold);
    color: #fff !important;
    padding: 6px 14px !important;
    border-radius: 4px;
    font-weight: 700;
    transition: background 0.2s;
}

.nav-franchise:hover {
    background: #d49a2e;
}

.nav-links a.nav-franchise.active::after {
    display: none;
}

/* ---------- Page Hero Mini ---------- */
.page-hero {
    position: relative;
    background: var(--mint);
    padding: 80px 0 100px;
    overflow: hidden;
}

.page-hero-dark {
    background: var(--green-dark);
    color: #fff;
}

.page-hero-dark .eyebrow { color: var(--gold); }
.page-hero-dark h1 { color: #fff; }
.page-hero-dark p { color: rgba(255,255,255,0.85); }

.page-hero h1 {
    font-size: clamp(42px, 6vw, 72px);
    line-height: 1;
    margin: 0 0 18px;
    color: var(--green-dark);
}

.page-hero-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
}

.page-hero-art {
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-hero-art img {
    max-width: 480px;
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.12);
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
    .mobile-menu-toggle {
        display: flex;
        order: 2;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(245, 243, 235, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 20px;
        gap: 16px;
        border-bottom: 1px solid var(--line);
        transform: translateY(-10px);
        opacity: 0;
        pointer-events: none;
        transition: 0.3s;
    }

    .nav-links.is-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-links a {
        font-size: 16px;
        padding: 8px 0;
    }

    .page-hero-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .page-hero-art {
        order: -1;
    }

    .page-hero-art img {
        max-width: 320px;
    }

    .step-connector::before {
        display: none;
    }
}
