:root {
    --parchment: #f5f0eb;
    --linen: #ede6dd;
    --charcoal: #2d2926;
    --stone: #7a7267;
    --blush: #e8b4b8;
    --sage: #b5c4b1;
    --periwinkle: #9ea8c7;
    --clay: #d4c5b5;
    --pulse-duration: 400ms;
    --pulse-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--parchment);
    color: var(--charcoal);
    font-family: 'Karla', sans-serif;
    font-size: clamp(1rem, 1.8vw, 1.25rem);
    line-height: 1.72;
    letter-spacing: 0.01em;
    overflow-x: hidden;
}

/* Progress Bar */
.progress-bar {
    position: fixed;
    top: 0;
    right: 0;
    width: 12px;
    height: 0%;
    background: var(--blush);
    z-index: 1000;
    transition: height 0.1s linear, background-color 0.3s ease;
}

/* Sections */
.section {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    padding: 60px 24px;
}

/* Floating Index Numbers */
.floating-index {
    position: absolute;
    font-family: 'Bebas Neue', cursive;
    font-size: clamp(150px, 25vw, 400px);
    color: var(--clay);
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
    line-height: 1;
}

.floating-index--light {
    color: var(--parchment);
    opacity: 0.1;
}

/* Lump Marks */
.lump-mark {
    border-radius: 50% 45% 55% 48% / 52% 50% 48% 53%;
    position: absolute;
    z-index: 1;
}

.lump-mark--small {
    width: 40px;
    height: 40px;
    background: var(--blush);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
}

.lump-mark--small.animate {
    animation: lumpAppear 600ms ease-out forwards, lumpDrift 800ms var(--pulse-ease) 600ms forwards;
}

.lump-mark--medium {
    width: 80px;
    height: 80px;
    background: var(--sage);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
}

.lump-mark--medium.animate {
    animation: lumpAppear 600ms ease-out forwards;
}

.lump-mark--large {
    width: 120px;
    height: 120px;
    background: var(--periwinkle);
    position: relative;
    margin: 40px auto 0;
    opacity: 0;
    animation: pulse 3s ease-in-out infinite;
}

.lump-mark--large.animate {
    opacity: 1;
}

