/* claude.formosa — 克制的排版系統：留白、極少顏色、極細線條。僅亮色模式。 */

:root {
  --ink: #111111;
  --muted: #6e6e6e;
  --line: #e4e4e4;
  --bg: #ffffff;
  --accent: #d97757;
  --wrap: 1080px;
  --pad: 24px;
  --section-y: 120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC",
          "Noto Sans TC", "Microsoft JhengHei", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

/* ---------- 雙語 ---------- */
html[data-lang="en"] .l.zh,
html[data-lang="zh"] .l.en { display: none !important; }

/* ---------- 基本元素 ---------- */
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1.2em; }
p:last-child { margin-bottom: 0; }
img, video { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: #fff; padding: 12px 20px;
}
.skip:focus { left: 0; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- 頂部固定列 ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px var(--pad);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.wordmark { font-weight: 600; letter-spacing: -0.02em; font-size: 17px; }
.langswitch { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.langswitch button {
  background: none; border: 0; padding: 4px 2px; cursor: pointer;
  font: inherit; color: var(--muted); letter-spacing: 0.02em;
}
.langswitch button[aria-pressed="true"] { color: var(--ink); font-weight: 600; }
.langswitch .sep { color: var(--line); }

/* 首頁 hero 在固定列下方，其餘頁面需要留出高度 */
main { padding-top: 61px; }
body.has-hero main { padding-top: 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #1a1a1a;
}
.hero video, .hero .hero-fallback {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,.42) 0%, rgba(0,0,0,.25) 45%, rgba(0,0,0,.55) 100%);
}
.hero-content {
  position: relative; z-index: 2;
  text-align: center; color: #fff;
  padding: 0 var(--pad);
}
.hero h1 {
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  letter-spacing: -0.035em;
  margin-bottom: 0.4em;
  text-shadow: 0 1px 24px rgba(0,0,0,.25);
}
.hero .lede {
  font-size: clamp(1rem, 2.2vw, 1.3rem);
  max-width: 34ch; margin: 0 auto 2.2em;
  color: rgba(255,255,255,.92);
  text-shadow: 0 1px 16px rgba(0,0,0,.3);
}

.btn {
  display: inline-block;
  padding: 14px 34px;
  border-radius: 999px;
  font-size: 15px; font-weight: 600;
  letter-spacing: 0.01em;
  background: #fff; color: var(--ink);
  border: 1px solid transparent;
  transition: transform .18s ease, background-color .18s ease, color .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }

/* ---------- 區塊 ---------- */
.section { padding: var(--section-y) 0; border-top: 1px solid var(--line); }
.section:first-of-type { border-top: 0; }
.section-label {
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 40px;
}
.section-label .l { text-transform: uppercase; }

/* ---------- 宗旨四欄 ---------- */
.mission {
  display: grid; gap: 48px 40px;
  grid-template-columns: repeat(4, 1fr);
}
.mission h3 { font-size: 18px; margin-bottom: 10px; }
.mission p { color: var(--muted); font-size: 15px; line-height: 1.65; }
.mission .rule { width: 28px; height: 2px; background: var(--accent); margin-bottom: 18px; }

/* ---------- 過去活動：純文字列表 ---------- */
.eventlist { border-top: 1px solid var(--line); }
.eventlist a {
  display: grid;
  grid-template-columns: 148px 1fr auto;
  gap: 24px; align-items: baseline;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left .2s ease;
}
.eventlist a:hover { padding-left: 10px; }
.eventlist .date {
  font-variant-numeric: tabular-nums;
  font-size: 14px; color: var(--muted); letter-spacing: 0.02em;
}
.eventlist .title { font-size: clamp(1.05rem, 2vw, 1.35rem); font-weight: 600; letter-spacing: -0.02em; }
.eventlist a:hover .title { color: var(--accent); }
.eventlist .count { font-size: 13px; color: var(--muted); white-space: nowrap; }

