/* Homepage: real classroom imagery and a quiet editorial rhythm. */
.home { --sans: "Geist", "Noto Sans TC", "PingFang TC", sans-serif; --serif: var(--sans); --mono: var(--sans); }
.home main { width: 100%; max-width: 100%; overflow-x: clip; }
.home .wrap { max-width: 1320px; }
.home .site-header { background: rgba(255,255,255,.97); }
.home .site-index, .home .site-index__list li { transition: none; }
.home .site-index__slug, .home .site-index__no { display: none; }
.home .site-index__list li a { grid-template-columns: 1fr; }
.home .site-footer__links .s { display: none; }
.home .sec-label { letter-spacing: .06em; color: var(--vermilion); font-family: var(--sans); font-size: 13px; }
.home .sec-title { font-weight: 600; line-height: 1.3; letter-spacing: -.025em; }
.home .home-sec { padding-block: clamp(72px, 9vw, 128px); }
.home-hero { position: relative; isolation: isolate; display: grid; align-items: center; min-height: 570px; margin-top: 96px; overflow: hidden; text-align: left; background: #e9e5dd; }
.home-hero__banner { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; animation: homeBannerIn 1.8s var(--ease) backwards; }
.home-hero::before { content: ""; position: absolute; z-index: -1; inset: 0; background: linear-gradient(90deg, rgba(248,246,241,.4), transparent 60%); pointer-events: none; }
.home-hero__copy { width: 100%; padding-block: 72px; }
.home-hero__intro { font-size: 13px; letter-spacing: .12em; color: var(--ink-2); }
.home-hero__title { max-width: 72rem; margin: 24px 0; font-family: var(--sans); font-weight: 600; font-size: clamp(38px, 4.8vw, 68px); line-height: 1.3; letter-spacing: -.045em; }
.home-hero__title > span { display: block; white-space: nowrap; }
.home-hero__text { font-size: 15px; line-height: 1.9; color: var(--ink-2); }
.home-hero__actions { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 14px; margin-top: 29px; }
.classroom-section { margin-top: 64px; }
.home-button { display: inline-flex; align-items: center; justify-content: center; gap: 30px; min-height: 48px; padding: 12px 23px; border: 1px solid var(--ink); background: var(--ink); color: #fff; font-size: 14px; transition: transform 150ms cubic-bezier(.23,1,.32,1), background-color 150ms ease; }
.home-button--outline { color: var(--ink); background: #fff; }
.classroom-gallery { position: relative; text-align: left; }
.classroom-slide > img { width: 100%; height: clamp(280px, 44vw, 590px); object-fit: cover; object-position: 50% 53%; }
.classroom-slide--art > img { object-fit: contain; background: #eef1ed; }
.classroom-slide figcaption { display: flex; justify-content: space-between; gap: 16px; padding-top: 16px; padding-right: 205px; font-size: 12px; color: var(--ink-2); }
.gallery-controls { position: absolute; right: 0; bottom: -7px; display: flex; align-items: center; gap: 8px; }
.gallery-status { font-size: 11px; margin-right: 8px; color: var(--ink-2); }
.gallery-controls button { width: 40px; height: 40px; border: 1px solid var(--hairline); font-size: 18px; transition: transform 150ms cubic-bezier(.23,1,.32,1); }
.home .editor__lead { font-size: clamp(26px,3.2vw,43px); line-height: 1.65; }
.inline-study { display: inline-block; width: 88px; height: 42px; vertical-align: middle; border-radius: 30px; object-fit: cover; margin-inline: 5px; }
.home .editor__text { margin-top: 25px; }
.facet-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); grid-auto-flow: dense; gap: 0; border-top: 1px solid var(--hairline); border-left: 1px solid var(--hairline); }
.facet-panel { border-right: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); padding: 18px 24px; }
.facet-panel summary { display: grid; grid-template-columns: 88px 1fr 20px; align-items: center; gap: 20px; cursor: pointer; list-style: none; font-family: var(--serif); font-weight: 700; font-size: 26px; }
.facet-panel summary::-webkit-details-marker { display: none; }
.facet-panel summary img { width: 88px; height: 100px; object-fit: contain; }
.facet-toggle { font-family: var(--sans); font-weight: 400; color: var(--ink-3); transition: transform 200ms cubic-bezier(.23,1,.32,1); }
.facet-panel[open] .facet-toggle { transform: rotate(45deg); }
.facet-panel__body { padding: 8px 0 16px; font-size: 14px; color: var(--ink-2); line-height: 1.8; }
.facet-panel[open] .facet-panel__body { animation: facetOpen 300ms cubic-bezier(.23,1,.32,1); }
.facet-panel__body a { display: inline-block; margin-top: 16px; color: var(--vermilion); }
.reading-feature { padding-block: clamp(72px,9vw,128px); background: #f1f2ed; }
.reading-feature__grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 9%; align-items: start; }
.reading-feature__intro h2 { font-family: var(--serif); font-weight: 700; font-size: clamp(32px,3.7vw,50px); line-height: 1.45; margin: 20px 0 25px; }
.reading-feature__intro > p:not(.sec-label) { max-width: 24rem; font-size: 15px; line-height: 2; color: var(--ink-2); }
.reading-feature__intro .home-button { margin-top: 30px; }
.image-link { display: block; overflow: hidden; background: white; }
.image-link img { width: 100%; }
.image-caption { display: flex; justify-content: space-between; gap: 16px; font-size: 11px; color: var(--ink-2); margin-top: 14px; }
.reading-course { display: grid; grid-template-columns: 42% 1fr; align-items: center; gap: 26px; border-top: 1px solid var(--hairline); padding-top: 30px; margin-top: 38px; }
.reading-course img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.reading-course small { font-size: 12px; color: var(--ink-2); }
.reading-course strong { display: block; font-family: var(--serif); font-size: 25px; font-weight: 600; margin: 14px 0; }
.reading-course > span > span { font-size: 12px; line-height: 1.8; }
/* 架上讀物: covers stand on a pale plinth. 美感日誌: one lead story beside a pull quote and two short entries. */
.home .shelf { grid-template-columns: minmax(0,1fr); column-gap: clamp(32px,4.5vw,64px); }
.home .shelf > div { border-bottom: 1px solid var(--hairline); }
.home .shelf__item { display: grid; grid-template-columns: 112px minmax(0,1fr); align-items: start; gap: 20px; }
.home .shelf__title { text-wrap: balance; transition: color 200ms ease; }
.shelf__cover { padding: 12% 15% 9%; background: #eef1ed; }
.shelf__cover img { width: 100%; box-shadow: 0 1px 2px rgba(35,32,27,.12), 0 6px 8px -4px rgba(35,32,27,.22); }
.life-spread { display: grid; gap: 40px; }
.life-lead { display: block; }
.life-lead__media, .life-row__media { overflow: hidden; background: #eef1ed; }
.life-lead__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.life-lead__body { margin-top: 22px; }
.life-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font-size: 12px; line-height: 1.6; color: var(--ink-3); }
.life-meta .cat { font-size: 12px; letter-spacing: .06em; }
.life-lead__title { margin-top: 10px; font-size: clamp(22px,2.3vw,30px); font-weight: 600; line-height: 1.5; letter-spacing: -.02em; text-wrap: balance; transition: color 200ms ease; }
.life-side > li + li { border-bottom: 1px solid var(--hairline); }
.life-quote { display: block; padding: clamp(24px,2.6vw,36px); background: #f1f2ed; }
.life-quote .life-meta { color: var(--ink-2); }
.life-quote__title { margin-top: 16px; }
.life-quote__pull { display: block; font-size: clamp(26px,2.8vw,38px); font-weight: 600; line-height: 1.35; letter-spacing: -.02em; text-wrap: balance; transition: color 200ms ease; }
.life-quote__mark { color: var(--vermilion); }
.life-quote__rest { display: block; margin-top: 14px; font-size: 14px; font-weight: 400; line-height: 1.8; color: var(--ink-2); }
.life-row { display: grid; grid-template-columns: 88px minmax(0,1fr); align-items: start; gap: 18px; padding-block: 22px; }
.life-row__media img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.life-row__title { margin-top: 6px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; font-size: 16px; font-weight: 600; line-height: 1.6; transition: color 200ms ease; }
/* CJK may break between any two characters, so balanced headings split words (國｜家); break only at punctuation, spaces and <wbr>. */
.home .shelf__title, .life-lead__title, .life-row__title, .life-quote__title { word-break: keep-all; overflow-wrap: anywhere; }
.nowrap { white-space: nowrap; }
@media (min-width: 768px) {
 .home .shelf__item { grid-template-columns: 168px minmax(0,1fr); gap: 32px; }
 .life-row { grid-template-columns: 112px minmax(0,1fr); gap: 24px; }
 .life-row__title { font-size: 17px; }
}
@media (min-width: 1024px) {
 .home .shelf { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .home .shelf__item { grid-template-columns: clamp(160px,14vw,200px) minmax(0,1fr); }
 .life-spread { grid-template-columns: minmax(0,7fr) minmax(0,5fr); align-items: start; gap: clamp(40px,4.5vw,64px); }
 .life-row { grid-template-columns: clamp(96px,9vw,128px) minmax(0,1fr); }
}
.home .site-footer__tagline { font-size: clamp(24px,4vw,52px); }
.home .row-news .title { font-size: 17px; line-height: 1.8; }
.home .idx-row:hover { padding-left: 0; }
/* Motion: the banner settles, the title letters rise once main.js has split them, and images wipe up from below.
   The wipe waits with opacity, not clip-path: a fully clipped element never intersects, so it would never be revealed. */
.js .home-hero__title:not(.lt-on) { opacity: 0; }
.js .rv--clip { transform: none; filter: none; transition: none; }
.js .rv--clip.is-in { animation: clipReveal 1.2s var(--ease) var(--rv-delay, 0ms) backwards; }
@keyframes clipReveal { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0); } }
@keyframes homeBannerIn { from { transform: scale(1.05); } }
@keyframes facetOpen { from { opacity: 0; transform: translateY(-6px); } }
@media (hover:hover) and (pointer:fine) {
 .home-button:hover { background: var(--vermilion); border-color: var(--vermilion); color: white; }
 .image-link img { transition: transform 240ms cubic-bezier(.23,1,.32,1); }
 .image-link:hover img { transform: scale(1.025); }
 .facet-panel summary img, .home-button span { transition: transform 240ms cubic-bezier(.23,1,.32,1); }
 .facet-panel summary:hover img { transform: translateY(-3px) rotate(-3deg); }
 .home-button:hover span { transform: translate(2px,-2px); }
 .life-lead__media img, .life-row__media img { transition: transform 400ms cubic-bezier(.23,1,.32,1); }
 .life-lead:hover .life-lead__media img, .life-row:hover .life-row__media img { transform: scale(1.03); }
 .life-lead:hover .life-lead__title, .life-row:hover .life-row__title, .life-quote:hover .life-quote__pull { color: var(--vermilion); }
 .shelf__cover img { transition: transform 300ms cubic-bezier(.23,1,.32,1), box-shadow 300ms cubic-bezier(.23,1,.32,1); }
 .shelf__item:hover .shelf__cover img { transform: translateY(-6px); box-shadow: 0 2px 3px rgba(35,32,27,.1), 0 8px 8px -2px rgba(35,32,27,.2); }
 .facet-panel summary:hover, .gallery-controls button:hover { color: var(--vermilion); }
 .home-button:active, .gallery-controls button:active, .home .grid-btn:active { transform: scale(.97); }
}
.home a:focus-visible, .home button:focus-visible, .home summary:focus-visible { outline: 2px solid var(--vermilion); outline-offset: 5px; transition: none; }
@media (max-width: 1000px) {
 .facet-panel { padding-inline: 16px; }
 .facet-panel summary { grid-template-columns: 60px 1fr 16px; gap: 12px; font-size: 22px; }
 .facet-panel summary img { width: 60px; }
 .reading-feature__grid { gap: 40px; }
 .classroom-slide figcaption { flex-direction: column; gap: 6px; }
 .gallery-controls { bottom: 0; }
}
@media (max-width: 767px) {
 .home-hero { display: flex; flex-direction: column; min-height: 0; margin-top: 96px; background: #f4f2ed; }
 .home-hero::before { display: none; }
 .home-hero__banner { position: static; z-index: auto; height: clamp(220px,56vw,360px); object-position: 82% center; transform-origin: 50% 100%; }
 .home-hero__copy { padding-block: 34px 40px; }
 .home-hero__intro { font-size: 11px; letter-spacing: .04em; }
 .home-hero__title { margin-block: 18px; font-size: clamp(34px,8.6vw,60px); }
 .home-hero__text { font-size: 13px; }
 .home-hero__actions { gap: 10px; margin-top: 24px; }
 .classroom-section { margin-top: 40px; }
 .home-button { padding-inline: 16px; gap: 14px; font-size: 13px; }
 .classroom-slide > img { height: 350px; object-position: 48% center; }
 .classroom-slide figcaption { padding-right: 0; font-size: 11px; }
 .gallery-controls { position: static; justify-content: flex-end; margin-top: 14px; }
 .facet-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .facet-panel { padding: 12px; }
 .facet-panel summary { grid-template-columns: 1fr 20px; gap: 8px; font-size: 22px; }
 .facet-panel summary img { width: 100%; height: 105px; grid-column: 1 / -1; }
 .reading-feature__grid { grid-template-columns: 1fr; gap: 40px; }
 .reading-feature__intro h2 { font-size: 38px; }
 .reading-course { gap: 20px; }
 .reading-course strong { font-size: 20px; }
 .image-caption { flex-direction: column; gap: 6px; }
 .home .row-news { grid-template-columns: 1fr; gap: 6px; }
}
@media (prefers-reduced-motion:reduce) {
 .home *, .home *::before, .home *::after { animation: none !important; transition: none !important; }
 .home-button:active, .gallery-controls button:active, .image-link:hover img, .facet-panel summary:hover img, .home-button:hover span,
 .life-lead:hover .life-lead__media img, .life-row:hover .life-row__media img, .shelf__item:hover .shelf__cover img { transform: none; }
}
