/* ============================================================
   yongzoon.com  --  Light-Academia Reading Space
   Palette:
     #FAF6F0 parchment   |  #F4EDE4 warm cream
     #2D2A26 ink         |  #8B7D6B sepia
     #D4C5B0 deep linen  |  #A8E6CF neon mint
     #FFDAB9 neon peach
   Fonts: Playfair Display, Source Serif 4, Josefin Sans
   ============================================================ */

:root {
    --parchment: #FAF6F0;
    --warm-cream: #F4EDE4;
    --ink: #2D2A26;
    --sepia: #8B7D6B;
    --linen: #D4C5B0;
    --mint: #A8E6CF;
    --peach: #FFDAB9;

    --font-display: "Playfair Display", "Lora", Georgia, serif;
    --font-body: "Source Serif 4", "Lora", "Source Serif Pro", Georgia, serif;
    --font-accent: "Josefin Sans", "Inter", "Futura", "Space Grotesk", system-ui, sans-serif;

    --shelf-w: 35%;
    --desk-w: 65%;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--parchment);
    color: var(--ink);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.85;
    font-size: clamp(1rem, 1.3vw, 1.15rem);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body { overflow-x: hidden; }

.paper-noise { position: absolute; width: 0; height: 0; }

/* ============================================================
   LAYOUT  --  Split-screen grid
   ============================================================ */
.layout {
    display: grid;
    grid-template-columns: var(--shelf-w) var(--desk-w);
    min-height: 100vh;
    width: 100%;
}

/* ============================================================
   LEFT PANEL  --  THE SHELF
   ============================================================ */
.shelf {
    position: sticky;
    top: 0;
    height: 100vh;
    background: var(--warm-cream);
    border-right: 1px solid var(--linen);
    display: grid;
    grid-template-rows: auto 1fr auto;
    overflow: hidden;
    z-index: 2;
}

.shelf__paper {
    position: absolute;
    inset: 0;
    pointer-events: none;
    filter: url(#paperTexture);
    opacity: 0.35;
    mix-blend-mode: multiply;
    z-index: 0;
}

.shelf > * { position: relative; z-index: 1; }

.shelf__top {
    padding: 2rem 2.5rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.shelf__label {
    font-family: var(--font-accent);
    font-weight: 300;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--sepia);
}

.shelf__name-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    position: relative;
}

.shelf__name {
    margin: 0;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(3rem, 7vw, 6rem);
    letter-spacing: -0.01em;
    color: var(--ink);
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    line-height: 1;
    transition: color 600ms ease;
}

.shelf__name::after {
    content: "";
    display: block;
    width: 1px;
    height: 64px;
    margin: 1rem auto 0;
    background: var(--sepia);
    opacity: 0.4;
}

/* The single neon-glow horizontal line at the panel's vertical midpoint */
.shelf__glow-line {
    position: absolute;
    top: 50%;
    left: 12%;
    right: 12%;
    height: 1px;
    background: var(--mint);
    box-shadow:
        0 0 8px rgba(168, 230, 207, 0.55),
        0 0 18px rgba(168, 230, 207, 0.35),
        0 0 32px rgba(168, 230, 207, 0.18);
    transform: translateY(-0.5px);
    animation: soft-pulse 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes soft-pulse {
    0%, 100% {
        box-shadow:
            0 0 8px rgba(168, 230, 207, 0.30),
            0 0 14px rgba(168, 230, 207, 0.18);
        opacity: 0.85;
    }
    50% {
        box-shadow:
            0 0 18px rgba(168, 230, 207, 0.60),
            0 0 32px rgba(168, 230, 207, 0.30);
        opacity: 1;
    }
}

.shelf__bottom {
    padding: 0 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.motif--branch {
    width: 60px;
    height: 80px;
    opacity: 0.85;
}

.shelf__footnote {
    font-family: var(--font-accent);
    font-size: 0.7rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--sepia);
    opacity: 0.7;
}

/* ============================================================
   RIGHT PANEL  --  THE DESK
   ============================================================ */
.desk {
    background: var(--parchment);
    position: relative;
    min-height: 100vh;
}

.desk::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    filter: url(#paperTexture);
    opacity: 0.25;
    mix-blend-mode: multiply;
    z-index: 0;
}

.section {
    position: relative;
    padding: clamp(4rem, 8vw, 8rem) clamp(2rem, 5vw, 5rem);
    z-index: 1;
}

.section + .section {
    border-top: 1px dashed rgba(212, 197, 176, 0.7);
}

/* Reveal animation base */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition:
        opacity 600ms ease,
        transform 600ms ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ----- shared utility ----- */
.kicker {
    display: inline-block;
    font-family: var(--font-accent);
    font-weight: 300;
    font-size: 0.78rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--sepia);
    margin-bottom: 1.5rem;
}

