/* A four-glyph, self-hosted title subset; license in assets/fonts/. */
@font-face {
 font-family: "Sideinn Title";
 src: url("./assets/fonts/ma-shan-zheng-title.ttf") format("truetype");
 font-style: normal;
 font-weight: 400;
 font-display: swap;
}

/* Homepage only: carry the illustration's warm paper and forest ink into the library. */
body {
 --canvas: #faf6ec;
 --paper: #fffdf8;
 --line: #e1dfd2;
 --surface-soft: #f0f2e9;
 --surface-green: #e7eee2;
 background: var(--canvas);
}
.site-header {
 height: 76px;
 background: var(--canvas);
 border-bottom-color: #dedccf;
 padding-inline: max(32px, calc((100% - 1192px) / 2));
}
.brand { font-size: 18px; }
.brand-logo { display: block; width: 62px; height: 62px; object-fit: contain; flex: 0 0 auto; }
.brand small { letter-spacing: 2px; }
.homepage-main { max-width: none; padding: 0; }

/* Keep live text in the sky. The picture is scenery, not a flattened UI. */
.intro {
 position: relative;
 display: block;
 isolation: isolate;
 overflow: hidden;
 height: clamp(580px, 51vw, 740px);
 padding: 0;
 border: 0;
 background: #faf5e7;
}
.hero-art { position: absolute; inset: 0; display: block; z-index: -2; }
.hero-art img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.intro::before {
 content: "";
 position: absolute;
 inset: 0;
 z-index: -1;
 pointer-events: none;
 background: linear-gradient(90deg, #faf6ecb8 0%, #faf6ec60 24%, transparent 48%);
}
.intro::after {
 content: "";
 position: absolute;
 inset: auto 0 0;
 height: 110px;
 z-index: 1;
 pointer-events: none;
 background: linear-gradient(transparent, #faf6ec70 58%, var(--canvas));
}
.intro-copy {
 position: relative;
 z-index: 2;
 width: 450px;
 margin-left: max(40px, calc((100% - 1192px) / 2));
 padding-top: clamp(70px, 7vw, 104px);
}
.intro .eyebrow { display: flex; align-items: center; gap: 12px; color: #5b6b57; font-size: 11px; letter-spacing: 2.7px; margin: 0 0 22px; }
.intro .eyebrow::before { content: ""; width: 25px; height: 1px; background: #af813a; }
.intro h1 {
 font-family: "Sideinn Title", "Kaiti SC", "STKaiti", serif;
 font-size: clamp(66px, 6.4vw, 88px);
 font-weight: 400;
 font-synthesis: none;
 letter-spacing: .045em;
 line-height: 1.15;
 margin: 0 0 23px;
 color: #284536;
}
.intro-line { font-size: 23px; line-height: 1.7; letter-spacing: .04em; margin: 0 0 18px; color: #345744; }
.intro-description { font-size: 14px; line-height: 1.95; color: #53614f; margin: 0; }
.entry-actions { display: flex; align-items: center; gap: 20px; margin-top: 28px; }
.entry-button {
 display: inline-flex;
 align-items: center;
 justify-content: space-between;
 gap: 36px;
 min-height: 48px;
 padding: 13px 22px;
 color: #fff7e4;
 background: #274f3d;
 border: 1px solid #274f3d;
 border-radius: 4px;
 text-decoration: none;
 font-size: 14px;
 letter-spacing: 1px;
 box-shadow: 0 3px 0 #183e2b18;
 transition: background .18s;
}
.entry-button:hover { background: #183e2b; }
.entry-note { color: #586751; font-size: 11px; letter-spacing: 1px; }

/* The illustration gives way to a quiet, usable reading area. */
.library { max-width: 1256px; margin: 0 auto; padding: 44px 32px 76px; gap: 36px; }
.shelf { border-right-color: #dedfce; }
.collection-heading h2 { font-family: "Songti SC", "STSong", serif; font-size: 26px; }
.note-card { border-color: #dce0d1; border-radius: 5px; box-shadow: 0 3px 14px #263c3504; }
.library-search { background: #fffdf8; border-color: #ccd4bf; }
.site-footer { margin-inline: max(32px, calc((100% - 1192px) / 2)); border-color: #dddfcf; }

@media (min-width: 761px) and (max-width: 1050px) {
 .intro { height: 600px; }
 .hero-art img { object-position: 55% top; }
 .intro-copy { width: 375px; margin-left: 32px; padding-top: 76px; }
 .intro h1 { font-size: 68px; }
 .intro-line { font-size: 21px; }
 .intro-description { font-size: 13px; }
 .intro::before { background: linear-gradient(90deg, #faf6eceb 0%, #faf6ecad 27%, transparent 57%); }
 .entry-actions { gap: 12px; }
 .entry-note { font-size: 10px; }
}

/* On phones, separate text and scenery; crop toward the doorway, not the empty sky. */
@media (max-width: 760px) {
 .site-header { height: 70px; padding-inline: 23px; }
 .brand { font-size: 16px; gap: 10px; }
 .brand-logo { width: 52px; height: 52px; }
 .brand small { font-size: 9px; }
 .header-link { font-size: 12px; }
 .intro { display: flex; flex-direction: column; height: auto; padding: 32px 0 0; background: var(--canvas); }
 .intro::before { display: none; }
 .intro::after { height: 75px; }
 .intro-copy { order: 0; width: auto; margin: 0; padding: 0 24px; }
 .intro .eyebrow { font-size: 10px; margin-bottom: 17px; letter-spacing: 2px; }
 .intro h1 { font-size: clamp(54px, 15vw, 66px); margin-bottom: 19px; letter-spacing: .035em; }
 .intro-line { font-size: 19px; line-height: 1.65; margin-bottom: 13px; }
 .intro-description { max-width: 380px; font-size: 13px; }
 .desktop-break { display: none; }
 .entry-actions { gap: 18px; margin-top: 21px; }
 .entry-button { min-height: 46px; padding: 12px 19px; gap: 30px; font-size: 13px; }
 .entry-note { font-size: 10px; }
 .hero-art { position: relative; inset: auto; order: 1; z-index: 0; height: clamp(330px, 76vw, 420px); width: 100%; margin-top: 22px; }
 .hero-art::before { content: ""; position: absolute; inset: 0 0 auto; height: 55px; background: linear-gradient(var(--canvas), transparent); z-index: 1; pointer-events: none; }
 .hero-art img { object-position: 74% center; }
 .library { display: block; padding: 28px 23px 50px; }
 .collection-heading h2 { font-size: 24px; }
 .site-footer { margin-inline: 23px; }
}
@media (max-width: 360px) {
 .intro h1 { font-size: 50px; }
 .entry-actions { gap: 12px; }
 .entry-note { letter-spacing: 0; }
}
@media (prefers-reduced-motion: reduce) { .entry-button { transition: none; } }
