:root {
  --navy: #1B3A5C;
  --navy-deep: #122842;
  --gold: #C9932E;
  --gold-soft: #E4C583;
  --bg: #F7F5F0;
  --surface: #FFFFFF;
  --text: #1F2733;
  --text-muted: #6B7280;
  --line: #E4E0D6;
  --radius: 6px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Noto Sans TC", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
}

h1, h2, h3 { font-family: "Noto Serif TC", serif; font-weight: 700; }

a { color: inherit; text-decoration: none; }

img { max-width: 100%; display: block; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 32px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 24px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: opacity .15s ease, background .15s ease, color .15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--gold); color: #fff; }
.btn-primary:hover { opacity: .88; }
.btn-ghost { border-color: var(--navy); color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: #fff; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 16px; font-size: 13px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 16px 32px;
}
.logo {
  font-family: "Noto Serif TC", serif;
  font-weight: 700;
  font-size: 20px;
  color: var(--navy);
  flex-shrink: 0;
}
.site-nav { flex: 1; }
.site-nav ul { display: flex; gap: 30px; list-style: none; }
.site-nav a {
  font-size: 14.5px;
  color: var(--text);
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover, .site-nav a.active { color: var(--navy); border-bottom-color: var(--gold); }
.header-cta { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
}
.nav-toggle span { display: block; height: 2px; background: var(--navy); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero { padding: 72px 0; }
.eyebrow {
  display: inline-block;
  font-size: 12.5px;
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 5px 14px;
  margin-bottom: 18px;
}
.hero h1 { font-size: 34px; line-height: 1.45; color: var(--navy-deep); margin-bottom: 18px; }
.hero p { font-size: 15.5px; color: var(--text-muted); max-width: 520px; margin-bottom: 28px; }
.hero-actions { display: flex; gap: 14px; margin-bottom: 36px; flex-wrap: wrap; }
.stat-strip { display: flex; gap: 40px; flex-wrap: wrap; }
.stat .num { font-family: "Noto Serif TC", serif; font-size: 24px; color: var(--navy); font-weight: 700; }
.stat .label { font-size: 13px; color: var(--text-muted); }

/* ---------- Page header (non-home pages) ---------- */
.page-header { padding: 56px 0 40px; border-bottom: 1px solid var(--line); }
.page-header h1 { font-size: 30px; color: var(--navy-deep); margin-bottom: 14px; }
.page-header p { font-size: 15px; color: var(--text-muted); max-width: 560px; }

/* ---------- Generic section ---------- */
.section { padding: 56px 0; border-top: 1px solid var(--line); }
.section:first-child { border-top: none; }
.section-alt { background: var(--surface); }
.section-title { font-size: 22px; color: var(--navy-deep); margin-bottom: 8px; }
.section-sub { font-size: 14.5px; color: var(--text-muted); margin-bottom: 28px; max-width: 560px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.section-head .section-title, .section-head .section-sub { margin-bottom: 0; }
.section-link { font-size: 14px; color: var(--navy); border-bottom: 1px solid var(--gold); padding-bottom: 2px; flex-shrink: 0; }

/* ---------- Services grid ---------- */
.svc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 28px; }
.svc-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.svc-card h3 { font-size: 15.5px; color: var(--navy-deep); margin-bottom: 6px; }
.svc-card p { font-size: 13px; color: var(--text-muted); }

.svc-detail-list { margin-top: 28px; display: flex; flex-direction: column; gap: 20px; }
.svc-detail-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 20px;
  align-items: start;
}
.svc-detail-index {
  font-family: "Noto Serif TC", serif;
  font-size: 26px;
  color: var(--gold);
  font-weight: 700;
}
.svc-detail-card h3 { font-size: 18px; color: var(--navy-deep); margin-bottom: 8px; }
.svc-detail-card p { font-size: 14px; color: var(--text-muted); }
.svc-detail-card p + p { margin-top: 6px; }

/* ---------- Values grid ---------- */
.values-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 28px; }
.value-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--bg); }
.value-card h3 { font-size: 15.5px; color: var(--navy-deep); margin-bottom: 6px; }
.value-card p { font-size: 13px; color: var(--text-muted); }

/* ---------- Timeline ---------- */
.timeline { margin-top: 28px; position: relative; padding-left: 28px; border-left: 2px solid var(--line); }
.timeline-item { position: relative; padding-bottom: 28px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -34px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
}
.timeline-year { font-family: "Noto Serif TC", serif; font-weight: 700; color: var(--navy); font-size: 15px; margin-bottom: 4px; }
.timeline-event { font-size: 14px; color: var(--text-muted); }

/* ---------- Mission callout ---------- */
.callout {
  margin-top: 28px;
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  padding: 32px;
}
.callout p { font-family: "Noto Serif TC", serif; font-size: 18px; line-height: 1.6; }

