/* ============================================
   bada.day -- Hand-drawn Field Journal
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    background-color: #F2EAD8;
    color: #3D3832;
    font-family: 'Lora', Georgia, serif;
    font-weight: 400;
    line-height: 1.72;
    letter-spacing: 0.01em;
    overflow-x: hidden;
    position: relative;
}

/* --- Typography --- */
.section-heading {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: 48px;
    color: #5C4033;
    margin-bottom: 12px;
    transform: rotate(-1deg);
}

.body-text {
    font-family: 'Lora', Georgia, serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.72;
    color: #3D3832;
    letter-spacing: 0.01em;
    max-width: 580px;
}

.annotation-text {
    font-family: 'Caveat', cursive;
    font-weight: 400;
    font-size: 14px;
    color: #8B9E7C;
    line-height: 1.4;
}

.label-tag,
.label-text {
    font-family: 'Nunito Sans', sans-serif;
    font-weight: 600;
    font-size: 11px;
    color: #A0876E;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.quote-text {
    font-family: 'Cormorant Infant', Georgia, serif;
    font-weight: 300;
    font-style: italic;
    font-size: 32px;
    color: #B07A5B;
    line-height: 1.4;
    max-width: 500px;
}

.date-text {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: 22px;
    color: #5C4033;
}

.illustration-caption {
    font-family: 'Caveat', cursive;
    font-weight: 400;
    font-size: 13px;
    color: #A0876E;
    display: block;
    margin-top: 6px;
    transform: rotate(-0.5deg);
}

/* --- Sketchbook Spine --- */
.spine {
    position: fixed;
    left: 8%;
    top: 0;
    bottom: 0;
    width: 4px;
    z-index: 5;
    pointer-events: none;
}

.spine-line {
    width: 100%;
    height: 100%;
}

/* --- Compass Navigation --- */
.compass-nav {
    position: fixed;
    top: 24px;
    right: 28px;
    width: 48px;
    height: 48px;
    z-index: 100;
    cursor: pointer;
}

