/* mores.quest - Field Journal of Social Customs */
/* Cottagecore pastoral meets ethnographic field journal */

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

:root {
    --parchment: #f4ede2;
    --ink-dark: #3a3028;
    --ink-brown: #5a4a3a;
    --gold-accent: #c4a050;
    --sage-green: #7a9a6a;
    --dusty-rose: #8a4a4a;
    --sky-wash: #a8c0d0;
    --warm-gray: #8a7a6a;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--parchment);
    color: var(--ink-dark);
    font-family: 'EB Garamond', Georgia, serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.8vw, 1.08rem);
    line-height: 1.75;
    overflow-x: hidden;
}

/* Linen texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1000;
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 2px,
            rgba(90, 74, 58, 0.015) 2px,
            rgba(90, 74, 58, 0.015) 3px
        ),
        repeating-linear-gradient(
            90deg,
            transparent,
            transparent 2px,
            rgba(90, 74, 58, 0.015) 2px,
            rgba(90, 74, 58, 0.015) 3px
        );
}

/* ========== COVER SECTION ========== */

.cover {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--parchment);
}

.cover-frame {
    position: relative;
    width: 80vw;
    height: 80vh;
    max-width: 700px;
    max-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hand-drawn-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
}

.hand-drawn-border.visible {
    opacity: 1;
}

.cover-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.cover-title {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 5rem);
    color: var(--ink-brown);
    letter-spacing: 0.05em;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.cover-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.cover-subtitle {
    font-family: 'EB Garamond', Georgia, serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(0.9rem, 2vw, 1.2rem);
    color: var(--warm-gray);
    margin-top: 0.5rem;
    opacity: 0;
    transition: opacity 0.8s ease;
}

.cover-subtitle.visible {
    opacity: 1;
}

.pressed-flower {
    margin-top: 2rem;
    opacity: 0;
    transform: translateY(5px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.pressed-flower.visible {
    opacity: 0.7;
    transform: translateY(0);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 1s ease 2s;
}

.scroll-indicator.visible {
    opacity: 1;
}

.scroll-indicator span {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 0.7rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--warm-gray);
}

.scroll-indicator svg {
    animation: bobDown 2s ease-in-out infinite;
}

@keyframes bobDown {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(5px); }
}

/* ========== JOURNAL MAIN ========== */

.journal {
    max-width: 620px;
    margin: 0 auto;
    padding: 4rem 2rem 2rem;
    position: relative;
}

/* Left margin line */
.journal::before {
    content: '';
    position: absolute;
    left: calc(50% - 310px + 40px);
    top: 0;
    bottom: 0;
    width: 1px;
    background: linear-gradient(
        to bottom,
        transparent,
        rgba(138, 74, 74, 0.2) 5%,
        rgba(138, 74, 74, 0.2) 95%,
        transparent
    );
}

@media (max-width: 680px) {
    .journal::before {
        left: 40px;
    }
}

/* ========== JOURNAL ENTRIES ========== */

.journal-entry {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 3.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.journal-entry.visible {
    opacity: 1;
    transform: translateY(0);
}

.entry-margin {
    flex: 0 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 2rem;
}

.margin-leaf {
    opacity: 0.5;
}

.entry-content {
    flex: 1;
}

.entry-header {
    margin-bottom: 0.75rem;
    border-bottom: 1px solid rgba(196, 160, 80, 0.3);
    padding-bottom: 0.5rem;
}

.entry-date {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--warm-gray);
    display: block;
    margin-bottom: 0.2rem;
}

.entry-location {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: clamp(1.3rem, 3vw, 1.8rem);
    color: var(--ink-brown);
}

.entry-title {
    font-family: 'EB Garamond', Georgia, serif;
    font-weight: 600;
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: var(--ink-dark);
    margin-bottom: 0.75rem;
    font-style: italic;
}

.entry-body {
    color: var(--ink-dark);
    margin-bottom: 0.75rem;
}

.entry-body em {
    color: var(--dusty-rose);
    font-style: italic;
}

.entry-annotation {
    display: flex;
    gap: 0.4rem;
    margin-top: 1rem;
    padding-left: 1rem;
    border-left: 2px solid var(--gold-accent);
    opacity: 0.7;
}

.annotation-mark {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    color: var(--gold-accent);
    font-size: 1.1rem;
}

.annotation-text {
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 0.75rem;
    color: var(--warm-gray);
    font-style: italic;
    line-height: 1.5;
}

/* ========== WATERCOLOR SPREADS ========== */

.watercolor-spread {
    position: relative;
    width: calc(100% + 4rem);
    margin-left: -2rem;
    height: 200px;
    margin-bottom: 3.5rem;
    overflow: hidden;
    opacity: 0;
    transition: opacity 1s ease;
}

.watercolor-spread.visible {
    opacity: 1;
}

.watercolor-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.4;
}

/* Spread 1 - Kyoto tones */
.blob-1 {
    width: 200px;
    height: 180px;
    background: var(--dusty-rose);
    top: 20px;
    left: 10%;
}

.blob-2 {
    width: 250px;
    height: 160px;
    background: var(--gold-accent);
    top: 30px;
    left: 35%;
}

.blob-3 {
    width: 180px;
    height: 200px;
    background: var(--sage-green);
    top: 10px;
    right: 10%;
}

/* Spread 2 - Oaxaca tones */
.blob-4 {
    width: 220px;
    height: 170px;
    background: var(--gold-accent);
    top: 15px;
    left: 5%;
}

.blob-5 {
    width: 190px;
    height: 190px;
    background: var(--dusty-rose);
    top: 20px;
    left: 40%;
}

.blob-6 {
    width: 210px;
    height: 160px;
    background: var(--sage-green);
    top: 25px;
    right: 5%;
}

/* Spread 3 - Varanasi tones */
.blob-7 {
    width: 230px;
    height: 180px;
    background: var(--sky-wash);
    top: 10px;
    left: 8%;
}

.blob-8 {
    width: 200px;
    height: 200px;
    background: var(--gold-accent);
    top: 15px;
    left: 42%;
}

.blob-9 {
    width: 180px;
    height: 170px;
    background: var(--dusty-rose);
    top: 20px;
    right: 8%;
}

.spread-caption {
    position: absolute;
    bottom: 15px;
    width: 100%;
    text-align: center;
    font-family: 'Caveat', cursive;
    font-weight: 400;
    font-size: 0.95rem;
    color: var(--warm-gray);
    z-index: 2;
}

/* ========== BACK COVER / FOOTER ========== */

.back-cover {
    padding: 4rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
}

.back-cover-frame {
    position: relative;
    width: 80vw;
    max-width: 600px;
    padding: 4rem 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-cover-frame .hand-drawn-border {
    opacity: 1;
}

.back-cover-content {
    text-align: center;
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.back-cover-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.back-cover-text {
    font-family: 'EB Garamond', Georgia, serif;
    font-style: italic;
    font-weight: 400;
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: var(--ink-brown);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.back-cover-attribution {
    font-family: 'Caveat', cursive;
    font-weight: 400;
    font-size: 0.9rem;
    color: var(--warm-gray);
}

/* ========== RESPONSIVE ========== */

@media (max-width: 480px) {
    .cover-frame {
        width: 90vw;
        height: 70vh;
    }

    .journal {
        padding: 3rem 1.5rem;
    }

    .journal-entry {
        gap: 1rem;
    }

    .entry-margin {
        flex: 0 0 14px;
    }

    .watercolor-spread {
        width: calc(100% + 3rem);
        margin-left: -1.5rem;
        height: 150px;
    }
}
