/* ccicsu site — a modern, bilingual church front door. Tokens match the bulletin
   (navy + gold), light and dark. */
:root {
  --s-bg: #f7f5f0;
  --s-surface: #ffffff;
  --s-soft: #f1ece1;
  --s-ink: #1d2433;
  --s-muted: #5f6675;
  --s-line: #e4ddcf;
  --s-navy: #1f3557;
  --s-gold: #a8874c;
  --s-gold-soft: #f3ead8;
  --s-radius: 18px;
  --s-shadow: 0 1px 2px rgba(20, 30, 50, .05), 0 8px 24px rgba(20, 30, 50, .06);
  --s-serif: "Noto Serif TC", "Songti TC", Georgia, serif;
  --s-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}
/* Night: chosen with the toggle, or the device's dark mode when nothing is chosen. */
:root[data-theme="dark"] {
  --s-bg: #111722; --s-surface: #182131; --s-soft: #1e2a3d; --s-ink: #eef0f4; --s-muted: #a7afbd;
  --s-line: #2a3649; --s-navy: #9fb6dc; --s-gold: #d3b57a; --s-gold-soft: #2b2a24;
  --s-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --s-bg: #111722; --s-surface: #182131; --s-soft: #1e2a3d; --s-ink: #eef0f4; --s-muted: #a7afbd;
    --s-line: #2a3649; --s-navy: #9fb6dc; --s-gold: #d3b57a; --s-gold-soft: #2b2a24;
    --s-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--s-bg); color: var(--s-ink); font-family: var(--s-sans); font-size: 17px; line-height: 1.6; }
a { color: var(--s-navy); }
img { max-width: 100%; }
.s-wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }
.en { display: block; color: var(--s-muted); font-size: .86em; letter-spacing: .01em; }
.en-inline { color: var(--s-muted); font-size: .86em; margin-left: .4em; }
.s-muted { color: var(--s-muted); }