.compass-icon {
    width: 48px;
    height: 48px;
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.compass-nav:hover .compass-icon {
    transform: rotate(15deg);
}

/* --- Navigation Overlay --- */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(242, 234, 216, 0.95);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.nav-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.nav-map {
    position: relative;
    width: 400px;
    max-width: 90vw;
    height: 500px;
    max-height: 80vh;
}

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

.map-labels {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.map-label {
    position: absolute;
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: 18px;
    color: #5C4033;
    text-decoration: none;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.map-label:hover {
    color: #6B8F7A;
}

.map-close {
    position: absolute;
    top: -10px;
    right: -10px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Coffee Ring Stains --- */
.coffee-ring {
    position: absolute;
    pointer-events: none;
    z-index: 1;
}

.coffee-ring-1 {
    top: 180vh;
    right: 8%;
    width: 120px;
    height: 120px;
}

.coffee-ring-2 {
    top: 420vh;
    left: 15%;
    width: 100px;
    height: 100px;
}

.coffee-ring-3 {
    top: 650vh;
    right: 20%;
    width: 90px;
    height: 90px;
}

/* --- Grid Backgrounds --- */
.grid-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* --- Scenes (General) --- */
.scene {
    position: relative;
    min-height: 100vh;
    padding: 80px 0;
}

/* --- Scene 1: Opening --- */
.scene-opening {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
}

.opening-content {
    position: relative;
    z-index: 2;
    margin-left: 14%;
    margin-right: 8%;
    text-align: left;
}

.title-container {
    margin-bottom: 20px;
    position: relative;
}

.title-svg {
    width: 100%;
    max-width: 400px;
    height: auto;
    display: block;
}

.title-path,
.title-path-2 {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
}

.site-title {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: 72px;
    color: #5C4033;
    margin-top: -20px;
    transform: rotate(-1.5deg);
}

.date-stamp {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 28px;
    margin-left: 4px;
    opacity: 0;
    transform: translateY(30px);
}

.title-compass {
    margin-bottom: 40px;
    width: 60px;
    opacity: 0;
    transform: translateY(30px);
}

.opening-text {
    max-width: 520px;
}

.opening-text .body-text {
    margin-bottom: 24px;
    opacity: 0;
    transform: translateY(30px);
}

/* --- Scene 2: Morning Pages --- */
.scene-morning {
    min-height: 200vh;
    padding: 100px 0;
    background-color: #F2EAD8;
}

.morning-content {
    position: relative;
    z-index: 2;
    margin-left: 14%;
    margin-right: 10%;
}

.morning-content .section-heading {
    margin-bottom: 8px;
}

.morning-content .label-tag {
    margin-bottom: 50px;
}

/* --- Scene 3: Field Sketches --- */
.scene-sketches {
    min-height: 200vh;
    padding: 100px 0;
    background-color: #E8DFD0;
}

.sketches-content {
    position: relative;
    z-index: 2;
    margin-left: 14%;
    margin-right: 10%;
}

.sketches-content .section-heading {
    margin-bottom: 8px;
}

.sketches-content .label-tag {
    margin-bottom: 50px;
}

/* --- Scene 4: Annotations --- */
.scene-annotations {
    min-height: 200vh;
    padding: 100px 0;
    background-color: #F2EAD8;
}

.annotations-content {
    position: relative;
    z-index: 2;
    margin-left: 14%;
    margin-right: 10%;
}

.annotations-content .section-heading {
    margin-bottom: 8px;
}

.annotations-content .label-tag {
    margin-bottom: 50px;
}

/* --- Scene 5: Closing --- */
.scene-closing {
    min-height: 100vh;
    padding: 100px 0;
    display: flex;
    align-items: center;
}

.closing-content {
    position: relative;
    z-index: 2;
    margin-left: 14%;
    margin-right: 10%;
    max-width: 520px;
}

/* --- Content Blocks --- */
.content-block {
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(30px);
}

.content-block .body-text {
    margin-bottom: 18px;
}

.content-block-wide {
    max-width: 580px;
}

.content-block-offset {
    margin-left: 40px;
}

.content-block-caption {
    max-width: 400px;
    margin-left: 20px;
}

.content-block-annotated .body-text {
    max-width: 520px;
}

.content-block-final .body-text {
    max-width: 480px;
}

/* --- Illustrations --- */
.illustration {
    margin: 50px 0 60px;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
}

.illustration svg {
    max-width: 100%;
    height: auto;
}

.illustration-window {
    max-width: 280px;
}

.illustration-coffee {
    max-width: 160px;
    margin-left: 60%;
}

.illustration-landscape {
    max-width: 600px;
    margin-bottom: 30px;
}

.illustration-map-detail {
    max-width: 300px;
    margin-left: 30%;
}

.illustration-book {
    max-width: 200px;
    margin: 40px auto;
}

/* --- Annotations & Margin Notes --- */
.margin-note {
    position: relative;
    opacity: 0;
    transform: translateY(20px);
}

.margin-note-1 {
    position: absolute;
    left: 1%;
    top: 65%;
    width: 120px;
    transform: rotate(-2deg) translateY(20px);
    z-index: 3;
}

.margin-note-2 {
    margin-left: -3%;
    margin-top: -20px;
    margin-bottom: 40px;
    transform: rotate(1deg) translateY(20px);
}

.margin-note-3 {
    margin-left: -3%;
    margin-top: 20px;
    margin-bottom: 40px;
    transform: rotate(-1.5deg) translateY(20px);
}

.margin-note-4 {
    margin-left: -3%;
    margin-top: 20px;
    margin-bottom: 40px;
    transform: rotate(0.5deg) translateY(20px);
}

.leader-line,
.leader-line-long {
    display: block;
    width: 60px;
    height: 30px;
    margin-bottom: 4px;
}

.leader-line-long {
    width: 80px;
    height: 40px;
}

.annotation-bubble {
    position: relative;
    margin: 20px 0 40px;
    padding-left: 10px;
    max-width: 260px;
    opacity: 0;
    transform: translateY(20px);
}

.annotation-bubble-1 {
    margin-left: 55%;
    margin-top: -30px;
}

.annotation-bubble-2 {
    margin-left: 50%;
}

.annotation-bubble-3 {
    margin-left: 45%;
}

/* --- Circled Word --- */
.circled-word {
    position: relative;
    display: inline;
}

.circled-word::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -6px;
    right: -6px;
    bottom: -4px;
    border: 1.5px solid #8B9E7C;
    border-radius: 50%;
    opacity: 0.6;
    transform: rotate(-2deg);
    pointer-events: none;
}

/* --- Underline Wavy --- */
.underline-wavy {
    text-decoration: underline;
    text-decoration-color: #8B9E7C;
    text-decoration-style: wavy;
    text-underline-offset: 4px;
}

/* --- Pull Quotes --- */
.pull-quote {
    margin: 60px 0 70px;
    padding: 30px 0;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
}

.pull-quote-wide {
    margin-left: 10%;
}

/* --- Tape Strips --- */
.tape-strip {
    position: absolute;
    width: 80px;
    height: 20px;
    background: rgba(242, 234, 216, 0.6);
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(61, 56, 50, 0.08);
    z-index: 3;
}

.tape-strip-left {
    top: -8px;
    left: -10px;
    transform: rotate(-12deg);
}

.tape-strip-right {
    bottom: -8px;
    right: 20px;
    transform: rotate(8deg);
}

.tape-strip-top {
    top: -10px;
    right: 20px;
    transform: rotate(6deg);
}

.tape-strip-bottom {
    bottom: -10px;
    left: 10px;
    transform: rotate(-9deg);
}

/* --- Illustrated Lists --- */
.illustrated-list {
    margin: 40px 0 50px;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
}

.illustrated-list-2 {
    margin-left: 30px;
}

.list-card {
    background: #E8DFD0;
    padding: 28px 32px;
    position: relative;
    max-width: 450px;
    /* Hand-drawn border effect via box-shadow */
    box-shadow:
        inset 2px 0 0 0 #A0876E,
        inset -2px 0 0 0 #A0876E,
        inset 0 2px 0 0 #A0876E,
        inset 0 -2px 0 0 #A0876E;
}

.list-heading {
    font-family: 'Caveat', cursive;
    font-weight: 700;
    font-size: 26px;
    color: #5C4033;
    margin-bottom: 14px;
}

.hand-list {
    list-style: none;
    padding: 0;
}

.hand-list li {
    font-family: 'Lora', Georgia, serif;
    font-size: 15px;
    line-height: 1.65;
    color: #3D3832;
    padding-left: 22px;
    position: relative;
    margin-bottom: 10px;
}

.hand-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 8px;
    height: 8px;
    border: 1.5px solid #B07A5B;
    border-radius: 50%;
}

/* --- Page Breaks --- */
.page-break {
    position: relative;
    padding: 30px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.page-break-line {
    width: 80%;
    max-width: 800px;
    height: 40px;
}

.page-break-note {
    font-family: 'Caveat', cursive;
    font-weight: 400;
    font-size: 14px;
    color: #A0876E;
    font-style: italic;
}

.page-break-doodle {
    width: 40px;
    height: 50px;
}

.page-break-doodle-2 {
    width: 50px;
    height: 50px;
}

.page-break-doodle-3 {
    width: 30px;
    height: 30px;
}

/* --- Closing Page --- */
.closing-stamp {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 30px 0 40px;
    opacity: 0;
    transform: translateY(30px);
}

.closing-border {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    max-width: 90%;
    pointer-events: none;
    opacity: 0.4;
}

.closing-border-svg {
    width: 100%;
    height: auto;
}

.fin-container {
    margin-top: 60px;
    text-align: center;
    opacity: 0;
}

.fin-svg {
    width: 200px;
    height: 80px;
    margin: 0 auto;
    display: block;
}

/* --- Draw SVG Animation --- */
.draw-path {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    transition: stroke-dashoffset 1.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.draw-svg.drawn .draw-path {
    stroke-dashoffset: 0;
}

/* --- Animate In --- */
.animate-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                transform 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.animate-in.visible {
    opacity: 1;
    transform: translateY(0) rotate(0deg);
}

.stagger-1 { transition-delay: 0.2s; }
.stagger-2 { transition-delay: 0.4s; }
.stagger-3 { transition-delay: 0.6s; }

/* --- Margin notes visible state needs rotation preserved --- */
.margin-note-1.visible {
    transform: rotate(-2deg) translateY(0);
}

.margin-note-2.visible {
    transform: rotate(1deg) translateY(0);
}

.margin-note-3.visible {
    transform: rotate(-1.5deg) translateY(0);
}

.margin-note-4.visible {
    transform: rotate(0.5deg) translateY(0);
}

/* --- Botanical Cluster --- */
.botanical-cluster {
    margin: 40px 0 50px;
    max-width: 200px;
    margin-left: 55%;
    opacity: 0;
    transform: translateY(30px);
}

.botanical-svg {
    width: 100%;
    height: auto;
}

/* --- Links --- */
a {
    color: #6B8F7A;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #5C4033;
}

/* --- Hover interactions --- */
.compass-small:hover {
    transform: rotate(15deg);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.botanical-cluster:hover .botanical-svg {
    transform: scale(1.1);
    transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }

    .spine {
        left: 4%;
    }

    .opening-content,
    .morning-content,
    .sketches-content,
    .annotations-content,
    .closing-content {
        margin-left: 10%;
        margin-right: 5%;
    }

    .site-title {
        font-size: 48px;
    }

    .section-heading {
        font-size: 36px;
    }

    .quote-text {
        font-size: 24px;
    }

    .illustration-coffee {
        margin-left: 30%;
    }

    .annotation-bubble-1 {
        margin-left: 20%;
    }

    .annotation-bubble-2 {
        margin-left: 15%;
    }

    .annotation-bubble-3 {
        margin-left: 10%;
    }

    .illustration-map-detail {
        margin-left: 10%;
    }

    .content-block-offset {
        margin-left: 10px;
    }

    .illustrated-list-2 {
        margin-left: 10px;
    }

    .botanical-cluster {
        margin-left: 30%;
    }

    .margin-note-1 {
        position: relative;
        left: auto;
        top: auto;
        margin-bottom: 30px;
    }

    .compass-nav {
        top: 16px;
        right: 16px;
    }

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

@media (max-width: 480px) {
    .site-title {
        font-size: 36px;
    }

    .section-heading {
        font-size: 30px;
    }

    .quote-text {
        font-size: 22px;
    }

    .illustration-landscape {
        max-width: 100%;
    }
}
