/* === RESET & BASE === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: #f4ede3;
    color: #2e2a26;
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.1vw, 1.2rem);
    line-height: 1.75;
    letter-spacing: 0.01em;
    overflow-x: hidden;
    transition: background-color 1s ease;
}

body.bg-secondary {
    background-color: #e8ddd0;
}

#svg-filters {
    position: absolute;
    width: 0;
    height: 0;
}

/* === GRAIN OVERLAY === */
#grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.025;
    filter: url(#grain);
    background: #f4ede3;
    mix-blend-mode: multiply;
}

/* === SECTION BASE === */
.section {
    position: relative;
    overflow: hidden;
}

/* === CLEARING (HERO) === */
#clearing {
    height: 100vh;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 0 0 12vh 8vw;
}

.clearing-blobs {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.morph-blob {
    position: absolute;
    opacity: 0.12;
    color: #7a8c6e;
}

.blob-1 {
    width: 55vw;
    height: 55vw;
    max-width: 700px;
    max-height: 700px;
    top: -10%;
    right: -5%;
}

.blob-2 {
    width: 40vw;
    height: 40vw;
    max-width: 500px;
    max-height: 500px;
    top: 30%;
    left: 10%;
}

/* Tea stains */
.tea-stain {
    position: absolute;
    opacity: 0.08;
    pointer-events: none;
}

.ts-1 {
    width: 120px;
    height: 120px;
    top: 15%;
    right: 20%;
}

.ts-2 {
    width: 90px;
    height: 90px;
    bottom: 25%;
    right: 35%;
}

/* Clearing content */
.clearing-content {
    position: relative;
    z-index: 2;
}

.wordmark {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-style: italic;
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: 0.04em;
    color: #2e2a26;
    opacity: 0;
    transform: translateY(12px);
    animation: wordmarkIn 2s cubic-bezier(0.16, 1, 0.3, 1) 1s forwards;
    filter: url(#woodblock);
}

.subtitle {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(0.7rem, 0.8vw, 0.85rem);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #6b6259;
    opacity: 0;
    transform: translateY(8px);
    animation: subtitleIn 1.5s cubic-bezier(0.16, 1, 0.3, 1) 3s forwards;
    margin-top: 0.75rem;
}

@keyframes wordmarkIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes subtitleIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Leaf particles */
#leaf-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.leaf {
    position: absolute;
    width: 12px;
    height: 12px;
    opacity: 0.15;
    top: -20px;
    animation: leafFall linear infinite;
}

.leaf svg {
    width: 100%;
    height: 100%;
}

@keyframes leafFall {
    0% {
        transform: translateY(-20px) rotate(0deg) translateX(0);
        opacity: 0.15;
    }
    10% {
        opacity: 0.15;
    }
    90% {
        opacity: 0.15;
    }
    100% {
        transform: translateY(100vh) rotate(360deg) translateX(40px);
        opacity: 0;
    }
}

/* === WORKBENCH === */
#workbench {
    padding: 10vh 6vw 15vh;
    min-height: 100vh;
}

.section-heading {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-style: italic;
    font-size: clamp(2.5rem, 6vw, 5rem);
    letter-spacing: 0.04em;
    color: #2e2a26;
    margin-bottom: 4rem;
}

.workbench-heading {
    text-align: left;
    margin-left: 5vw;
}

.workbench-surface {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1100px;
    padding: 0 2vw;
}

.project-card {
    background: #f4ede3;
    border: 1px solid rgba(107, 98, 89, 0.2);
    box-shadow: 0 2px 8px rgba(46, 42, 38, 0.06);
    padding: 2.5rem 2rem;
    position: relative;
    transition: border-color 0.4s ease, transform 0.4s ease;
    clip-path: circle(0% at 50% 50%);
}

.project-card.revealed {
    clip-path: inset(0);
}

.card-1 { transform: rotate(-1.5deg); margin-top: 2rem; }
.card-2 { transform: rotate(2deg); margin-top: 5rem; }
.card-3 { transform: rotate(1deg); margin-left: 3rem; }
.card-4 { transform: rotate(-2.5deg); margin-top: -2rem; }