.rule {
    border: none;
    height: 1px;
    background: var(--mint);
    margin: 2.5rem 0;
    box-shadow:
        0 0 10px rgba(168, 230, 207, 0.45),
        0 0 22px rgba(168, 230, 207, 0.22);
    width: 100%;
    max-width: 320px;
}

.rule--mint { background: var(--mint); }

/* ============================================================
   SECTION 1  --  HERO
   ============================================================ */
.section--hero { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }

.hero { max-width: 720px; }

.hero__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.08;
    letter-spacing: -0.01em;
    color: var(--ink);
    margin: 0 0 1.5rem;
}

.hero__title em {
    font-style: italic;
    font-weight: 400;
    color: var(--sepia);
}

.hero__lede {
    font-family: var(--font-body);
    font-size: clamp(1.05rem, 1.4vw, 1.25rem);
    color: var(--ink);
    max-width: 56ch;
    margin: 0 0 1rem;
}

.hero__meta {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(1.5rem, 3vw, 3rem);
    margin-top: 1rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.meta-key {
    font-family: var(--font-accent);
    font-weight: 300;
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--sepia);
}

.meta-val {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--ink);
    font-style: italic;
}

.motif--corner {
    position: absolute;
    width: 140px;
    height: 140px;
    bottom: 2.5rem;
    right: 2.5rem;
    opacity: 0.7;
}

/* SVG drawn-in animation */
.motif .draw,
.card__motif .draw {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    transition: stroke-dashoffset 1.2s ease;
}

.is-visible .motif .draw,
.is-visible .card__motif .draw {
    stroke-dashoffset: 0;
}

/* ============================================================
   SECTION 2  --  BOOK SPREAD
   ============================================================ */
.section--spread {
    background: var(--parchment);
    position: relative;
}

.spread__head { max-width: 760px; margin-bottom: 3rem; }

.spread__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    line-height: 1.18;
    letter-spacing: -0.005em;
    margin: 0;
    color: var(--ink);
}

.spread__columns {
    column-count: 2;
    column-gap: 3rem;
    column-rule: 1px solid var(--linen);
    max-width: 820px;
}

.spread__columns p {
    margin: 0 0 1.25rem;
    text-indent: 1.4em;
    break-inside: avoid-column;
}

.spread__columns p:first-child {
    text-indent: 0;
}

/* Drop-cap on first paragraph */
.spread__columns p:first-child::first-letter {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 3.4em;
    float: left;
    line-height: 0.9;
    margin: 0.05em 0.08em 0 0;
    color: var(--ink);
}

.pullquote {
    margin: 1.25rem 0;
    padding: 0.6rem 0 0.6rem 1.25rem;
    border-left: 3px solid var(--mint);
    box-shadow: -3px 0 18px rgba(168, 230, 207, 0.35);
    font-family: var(--font-display);
    font-style: italic;
    font-weight: 600;
    font-size: 1.15rem;
    line-height: 1.45;
    color: var(--ink);
    break-inside: avoid;
}

.pressed {
    position: absolute;
    width: 140px;
    height: 220px;
    opacity: 0.55;
    pointer-events: none;
}

.pressed--left {
    top: 25%;
    left: 0.5rem;
    transform: translateX(-20%);
}

.pressed--right {
    bottom: 12%;
    right: 0.5rem;
    transform: translateX(20%);
}

/* ============================================================
   SECTION 3  --  GALLERY
   ============================================================ */
.section--gallery {
    background: linear-gradient(180deg, var(--parchment) 0%, var(--warm-cream) 100%);
    position: relative;
}

.gallery__head { max-width: 720px; margin-bottom: 3rem; }

.gallery__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    margin: 0 0 0.75rem;
    color: var(--ink);
}

.gallery__lede {
    margin: 0;
    color: var(--sepia);
    max-width: 50ch;
    font-style: italic;
}

.gallery {
    position: relative;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: minmax(60px, auto);
    gap: 1.5rem;
    margin-top: 2rem;
}

.card {
    margin: 0;
    background: var(--parchment);
    border: 1px solid var(--linen);
    padding: 1.75rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition:
        transform 500ms ease,
        box-shadow 500ms ease,
        border-color 500ms ease;
    position: relative;
}

