/* gabs.wiki - A Botanical Encyclopedia of Value */
/* Palette: #f5f8fc (bg), #1c2a3a (dark), #7ba4c7 (blue accent), #5a7088 (muted), #d4a574 (warm), #e8f0f7 #e1ecf5 #c5d5e8 (light blues) */

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

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

body {
    background-color: #f5f8fc;
    color: #1c2a3a;
    font-family: "IBM Plex Serif", Georgia, serif;
    font-weight: 400;
    line-height: 1.75;
    position: relative;
    overflow-x: hidden;
}

/* Vertical stem line running through the page */
.stem-line {
    position: fixed;
    left: 50%;
    top: 0;
    width: 1px;
    height: 0%;
    background: linear-gradient(to bottom, transparent, #c5d5e8 10%, #c5d5e8 90%, transparent);
    transform: translateX(-0.5px);
    z-index: 0;
    pointer-events: none;
    transition: height 0.1s linear;
}

/* ===================== TITLE PLATE ===================== */
.title-plate {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    padding: 40px 24px;
}

.title-plate-inner {
    text-align: center;
    max-width: 480px;
    position: relative;
}

.title-botanical-frame {
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 420px;
    opacity: 0;
    animation: fadeInFrame 2s ease-out 0.3s forwards;
}

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

.title-main {
    font-family: "Caveat", cursive;
    font-weight: 700;
    font-size: clamp(2.4rem, 6vw, 4rem);
    color: #1c2a3a;
    letter-spacing: -0.01em;
    margin-bottom: 8px;
    opacity: 0;
    animation: fadeInUp 1.2s ease-out 0.5s forwards;
}

.title-korean {
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 300;
    color: #7ba4c7;
    line-height: 1.1;
    margin-bottom: 16px;
    opacity: 0;
    animation: fadeInUp 1.2s ease-out 0.8s forwards;
}

.title-subtitle {
    font-family: "Caveat", cursive;
    font-weight: 400;
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: #5a7088;
    letter-spacing: 0.05em;
    margin-bottom: 24px;
    opacity: 0;
    animation: fadeInUp 1.2s ease-out 1.1s forwards;
}

.title-annotation {
    display: inline-block;
    padding: 6px 16px;
    border: 1px solid #c5d5e8;
    border-radius: 2px;
    margin-bottom: 32px;
    opacity: 0;
    animation: fadeInUp 1.2s ease-out 1.3s forwards;
}

.annotation-text {
    font-family: "Caveat", cursive;
    font-size: 0.95rem;
    color: #5a7088;
}

.title-pressed-flower {
    width: 100px;
    margin: 0 auto;
    opacity: 0;
    animation: fadeInFlower 2s ease-out 1.6s forwards;
}

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

/* ===================== JOURNAL COLUMN ===================== */
.journal-column {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

/* ===================== ROOT INDEX ===================== */
.root-index {
    padding: 80px 0 60px;
}

.section-divider {
    width: 200px;
    margin: 0 auto 32px;
}

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

.section-heading {
    font-family: "Caveat", cursive;
    font-weight: 700;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    color: #1c2a3a;
    text-align: center;
    margin-bottom: 8px;
}

.section-annotation {
    font-family: "Caveat", cursive;
    font-size: 1rem;
    color: #5a7088;
    text-align: center;
    margin-bottom: 40px;
}

.root-entries {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.root-entry {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: #e8f0f7;
    border: 1px solid #c5d5e8;
    border-radius: 4px;
    text-decoration: none;
    color: #1c2a3a;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.root-entry::before {
    content: attr(data-index);
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-family: "Caveat", cursive;
    font-size: 1.4rem;
    color: #c5d5e8;
    font-weight: 700;
    transition: color 0.4s ease;
}

.root-entry:hover {
    background: #e1ecf5;
    border-color: #7ba4c7;
    transform: translateX(4px);
}

.root-entry:hover::before {
    color: #7ba4c7;
}

.entry-icon {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.iso-icon {
    width: 100%;
    height: 100%;
}

.entry-label {
    font-family: "Caveat", cursive;
    font-weight: 700;
    font-size: 1.3rem;
    display: block;
}

.entry-latin {
    font-family: "IBM Plex Serif", serif;
    font-style: italic;
    font-size: 0.8rem;
    color: #5a7088;
    display: block;
    margin-top: 2px;
}
/* ===================== SPECIMEN ENTRIES ===================== */
.specimen-entry {
    padding: 60px 0;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.specimen-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.specimen-number {
    font-family: "Caveat", cursive;
    font-weight: 700;
    font-size: 1rem;
    color: #7ba4c7;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

.specimen-title {
    font-family: "Caveat", cursive;
    font-weight: 700;
    font-size: clamp(1.8rem, 4vw, 3.2rem);
    color: #1c2a3a;
    margin-bottom: 4px;
}

.specimen-latin {
    font-family: "IBM Plex Serif", serif;
    font-style: italic;
    font-size: 0.9rem;
    color: #5a7088;
}

.specimen-illustration {
    margin: 0 auto 40px;
    max-width: 400px;
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 1s ease 0.2s, transform 1s ease 0.2s;
}

.specimen-entry.visible .specimen-illustration {
    opacity: 1;
    transform: scale(1);
}

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

.specimen-body {
    max-width: 560px;
    margin: 0 auto;
}

.specimen-text {
    font-family: "IBM Plex Serif", serif;
    font-size: clamp(0.95rem, 1.8vw, 1.05rem);
    color: #1c2a3a;
    line-height: 1.8;
    margin-bottom: 20px;
}

.specimen-text em {
    font-style: italic;
    color: #5a7088;
}

.specimen-quote {
    margin: 32px 0;
    padding: 24px 28px;
    background: #e8f0f7;
    border-left: 3px solid #d4a574;
    border-radius: 0 4px 4px 0;
    position: relative;
}

.quote-mark {
    font-family: "Caveat", cursive;
    font-size: 2.5rem;
    color: #d4a574;
    opacity: 0.6;
    line-height: 0;
    position: absolute;
    top: 20px;
    left: 12px;
}

.specimen-quote {
    font-family: "IBM Plex Serif", serif;
    font-style: italic;
    font-size: 0.95rem;
    color: #5a7088;
    line-height: 1.7;
}

.specimen-quote cite {
    display: block;
    margin-top: 12px;
    font-size: 0.85rem;
    font-style: normal;
    color: #7ba4c7;
}

.specimen-field-note {
    margin-top: 32px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f5f8fc, #e8f0f7);
    border: 1px dashed #c5d5e8;
    border-radius: 4px;
    position: relative;
}

.field-note-label {
    font-family: "Caveat", cursive;
    font-weight: 700;
    font-size: 1rem;
    color: #d4a574;
    display: block;
    margin-bottom: 8px;
}

.specimen-field-note p {
    font-family: "IBM Plex Serif", serif;
    font-size: 0.9rem;
    color: #5a7088;
    line-height: 1.7;
}

/* ===================== BOTANICAL DIVIDERS ===================== */
.botanical-divider {
    display: flex;
    justify-content: center;
    padding: 20px 0;
}

.divider-botanical-svg {
    width: 60px;
    height: auto;
}

.divider-final-svg {
    width: 80px;
}

/* ===================== COLOPHON ===================== */
.colophon {
    padding: 80px 24px 60px;
    position: relative;
    z-index: 1;
}

.colophon-inner {
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
}

.colophon-border-top {
    margin-bottom: 32px;
}

.colophon-rule-svg {
    width: 100%;
    max-width: 400px;
    height: auto;
}

.colophon-title {
    font-family: "Caveat", cursive;
    font-weight: 700;
    font-size: clamp(1.2rem, 2.5vw, 1.6rem);
    color: #1c2a3a;
    margin-bottom: 16px;
}

.colophon-text {
    font-family: "IBM Plex Serif", serif;
    font-size: 0.85rem;
    color: #5a7088;
    line-height: 1.7;
    margin-bottom: 24px;
}

.colophon-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}

.colophon-detail {
    display: flex;
    justify-content: center;
    gap: 12px;
    align-items: baseline;
}

.colophon-label {
    font-family: "Caveat", cursive;
    font-weight: 700;
    font-size: 0.9rem;
    color: #7ba4c7;
}

.colophon-value {
    font-family: "Inter", sans-serif;
    font-size: 0.75rem;
    color: #5a7088;
    font-weight: 300;
}

.colophon-closing {
    margin-bottom: 24px;
}

.colophon-korean {
    font-family: "Caveat", cursive;
    font-size: 1.1rem;
    color: #5a7088;
}

.colophon-flower {
    width: 40px;
    margin: 0 auto;
    opacity: 0.6;
}

.colophon-flower-svg {
    width: 100%;
    height: auto;
}
/* ===================== ANIMATIONS ===================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInFrame {
    from {
        opacity: 0;
        transform: translateX(-50%) scale(0.95);
    }
    to {
        opacity: 0.6;
        transform: translateX(-50%) scale(1);
    }
}

@keyframes fadeInFlower {
    from {
        opacity: 0;
        transform: scale(0.8) rotate(-5deg);
    }
    to {
        opacity: 0.7;
        transform: scale(1) rotate(0deg);
    }
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
    .title-botanical-frame {
        display: none;
    }

    .journal-column {
        padding: 0 20px;
    }

    .specimen-entry {
        padding: 40px 0;
    }

    .root-entry::before {
        display: none;
    }

    .specimen-illustration {
        max-width: 300px;
    }

    .colophon-detail {
        flex-direction: column;
        gap: 2px;
    }
}

@media (min-width: 1200px) {
    .title-plate-inner {
        max-width: 520px;
    }
}

/* Subtle background texture */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle at 1px 1px, #e1ecf5 0.5px, transparent 0.5px);
    background-size: 40px 40px;
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
}

/* Smooth scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #c5d5e8;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #7ba4c7;
}

/* Selection color */
::selection {
    background: #e1ecf5;
    color: #1c2a3a;
}
/* Additional palette color */
.specimen-entry.visible .specimen-body {
    border-top: 1px solid transparent;
    background: linear-gradient(180deg, #e8f0f8 0%, transparent 3%);
}
