/* 語境創學官網：共用樣式（變數都加 --s- 前綴，避免和報名頁的活動配色互相影響） */
:root {
  --s-bg: #FFF8EE; --s-surface: #FFFFFF; --s-ink: #2B2340; --s-muted: #6B6478; --s-line: #F0E4D4;
  --s-primary: #E8743B; --s-on-primary: #2B2340; --s-primary-text: #B4501A;
  --s-plum: #8E4F87; --s-soft: #FFEBD6;
  --s-rainbow: linear-gradient(90deg, #E0874F, #F2C14E, #A0679A, #7E86C8, #5BB3C9, #A8D88A, #E07B7B, #B02A82);
  --s-round: 'Huninn', 'Noto Sans TC', system-ui, sans-serif;
  --s-body: 'Noto Sans TC', system-ui, sans-serif;
  --s-radius: 22px;
}

body.site {
  margin: 0; background: var(--s-bg); color: var(--s-ink);
  font-family: var(--s-body); font-size: 17px; line-height: 1.7; -webkit-font-smoothing: antialiased;
}
body.site * { box-sizing: border-box; }
body.site h1, body.site h2, body.site h3 { font-family: var(--s-round); font-weight: 400; letter-spacing: .02em; margin: 0; }
body.site a { color: var(--s-primary-text); }
.s-wrap { max-width: 1040px; margin: 0 auto; padding: 0 16px; }
.s-hidden { display: none !important; }

/* ---------- 頁首 ---------- */
.sh { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px); font-family: var(--s-body); }
.sh::after { content: ''; display: block; height: 4px; background: var(--s-rainbow); }
.sh-in { max-width: 1040px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 16px; }
.sh-logo { display: flex; align-items: center; text-decoration: none; flex: none; }
.sh-logo img { height: 46px; width: auto; display: block; }
.sh-nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.sh-nav a {
  text-decoration: none; color: #2B2340; font-family: var(--s-round); font-size: 16px;
  padding: 8px 12px; border-radius: 999px; white-space: nowrap;
}
.sh-nav a:hover { background: #FFF1E2; }
.sh-nav a.on { background: #2B2340; color: #fff; }
.sh-nav a.sh-cta { background: #06C755; color: #fff; margin-left: 6px; }
.sh-burger { display: none; margin-left: auto; font: inherit; font-size: 26px; line-height: 1; border: 0; background: none; cursor: pointer; padding: 6px 8px; color: #2B2340; }

@media (max-width: 980px) {
  .sh-logo img { height: 40px; }
  .sh-burger { display: block; }
  .sh-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: #fff; padding: 8px 16px 16px; box-shadow: 0 12px 24px rgba(43, 35, 64, .12);
  }
  .sh-nav.open { display: flex; }
  .sh-nav a { padding: 12px 14px; font-size: 18px; }
  .sh-nav a.sh-cta { margin: 6px 0 0; text-align: center; }
}

/* ---------- 頁尾 ---------- */
.sf { margin-top: 64px; background: #2B2340; color: #EDE7F3; font-family: var(--s-body); font-size: 15px; }
.sf::before { content: ''; display: block; height: 4px; background: var(--s-rainbow); }
.sf-in { max-width: 1040px; margin: 0 auto; padding: 36px 16px 28px; display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 28px; }
.sf h4 { margin: 0 0 10px; font-family: var(--s-round); font-weight: 400; font-size: 18px; color: #fff; }
.sf a { color: #FFD7B5; text-decoration: none; }
.sf a:hover { text-decoration: underline; }
.sf-brand img { height: 52px; background: #fff; border-radius: 12px; padding: 6px 10px; }
.sf-brand p { margin: 12px 0 0; color: #C9C0D6; }
.sf ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.sf-copy { text-align: center; color: #9E94AE; font-size: 13px; padding: 0 16px 22px; }
@media (max-width: 760px) { .sf-in { grid-template-columns: 1fr; gap: 22px; } }

/* ---------- 共用元件 ---------- */
.s-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
  font-family: var(--s-round); font-size: 18px; text-decoration: none; border: 0;
  background: var(--s-primary); color: var(--s-on-primary) !important; padding: 12px 26px; border-radius: 999px;
  box-shadow: 0 5px 0 #B4501A; transition: transform .1s, box-shadow .1s;
}
.s-btn:active { transform: translateY(4px); box-shadow: 0 1px 0 #B4501A; }
.s-btn.ghost { background: #fff; color: var(--s-ink) !important; box-shadow: 0 5px 0 var(--s-line); border: 2px solid var(--s-line); }
.s-btn.line { background: #06C755; color: #fff !important; box-shadow: 0 5px 0 #04913E; }
.s-btn.small { font-size: 15px; padding: 8px 16px; box-shadow: 0 3px 0 #B4501A; }

.s-section { margin-top: 56px; }
.s-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.s-head h2 { font-size: clamp(24px, 5vw, 30px); }
.s-head p { margin: 4px 0 0; color: var(--s-muted); }
body.site a.s-card { color: var(--s-ink); text-decoration: none; }
.s-card { background: var(--s-surface); border: 2px solid var(--s-line); border-radius: var(--s-radius); box-shadow: 0 6px 0 var(--s-line); }

/* 名額狀態標籤 */
.s-badge { display: inline-block; font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.s-badge.open { background: #E3F6EC; color: #1B7A4B; }
.s-badge.few { background: #FFE8D2; color: #B4501A; }
.s-badge.full { background: #EFE4F2; color: #7A3E74; }
.s-badge.closed, .s-badge.past { background: #EEEAE4; color: #6B6478; }

/* 名額條 */
.s-bar { height: 8px; border-radius: 999px; background: #F3EBE0; overflow: hidden; }
.s-bar i { display: block; height: 100%; border-radius: 999px; background: var(--s-primary); }
.s-bar.full i { background: #A0679A; }

/* 載入中 */
.s-loading { text-align: center; color: var(--s-muted); padding: 40px 0; }
.s-loading span { display: inline-block; font-size: 36px; animation: s-bob 1s ease-in-out infinite; }
@keyframes s-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .s-loading span { animation: none; } }