.card--1 { grid-column: 1 / span 6; transform: translateY(0) rotate(-0.6deg); }
.card--2 { grid-column: 6 / span 7; transform: translateY(2.5rem) rotate(0.5deg); }
.card--3 { grid-column: 2 / span 6; transform: translateY(-1rem) rotate(0.8deg); }
.card--4 { grid-column: 7 / span 6; transform: translateY(1.5rem) rotate(-0.4deg); }

.card:hover {
    border-color: var(--mint);
    box-shadow:
        0 0 14px rgba(168, 230, 207, 0.45),
        0 0 28px rgba(168, 230, 207, 0.22);
    transform: translateY(-4px) rotate(0deg);
}

.card--2:hover,
.card--4:hover {
    border-color: var(--peach);
    box-shadow:
        0 0 14px rgba(255, 218, 185, 0.55),
        0 0 28px rgba(255, 218, 185, 0.28);
}

.card__motif {
    width: 56px;
    height: 56px;
    opacity: 0.8;
}

.card__num {
    font-family: var(--font-accent);
    font-weight: 300;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--sepia);
}

.card__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.4rem;
    margin: 0;
    color: var(--ink);
}

.card__body {
    margin: 0;
    color: var(--sepia);
    font-size: 0.98rem;
    line-height: 1.65;
    font-style: italic;
}

/* ============================================================
   SECTION 4  --  HANDWRITTEN NOTE
   ============================================================ */
.section--note {
    background: var(--warm-cream);
    padding-bottom: clamp(3rem, 6vw, 6rem);
}

.note {
    max-width: 640px;
    background: var(--parchment);
    border: 1px solid var(--linen);
    padding: clamp(2rem, 4vw, 3.5rem);
    transform: rotate(-1.2deg);
    box-shadow:
        2px 4px 0 rgba(45, 42, 38, 0.04),
        6px 12px 30px rgba(45, 42, 38, 0.06);
    font-family: var(--font-display);
    font-style: italic;
    color: var(--ink);
    position: relative;
}

.note::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    filter: url(#paperTexture);
    opacity: 0.35;
    mix-blend-mode: multiply;
}

.note > * { position: relative; }

.note .kicker {
    font-style: normal;
    color: var(--sepia);
}

.note__greeting {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 0 1rem;
}

.note__body {
    font-size: 1.1rem;
    line-height: 1.7;
    margin: 0 0 1.5rem;
    font-family: var(--font-body);
    font-style: italic;
}

.note__contact {
    margin: 0 0 0.6rem;
    display: flex;
    align-items: baseline;
    gap: 1rem;
    font-style: normal;
}

.note__label {
    font-family: var(--font-accent);
    font-weight: 300;
    font-size: 0.72rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--sepia);
    min-width: 80px;
}

.note__link {
    color: var(--ink);
    text-decoration: none;
    border-bottom: 1px solid var(--mint);
    padding-bottom: 1px;
    font-family: var(--font-display);
    font-weight: 600;
    font-style: italic;
    transition:
        color 300ms ease,
        text-shadow 300ms ease,
        border-color 300ms ease;
}

.note__link:hover {
    color: var(--ink);
    border-color: var(--peach);
    text-shadow: 0 0 12px rgba(255, 218, 185, 0.65);
}

.note__sign {
    margin: 2rem 0 0;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--sepia);
    text-align: right;
}

.colophon {
    margin: 3rem auto 0;
    max-width: 640px;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.75rem;
    font-family: var(--font-accent);
    font-weight: 300;
    font-size: 0.72rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--sepia);
    border-top: 1px solid var(--linen);
    padding-top: 1.5rem;
    justify-content: space-between;
}

/* ============================================================
   GLOW UTILITIES
   ============================================================ */
.glow-mint  { box-shadow: 0 0 12px rgba(168, 230, 207, 0.4); }
.glow-peach { box-shadow: 0 0 12px rgba(255, 218, 185, 0.4); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
    .layout {
        grid-template-columns: 1fr;
    }
    .shelf {
        position: relative;
        height: 50vh;
        min-height: 380px;
        border-right: none;
        border-bottom: 1px solid var(--linen);
    }
    .shelf__name {
        font-size: clamp(2.5rem, 14vw, 5rem);
    }
    .pressed { display: none; }
}

@media (max-width: 768px) {
    .spread__columns {
        column-count: 1;
        column-rule: none;
    }
    .gallery {
        grid-template-columns: 1fr;
    }
    .card--1, .card--2, .card--3, .card--4 {
        grid-column: 1 / -1;
        transform: none;
    }
    .section { padding: 4rem 1.5rem; }
    .motif--corner { display: none; }
}
