/* ===========================================
   senggack.org - A Garden of Thoughts
   Goblincore herbalist aesthetic
   =========================================== */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: #f5ede0;
    color: #5a3d2b;
    font-family: 'Lora', Georgia, serif;
    font-weight: 400;
    font-size: clamp(16px, 1.7vw, 19px);
    line-height: 1.9;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Palette Reference ---
   Warm Parchment: #f5ede0
   Burnt Sienna: #c4713a
   Deep Walnut: #5a3d2b
   Botanical Green: #6b8f5e
   Dried Rose: #b8756a
   Cream White: #faf7f0
   Ink Brown: #3a2518
   Darker Parchment: #e8dfd0
   Fonts: Cormorant Garamond, Lora, Caveat
--- */

/* --- Texture Overlays (pressed-flower stains) --- */
.texture-overlay {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    border-radius: 50%;
}

.texture-1 {
    width: 500px;
    height: 500px;
    top: 20%;
    left: -5%;
    background: radial-gradient(ellipse at center, rgba(196,113,58,0.03) 0%, transparent 70%);
}

.texture-2 {
    width: 400px;
    height: 400px;
    top: 50%;
    right: -8%;
    background: radial-gradient(ellipse at center, rgba(107,143,94,0.03) 0%, transparent 70%);
}

.texture-3 {
    width: 600px;
    height: 600px;
    bottom: 10%;
    left: 30%;
    background: radial-gradient(ellipse at center, rgba(184,117,106,0.025) 0%, transparent 70%);
}

/* --- Hero Section --- */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #e8dfd0;
    z-index: 1;
    animation: heroFadeIn 600ms ease-out forwards;
}

@keyframes heroFadeIn {
    from { background-color: #e8dfd0; }
    to { background-color: #f5ede0; }
}

.hero-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Wreath SVG */
.wreath {
    width: clamp(240px, 50vw, 380px);
    height: clamp(240px, 50vw, 380px);
}

.wreath-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: wreathDraw 1600ms ease-in-out forwards;
    animation-delay: 600ms;
}

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

/* Hero Title */
.hero-title {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-weight: 600;
    font-style: italic;
    font-size: clamp(48px, 8vw, 88px);
    color: #3a2518;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.95);
    opacity: 0;
    animation: titleFadeIn 800ms ease-out forwards;
    animation-delay: 2200ms;
    letter-spacing: 0.02em;
}

@keyframes titleFadeIn {
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.0);
    }
}

/* Hero Subtitle */
.hero-subtitle {
    font-family: 'Caveat', cursive;
    font-weight: 400;
    font-size: clamp(20px, 3vw, 32px);
    color: #5a3d2b;
    margin-top: 12px;
    opacity: 0;
    animation: subtitleFadeIn 800ms ease-out forwards;
    animation-delay: 3000ms;
}

@keyframes subtitleFadeIn {
    to {
        opacity: 1;
    }
}

/* Scroll Hint */
.scroll-hint {
    position: absolute;
    bottom: 40px;
    opacity: 0;
    animation: scrollHintFadeIn 1000ms ease-out forwards;
    animation-delay: 3800ms;
}

@keyframes scrollHintFadeIn {
    to { opacity: 0.5; }
}

.scroll-hint svg {
    animation: scrollBounce 2s ease-in-out infinite;
    animation-delay: 4800ms;
}

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

/* --- Journal Entries --- */
.journal-entry {
    position: relative;
    width: 100%;
    padding: 12vh 24px;
    z-index: 1;
}

.journal-entry:nth-child(even of .journal-entry) {
    background-color: #faf7f0;
}

.entry-content {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 800ms ease-out, transform 800ms ease-out;
}

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

/* Ornaments */
.ornament {
    width: 60px;
    height: 40px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.ornament-path {
    stroke-dasharray: 200;
    stroke-dashoffset: 200;
    transition: stroke-dashoffset 600ms ease-in-out;
}

.ornament.drawn .ornament-path {
    stroke-dashoffset: 0;
}

/* Entry Date Labels */
.entry-date {
    display: block;
    text-align: center;
    font-family: 'Caveat', cursive;
    font-size: clamp(14px, 1.4vw, 16px);
    color: #b8756a;
    text-transform: lowercase;
    letter-spacing: 0.1em;
    margin-bottom: 16px;
}

/* Entry Titles */
.entry-title {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-weight: 600;
    font-size: clamp(28px, 4.5vw, 52px);
    color: #3a2518;
    text-align: center;
    margin-bottom: 32px;
    line-height: 1.2;
}

/* Entry Text */
.entry-text {
    margin-bottom: 24px;
    text-align: left;
    color: #5a3d2b;
}

.entry-text:last-of-type {
    margin-bottom: 0;
}

.entry-text strong,
.entry-text em {
    color: #6b8f5e;
}

/* --- Margin Notes --- */
.margin-note {
    position: absolute;
    right: -240px;
    top: 120px;
    width: 200px;
    opacity: 0;
    transition: opacity 500ms ease-out;
    display: none;
}

.margin-note.visible {
    opacity: 1;
}

.margin-text {
    font-family: 'Caveat', cursive;
    font-size: clamp(14px, 1.4vw, 16px);
    color: #b8756a;
    line-height: 1.5;
    display: block;
    padding-left: 16px;
    border-left: 1px solid rgba(184,117,106,0.3);
}

/* Show margin notes on desktop */
@media (min-width: 1200px) {
    .margin-note {
        display: block;
    }
}

/* --- Full-bleed Botanical Breaks --- */
.botanical-break {
    width: 100%;
    overflow: hidden;
    padding: 40px 0;
    position: relative;
    z-index: 1;
}

.botanical-svg {
    width: 100%;
    height: auto;
    min-height: 200px;
    display: block;
}

.botanical-svg path {
    stroke-dasharray: 500;
    stroke-dashoffset: 500;
    transition: stroke-dashoffset 2500ms ease-in-out;
}

.botanical-break.animated .botanical-svg path {
    stroke-dashoffset: 0;
}

/* --- Closing Section --- */
.closing {
    position: relative;
    width: 100%;
    padding: 16vh 24px 20vh;
    z-index: 1;
    text-align: center;
}

.closing-content {
    max-width: 600px;
    margin: 0 auto;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 800ms ease-out, transform 800ms ease-out;
}

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

.closing .ornament-wreath-small {
    width: 80px;
    height: 80px;
    margin: 0 auto 32px;
}

.closing .ornament-wreath-small svg {
    width: 100%;
    height: 100%;
}

.closing-text {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-weight: 600;
    font-style: italic;
    font-size: clamp(24px, 3.5vw, 40px);
    color: #3a2518;
    margin-bottom: 16px;
}

.closing-korean {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-weight: 500;
    font-style: italic;
    font-size: clamp(16px, 2vw, 22px);
    color: #b8756a;
}

/* --- Responsive Adjustments --- */
@media (max-width: 768px) {
    .journal-entry {
        padding: 8vh 20px;
    }

    .entry-content {
        max-width: 100%;
    }

    .botanical-break {
        padding: 24px 0;
    }
}

@media (max-width: 480px) {
    .wreath {
        width: 220px;
        height: 220px;
    }

    .hero-title {
        font-size: 44px;
    }

    .journal-entry {
        padding: 6vh 16px;
    }
}

/* --- Selection styling --- */
::selection {
    background-color: rgba(196,113,58,0.2);
    color: #3a2518;
}

/* --- Scrollbar styling (webkit) --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f5ede0;
}

::-webkit-scrollbar-thumb {
    background: #c4713a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a3d2b;
}