/* ---------- 下一場 ---------- */
.nextgrid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  border-top: 1px solid var(--line);
  padding-top: 32px;
}
.nextgrid dt {
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px;
}
.nextgrid dd { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.nextgrid dd .sub { display: block; font-size: 14px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.note { margin-top: 36px; color: var(--muted); font-size: 15px; }

/* ---------- 召集人 ---------- */
.organizers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.organizer { display: flex; align-items: center; gap: 16px; }
.avatar {
  flex: 0 0 auto;
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: #f2f2f2; color: var(--muted);
  font-size: 15px; font-weight: 600; letter-spacing: 0.02em;
  object-fit: cover;
}
.organizer .name { font-weight: 600; letter-spacing: -0.01em; }
.organizer .role { font-size: 14px; color: var(--muted); }

/* ---------- Discord ---------- */
.discord { text-align: center; }
.discord .qr { display: none; margin: 36px auto 0; }
.discord .qr img { width: 168px; height: 168px; margin: 0 auto; }
.discord .qr figcaption { margin-top: 12px; font-size: 13px; color: var(--muted); }
@media (min-width: 900px) and (hover: hover) {
  .discord .qr { display: block; }
}

/* ---------- 活動頁 ---------- */
.event-head { padding: 88px 0 0; }
.event-head .date {
  font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 18px;
}
.event-head h1 { font-size: clamp(2rem, 5vw, 3.1rem); margin-bottom: 28px; }
.event-head .intro { font-size: 19px; max-width: 62ch; color: #333; }

.event-poster { margin: 56px 0 0; }
.event-poster img { width: 100%; max-width: 460px; border: 1px solid var(--line); }

.speakers { border-top: 1px solid var(--line); }
.speaker { padding: 32px 0; border-bottom: 1px solid var(--line); }
.speaker .who { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.speaker .org { font-size: 14px; color: var(--muted); font-weight: 400; letter-spacing: 0; }
.speaker .what { margin-top: 10px; max-width: 68ch; color: #333; }
.speaker .links { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.speaker .links a {
  font-size: 14px; color: var(--accent);
  border-bottom: 1px solid rgba(217, 119, 87, .35);
  padding-bottom: 1px; word-break: break-word;
}
.speaker .links a:hover { border-bottom-color: var(--accent); }

.photos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.photos img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #f2f2f2; }

.event-video video { width: 100%; background: #111; }

.event-nav {
  display: flex; justify-content: space-between; gap: 20px;
  border-top: 1px solid var(--line);
  padding: 32px 0 var(--section-y);
  font-size: 15px;
}
.event-nav a { color: var(--muted); }
.event-nav a:hover { color: var(--accent); }
.event-nav .spacer { flex: 1; }

/* ---------- 頁尾 ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 56px var(--pad) 72px;
  text-align: center;
}
.social { display: flex; justify-content: center; gap: 32px; margin-bottom: 28px; font-size: 15px; }
.social a { color: var(--muted); }
.social a:hover { color: var(--ink); }
.fine { font-size: 13px; color: var(--muted); margin: 0 0 6px; }

/* ---------- 動態：最低限度 ---------- */
/* 預設可見。只有在 JS 確定可用時才先隱藏，避免 JS 失敗時整頁空白。 */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 手機 ---------- */
@media (max-width: 860px) {
  :root { --section-y: 72px; }
  body { font-size: 16px; }
  .mission { grid-template-columns: 1fr; gap: 36px; }
  .nextgrid { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .organizers { grid-template-columns: 1fr; gap: 24px; }
  .photos { grid-template-columns: repeat(2, 1fr); }
  .eventlist a { grid-template-columns: 1fr; gap: 6px; padding: 22px 0; }
  .eventlist a:hover { padding-left: 0; }
  .event-head { padding-top: 56px; }
}

@media (max-width: 480px) {
  .nextgrid { grid-template-columns: 1fr; }
  .photos { grid-template-columns: 1fr; }
}
