/* 學院入口首頁:深紫夕光與金色光芒(與片頭動畫一致)。主視覺永遠是深色;下方淺色模式為溫暖的米白,深色模式為紫黑 */
:root {
  --night1: #120a20; --night2: #24123f; --night3: #3d2369; --violet: #5b3a8f;
  --gold: #d9b45f; --gold-2: #f3dfa2; --gold-ink: #7a560f;
  --page: #faf7f0; --surface: #ffffff; --text: #221a2e; --muted: #4f475c; --line: #ebe3d3;
  --brand: #4b2f7e; --brand-soft: #f4effa; --leaf: #5f8a1c; --leaf-soft: #eef4de;
  --shadow: 0 1px 2px rgba(60, 40, 10, .05), 0 10px 30px rgba(60, 40, 10, .07);
  --serif: "Noto Serif TC", "Songti TC", "STSong", "Source Han Serif TC", "PMingLiU", "MingLiU", serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --page: #141019; --surface: #1d1726; --text: #efe9f6; --muted: #c4bcd2; --line: #2f2740;
    --brand: #c7b0f0; --brand-soft: #2a2140; --leaf: #a9d164; --leaf-soft: #263318; --gold-ink: #e3c27a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 10px 30px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--text); font: 18px/1.75 "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, -apple-system, sans-serif; }
a { color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

/* 頂端列:浮在主視覺上 */
.top { position: absolute; top: 0; left: 0; right: 0; z-index: 5; color: #fff; padding-top: env(safe-area-inset-top); }
.top-in { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif); font-weight: 700; font-size: 20px; letter-spacing: .06em; }
.brand img { width: 34px; height: 34px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 2px rgba(217, 180, 95, .55); }
.lang { font: inherit; font-size: 16px; color: var(--gold-2); background: rgba(255, 255, 255, .05); border: 1px solid rgba(217, 180, 95, .55); border-radius: 999px; padding: 4px 14px; cursor: pointer; }
.lang:hover { background: rgba(217, 180, 95, .15); }
.top-act { display: flex; align-items: center; gap: 8px; }
.share { display: inline-flex; align-items: center; gap: 6px; }
.share svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* 主視覺 */
.hero {
  position: relative; overflow: hidden; color: #fff; text-align: center;
  min-height: min(92vh, 820px); display: flex; align-items: center; padding: 84px 0 72px;
  background:
    radial-gradient(ellipse 60% 45% at 50% 0%, rgba(243, 223, 162, .28), transparent 70%),
    radial-gradient(ellipse 80% 60% at 50% 110%, rgba(91, 58, 143, .55), transparent 70%),
    linear-gradient(180deg, var(--night2) 0%, var(--night1) 55%, #0c0716 100%);
}
.dust { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.beam {
  position: absolute; top: -10%; left: 50%; width: 46vw; max-width: 620px; height: 120%; transform: translateX(-50%) ;
  background: linear-gradient(180deg, rgba(255, 236, 190, .30) 0%, rgba(255, 228, 170, .10) 45%, transparent 85%);
  clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%); filter: blur(18px); mix-blend-mode: screen; pointer-events: none;
  animation: breathe 9s ease-in-out infinite;
}
.beam.b2 { width: 22vw; max-width: 300px; background: linear-gradient(180deg, rgba(255, 245, 215, .35), transparent 70%); filter: blur(10px); animation-delay: -4s; }
@keyframes breathe { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }
.hero-in { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; }
.seal { position: relative; width: 104px; height: 104px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 18px; }
.seal::before { content: ""; position: absolute; inset: -38px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 230, 170, .45), rgba(255, 210, 130, .12) 45%, transparent 70%); animation: breathe 6s ease-in-out infinite; }
.seal img { position: relative; width: 96px; height: 96px; border-radius: 50%; background: #fff; padding: 6px; box-shadow: 0 0 0 2px var(--gold), 0 0 0 7px rgba(217, 180, 95, .18), 0 10px 40px rgba(0, 0, 0, .45); }
.eyebrow { margin: 0 0 6px; font-size: 14px; font-weight: 600; letter-spacing: .32em; text-transform: uppercase; color: var(--gold-2); opacity: .9; }
.hero h1 { margin: 0; font-family: var(--serif); font-weight: 700; font-size: clamp(38px, 8vw, 68px); line-height: 1.2; letter-spacing: .14em; text-shadow: 0 2px 30px rgba(255, 220, 150, .25); }
.rule { display: flex; align-items: center; gap: 14px; margin: 18px 0 14px; color: var(--gold); width: min(360px, 80%); }
.rule span { flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.rule i { font-style: normal; font-size: 18px; text-shadow: 0 0 12px rgba(243, 223, 162, .8); }
.rule.small { width: 220px; margin: 0 auto 14px; }
.motto { margin: 0 0 18px; }
.motto p { margin: 0; font-family: var(--serif); font-size: clamp(26px, 4.6vw, 40px); font-weight: 600; letter-spacing: .12em; color: var(--gold-2); text-shadow: 0 0 24px rgba(243, 223, 162, .35); }
.motto cite { display: block; margin-top: 6px; font-style: normal; font-size: 16px; letter-spacing: .2em; color: rgba(243, 223, 162, .92); }
.vision { white-space: pre-line; margin: 0 auto; max-width: 40em; font-size: clamp(17px, 2.5vw, 20px); color: rgba(255, 255, 255, .95); line-height: 1.9; }
.jump { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }
.jump a { text-decoration: none; font-size: 17px; font-weight: 600; letter-spacing: .08em; padding: 8px 20px; border-radius: 999px; color: var(--gold-2); border: 1px solid rgba(217, 180, 95, .6); background: rgba(18, 10, 32, .35); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); transition: background .2s, color .2s; }
.jump a:hover { background: var(--gold); color: #2a1a05; }
.cue { position: absolute; z-index: 2; bottom: 18px; left: 50%; transform: translateX(-50%); width: 40px; height: 40px; display: grid; place-items: center; color: var(--gold-2); opacity: .75; animation: float 2.6s ease-in-out infinite; }
.cue svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@keyframes float { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 6px); } }

/* 今日經文 */
.daily { position: relative; z-index: 3; margin-top: -44px; }
.verse-card {
  margin: 0 auto; max-width: 820px; text-align: center; padding: 30px 28px 22px; border-radius: 20px;
  background: var(--surface); box-shadow: var(--shadow), 0 0 0 1px var(--line);
  background-image: radial-gradient(ellipse at top, rgba(217, 180, 95, .12), transparent 60%);
}
.verse-card figcaption { display: flex; justify-content: center; gap: 12px; align-items: baseline; color: var(--gold-ink); font-size: 15px; font-weight: 600; letter-spacing: .24em; }
.verse-card figcaption time { letter-spacing: .08em; }
.verse-card blockquote { margin: 12px 0 8px; }
.verse-card blockquote p { margin: 0; font-family: var(--serif); font-size: clamp(22px, 3.4vw, 29px); line-height: 1.8; letter-spacing: .04em; }
.verse-ref { margin: 0; font-family: var(--serif); font-size: 19px; font-weight: 600; color: var(--gold-ink); letter-spacing: .12em; }
.verse-note { margin: 10px 0 0; font-size: 14px; color: var(--muted); }

/* 分區與卡片 */
.sections { padding-bottom: 20px; }
.sec { padding-top: 54px; scroll-margin-top: 16px; }
.sec-head { display: flex; align-items: center; gap: 14px; margin-bottom: 4px; }
.sec-head .orn { width: 38px; height: 38px; flex: none; color: var(--gold-ink); fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.sec h2 { margin: 0; font-family: var(--serif); font-size: 31px; letter-spacing: .14em; }
.sec-head::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold), transparent); opacity: .6; }
.sub { margin: 0 0 18px 52px; color: var(--muted); font-size: 17px; }
.grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(3, 1fr); } .grid.g4 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1180px) { .grid.g4 { grid-template-columns: repeat(4, 1fr); } }

