/* ============================================================
   國立政治大學統計學系 60 週年紀念網站  共用樣式 v2
   配色：喜慶紅 × 金 × 系徽藍，米白內文底；統計圖示裝飾
   ============================================================ */

:root {
  --red: #9a1b2f;
  --red-deep: #6b0f1f;
  --red-light: #b8283d;
  --gold: #d9a52d;
  --gold-light: #f0c95a;
  --gold-pale: #fff3cf;
  --navy: #1f3a68;
  --navy-light: #2b4f8a;
  --orange: #e3862b;
  --cream: #fdfbf7;
  --paper: #ffffff;
  --ink: #2a2a33;
  --ink-soft: #5f5f6b;
  --line: rgba(31, 58, 104, .14);
  --shadow: 0 12px 32px rgba(107, 15, 31, .14);
  --shadow-sm: 0 4px 14px rgba(42, 42, 51, .10);
  --serif: "Noto Serif TC", "Songti TC", "PMingLiU", "新細明體", Georgia, serif;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "微軟正黑體", sans-serif;
  --maxw: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  line-height: 1.85;
  font-size: 17px;
  background-color: var(--cream);
  background-image:
    radial-gradient(rgba(31,58,104,.07) 1px, transparent 1.4px);
  background-size: 22px 22px;
}
a { color: var(--navy); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 700; line-height: 1.35; margin: 0 0 .5em; color: var(--ink); }
p { margin: 0 0 1em; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 840px; }