.project-card:hover {
    border-color: #a0735a;
    transform: rotate(0deg);
}

.card-label {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: clamp(0.7rem, 0.8vw, 0.85rem);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #6b6259;
    display: block;
    margin-bottom: 1rem;
}

.card-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    letter-spacing: 0.02em;
    color: #2e2a26;
    margin-bottom: 0.75rem;
}

.card-desc {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: clamp(0.9rem, 1vw, 1.05rem);
    line-height: 1.7;
    color: #6b6259;
}

/* === THE PATH === */
#path {
    padding: 10vh 0 15vh;
    min-height: 100vh;
}

.raked-line-divider,
.raked-line-small {
    width: 100%;
    overflow: hidden;
    padding: 2rem 0;
}

.raked-line-divider svg,
.raked-line-small svg {
    width: 100%;
    height: 4px;
    display: block;
}

.raked-line {
    opacity: 0.25;
    stroke-dasharray: 1200;
    stroke-dashoffset: 1200;
    transition: stroke-dashoffset 1.2s ease;
}

.raked-line.drawn {
    stroke-dashoffset: 0;
}

.raked-line-small {
    max-width: 600px;
    margin-left: auto;
    margin-right: 15%;
    padding: 1.5rem 0;
}

.path-content {
    margin-left: auto;
    margin-right: 15%;
    max-width: 42ch;
    padding: 0 2rem;
}

.path-heading {
    text-align: right;
}

.path-text {
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.path-text.visible {
    opacity: 1;
    transform: translateX(0);
}

.path-text p {
    color: #2e2a26;
}

.pull-quote {
    margin: 3rem 0;
    margin-left: -8rem;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pull-quote.visible {
    opacity: 1;
    transform: translateX(0);
}

.pull-quote p {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-style: italic;
    font-size: 1.5em;
    color: #a0735a;
    line-height: 1.5;
}

/* === THE HEARTH === */
#hearth {
    padding: 15vh 6vw;
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #3d3028;
    position: relative;
}

.hearth-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(200, 148, 61, 0.08) 0%, transparent 60%);
    pointer-events: none;
    animation: glowPulse 8s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

.hearth-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 500px;
}

.hearth-heading {
    color: #e8ddd0;
    text-align: center;
    margin-bottom: 3rem;
}

.hearth-contact {
    margin-bottom: 3rem;
}

.hearth-text {
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    color: #e8ddd0;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hearth-email {
    display: inline-block;
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 600;
    font-size: 1.2em;
    color: #c8943d;
    text-decoration: none;
    border-bottom: 1px solid rgba(200, 148, 61, 0.3);
    padding-bottom: 2px;
    transition: border-color 0.4s ease;
    margin-bottom: 2rem;
}

.hearth-email:hover {
    border-color: #c8943d;
}

.hearth-links {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    margin-top: 2rem;
}

.hearth-link {
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    font-size: clamp(0.7rem, 0.8vw, 0.85rem);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #6b6259;
    text-decoration: none;
    transition: color 0.4s ease;
}

.hearth-link:hover {
    color: #a0735a;
}

.hearth-closing {
    font-family: 'DM Sans', sans-serif;
    font-weight: 400;
    font-size: clamp(0.7rem, 0.8vw, 0.85rem);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #6b6259;
    margin-top: 4rem;
}

/* === CUSTOM CURSOR === */
.custom-cursor {
    display: none;
}

@media (pointer: fine) {
    a, .project-card {
        cursor: pointer;
    }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    #clearing {
        padding: 0 0 10vh 6vw;
    }

    .workbench-surface {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .card-1, .card-2, .card-3, .card-4 {
        margin: 0;
        transform: rotate(0deg);
    }

    .pull-quote {
        margin-left: 0;
    }

    .path-content {
        margin-right: 5%;
        margin-left: 5%;
    }

    .raked-line-small {
        margin-right: 5%;
    }
}