.card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s, border-color .2s; overflow: hidden;
}
.card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: 0; transition: opacity .2s; }
.card:hover { transform: translateY(-3px); border-color: rgba(217, 180, 95, .7); box-shadow: var(--shadow), 0 14px 34px rgba(91, 58, 143, .12); }
.card:hover::before { opacity: 1; }
.main { display: flex; align-items: flex-start; gap: 14px; padding: 18px; text-decoration: none; flex: 1; border-radius: 16px; }
.ic {
  flex: none; width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; color: var(--gold-ink);
  background: radial-gradient(circle at 35% 30%, rgba(243, 223, 162, .35), rgba(217, 180, 95, .10)); box-shadow: inset 0 0 0 1px rgba(217, 180, 95, .55);
  font-family: "Times New Roman", var(--serif); font-size: 23px; font-weight: 600;
}
.ic svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.name { font-family: var(--serif); font-weight: 700; font-size: 21px; letter-spacing: .04em; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tag { font-family: "Noto Sans TC", "PingFang TC", sans-serif; font-size: 13px; font-weight: 700; letter-spacing: 0; color: var(--brand); background: var(--brand-soft); border-radius: 999px; padding: 1px 8px; }
.desc { color: var(--muted); font-size: 16px; margin-top: 2px; }
.host { color: var(--gold-ink); font-size: 14px; margin-top: 6px; overflow-wrap: break-word; word-break: normal; letter-spacing: .02em; }
.arrow { flex: none; color: var(--gold-ink); font-size: 28px; line-height: 1; align-self: center; transition: transform .2s; }
.card:hover .arrow { transform: translateX(3px); }
.extra { display: flex; align-items: center; gap: 8px; margin: 0 18px 16px 80px; padding: 7px 12px; border-radius: 10px; background: var(--brand-soft); color: var(--brand); text-decoration: none; font-size: 14px; font-weight: 600; }
.extra svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.extra:hover { filter: brightness(.96); }

/* 頁尾 */
.foot { margin-top: 64px; padding: 40px 0 80px; text-align: center; color: rgba(255, 255, 255, .88); font-size: 16px; background: linear-gradient(180deg, var(--night2), var(--night1)); }
.foot p { margin: 0 0 4px; }
.foot strong { color: #fff; font-family: var(--serif); letter-spacing: .12em; font-size: 19px; }
/* 頁尾 QR code:電腦螢幕或投影給別人用手機掃;手機上改成分享按鈕 */
.foot-qr { display: inline-flex; align-items: center; gap: 18px; margin-top: 22px; padding: 12px 18px 12px 12px; border: 1px solid rgba(217, 180, 95, .35); border-radius: 16px; text-align: left; }
.foot-qr img { width: 120px; height: 120px; border-radius: 10px; background: #fff; }
.foot-qr p { margin: 0; }
.foot-qr-t { color: var(--gold-2); font-size: 17px; letter-spacing: .06em; }
.foot-qr-u { color: rgba(255, 255, 255, .7); font-size: 14px; margin: 2px 0 8px !important; }
.foot-qr-b, .foot-share { font: inherit; font-size: 14px; color: var(--gold-2); background: none; border: 1px solid rgba(217, 180, 95, .55); border-radius: 999px; padding: 4px 14px; cursor: pointer; }
.foot-qr-b:hover, .foot-share:hover { background: rgba(217, 180, 95, .15); }
.foot-share { display: none; margin-top: 18px; font-size: 16px; padding: 8px 20px; }
@media (max-width: 640px), (pointer: coarse) and (max-width: 1024px) {
  .foot-qr { display: none; }
  .foot-share { display: inline-block; }
}
.share-dlg { border: none; border-radius: 22px; padding: 0; max-width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px); background: var(--night1, #1c1030); color: #fff; box-shadow: 0 30px 80px rgba(0, 0, 0, .55); }
.share-dlg::backdrop { background: rgba(10, 5, 20, .72); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.share-in { padding: 22px; text-align: center; }
.share-in h2 { margin: 0 0 14px; font-family: var(--serif); color: var(--gold-2); font-size: 22px; letter-spacing: .12em; font-weight: 600; }
.share-in img { width: 100%; height: auto; max-height: 62vh; object-fit: contain; border-radius: 14px; }
.share-u { margin: 10px 0 14px; color: rgba(255, 255, 255, .8); font-size: 15px; }
.share-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.sbtn { font: inherit; font-size: 15px; text-decoration: none; color: #2a1a05; background: var(--gold); border: 1px solid var(--gold); border-radius: 999px; padding: 7px 16px; cursor: pointer; }
.sbtn:hover { background: var(--gold-2); }
.sbtn.ghost { color: var(--gold-2); background: none; }
.foot-motto { font-family: var(--serif); color: var(--gold-2); font-size: 21px; letter-spacing: .1em; margin-bottom: 12px !important; }

@media (max-width: 640px) {
  .hero { min-height: auto; padding: 88px 0 80px; }
  .hero h1 { letter-spacing: .08em; }
  .eyebrow { letter-spacing: .12em; font-size: 12px; }
  .motto p { letter-spacing: .06em; font-size: min(25px, 6.4vw); }
  .jump a { font-size: 16px; padding: 8px 14px; letter-spacing: .04em; }
  .beam { width: 90vw; }
  .verse-card { padding: 24px 18px 18px; }
  .sub { margin-left: 0; }
  .extra { margin-left: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .beam, .seal::before, .cue { animation: none; }
  html { scroll-behavior: auto; }
}
@media (max-width: 420px) { .share span { display: none; } .share { padding: 6px 10px; } }
