:root {
  --navy: #0f2c4a;
  --blue: #1c5f9e;
  --orange: #f0954a;
  --orange-ink: #a9540c;
  --ink: #1e2a36;
  --muted: #566472;
  --line: #d5dee7;
  --tint: #f2f6fa;
  --paper: #fdfdfb;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  font-size: 17px;
  line-height: 1.7;
}
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; padding: 0; }
ul { list-style: none; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }
.wrap--wide { width: min(1320px, 100% - 40px); }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 19px;
  color: var(--navy);
  text-decoration: none;
  white-space: nowrap;
}
/* Placeholder until the logo is finalized */
.brand__logo {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 2px dashed #8795a3;
  border-radius: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.04em;
}
.site-header nav { display: flex; gap: 24px; }
.site-header nav a {
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.site-header nav a:hover { color: var(--blue); }

/* Hero */
.hero { background: var(--navy); color: #fff; }
.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 56px;
  padding-block: 72px;
}
.hero__eyebrow { color: #a9c6e2; font-size: 15px; font-weight: 500; letter-spacing: 0.04em; }
.hero h1 { margin-top: 12px; font-size: clamp(36px, 4.6vw, 56px); line-height: 1.2; }
.hero h1 em { color: var(--orange); font-style: normal; }
.hero__lead { margin-top: 20px; color: #dbe6f0; font-size: 20px; }
.hero__image { width: 100%; border-radius: 8px; }
.button {
  display: inline-block;
  margin-top: 32px;
  padding: 11px 26px;
  border-radius: 6px;
  background: var(--orange);
  color: #1f1408;
  font-weight: 700;
  text-decoration: none;
}
.button:hover { background: #f5a968; }

/* Sections */
.section { padding-block: 80px; }
.section--tint { background: var(--tint); }
.section--dark { background: var(--navy); color: #fff; }
.section h2 { font-size: 34px; line-height: 1.3; color: var(--navy); }
.section--dark h2 { color: #fff; }
.lead { margin-top: 20px; max-width: 42em; font-size: 20px; }

.values {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-top: 48px;
}
.values li { padding-top: 16px; border-top: 3px solid var(--blue); }
.values h3 { font-size: 20px; color: var(--navy); }
.values p { margin-top: 6px; color: var(--muted); font-size: 16px; }

.facts {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 48px;
  margin-top: 56px;
}
.facts div {
  display: flex;
  gap: 24px;
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
}
.facts dt { flex: 0 0 5em; color: var(--muted); }
.facts dd { font-weight: 500; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 40px;
}
.card {
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.card h3 { font-size: 20px; color: var(--navy); }
.card p { margin-top: 10px; color: var(--muted); font-size: 16px; }

.list-title { margin-top: 56px; font-size: 22px; color: var(--navy); }
.ops {
  margin-top: 16px;
  padding-left: 1.6em;
  columns: 2;
  column-gap: 48px;
}
.ops li { padding-block: 5px; break-inside: avoid; }

/* Org tree: nested lists, connectors drawn with pseudo-elements */
.tree { margin-top: 40px; }
.tree ul { display: flex; justify-content: center; }
.tree li {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 4px 0;
}
.tree li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  border-top: 2px solid #8795a3;
}
.tree li:first-child::before { left: 50%; }
.tree li:last-child::before { right: 50%; }
.tree li:only-child::before { display: none; }
.tree li::after {
  content: "";
  position: absolute;
  top: 0;
  left: calc(50% - 1px);
  height: 24px;
  border-left: 2px solid #8795a3;
}
.tree > ul > li { padding-top: 0; }
.tree > ul > li::after { display: none; }
.tree li > ul { position: relative; }
.tree li > ul::before {
  content: "";
  position: absolute;
  top: 0;
  left: calc(50% - 1px);
  height: 0;
}

.node {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 100px;
  min-height: 72px;
  padding: 10px 8px;
  background: #fff;
  border: 1px solid #b8c6d4;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.45;
  text-align: center;
  white-space: nowrap;
}
.node b { font-weight: 700; color: var(--navy); }
.node small { font-size: 14px; color: var(--ink); }
.node span { font-weight: 700; color: var(--orange-ink); }
.node--top {
  width: auto;
  min-width: 220px;
  background: var(--navy);
  border-color: var(--navy);
  font-size: 16px;
}
.node--top b { color: #fff; }
.node--top span { color: #ffc79a; }
.node--dept { background: #dfeaf5; border-color: var(--blue); }
.node--partner { background: #fbeee0; border-color: var(--orange-ink); }
.node--partner-unit { background: #fef8f1; border-color: #e0bd97; }

@media (max-width: 1240px) {
  /* Below this width the tree no longer fits: it becomes an indented list */
  .tree ul { display: block; }
  .tree > ul > li > ul > li > ul { margin-top: 12px; }
  .tree li {
    display: block;
    padding: 12px 0 0 22px;
  }
  .tree > ul > li,
  .tree > ul > li > ul > li { padding-left: 0; }
  .tree > ul > li > ul > li::before,
  .tree > ul > li > ul > li::after { display: none; }
  .tree li::before,
  .tree li:first-child::before,
  .tree li:last-child::before,
  .tree li:only-child::before {
    display: block;
    top: 0;
    bottom: 0;
    left: 6px;
    right: auto;
    width: 16px;
    height: 44px;
    border-top: 0;
    border-left: 2px solid #8795a3;
    border-bottom: 2px solid #8795a3;
  }
  .tree li::after {
    top: 0;
    bottom: 0;
    left: 6px;
    height: auto;
  }
  .tree li:last-child::after { display: none; }
  .tree > ul > li::before { display: none; }
  .node,
  .node--top {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 2px 10px;
    width: 100%;
    min-height: 0;
    padding: 12px 14px;
    font-size: 16px;
    text-align: left;
    white-space: normal;
  }
  .node small { font-size: 15px; }
}

/* Contact & footer */
address { margin-top: 20px; font-style: normal; }
.contact-name { font-size: 20px; font-weight: 700; }
address a { color: #ffc79a; }
.site-footer {
  padding-block: 20px;
  background: #0a2036;
  color: #a9c6e2;
  font-size: 14px;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 24px;
}
.build {
  color: #6f8aa5;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px;
  text-decoration: none;
}
.build:hover { color: #a9c6e2; }

@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; gap: 36px; padding-block: 48px; }
  .values { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .ops { columns: 1; }
  .section { padding-block: 56px; }
}

@media (max-width: 560px) {
  .site-header__inner { flex-direction: column; align-items: flex-start; gap: 4px; padding-block: 10px; }
  .site-header nav { gap: 16px; }
  .site-header { position: static; }
  .values, .cards, .facts { grid-template-columns: 1fr; }
  .section h2 { font-size: 28px; }
}