/* ---------- 頂部導覽 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: linear-gradient(90deg, var(--red-deep), var(--red) 60%, var(--red-light));
  border-bottom: 3px solid var(--gold);
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 66px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--serif); font-weight: 700; color: #fff; white-space: nowrap; font-size: 19px; }
.brand:hover { text-decoration: none; }
.brand img { width: 74px; height: auto; }
.brand small { display: block; font-family: var(--sans); font-weight: 500; font-size: 11px; color: var(--gold-light); letter-spacing: .12em; line-height: 1.2; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; }
.nav a { padding: 7px 14px; border-radius: 999px; font-size: 15px; color: #fff; font-weight: 500; }
.nav a:hover, .nav a.active { background: var(--gold); color: var(--red-deep); text-decoration: none; }
.nav-toggle { display: none; background: none; border: 1px solid rgba(255,255,255,.5); border-radius: 6px; padding: 6px 10px; font-size: 18px; cursor: pointer; color: #fff; }
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .brand small { display: none; }
  .brand img { width: 60px; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 66px; background: var(--red-deep); border-bottom: 3px solid var(--gold); padding: 10px 20px 16px; flex-direction: column; }
  .nav.open { display: flex; }
  .nav a { padding: 10px 12px; }
}

/* ---------- 內頁頁首橫幅 ---------- */
.page-hero {
  position: relative; overflow: hidden;
  padding: 58px 0 54px; text-align: center; color: #fff;
  background: radial-gradient(ellipse at 20% 0%, rgba(255,255,255,.14), transparent 45%),
              linear-gradient(135deg, var(--red-deep), var(--red) 55%, #a61f36);
}
.page-hero .kicker { font-family: var(--sans); letter-spacing: .32em; color: var(--gold-light); font-size: 13px; margin-bottom: 8px; font-weight: 500; }
.page-hero h1 { font-size: clamp(28px, 4.5vw, 44px); margin-bottom: 8px; color: #fff; }
.page-hero .sub { color: rgba(255,255,255,.85); font-family: var(--serif); letter-spacing: .1em; }
.page-hero svg.curve-bg { position: absolute; left: 0; right: 0; bottom: -2px; width: 100%; height: 120px; opacity: .6; pointer-events: none; }
.page-hero .mark { position: absolute; right: 4%; top: 50%; transform: translateY(-50%); width: 150px; opacity: .9; }
@media (max-width: 760px) { .page-hero .mark { display: none; } }

/* ---------- 區塊 ---------- */
section.block { padding: 60px 0; }
.section-title { text-align: center; margin-bottom: 36px; }
.section-title h2 { font-size: clamp(24px, 3.4vw, 34px); display: inline-flex; align-items: center; gap: 12px; position: relative; color: var(--red-deep); }
.section-title h2 .ico { width: 34px; height: 34px; flex: none; }
.section-title h2::after { content: ""; position: absolute; left: 50%; bottom: -12px; transform: translateX(-50%); width: 64px; height: 4px; background: linear-gradient(90deg, var(--gold), var(--orange)); border-radius: 2px; }
.section-title .en { font-family: var(--sans); color: var(--navy); letter-spacing: .25em; font-size: 12px; margin-top: 18px; font-weight: 500; }
.band { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-red { background: linear-gradient(135deg, var(--red-deep), var(--red)); color: #fff; }
.band-red .section-title h2 { color: #fff; }
.band-red .section-title .en { color: var(--gold-light); }

/* ---------- 卡片 / 紙張 ---------- */
.paper {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 5px solid var(--red);
  box-shadow: var(--shadow);
  padding: 40px 44px;
  position: relative;
}
.paper::before { display: none; }
@media (max-width: 600px) { .paper { padding: 28px 22px; } }

/* 邀請卡 */
.invite { max-width: 880px; margin: 0 auto; border-top-color: var(--gold); }
.invite .ribbon { position: absolute; top: -5px; right: 28px; width: 46px; height: 74px; background: linear-gradient(180deg, var(--red-light), var(--red)); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%); }
.invite .ribbon span { display: block; color: var(--gold-light); font-family: var(--serif); font-size: 15px; writing-mode: vertical-rl; margin: 8px auto 0; letter-spacing: .1em; }
.invite .invite-head { text-align: center; border-bottom: 1px solid var(--line); padding-bottom: 20px; margin-bottom: 24px; }
.invite .invite-head .cn { font-family: var(--serif); font-size: clamp(20px, 3vw, 27px); font-weight: 700; color: var(--red-deep); }
.invite .invite-head .en { color: var(--navy); font-family: var(--sans); font-size: 13px; letter-spacing: .12em; margin-top: 6px; }
.invite p { text-align: justify; }
.invite .salute { font-family: var(--serif); font-weight: 700; }
.invite .highlight-box { margin: 22px 0; padding: 18px 22px; background: var(--gold-pale); border-left: 4px solid var(--gold); }
.invite .highlight-box h4 { margin: 0 0 6px; color: var(--red-deep); font-size: 17px; }
.invite .highlight-box p { margin: 0 0 4px; }
.invite .highlight-box.hot { background: rgba(154,27,47,.06); border-left-color: var(--red); }
.invite .slogan-line { text-align: center; font-family: var(--serif); font-size: clamp(18px, 2.6vw, 25px); letter-spacing: .12em; color: var(--red); margin: 26px 0; font-weight: 700; }
.invite .sign { text-align: right; font-family: var(--serif); line-height: 2; margin-top: 20px; }
.invite .sign strong { display: block; }
.seal {
  display: inline-block; width: 64px; height: 64px; border: 3px solid var(--red); color: var(--red);
  font-family: var(--serif); font-weight: 700; font-size: 20px; line-height: 1.1; text-align: center;
  padding-top: 9px; transform: rotate(-8deg); opacity: .85; border-radius: 4px; margin-left: 10px; vertical-align: middle;
}

/* ---------- 按鈕 ---------- */
.btn {
  display: inline-block; padding: 12px 30px; border-radius: 999px; font-weight: 700; letter-spacing: .06em;
  background: var(--red); color: #fff; border: 2px solid var(--red); transition: .2s; box-shadow: 0 4px 12px rgba(154,27,47,.25);
}
.btn:hover { background: var(--red-deep); border-color: var(--red-deep); text-decoration: none; transform: translateY(-2px); }
.btn.gold { background: linear-gradient(180deg, var(--gold-light), var(--gold)); border-color: var(--gold); color: var(--red-deep); box-shadow: 0 4px 12px rgba(217,165,45,.35); }
.btn.gold:hover { background: var(--gold); }
.btn.ghost { background: transparent; color: var(--red); box-shadow: none; }
.btn.ghost:hover { background: rgba(154,27,47,.08); }
.btn.ghost.light { color: #fff; border-color: rgba(255,255,255,.7); }
.btn.ghost.light:hover { background: rgba(255,255,255,.12); }
.btn.big { font-size: 19px; padding: 16px 42px; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

/* ---------- 入口卡片 (四大單元) ---------- */
.portal-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.portal {
  display: block; background: var(--paper); border: 1px solid var(--line); border-radius: 10px;
  padding: 28px 24px 24px; box-shadow: var(--shadow-sm); color: var(--ink);
  transition: .25s; position: relative; overflow: hidden;
}
.portal::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 6px; background: linear-gradient(90deg, var(--red), var(--gold)); }
.portal:hover { transform: translateY(-5px); box-shadow: var(--shadow); text-decoration: none; }
.portal .icon { width: 64px; height: 64px; margin-bottom: 14px; }
.portal h3 { font-size: 22px; margin-bottom: 4px; color: var(--red-deep); }
.portal p { color: var(--ink-soft); font-size: 15px; margin: 0 0 22px; line-height: 1.7; }
.portal .go { position: absolute; right: 20px; bottom: 14px; color: var(--red); font-size: 14px; font-weight: 700; }
.portal .tag { position: absolute; top: 18px; right: -34px; transform: rotate(35deg); background: var(--gold); color: var(--red-deep); font-size: 12px; font-weight: 700; padding: 2px 40px; letter-spacing: .1em; }

/* ---------- 老照片 ---------- */
.photo {
  background: #fff; padding: 10px 10px 14px; border: 1px solid #e6dfd2;
  box-shadow: 0 6px 18px rgba(42,42,51,.18); display: block; transition: .25s;
}
.photo:hover { transform: rotate(0) scale(1.04) !important; z-index: 2; box-shadow: var(--shadow); }
.photo img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; filter: sepia(.2) contrast(1.02); }
.photo .cap { font-family: var(--serif); font-size: 14px; color: var(--ink-soft); text-align: center; margin-top: 8px; }
.album { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 28px; }
.album .photo:nth-child(3n+1) { transform: rotate(-1.5deg); }
.album .photo:nth-child(3n+2) { transform: rotate(1deg); }
.album .photo:nth-child(3n+3) { transform: rotate(-.5deg); }

/* 燈箱 */
.lightbox { position: fixed; inset: 0; background: rgba(30,8,12,.93); display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 95vw; max-height: 86vh; box-shadow: 0 0 40px rgba(0,0,0,.6); background: #fff; padding: 8px; }
.lightbox .lb-cap { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: var(--gold-light); font-family: var(--serif); }
.lightbox .lb-close { position: absolute; top: 14px; right: 20px; color: #fff; font-size: 34px; background: none; border: 0; cursor: pointer; }
.lightbox .lb-nav { position: absolute; top: 50%; transform: translateY(-50%); color: #fff; font-size: 40px; background: none; border: 0; cursor: pointer; padding: 10px 16px; opacity: .8; }
.lightbox .lb-prev { left: 8px; } .lightbox .lb-next { right: 8px; }

/* ---------- 文件內文 (說明頁) ---------- */
.doc h2 { font-size: 22px; margin-top: 36px; padding-left: 14px; border-left: 5px solid var(--gold); color: var(--red-deep); }
.doc h2:first-of-type { margin-top: 0; }
.doc ol, .doc ul { padding-left: 1.6em; }
.doc li { margin-bottom: .4em; }
.doc li::marker { color: var(--red); font-weight: 700; }
.doc .note { background: rgba(154,27,47,.06); border: 1px dashed var(--red); padding: 14px 18px; margin: 20px 0; }
.doc .consent { background: var(--gold-pale); border: 1px solid var(--gold); padding: 18px 22px; margin: 20px 0; }
.doc .consent label { display: flex; gap: 10px; align-items: flex-start; font-weight: 700; }
.doc .consent input { margin-top: 8px; transform: scale(1.3); }
.doc .contact { text-align: center; font-family: var(--serif); border-top: 1px solid var(--line); padding-top: 18px; margin-top: 30px; color: var(--ink-soft); }

/* 表格 (時程 / 流程) */
table.tbl { width: 100%; border-collapse: collapse; font-size: 16px; background: var(--paper); box-shadow: var(--shadow-sm); }
table.tbl th, table.tbl td { border: 1px solid var(--line); padding: 11px 14px; vertical-align: top; text-align: left; }
table.tbl th { background: var(--red); color: #fff; font-family: var(--serif); white-space: nowrap; }
table.tbl tr:nth-child(even) td { background: var(--cream); }
table.tbl td.time { white-space: nowrap; font-weight: 700; color: var(--red); }
@media (max-width: 600px) { table.tbl { font-size: 14px; } table.tbl th, table.tbl td { padding: 8px 8px; } }

/* 兩欄徵稿內容 */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
@media (max-width: 720px) { .two-col { grid-template-columns: 1fr; } }
.call-card { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 24px 26px; box-shadow: var(--shadow-sm); border-top: 5px solid var(--gold); }
.call-card h3 { color: var(--red-deep); font-size: 21px; border-bottom: 1px dashed var(--line); padding-bottom: 8px; margin-bottom: 12px; }
.call-card ul { padding-left: 1.2em; margin: 0; }
.call-card .em { font-family: var(--serif); font-size: 18px; letter-spacing: .08em; color: var(--red); font-weight: 700; }

/* 時間軸 */
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before { content: ""; position: absolute; left: 110px; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, var(--gold), var(--red)); opacity: .6; border-radius: 2px; }
.timeline li { display: grid; grid-template-columns: 96px 40px 1fr; gap: 0; align-items: start; margin-bottom: 22px; }
.timeline .t { font-family: var(--serif); font-weight: 700; color: var(--red); text-align: right; padding-top: 2px; font-size: 18px; }
.timeline .dot { width: 16px; height: 16px; border-radius: 50%; background: var(--gold); border: 3px solid #fff; box-shadow: 0 0 0 2px var(--red); margin: 9px auto 0; }
.timeline .c strong { font-family: var(--serif); display: block; font-size: 18px; }
.timeline .c span { color: var(--ink-soft); font-size: 15px; }
@media (max-width: 600px) {
  .timeline::before { left: 20px; }
  .timeline li { grid-template-columns: 40px 1fr; }
  .timeline .t { grid-column: 2; text-align: left; }
  .timeline .dot { grid-row: 1 / span 2; grid-column: 1; }
}

/* 專刊目錄 */
.toc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; }
.toc-item { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; position: relative; box-shadow: var(--shadow-sm); transition: .2s; color: var(--ink); display: block; }
.toc-item:hover { transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.toc-item .num { font-family: var(--serif); font-size: 36px; color: var(--gold); line-height: 1; }
.toc-item h3 { font-size: 21px; margin: 6px 0 4px; color: var(--red-deep); }
.toc-item p { font-size: 15px; color: var(--ink-soft); margin: 0; }
.toc-item .status { display: inline-block; margin-top: 8px; font-size: 12px; padding: 2px 10px; border-radius: 999px; background: rgba(154,27,47,.10); color: var(--red); letter-spacing: .1em; }
.toc-item .status.ok { background: rgba(31,58,104,.12); color: var(--navy); }

/* 佔位區 */
.placeholder { border: 2px dashed rgba(154,27,47,.35); background: rgba(255,255,255,.7); border-radius: 10px; padding: 34px 20px; text-align: center; color: var(--ink-soft); font-family: var(--serif); }
.placeholder .big { font-size: 22px; color: var(--red); }

/* 三五七言祝福牆 */
.blessings { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.bless { background: var(--paper); border: 1px solid var(--gold); border-radius: 8px; padding: 20px 16px; text-align: center; font-family: var(--serif); box-shadow: 3px 3px 0 var(--gold-light); position: relative; }
.bless::before { content: "“"; position: absolute; left: 10px; top: 2px; font-size: 34px; color: var(--gold); line-height: 1; opacity: .7; }
.bless .w { font-size: 21px; letter-spacing: .12em; color: var(--red-deep); font-weight: 700; }
.bless .who { font-size: 13px; color: var(--ink-soft); margin-top: 8px; font-family: var(--sans); }
.bless .kind { font-size: 12px; color: var(--navy); letter-spacing: .25em; }

/* 統計裝飾 */
.divider-stat { display: block; width: 100%; max-width: 560px; height: 46px; margin: 0 auto; opacity: .8; }

/* ---------- 頁尾 ---------- */
footer { margin-top: 40px; background: linear-gradient(180deg, var(--red-deep), #4d0a16); color: #f3e4e6; padding: 44px 0 28px; font-size: 14px; border-top: 4px solid var(--gold); }
footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; }
footer a { color: var(--gold-light); }
footer .ft-title { font-family: var(--serif); font-size: 18px; color: #fff; margin-bottom: 8px; }
footer .copy { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.15); padding-top: 14px; margin-top: 10px; text-align: center; color: rgba(255,255,255,.6); }
@media (max-width: 700px) { footer .wrap { grid-template-columns: 1fr; } }

/* 動畫 */
.fade-up { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.fade-up.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .fade-up { opacity: 1; transform: none; transition: none; } }
