/* yongzoon.net - Victorian ornate plate-book */

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

:root {
    --bg-deep: #1a1710;
    --bg-dark: #221e16;
    --olive-dark: #6a5a3a;
    --teal-muted: #5a6a6a;
    --gold-dark: #8a7a5a;
    --gold: #a08a60;
    --warm-stone: #b0a898;
    --parchment: #c8b898;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-deep);
    color: var(--parchment);
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    line-height: 1.7;
    overflow-x: hidden;
}

/* Plates */
.plate {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
}

.plate-frame {
    position: relative;
    width: 100%;
    max-width: 700px;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Ornamental border */
.ornament-border {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.border-draw {
    stroke-dasharray: 2800;
    stroke-dashoffset: 2800;
    transition: stroke-dashoffset 1.5s ease;
}

.plate.revealed .border-draw {
    stroke-dashoffset: 0;
}

/* Plate content */
.plate-content {
    text-align: center;
    padding: 60px 48px;
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.8s ease 0.3s, transform 0.8s ease 0.3s;
}

.plate.revealed .plate-content {
    opacity: 1;
    transform: translateY(0);
}

/* Plate numbers */
.plate-number {
    display: block;
    font-family: 'EB Garamond', serif;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.2em;
    color: var(--gold);
    margin-bottom: 32px;
    opacity: 0.7;
}

/* Frontispiece */
.frontispiece-title {
    font-family: 'EB Garamond', serif;
    font-size: clamp(40px, 8vw, 64px);
    font-weight: 400;
    letter-spacing: 0.04em;
    color: var(--parchment);
    line-height: 1.1;
    margin-bottom: 8px;
}

.frontispiece-sub {
    font-family: 'EB Garamond', serif;
    font-size: 24px;
    font-weight: 400;
    font-style: italic;
    color: var(--gold);
    margin-bottom: 24px;
}

.frontispiece-desc {
    font-family: 'Cormorant Garamond', serif;
    font-size: 18px;
    font-weight: 300;
    font-style: italic;
    color: var(--warm-stone);
    margin-top: 24px;
}

/* Ornamental rules */
.ornamental-rule {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

/* Plate titles */
.plate-title {
    font-family: 'EB Garamond', serif;
    font-size: clamp(24px, 4vw, 36px);
    font-weight: 500;
    letter-spacing: 0.06em;
    color: var(--parchment);
    margin-bottom: 32px;
}

/* Plate body text */
.plate-body {
    font-family: 'Cormorant Garamond', serif;
    font-size: 18px;
    font-weight: 300;
    line-height: 2;
    color: var(--warm-stone);
    max-width: 500px;
    margin: 0 auto 24px;
    text-align: justify;
}

/* Plate captions */
.plate-caption {
    font-family: 'Cormorant Garamond', serif;
    font-size: 15px;
    font-weight: 300;
    font-style: italic;
    line-height: 1.7;
    color: var(--gold-dark);
    max-width: 450px;
    margin: 24px auto 0;
    text-align: center;
}

/* Illustrations */
.crystal-illustration,
.botanical-illustration {
    margin: 24px auto;
    display: flex;
    justify-content: center;
}

/* Counter animation for plate numbers */
.plate-number {
    overflow: hidden;
}

/* Colophon details */
.colophon-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.colophon-line {
    font-family: 'EB Garamond', serif;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0.1em;
    color: var(--gold);
}

.colophon-date {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 11px;
    font-weight: 300;
    color: var(--gold-dark);
    letter-spacing: 0.05em;
}

.colophon-note {
    font-family: 'Cormorant Garamond', serif;
    font-size: 15px;
    font-weight: 300;
    color: var(--warm-stone);
    margin-top: 8px;
}

/* Ambient candlelight flicker */
.plate::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(160, 138, 96, 0.03) 0%, transparent 70%);
    pointer-events: none;
    animation: candleFlicker 4s ease-in-out infinite;
}

@keyframes candleFlicker {
    0%, 100% { opacity: 0.6; }
    25% { opacity: 0.8; }
    50% { opacity: 0.5; }
    75% { opacity: 0.9; }
}

/* Responsive */
@media (max-width: 768px) {
    .plate {
        padding: 24px 16px;
    }
    .plate-content {
        padding: 40px 24px;
    }
    .plate-frame {
        min-height: 400px;
    }
}
