@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+TC:wght@300;400;500&family=Source+Serif+4:ital,opsz,wght@0,8..60,300..600;1,8..60,400&display=swap');

:root {
  color-scheme: light;
  --paper: #f4f0e6;
  --surface: #fbf8f1;
  --ink: #1f1c17;
  --muted: #6b6459;
  --accent: #6f9188;
  --rule: #ded7c7;
  --serif: 'Source Serif 4', Georgia, serif;
  --han: 'Noto Serif TC', 'Songti TC', serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .25em; }
img { display: block; max-width: 100%; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 20px; top: 20px; z-index: 10; background: var(--surface); padding: 10px 14px; }

.site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1240px;
  margin: auto;
  padding: 28px 34px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.brand-name { font-family: var(--han); letter-spacing: .14em; font-size: 15px; }
.nav { display: flex; align-items: center; gap: 24px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.nav a { text-decoration: none; }
.language-toggle { border: 0; border-left: 1px solid var(--rule); padding: 3px 0 3px 20px; background: none; color: var(--muted); font: inherit; cursor: pointer; }

.hero { min-height: 100svh; position: relative; overflow: hidden; display: grid; align-items: center; }
.hero-art {
  position: absolute;
  inset: 0 auto 0 0;
  width: min(58vw, 1254px);
  height: 100%;
  object-fit: cover;
  object-position: left center;
  opacity: .9;
}
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 10%, rgba(244,240,230,.1) 40%, var(--paper) 82%); }
.hero-content { position: relative; z-index: 2; width: min(1180px, calc(100% - 68px)); margin: 0 auto; padding-left: min(52vw, 650px); }
.eyebrow, .section-label { color: var(--accent); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }
h1 { margin: 22px 0; font-weight: 400; font-size: clamp(46px, 6vw, 84px); line-height: 1.03; letter-spacing: -.025em; }
h1 .han { font-family: var(--han); letter-spacing: .12em; font-size: .64em; display: block; margin-bottom: 14px; }
.hero-promise { margin: 0 0 12px; max-width: 560px; font-size: clamp(24px, 2.8vw, 38px); line-height: 1.2; }
.lead { max-width: 520px; color: var(--muted); font-size: clamp(18px, 2vw, 23px); line-height: 1.6; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 0 24px; border: 1px solid var(--ink); text-decoration: none; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; }
.button.secondary { border-color: var(--rule); color: var(--muted); }
.availability { display: block; margin-top: 18px; color: var(--muted); font-size: 13px; }

.section { padding: clamp(90px, 12vw, 170px) 34px; }
.section-inner { max-width: 1120px; margin: auto; }
.intro-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(50px, 10vw, 150px); align-items: start; }
.vertical-quote { font-family: var(--han); writing-mode: vertical-rl; text-orientation: upright; font-size: clamp(34px, 5vw, 56px); letter-spacing: .18em; line-height: 1.65; height: 390px; justify-self: center; }
h2 { font-weight: 400; font-size: clamp(34px, 4vw, 54px); line-height: 1.15; margin: 20px 0 28px; }
.copy { color: var(--muted); max-width: 610px; }
.principles { margin-top: 60px; border-top: 1px solid var(--rule); }
.principle { display: grid; grid-template-columns: 70px 1fr; gap: 26px; padding: 28px 0; border-bottom: 1px solid var(--rule); }
.principle-num { color: var(--accent); font-size: 12px; letter-spacing: .12em; }
.principle h3 { margin: 0 0 6px; font-weight: 400; font-size: 22px; }
.principle p { margin: 0; color: var(--muted); }

.oracle { background: #15130f; color: #ede6d6; position: relative; overflow: hidden; }
.oracle .copy { color: #9a9384; }
.oracle .section-label { color: #8fb0a6; }
.oracle-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.hexagram { display: flex; align-items: center; justify-content: center; gap: 42px; min-height: 410px; }
.hexagram-lines { width: 150px; display: flex; flex-direction: column; gap: 17px; }
.line { height: 9px; display: flex; gap: 22px; }
.line::before, .line::after { content: ''; flex: 1; background: #ede6d6; }
.line.yang::after { display: none; }
.hexagram-name { font-family: var(--han); writing-mode: vertical-rl; font-size: 46px; letter-spacing: .15em; }

.closing { text-align: center; }
.closing .section-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.closing .vertical-quote { margin: 0 0 48px; height: 250px; }
.closing .section-label,
.closing h2,
.closing .copy {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
/* letter-spacing 会在末字后留下半个视觉空隙，向右补偿后才与正文光学同轴。 */
.closing .section-label { transform: translateX(.08em); }
.closing .copy { max-width: 680px; }
.site-footer { border-top: 1px solid var(--rule); padding: 40px 34px; color: var(--muted); font-size: 13px; }
.footer-inner { max-width: 1120px; margin: auto; display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }

.document-header { padding: 150px 34px 70px; border-bottom: 1px solid var(--rule); }
.document-header > div, .document { max-width: 820px; margin: auto; }
.document-header h1 { font-size: clamp(40px, 6vw, 68px); }
.updated { color: var(--muted); font-size: 13px; }
.document { padding: 70px 34px 120px; }
.document h2 { margin-top: 64px; font-size: 30px; }
.document h3 { margin-top: 34px; font-weight: 500; }
.document p, .document li { color: var(--muted); }
.document strong { color: var(--ink); }
.contact-card { border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 30px 0; margin: 40px 0; }
.artwork-list { list-style: none; padding: 0; }
.artwork-list li { padding: 22px 0; border-bottom: 1px solid var(--rule); }

[lang='zh-Hant'] .en, [lang='en'] .zh { display: none !important; }

@media (max-width: 760px) {
  .site-header { padding: 20px; }
  .nav > a { display: none; }
  .hero { min-height: 820px; align-items: end; }
  .hero-art { width: 100%; height: 58%; object-position: left bottom; top: auto; }
  .hero::after { background: linear-gradient(180deg, var(--paper) 8%, rgba(244,240,230,.15) 45%, var(--paper) 82%); }
  .hero-content { width: calc(100% - 40px); padding: 130px 0 90px; }
  h1 { font-size: 48px; }
  .intro-grid, .oracle-grid { grid-template-columns: 1fr; gap: 50px; }
  .vertical-quote { height: 300px; font-size: 38px; }
  .section { padding-left: 20px; padding-right: 20px; }
  .principle { grid-template-columns: 44px 1fr; gap: 14px; }
  .hexagram { min-height: 330px; }
  .document-header, .document { padding-left: 20px; padding-right: 20px; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-content { animation: reveal .9s ease-out both; }
  @keyframes reveal { from { opacity: 0; transform: translateY(18px); } }
}