@keyframes lumpAppear {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

@keyframes lumpDrift {
    from { top: 50%; left: 50%; }
    to { top: 20%; left: 15%; }
}

@keyframes pulse {
    0%, 100% { transform: scale(1.0); }
    50% { transform: scale(1.04); }
}

@keyframes pulseAttention {
    0% { transform: scale(0.95); opacity: 0; }
    60% { transform: scale(1.02); opacity: 1; }
    100% { transform: scale(1.0); opacity: 1; }
}

/* Photo Frames */
.photo-frame {
    border: 2px solid var(--linen);
    box-shadow: 4px 4px 0px var(--clay);
    overflow: hidden;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    filter: saturate(0.6) contrast(0.95) brightness(1.05);
}

.photo-placeholder--clay {
    background: linear-gradient(135deg, var(--clay) 0%, var(--stone) 50%, var(--linen) 100%);
    min-height: 280px;
}

.photo-placeholder--wood {
    background: linear-gradient(160deg, var(--stone) 0%, var(--clay) 40%, #a09080 100%);
    min-height: 300px;
}

.photo-placeholder--stone {
    background: linear-gradient(145deg, #8a8278 0%, var(--clay) 60%, var(--linen) 100%);
    min-height: 180px;
}

.photo-placeholder--linen {
    background: linear-gradient(120deg, var(--linen) 0%, var(--clay) 50%, var(--parchment) 100%);
    min-height: 180px;
}

.photo-placeholder--paper {
    background: linear-gradient(170deg, var(--parchment) 0%, var(--clay) 60%, var(--stone) 100%);
    min-height: 180px;
}

.photo-placeholder--fired {
    background: linear-gradient(135deg, var(--charcoal) 0%, var(--stone) 40%, var(--clay) 100%);
    min-height: 350px;
}

/* Section 1 */
.section-1 {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(12, 1fr);
    gap: 24px;
    align-items: start;
}

.section-1 .floating-index {
    top: 10%;
    right: 15%;
}

.section-1__title {
    grid-column: 2 / 6;
    grid-row: 8 / 11;
    font-family: 'Bebas Neue', cursive;
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--charcoal);
    z-index: 2;
    min-height: 1.2em;
}

.section-1__subtitle {
    grid-column: 2 / 6;
    grid-row: 11 / 12;
    font-family: 'Karla', sans-serif;
    color: var(--stone);
    opacity: 0;
    z-index: 2;
}

.section-1__subtitle.animate {
    animation: fadeIn 400ms ease-out forwards;
}

.section-1__photo {
    grid-column: 7 / 12;
    grid-row: 2 / 7;
    transform: translateX(20px);
    z-index: 1;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Section 2 */
.section-2 {
    background: var(--linen);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    position: relative;
}

.clay-dots {
    position: absolute;
    inset: 0;
    opacity: 0.3;
    background-image: radial-gradient(circle 3px at center, var(--clay) 100%, transparent 100%);
    background-size: 28px 28px;
    background-position: 2px 1px;
    pointer-events: none;
}

.section-2__text-block {
    position: relative;
    z-index: 2;
    background: rgba(245, 240, 235, 0.85);
    padding: 48px;
    max-width: 480px;
    margin-right: -60px;
    opacity: 0;
    transform: translateX(-40px);
}

.section-2__text-block.animate {
    animation: slideInLeft 500ms var(--pulse-ease) forwards;
}

.section-2__heading {
    font-family: 'Bebas Neue', cursive;
    font-size: clamp(1.8rem, 4vw, 3.5rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.section-2__body {
    color: var(--stone);
}

.section-2__photo {
    position: relative;
    z-index: 1;
    max-width: 45%;
    opacity: 0;
    transform: translateX(40px);
}

.section-2__photo.animate {
    animation: slideInRight 500ms var(--pulse-ease) forwards;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Section 3 */
.section-3 {
    background: var(--parchment);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 24px;
}

.section-3 .floating-index {
    top: 5%;
    left: 5%;
}

.section-3__block {
    background: rgba(245, 240, 235, 0.85);
    padding: 32px;
    opacity: 0;
    transform: scale(0.95);
    z-index: 2;
}

.section-3__block.animate {
    animation: pulseAttention var(--pulse-duration) var(--pulse-ease) forwards;
}

.section-3__block h3 {
    font-family: 'Bebas Neue', cursive;
    font-size: clamp(1.8rem, 4vw, 3rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.photo-frame--small {
    width: 200px;
    height: 150px;
}

.section-3__block--1 {
    align-self: flex-start;
    margin-left: 10%;
}

.section-3__block--2 {
    margin-top: -30px;
    align-self: center;
    margin-left: 5%;
}

.section-3__block--3 {
    margin-top: -30px;
    align-self: flex-end;
    margin-right: 10%;
}

/* Section 4 */
.section-4 {
    background: var(--charcoal);
    color: var(--parchment);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 80px 24px;
}

.section-4 .floating-index {
    top: 10%;
    right: 10%;
}

.section-4__photo {
    transform: translateY(-30px);
    margin-bottom: 40px;
}

.photo-frame--large {
    width: clamp(300px, 60vw, 800px);
    height: auto;
}

.section-4__heading {
    font-family: 'Bebas Neue', cursive;
    font-size: clamp(2rem, 5vw, 5rem);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--parchment);
    opacity: 0;
}

.section-4__heading.animate {
    animation: pulseAttention var(--pulse-duration) var(--pulse-ease) forwards;
}

/* Torn Edges */
.torn-edge {
    position: relative;
    z-index: 10;
    margin-top: -1px;
    line-height: 0;
}

.torn-edge svg {
    display: block;
    width: 100%;
    height: 40px;
}

.torn-edge--1 {
    background: var(--parchment);
}

.torn-edge--2 {
    background: var(--linen);
}

.torn-edge--3 {
    background: var(--parchment);
}

/* Caption/Meta text */
.meta-text {
    font-family: 'DM Mono', monospace;
    font-size: clamp(0.7rem, 1vw, 0.85rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--stone);
}

/* Link hover animation */
a {
    color: var(--charcoal);
    text-decoration: none;
    position: relative;
    display: inline-block;
}

a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    right: 50%;
    height: 2px;
    background: var(--blush);
    transition: left 200ms ease, right 200ms ease;
}

a:hover::after {
    left: 0;
    right: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .section-1 {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 24px;
        padding: 40px 24px;
    }

    .section-1__title {
        font-size: clamp(2rem, 6vw, 4rem);
    }

    .section-1__photo {
        transform: translateX(12px);
        max-width: 85%;
    }

    .section-2 {
        flex-direction: column;
        padding: 60px 24px;
        gap: 24px;
    }

    .section-2__text-block {
        margin-right: 0;
        max-width: 100%;
        transform: translateX(-12px);
    }

    .section-2__photo {
        max-width: 85%;
        transform: translateX(12px);
    }

    .section-3__block--1,
    .section-3__block--2,
    .section-3__block--3 {
        align-self: center;
        margin-left: 12px;
        margin-right: 0;
    }

    .section-3__block--3 {
        margin-right: 12px;
        margin-left: 0;
    }

    .photo-frame--small {
        width: 160px;
        height: 120px;
    }
}

@media (max-width: 480px) {
    .section-3__block--1,
    .section-3__block--2,
    .section-3__block--3 {
        margin-left: 0;
        margin-right: 0;
        margin-top: 24px;
    }

    .section-2__text-block {
        transform: none;
    }

    .section-2__photo {
        transform: none;
    }

    .section-1__photo {
        transform: none;
    }
}