/* header */
.s-header { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--s-bg) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--s-line); }
.s-header .s-wrap { display: flex; align-items: center; gap: 14px; min-height: 60px; }
.s-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--s-ink); font-weight: 700; min-width: 0; }
.s-brand img { width: 36px; height: 36px; object-fit: contain; border-radius: 8px; }
.s-brand span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s-nav { margin-left: auto; display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.s-nav a { text-decoration: none; color: var(--s-ink); font-size: .9rem; padding: 6px 10px; border-radius: 999px; white-space: nowrap; }
.s-nav a:hover { background: var(--s-soft); }
.s-nav a.s-nav-cta { background: var(--s-navy); color: var(--s-surface); }
@media (max-width: 760px) { .s-nav a:not(.s-nav-keep) { display: none; } }

/* hero */
.s-hero { position: relative; overflow: hidden; color: var(--s-ink);
  background: radial-gradient(120% 80% at 20% 0%, var(--s-gold-soft), transparent 60%), linear-gradient(180deg, var(--s-soft), var(--s-bg)); }
.s-hero.has-photo { color: #fff; background: #1d2433; }
.s-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.s-hero.has-photo .s-hero-img { opacity: .55; }
.s-hero:not(.has-photo) .s-hero-img { object-fit: contain; object-position: right bottom; opacity: .55; width: 70%; left: auto; right: 0; }
.s-hero .s-wrap { position: relative; padding-top: 72px; padding-bottom: 72px; }
.s-hero h1 { font-family: var(--s-serif); font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.15; margin: 0 0 6px; }
.s-hero .s-hero-en { font-size: clamp(1rem, 2.2vw, 1.3rem); opacity: .85; margin: 0 0 22px; }
.s-hero .s-theme { font-family: var(--s-serif); font-size: 1.1rem; margin: 0 0 26px; max-width: 40em; }
.s-hero .s-theme cite { display: block; font-style: normal; font-size: .9em; opacity: .8; }
.s-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.s-btn { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; padding: 10px 20px; border-radius: 999px; text-decoration: none; font-weight: 600; line-height: 1.25; border: 1px solid transparent; }
.s-btn small { font-weight: 400; opacity: .8; font-size: .78em; }
.s-btn-primary { background: var(--s-navy); color: var(--s-surface); }
.s-btn-ghost { background: color-mix(in srgb, var(--s-surface) 70%, transparent); color: var(--s-ink); border-color: var(--s-line); }
.s-hero.has-photo .s-btn-ghost { background: rgba(255, 255, 255, .15); color: #fff; border-color: rgba(255, 255, 255, .5); }

/* sections + cards */
.s-section { padding: 52px 0 8px; }
.s-section h2 { font-family: var(--s-serif); font-size: 1.6rem; margin: 0 0 18px; line-height: 1.25; }
.s-section h2 .en { font-family: var(--s-sans); font-size: .55em; letter-spacing: .12em; text-transform: uppercase; margin-top: 2px; }
.s-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.s-grid-2 { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.s-card { background: var(--s-surface); border: 1px solid var(--s-line); border-radius: var(--s-radius); box-shadow: var(--s-shadow); padding: 20px 22px; }
.s-card h3 { margin: 0 0 6px; font-size: 1.1rem; }
.s-card p { margin: 6px 0; }
.s-card .s-time { font-family: var(--s-serif); color: var(--s-gold); font-size: 1.05rem; }
.s-card-link { text-decoration: none; color: inherit; display: block; transition: transform .15s ease; }
.s-card-link:hover { transform: translateY(-2px); }
.s-kicker { color: var(--s-gold); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
.s-more { display: inline-block; margin-top: 8px; font-weight: 600; text-decoration: none; }

/* this Sunday */
.s-sunday { display: grid; gap: 16px; grid-template-columns: 1.4fr 1fr; align-items: stretch; }
@media (max-width: 820px) { .s-sunday { grid-template-columns: 1fr; } }
.s-date { font-family: var(--s-serif); color: var(--s-gold); font-size: 2.2rem; line-height: 1; }
.s-msg { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 14px; align-items: baseline; padding: 10px 0; border-top: 1px solid var(--s-line); }
.s-msg:first-of-type { border-top: 0; }
.s-msg .s-msg-label { color: var(--s-gold); font-weight: 700; font-size: .9rem; white-space: nowrap; }
.s-msg .s-msg-title { font-weight: 600; }
.s-msg .s-msg-who { white-space: nowrap; }
.s-msg .s-msg-sub { grid-column: 2 / -1; color: var(--s-muted); font-size: .92rem; }

/* rows inside cards */
.s-rows { list-style: none; margin: 0; padding: 0; }
.s-rows li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--s-line); }
.s-rows li:first-child { border-top: 0; }
.s-rows .s-time { white-space: nowrap; }

/* embed */
.s-embed { width: 100%; border: 0; border-radius: var(--s-radius); background: var(--s-surface); box-shadow: var(--s-shadow); min-height: 380px; display: block; }

/* news */
.s-news-cover { aspect-ratio: 16 / 9; border-radius: 12px; background: var(--s-soft) center / cover no-repeat; margin: -6px -8px 12px; }

/* tools */
.s-tools h3 { font-size: 1rem; margin: 0 0 8px; }
.s-tools ul { list-style: none; margin: 0; padding: 0; }
.s-tools li { padding: 5px 0; }
.s-tools a { text-decoration: none; }
.s-tools a:hover { text-decoration: underline; }

/* footer */
.s-footer { margin-top: 56px; padding: 32px 0 44px; border-top: 1px solid var(--s-line); color: var(--s-muted); font-size: .9rem; }
.s-footer .s-wrap { display: flex; gap: 20px; flex-wrap: wrap; justify-content: space-between; }
.s-footer a { color: var(--s-muted); margin-right: 14px; }
.s-status { padding: 40px 20px; text-align: center; color: var(--s-muted); }

/* language + theme toggles */
.s-toggles { display: flex; align-items: center; gap: 6px; margin-left: 6px; }
.s-seg { display: inline-flex; border: 1px solid var(--s-line); border-radius: 999px; overflow: hidden; }
.s-seg button, .s-theme-btn { font: inherit; font-size: .82rem; border: 0; background: transparent; color: var(--s-ink); padding: 5px 9px; cursor: pointer; }
.s-seg button + button { border-left: 1px solid var(--s-line); }
.s-seg button[aria-pressed="true"] { background: var(--s-navy); color: var(--s-surface); }
.s-theme-btn { border: 1px solid var(--s-line); border-radius: 999px; padding: 4px 9px; }
.s-seg button { white-space: nowrap; }
@media (max-width: 480px) {
  .s-header .s-wrap { gap: 8px; }
  .s-brand span { display: none; }   /* the hero carries the name on a phone */
  .s-toggles { margin-left: 0; gap: 4px; }
  .s-seg button { padding: 5px 7px; }
  .s-msg { grid-template-columns: 1fr auto; }
  .s-msg .s-msg-label { grid-column: 1 / -1; }
  .s-msg .s-msg-sub { grid-column: 1 / -1; }
}
