/* Andremilla — Timeline & Photo Album Styles */

/* ===== CSS Custom Properties ===== */

:root {
    --gold: #C8A96E;
    --gold-light: #D4BA85;
    --cream: #FAF8F5;
    --charcoal: #2D2D2D;
    --scroll-y: 0;
}


/* ===== Timeline Layout ===== */

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, transparent, var(--gold) 5%, var(--gold) 95%, transparent);
    transform: translateX(-50%);
}

.timeline-node {
    position: relative;
    width: 50%;
    padding: 0 2rem 3rem;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.timeline-node.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Alternating sides — desktop */
.timeline-left {
    padding-right: 3rem;
    text-align: right;
}

.timeline-right {
    margin-left: 50%;
    padding-left: 3rem;
    text-align: left;
}

/* Gold dot on the center line */
.timeline-dot {
    position: absolute;
    top: 1.5rem;
    width: 14px;
    height: 14px;
    background: var(--gold);
    border: 3px solid var(--cream);
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--gold);
    z-index: 10;
}

.timeline-left .timeline-dot {
    right: -7px;
}

.timeline-right .timeline-dot {
    left: -7px;
}

/* End dot at bottom of timeline */
.timeline-end-dot {
    position: relative;
    width: 20px;
    height: 20px;
    margin: 0 auto;
    background: var(--gold);
    border: 4px solid var(--cream);
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--gold);
}

/* Timeline card — print-like feel */
.timeline-card {
    display: block;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 20px rgba(45, 45, 45, 0.06),
                0 1px 3px rgba(45, 45, 45, 0.08);
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    text-align: left;
}

.timeline-card:hover {
    box-shadow: 0 12px 40px rgba(45, 45, 45, 0.12),
                0 2px 6px rgba(45, 45, 45, 0.06);
    transform: translateY(-4px) rotate(-0.5deg);
}


/* ===== Photo Grid ===== */

.photo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.photo-grid-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 0.5rem;
    opacity: 0;
    transform: translateY(20px);
    animation: photo-reveal 0.5s ease forwards;
}

.photo-grid-item:nth-child(1) { animation-delay: 0ms; }
.photo-grid-item:nth-child(2) { animation-delay: 60ms; }
.photo-grid-item:nth-child(3) { animation-delay: 120ms; }
.photo-grid-item:nth-child(4) { animation-delay: 180ms; }
.photo-grid-item:nth-child(5) { animation-delay: 240ms; }
.photo-grid-item:nth-child(6) { animation-delay: 300ms; }
.photo-grid-item:nth-child(7) { animation-delay: 360ms; }
.photo-grid-item:nth-child(8) { animation-delay: 420ms; }

@keyframes photo-reveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.photo-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.photo-grid-item:hover img {
    transform: scale(1.05);
}


/* ===== Parallax Hero ===== */

.parallax-hero {
    transform: translateY(calc(var(--scroll-y) * -0.3px));
    will-change: transform;
}


/* ===== Staggered Reveal Animations ===== */

[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delay via CSS custom property */
[data-animate][style*="--delay"] {
    transition-delay: var(--delay);
}


/* ===== View Transition Support ===== */

@view-transition {
    navigation: auto;
}

::view-transition-old(root) {
    animation: 200ms ease-out fade-out;
}

::view-transition-new(root) {
    animation: 200ms ease-in fade-in;
}

@keyframes fade-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}


/* ===== Seasonal Theme Variables ===== */

.season-spring {
    --accent: #8BC34A;
    --accent-light: #AED581;
    --hero-gradient: linear-gradient(135deg, #E8F5E9 0%, #F1F8E9 100%);
}

.season-summer {
    --accent: #FF9800;
    --accent-light: #FFB74D;
    --hero-gradient: linear-gradient(135deg, #FFF8E1 0%, #FFF3E0 100%);
}

.season-autumn {
    --accent: #D84315;
    --accent-light: #FF7043;
    --hero-gradient: linear-gradient(135deg, #FBE9E7 0%, #EFEBE9 100%);
}

.season-winter {
    --accent: #42A5F5;
    --accent-light: #90CAF9;
    --hero-gradient: linear-gradient(135deg, #E3F2FD 0%, #E8EAF6 100%);
}


/* ===== Mobile (< 768px) ===== */

@media (max-width: 767px) {
    .timeline-line {
        left: 1.25rem;
    }

    .timeline-node,
    .timeline-left,
    .timeline-right {
        width: 100%;
        margin-left: 0;
        padding-left: 3rem;
        padding-right: 1rem;
        text-align: left;
    }

    .timeline-left .timeline-dot,
    .timeline-right .timeline-dot {
        left: calc(1.25rem - 7px);
        right: auto;
    }

    .timeline-end-dot {
        margin-left: calc(1.25rem - 10px);
    }

    .timeline-card:hover {
        transform: translateY(-2px) rotate(0deg);
    }
}


/* ===== Tablet+ (>= 768px) ===== */

@media (min-width: 768px) {
    .photo-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


/* ===== Desktop (>= 1024px) ===== */

@media (min-width: 1024px) {
    .photo-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}


/* ===== Smooth scrolling ===== */

html {
    scroll-behavior: smooth;
}


/* ===== Selection color ===== */

::selection {
    background: var(--gold);
    color: white;
}


/* ===== Scrollbar hide utility ===== */

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}
