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

html {
    scroll-snap-type: y proximity;
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: #f5efe6;
    color: #4a3728;
    font-family: 'Source Serif 4', Georgia, serif;
    font-weight: 400;
    font-size: clamp(1rem, 1.1vw, 1.15rem);
    line-height: 1.72;
    overflow-x: hidden;
}

/* Pencil grain texture on body */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 9999;
    background-image:
        radial-gradient(circle at 20% 30%, #3d2b1f 0.5px, transparent 0.5px),
        radial-gradient(circle at 70% 60%, #3d2b1f 0.4px, transparent 0.4px),
        radial-gradient(circle at 45% 80%, #3d2b1f 0.6px, transparent 0.6px),
        radial-gradient(circle at 85% 15%, #3d2b1f 0.3px, transparent 0.3px);
    background-size: 120px 100px, 80px 130px, 150px 90px, 110px 140px;
    opacity: 0.03;
}

/* Grid lines subtle background */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background-image:
        linear-gradient(to right, #7a8fb5 1px, transparent 1px),
        linear-gradient(to bottom, #7a8fb5 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.04;
}

/* === HERO === */
.hero {
    position: relative;
    min-height: 110vh;
    display: flex;
    align-items: center;
    justify-content: center;
    scroll-snap-align: start;
    background: linear-gradient(180deg, #f5efe6 0%, #ebe3d5 100%);
    overflow: hidden;
}

.hero-contours {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.contour-svg {
    width: 100%;
    height: 100%;
}

.contour-line {
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    animation: drawContour 2.5s ease-out forwards;
}

.c1 { animation-delay: 0s; }
.c2 { animation-delay: 0.2s; }
.c3 { animation-delay: 0.4s; }
.c4 { animation-delay: 0.6s; }
.c5 { animation-delay: 0.8s; }
.c6 { animation-delay: 1.0s; }
.c7 { animation-delay: 1.2s; }

@keyframes drawContour {
    to { stroke-dashoffset: 0; }
}

.hero-title {
    position: relative;
    z-index: 2;
    font-family: 'Abril Fatface', serif;
    font-size: clamp(4rem, 11vw, 9rem);
    font-weight: 400;
    letter-spacing: 0.06em;
    color: #3d2b1f;
    text-transform: uppercase;
    opacity: 0;
    animation: fadeInTitle 1.8s ease-out 1s forwards;
}

@keyframes fadeInTitle {
    from { opacity: 0; color: #f5efe6; }
    to { opacity: 1; color: #3d2b1f; }
}

.hero-chevron {
    position: absolute;
    bottom: 8vh;
    z-index: 2;
    animation: breathe 3s ease-in-out infinite;
}

@keyframes breathe {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.9; }
}

/* === FIELD NOTES === */
.field-notes {
    position: relative;
    padding: 120px 5vw 80px;
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 20px;
    min-height: 80vh;
    scroll-snap-align: start;
    background: linear-gradient(180deg, #ebe3d5 0%, #f5efe6 100%);
}

.contour-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.contour-svg-bg {
    width: 100%;
    height: 100%;
}

.card {
    position: relative;
    z-index: 1;
    background-color: #ebe3d5;
    padding: 32px 28px;
    background-image: repeating-linear-gradient(
        transparent, transparent 23px, #c9b99a 23px, #c9b99a 24px
    );
    box-shadow: 0 2px 8px rgba(42,31,21,0.08);
    transition: transform 350ms cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 350ms cubic-bezier(0.34, 1.56, 0.64, 1),
                background-color 350ms ease;
}

.card:hover {
    transform: translateY(-6px) rotate(0deg) !important;
    box-shadow: 0 12px 32px rgba(42,31,21,0.15);
    background-color: #f5efe6;
}

.card-1 {
    grid-column: 1 / 5;
    margin-top: 0;
    clip-path: polygon(0% 2%, 98% 0%, 100% 97%, 3% 100%);
}

.card-2 {
    grid-column: 4 / 8;
    margin-top: 60px;
    clip-path: polygon(1% 0%, 100% 3%, 97% 100%, 0% 98%);
}

.card-3 {
    grid-column: 7 / 11;
    margin-top: -20px;
    clip-path: polygon(2% 1%, 99% 0%, 100% 98%, 0% 100%);
}

.card-heading {
    font-family: 'Fraunces', serif;
    font-weight: 800;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    color: #5a3e28;
    margin-bottom: 16px;
    line-height: 1.2;
    font-variation-settings: 'WONK' 1;
}

.card p {
    color: #4a3728;
}

.card-annotation {
    font-family: 'Caveat', cursive;
    font-size: 0.85rem;
    color: #8b5e3c;
    margin-bottom: 8px;
    transform: rotate(-1deg);
}

.margin-note {
    position: absolute;
    font-family: 'Caveat', cursive;
    font-size: 0.85rem;
    color: #7a8fb5;
    transform: rotate(1deg);
    white-space: nowrap;
}

/* === SVG DIVIDERS === */
.svg-divider {
    padding: 20px 0;
}

.svg-divider svg {
    width: 100%;
    height: 30px;
    display: block;
}

/* === ARC CANVAS === */
.arc-canvas {
    position: relative;
    padding: 80px 5vw 120px;
    scroll-snap-align: start;
    background: linear-gradient(180deg, #f5efe6 0%, #ebe3d5 50%, #f5efe6 100%);
    overflow: hidden;
}

.section-title {
    font-family: 'Fraunces', serif;
    font-weight: 600;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    color: #5a3e28;
    text-align: center;
    margin-bottom: 60px;
    font-variation-settings: 'WONK' 1;
}

.arc-diagram {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.arc-svg {
    width: 100%;
    height: auto;
    display: block;
}

.arc-line {
    stroke-dasharray: 1500;
    stroke-dashoffset: 1500;
    transition: stroke-dashoffset 1.2s ease-out;
}

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

.arc-layer {
    transition: opacity 400ms ease;
}

.arc-labels {
    position: absolute;
    inset: 0;
}

.arc-label {
    position: absolute;
    font-family: 'Caveat', cursive;
    font-size: clamp(0.8rem, 1.5vw, 1.1rem);
    color: #8b5e3c;
    white-space: nowrap;
}

/* === SPECIMEN GALLERY === */
.specimen-gallery {
    padding: 80px 5vw 100px;
    scroll-snap-align: start;
    background: linear-gradient(180deg, #f5efe6 0%, #ebe3d5 100%);
}

.specimens-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px 20px;
    max-width: 960px;
    margin: 0 auto;
}

.specimen {
    position: relative;
    background-color: #ebe3d5;
    padding: 24px 20px 16px;
    box-shadow: 0 2px 8px rgba(42,31,21,0.08);
    background-image: repeating-linear-gradient(
        transparent, transparent 23px, #c9b99a 23px, #c9b99a 24px
    );
    transition: transform 350ms cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 350ms cubic-bezier(0.34, 1.56, 0.64, 1),
                opacity 300ms ease,
                background-color 350ms ease;
    cursor: default;
}

.specimen:nth-child(2) { margin-top: 40px; }
.specimen:nth-child(4) { margin-top: -20px; }
.specimen:nth-child(5) { margin-top: 20px; }

.specimen:hover {
    transform: translateY(-6px) rotate(0deg) !important;
    box-shadow: 0 12px 32px rgba(42,31,21,0.15);
    background-color: #f5efe6;
    z-index: 2;
}

.specimen-arc {
    width: 100%;
    height: auto;
    display: block;
    margin-bottom: 12px;
}

.specimen-label {
    display: block;
    font-family: 'Fraunces', serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: #5a3e28;
    font-variation-settings: 'WONK' 1;
}

.specimen-note {
    display: block;
    font-family: 'Caveat', cursive;
    font-size: 0.85rem;
    color: #8b5e3c;
    transform: rotate(-0.5deg);
    margin-top: 4px;
}

/* === COLOPHON === */
.colophon {
    padding: 120px 5vw 100px;
    display: flex;
    justify-content: center;
    scroll-snap-align: start;
    background: #f5efe6;
}

.colophon-content {
    max-width: 520px;
    text-align: center;
}

.manifesto {
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: clamp(1rem, 1.2vw, 1.15rem);
    color: #4a3728;
    line-height: 1.85;
    margin-bottom: 40px;
}

.colophon-divider {
    width: 60%;
    height: auto;
    margin: 0 auto 40px;
    display: block;
}

.email-label {
    display: block;
    font-family: 'Caveat', cursive;
    font-size: 1.1rem;
    color: #8b5e3c;
    margin-bottom: 12px;
}

.email-field {
    display: flex;
    align-items: center;
    border-bottom: 2px solid #c47c5a;
    max-width: 320px;
    margin: 0 auto;
}

.email-field input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: 1rem;
    color: #3d2b1f;
    padding: 8px 4px;
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='M13,1 L3,11 L2,14 L5,13 L15,3Z' fill='%238b5e3c'/%3E%3C/svg%3E"), text;
}

.email-field input::placeholder {
    color: #a8b5a0;
}

.email-field button {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #c47c5a;
    cursor: pointer;
    padding: 8px;
    transition: transform 200ms ease;
}

.email-field button:hover {
    transform: translateX(4px);
}

/* Shadow color reference: #2a1f15 (Walnut Shadow) */

/* === REVEAL ANIMATIONS === */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 700ms cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 700ms cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Preserve card rotations when visible */
.card.visible,
.specimen.visible {
    transform: translateY(0) rotate(var(--rot, 0deg));
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .field-notes {
        display: flex;
        flex-direction: column;
        gap: 24px;
        padding: 80px 6vw 60px;
    }

    .card-1, .card-2, .card-3 {
        margin-top: 8px;
        clip-path: polygon(0% 1%, 99% 0%, 100% 99%, 1% 100%);
    }

    .specimens-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
    }

    .specimen:nth-child(2),
    .specimen:nth-child(4),
    .specimen:nth-child(5) {
        margin-top: 0;
    }

    .hero-title {
        font-size: clamp(2.5rem, 10vw, 4rem);
    }

    .arc-labels {
        display: none;
    }

    .margin-note {
        display: none;
    }
}
