/* releasing/0.1 web tokens + shared components. Both directions import this. */
@font-face { font-family: "Chiron Sung HK"; src: url("/fonts/ChironSungHK-subset.woff2") format("woff2"); font-weight: 200 900; font-display: swap; }
@font-face { font-family: "LXGW WenKai TC"; src: url("/fonts/LXGWWenKaiTC-subset.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Noto Sans TC"; src: url("/fonts/NotoSansTC-subset.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/Newsreader-roman-latin.woff2") format("woff2"); font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/Newsreader-italic-latin.woff2") format("woff2"); font-style: italic; font-display: swap; }

:root {
  --paper: #F7F2E8; --ink: #24302A; --ink-2: rgba(36, 48, 42, .74); --ink-3: rgba(36, 48, 42, .71);
  --moss: #4E6B45; --moss-wc: #5E7A55; --sage: #DCE3D0; --warm: #E9DDC6;
  --rule: rgba(36, 48, 42, .16);
  --ming: "Chiron Sung HK", "Noto Serif TC", serif;
  --kai: "LXGW WenKai TC", "Chiron Sung HK", serif;
  --sans: "Noto Sans TC", system-ui, sans-serif;
  --latin: "Newsreader", Georgia, serif;
  --measure: 34em;
  --shadow-soft: 0 1px 2px rgba(36, 48, 42, .05), 0 8px 24px -10px rgba(36, 48, 42, .14), 0 28px 60px -30px rgba(36, 48, 42, .18);
  --glass-bg: rgba(255, 255, 255, .6);
  --ease: cubic-bezier(.22, .7, .2, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink); background-color: var(--paper);
  font-family: var(--ming); font-weight: 400; font-size: 18px; line-height: 1.95; letter-spacing: .02em;
  font-feature-settings: "palt" 0; text-rendering: optimizeLegibility;
}
body { position: relative; min-height: 100vh; }
body::after { content: ""; position: absolute; inset: 0; background: url("/img/grain-light.png"); background-size: 512px; mix-blend-mode: multiply; pointer-events: none; z-index: 100; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3 { font-weight: 700; line-height: 1.35; letter-spacing: .03em; word-break: keep-all; overflow-wrap: anywhere; margin: 0; }
p { margin: 0 0 1.15em; }
.sans { font-family: var(--sans); font-weight: 500; letter-spacing: .04em; }
.latin { font-family: var(--latin); }
em, .en { font-family: var(--latin); font-style: italic; letter-spacing: 0; }

/* the only ornament: hairline + small italic numeral */
.num { display: inline-block; font-family: var(--latin); font-style: italic; color: var(--moss); font-size: 17px; line-height: 1; letter-spacing: .02em; }
.num::after { content: ""; display: block; width: 56px; height: 1px; background: var(--moss); margin-top: 10px; opacity: .9; }

/* frosted glass (text over imagery only) */
.glass { background: var(--glass-bg); -webkit-backdrop-filter: blur(15px); backdrop-filter: blur(15px); border: 1px solid rgba(255, 255, 255, .85); box-shadow: var(--shadow-soft); border-radius: 18px; }

/* buttons, tags */
.btn { display: inline-flex; align-items: center; gap: .6em; font-family: var(--sans); font-weight: 500; font-size: 16px; letter-spacing: .06em; background: var(--moss); color: #F7F2E8; padding: 13px 26px; border-radius: 999px; transition: transform .5s var(--ease), box-shadow .5s var(--ease); box-shadow: 0 6px 18px -8px rgba(78, 107, 69, .7); }
.btn:hover { transform: translateY(-1px); }
.link { font-family: var(--sans); font-weight: 500; font-size: 16px; letter-spacing: .05em; border-bottom: 1px solid currentColor; padding-bottom: 2px; }
.tag { font-family: var(--sans); font-weight: 500; font-size: 13px; letter-spacing: .08em; color: var(--ink-2); }
.tag.type { color: var(--moss); }
.dot { margin: 0 .55em; color: var(--ink-3); }
.vig { }
.ln { display: block; white-space: nowrap; }

/* header / footer */
.site-head { display: flex; align-items: center; justify-content: space-between; padding: 26px 56px; position: relative; z-index: 3; }
.wordmark { font-family: var(--ming); font-weight: 700; font-size: 22px; letter-spacing: .12em; }
.nav { display: flex; gap: 34px; font-family: var(--sans); font-weight: 500; font-size: 15px; letter-spacing: .08em; }
.nav a[aria-current], .nav .dd-btn[aria-current] { color: var(--moss); }
.nav-dd { position: relative; }
.dd-btn { font: inherit; letter-spacing: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.dd-btn i { width: 6px; height: 6px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .4s var(--ease); }
.dd-menu { position: absolute; right: -14px; top: calc(100% + 12px); min-width: 180px; padding: 8px; display: flex; flex-direction: column; background: rgba(252, 250, 244, .92); -webkit-backdrop-filter: blur(15px); backdrop-filter: blur(15px); border: 1px solid rgba(255, 255, 255, .85); border-radius: 12px; box-shadow: var(--shadow-soft);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .4s var(--ease), transform .5s var(--ease), visibility 0s linear .4s; z-index: 50; }
.dd-menu::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.dd-menu a { padding: 9px 14px; border-radius: 8px; white-space: nowrap; }
.dd-menu a:hover, .dd-menu a:focus-visible { background: rgba(220, 227, 208, .55); color: var(--moss); }
@media (hover: hover) { .nav-dd:hover .dd-menu { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; } .nav-dd:hover .dd-btn i { transform: translateY(1px) rotate(225deg); } }
.nav-dd:focus-within .dd-menu, .nav-dd.open .dd-menu { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.nav-dd.open .dd-btn i { transform: translateY(1px) rotate(225deg); }
.site-foot { margin-top: 120px; padding: 40px 56px 56px; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; font-family: var(--sans); font-size: 13px; color: var(--ink-3); letter-spacing: .05em; }

/* article blocks shared */
.prose { max-width: var(--measure); }
.prose h2 { font-size: 27px; margin: 2.6em 0 1em; }
.prose h2 .num { display: block; margin-bottom: 18px; }
.prose blockquote { margin: 1.6em 0 1.8em; padding: 2px 0 2px 26px; border-left: 1px solid var(--moss); font-family: var(--kai); font-size: 21px; line-height: 1.85; color: var(--ink); }
.prose blockquote p { margin: 0; }
.prose ul { padding-left: 1.2em; margin: 0 0 1.2em; }
.prose li { margin-bottom: .4em; }
.prose li::marker { color: var(--moss); }

.summary .label { font-family: var(--sans); font-weight: 500; font-size: 13px; letter-spacing: .14em; color: var(--moss); margin-bottom: 10px; display: block; }
.summary p { font-size: 20px; line-height: 1.85; font-weight: 500; margin: 0 0 .5em; }
.summary p:last-child { margin-bottom: 0; }

.src-quote { font-family: var(--latin); font-style: italic; font-size: 17px; line-height: 1.6; letter-spacing: 0; color: var(--ink); margin: 0 0 6px; }
.src-ref { display: block; line-height: 1.5; font-family: var(--sans); font-size: 12.5px; letter-spacing: .05em; color: var(--ink-3); }

.video { position: relative; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-soft); aspect-ratio: 16 / 9; background: #cfc8b8; }
.video img { width: 100%; height: 100%; object-fit: cover; }
.video .play { position: absolute; left: 22px; bottom: 20px; display: flex; align-items: center; gap: 12px; padding: 10px 18px 10px 12px; font-family: var(--sans); font-weight: 500; font-size: 14px; letter-spacing: .06em; }
.video .play i { width: 30px; height: 30px; border-radius: 50%; background: var(--moss); display: grid; place-items: center; }
.video .play i::before { content: ""; border-left: 10px solid #F7F2E8; border-top: 6px solid transparent; border-bottom: 6px solid transparent; margin-left: 3px; }
.chapters { list-style: none; padding: 0; margin: 14px 0 0; font-family: var(--sans); font-size: 14px; letter-spacing: .04em; color: var(--ink-2); columns: 2; column-gap: 28px; }
.chapters li { break-inside: avoid; padding: 4px 0; }
.chapters b { font-family: var(--latin); font-style: italic; font-weight: 400; color: var(--moss); margin-right: 10px; font-size: 15px; letter-spacing: 0; }

details.faq { border-top: 1px solid var(--rule); padding: 18px 0; }
details.faq:last-of-type { border-bottom: 1px solid var(--rule); }
details.faq summary { cursor: pointer; list-style: none; font-weight: 700; font-size: 19px; display: flex; justify-content: space-between; gap: 20px; }
details.faq summary::after { content: "+"; font-family: var(--latin); color: var(--moss); font-size: 22px; line-height: 1.2; }
details.faq[open] summary::after { content: "−"; }
details.faq p { margin: 12px 0 0; color: var(--ink-2); }

.author { display: flex; gap: 22px; align-items: flex-start; }
.author .avatar { width: 64px; height: 64px; border-radius: 50%; overflow: hidden; flex: none; background: var(--sage); }
.author .avatar img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 32%; transform: scale(1.55); transform-origin: 50% 34%; }
.author .avatar { display: block; background: radial-gradient(circle at 50% 40%, #FBF8F1, #EFE7D6); }
.author h3 { font-size: 18px; margin-bottom: 4px; }
.author p { font-size: 15.5px; line-height: 1.8; color: var(--ink-2); margin: 0; }

/* review annotations: NOT part of the design, remove in production */
.anno { font-family: var(--sans); font-size: 12px; font-weight: 500; letter-spacing: .04em; color: #8a5a2b; border: 1px dashed #c99a6a; background: rgba(255, 248, 236, .9); border-radius: 6px; padding: 3px 8px; display: inline-block; }

/* motion: slow bloom, settle (1.2-1.6 s) */
@media (prefers-reduced-motion: no-preference) {
  .bloom { animation: bloom 1.4s var(--ease) both; }
  .bloom.d2 { animation-delay: .12s; } .bloom.d3 { animation-delay: .24s; } .bloom.d4 { animation-delay: .36s; }
  @keyframes bloom { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
}
.static .bloom { animation: none !important; }

@media (max-width: 720px) {
  body { font-size: 17px; line-height: 1.9; }
  .site-head { padding: 18px 22px; flex-wrap: wrap; gap: 6px 18px; }
  .nav { gap: 18px; font-size: 14px; }
  .site-foot { padding: 28px 22px 40px; margin-top: 80px; }
  .prose h2 { font-size: 23px; }
  .prose blockquote { font-size: 19px; padding-left: 18px; }
  .summary p { font-size: 18px; }
  .chapters { columns: 1; }
  .video .play { left: 10px; bottom: 10px; padding: 6px 12px 6px 7px; font-size: 12.5px; gap: 8px; }
  .video .play i { width: 22px; height: 22px; }
  .video .play i::before { border-left-width: 8px; border-top-width: 5px; border-bottom-width: 5px; }
}