/* ---------- Cases grid ---------- */
.cases-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 28px; }
.case-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.case-thumb {
  height: 140px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.case-thumb span { font-family: "Noto Serif TC", serif; color: var(--gold-soft); font-size: 13px; letter-spacing: .1em; }
.case-body { padding: 20px; }
.case-tag {
  display: inline-block;
  font-size: 12px;
  color: var(--gold);
  border: 1px solid var(--gold);
  border-radius: 999px;
  padding: 3px 11px;
  margin-bottom: 10px;
}
.case-card h3 { font-size: 15.5px; color: var(--navy-deep); margin-bottom: 6px; }
.case-card p { font-size: 13px; color: var(--text-muted); }
.case-cta { margin-top: 14px; }

/* ---------- News list ---------- */
.news-list { margin-top: 28px; display: flex; flex-direction: column; }
.news-item {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 20px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.news-item:last-child { border-bottom: none; }
.news-date { font-size: 13px; color: var(--text-muted); padding-top: 2px; }
.news-item h3 { font-size: 15px; color: var(--navy-deep); margin-bottom: 4px; }
.news-item p { font-size: 13.5px; color: var(--text-muted); }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--navy-deep);
  color: #fff;
  padding: 48px 0;
  text-align: center;
}
.cta-banner h2 { font-size: 24px; margin-bottom: 10px; }
.cta-banner p { color: rgba(255,255,255,.72); font-size: 14.5px; margin-bottom: 22px; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; margin-top: 28px; align-items: start; }
.contact-info-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.contact-info-card dl { display: flex; flex-direction: column; gap: 16px; }
.contact-info-card dt { font-size: 12.5px; color: var(--gold); margin-bottom: 3px; }
.contact-info-card dd { font-size: 14.5px; color: var(--text); }
.contact-note { margin-top: 20px; font-size: 12.5px; color: var(--text-muted); }
.map-embed { margin-top: 20px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.map-embed iframe { width: 100%; height: 220px; border: 0; display: block; }

.case-notice {
  background: var(--bg);
  border: 1px solid var(--gold);
  color: var(--navy-deep);
  border-radius: var(--radius);
  padding: 10px 16px;
  font-size: 13.5px;
  margin-bottom: 18px;
}

.contact-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { margin-bottom: 18px; }
.form-field label { display: block; font-size: 13.5px; color: var(--text); margin-bottom: 6px; }
.form-field input,
.form-field textarea {
  width: 100%;
  font: inherit;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
}
.form-field input:focus,
.form-field textarea:focus { outline: none; border-color: var(--gold); }
.form-field textarea { resize: vertical; min-height: 120px; }
.form-honeypot { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }
.form-widget { margin-bottom: 18px; }
.form-msg { margin-top: 16px; padding: 12px 16px; border-radius: var(--radius); font-size: 13.5px; display: none; }
.form-msg.is-visible { display: block; }
.form-msg.is-success { background: #E6F4EA; color: #1E7A34; }
.form-msg.is-error { background: #FBEAEA; color: #B3261E; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: rgba(255,255,255,.82); margin-top: 0; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding: 48px 32px 32px; }
.logo-footer { color: #fff; margin-bottom: 8px; }
.footer-brand p { font-size: 13.5px; color: rgba(255,255,255,.6); }
.footer-social { margin-top: 14px; display: flex; gap: 14px; }
.footer-social a { font-size: 13px; color: var(--gold-soft); }
.footer-col h4 { font-size: 13.5px; color: #fff; margin-bottom: 14px; letter-spacing: .04em; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { font-size: 13.5px; color: rgba(255,255,255,.72); }
.footer-col a:hover { color: var(--gold-soft); }
.footer-contact li { font-size: 13.5px; color: rgba(255,255,255,.72); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 18px 32px; }
.footer-bottom p { font-size: 12.5px; color: rgba(255,255,255,.5); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .svc-grid { grid-template-columns: repeat(2, 1fr); }
  .values-grid { grid-template-columns: repeat(2, 1fr); }
  .cases-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .wrap { padding: 0 20px; }
  .header-inner { padding: 14px 20px; }
  .site-nav {
    position: fixed;
    inset: 65px 0 0 0;
    background: var(--surface);
    padding: 24px 20px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
    border-top: 1px solid var(--line);
  }
  .site-nav.is-open { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .site-nav ul { flex-direction: column; gap: 4px; }
  .site-nav a { display: block; padding: 12px 4px; font-size: 16px; }
  .header-cta { display: none; }
  .nav-toggle { display: flex; }
  .stat-strip { gap: 24px; }
  .hero h1 { font-size: 27px; }
  .svc-grid { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }
  .cases-grid { grid-template-columns: 1fr; }
  .svc-detail-card { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .news-item { grid-template-columns: 1fr; }
}
