:root {
  --blue: #1E3A5F;
  --deep-blue: #365D84;
  --text: #1F2937;
  --muted: #4B5563;
  --line: #D6DCE5;
  --pale: #EEF2F6;
  --white: #FFFFFF;
  --page: #FAFAF8;
  --accent: #5A89B6;
  --button-primary: #365D84;
  --button-hover: #27496D;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--page);
  font-family: "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", Arial, sans-serif;
  font-size: 18px;
  font-weight: 700;
}
h1, h2, h3, h4, h5, h6, strong, b { font-weight: 700; }
button, input, select, textarea { font-weight: inherit; }
.page-shell {
  width: 100%;
  max-width: none;
  margin: 0 auto;
  background: var(--page);
  box-shadow: none;
}
.site-header {
  height: 100px;
  display: flex;
  align-items: center;
  padding: 0 36px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 10;
}
.brand { display: flex; align-items: center; align-self: center; margin: 0; color: var(--blue); text-decoration: none; width: 280px; flex-shrink: 0; }
.brand-mark {
  width: 58px; height: 58px; display: grid; place-items: center;
  overflow: hidden; margin-right: 10px;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; white-space: nowrap; }
.brand-text strong { font-size: 22px; }
.brand-text small { margin-top: 4px; font-size: 11px; letter-spacing: 1.2px; }
.main-nav { display: flex; align-items: center; height: 100px; margin-left: auto; margin-right: 0; justify-content: flex-end; padding: 18px 0 0; }
.main-nav > a {
  color: var(--text); text-decoration: none; font-size: 18px; margin-right: 28px;
  border-bottom: 2px solid transparent; height: 100%; display: flex; align-items: center;
}
.main-nav > a:hover { border-bottom-color: var(--blue); }
.header-actions { position: absolute; top: 8px; right: 36px; display: flex; flex-direction: row; align-items: center; justify-content: flex-end; gap: 18px; padding-bottom: 16px; }
.header-actions a { color: var(--blue); text-decoration: none; }
.phone { display: flex; align-items: center; gap: 7px; font-weight: 700; font-size: 15px; line-height: 1.15; }
.phone-icon { width: 22px; height: 22px; border: 1px solid var(--line); border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.line-id { display: flex; align-items: center; gap: 7px; padding-left: 18px; border-left: 1px solid var(--line); font-weight: 700; font-size: 15px; line-height: 1.15; }
.line-icon { min-width: 38px; height: 22px; padding: 0 5px; border-radius: 11px; background: #06C755; color: #fff; display: grid; place-items: center; flex-shrink: 0; font-size: 10px; }
.social { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; background: var(--accent); color: #fff !important; font-size: 14px; font-weight: 800; }
.menu-toggle { display: none; }
.back-to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 100;
  width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: var(--button-primary); color: #fff; box-shadow: 0 6px 18px rgba(31,41,55,.16);
  font-size: 20px; line-height: 1; cursor: pointer;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; transform: translateY(0); }

.hero {
  min-height: 430px;
  position: relative;
  overflow: hidden;
  background: var(--page) url("assets/hero-upload.jpe") center/cover no-repeat;
  border-bottom: 1px solid var(--line);
}
.featured, .process, .archive, .partner-banner, .contact { scroll-margin-top: 100px; }
.hero-content { position: relative; z-index: 2; padding: 115px 58px 60px; }
.hero h1 { margin: 0 0 22px; color: var(--blue); font-size: clamp(24px, 5vw, 54px); letter-spacing: 1px; white-space: nowrap; -webkit-text-stroke: 1px #fff; paint-order: stroke fill; }
.hero-content p { max-width: 720px; margin: 0 0 22px; line-height: 1.7; }
.primary-button {
  display: inline-flex; align-items: center; gap: 18px;
  padding: 15px 24px; background: var(--button-primary); color: #fff; text-decoration: none;
  border-radius: 3px; font-weight: 700;
}
.hero-line-button { display: none; }

.section { padding: 52px 58px 58px; background: var(--page); }
.featured { background: var(--pale); }
.section-heading { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 22px; }
.eyebrow { margin: 0 0 7px; color: var(--accent); font-size: 10px; letter-spacing: 2.2px; font-weight: 800; }
.section-heading h2, .partner-banner h2, .contact h2 {
  margin: 0 0 7px; color: var(--blue); font-size: 36px; line-height: 1.2;
}
.section-heading p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 14px; }
.outline-button {
  margin-top: 10px; padding: 9px 12px; border: 1px solid var(--button-primary); border-radius: 2px;
  color: var(--deep-blue); text-decoration: none; font-size: 12px;
}
.primary-button:hover,
.outline-button:hover,
.archive-preview .archive-more:hover,
.back-to-top:hover {
  background: var(--button-hover); border-color: var(--button-hover); color: #fff;
}
.project-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.project-card {
  background: var(--white); border: 1px solid var(--line); border-radius: 4px;
  overflow: hidden; box-shadow: 0 4px 12px rgba(31,41,55,.08);
}
.project-image {
  height: 260px; position: relative;
  background: linear-gradient(rgba(30,58,95,.08), rgba(30,58,95,.08)), url("assets/page-hero.png") center 72%/cover no-repeat;
}
.image-two { background: linear-gradient(rgba(30,58,95,.08), rgba(30,58,95,.08)), url("assets/page-hero.png") 42% 72%/cover no-repeat; }
.status { position: absolute; left: 14px; top: 12px; padding: 5px 8px; background: var(--blue); color: #fff; font-size: 9px; }
.project-body { padding: 15px 16px 12px; }
.meta-row { display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; margin-bottom: 7px; }
.project-body h3 { margin: 0 0 8px; color: var(--deep-blue); font-size: 21px; }
.project-body p { margin: 0; min-height: 48px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.card-footer { display: flex; justify-content: space-between; align-items: end; margin-top: 10px; color: var(--muted); font-size: 13px; }
.card-footer a { color: var(--accent); text-decoration: none; }
.card-footer i { width: 20px; height: 20px; display: inline-grid; place-items: center; border-radius: 50%; background: var(--accent); color: #fff; font-style: normal; }

.process { background: var(--page); }
.section-heading.compact { margin-bottom: 18px; }
.section-title-with-link { display: flex; align-items: center; gap: 10px; }
.pdf-link {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 58px; height: 34px; padding: 0 9px;
  border: 1px solid #E7C8CB; border-radius: 4px; background: var(--white);
  color: #B4232F; text-decoration: none; font-size: 10px; font-weight: 900;
  letter-spacing: .2px;
}
.pdf-link::before {
  content: ""; flex: none; width: 11px; height: 14px; border: 1.5px solid currentColor;
  border-radius: 2px;
  background:
    linear-gradient(currentColor, currentColor) 2px 5px / 6px 1px,
    linear-gradient(currentColor, currentColor) 2px 8px / 6px 1px,
    linear-gradient(currentColor, currentColor) 2px 11px / 4px 1px;
  background-repeat: no-repeat;
}
.process-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.process-card {
  min-width: 0; background: var(--white); border: 1px solid var(--line); border-radius: 4px;
  overflow: hidden; position: relative; padding: 12px 12px 14px;
}
.step-label { height: 28px; color: var(--accent); font-size: 18px; font-weight: 800; line-height: 28px; letter-spacing: 1px; }
.process-card img { width: 100%; height: 165px; object-fit: cover; border-radius: 3px; display: block; }
.process-card h3 { margin: 10px 0 6px; color: var(--deep-blue); font-size: 17px; line-height: 1.5; }
.process-card p { margin: 0; min-height: 44px; color: var(--muted); font-size: 14px; line-height: 1.7; }

.archive { background: var(--pale); }
.archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; column-gap: 60px; row-gap: 14px; padding: 10px 18px 12px; }
.featured.archive .archive-grid { grid-template-columns: repeat(5, 1fr); column-gap: 14px; }
.featured.archive .archive-grid article { min-height: 68px; padding: 10px 8px 8px 10px; }
.archive-grid article { min-height: 52px; padding: 9px 10px 8px 16px; background: var(--white); border-left: 3px solid var(--accent); display: flex; flex-direction: column; justify-content: center; }
.archive-grid strong { color: var(--deep-blue); font-size: 18px; line-height: 1.45; overflow-wrap: anywhere; }
.archive-grid span { margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.archive-preview { position: relative; overflow: hidden; }
.archive-fade {
  position: absolute; top: var(--archive-fade-start, 100%); right: 0; bottom: 0; left: 0; z-index: 1;
  pointer-events: none; backdrop-filter: blur(3px);
  background: linear-gradient(to bottom, rgba(250,250,248,.22), rgba(250,250,248,.94));
}
.archive-preview .archive-more {
  position: absolute; top: calc(var(--archive-fade-start, 100%) + 75px); left: 50%; z-index: 2;
  margin: 0; padding: 14px 24px; transform: translate(-50%, -50%); white-space: nowrap;
  font-size: 16px; font-weight: 700;
  background: var(--button-primary); color: #fff; border-color: var(--button-primary); box-shadow: 0 4px 14px rgba(31,41,55,.18);
}

.partner-banner {
  margin: 42px 58px 0;
  min-height: 160px; padding: 30px 34px;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--pale); border: 1px solid var(--line);
}
.partner-banner div:first-child { max-width: 730px; }
.partner-banner h2 { font-size: 22px; }
.partner-banner p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.partner-mark { width: 132px; height: 132px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--white); border-radius: 4px; color: var(--blue); }
.partner-mark span { width: 42px; height: 42px; display: grid; place-items: center; background: var(--blue); color: #fff; border-radius: 50%; font-size: 22px; }
.partner-mark span { font-size: 28px; font-weight: 900; line-height: 1; }
.partner-mark strong { margin-top: 8px; font-size: 13px; }
.partner-mark small { margin-top: 3px; color: var(--muted); font-size: 8px; letter-spacing: 1px; }
.partner-page { margin-bottom: 58px; }
.partner-link { margin-top: 18px; font-size: 12px; }
.partner-grid { display: grid; grid-template-columns: 1fr; gap: 18px; }
.partner-card { min-height: 220px; padding: 28px; background: var(--white); border: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.partner-card h2 { margin: 4px 0 8px; color: var(--blue); font-size: 26px; }
.partner-card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.8; }
.partner-logo-link { flex: none; display: inline-flex; align-items: center; justify-content: center; }
.partner-logo { width: 132px; height: 132px; object-fit: contain; }

.contact { text-align: center; padding: 58px 58px 52px; background: var(--page); }
.contact h2 { margin-bottom: 8px; }
.contact > p:not(.eyebrow) { margin: 0 auto 24px; color: var(--muted); font-size: 13px; }
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.contact-grid a { min-height: 126px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text); text-decoration: none; background: var(--white); border: 1px solid var(--line); border-radius: 4px; }
.contact-grid a > span { width: 34px; height: 34px; display: grid; place-items: center; margin-bottom: 8px; background: var(--pale); color: var(--accent); border-radius: 50%; font-weight: 800; }
.contact-grid strong { color: var(--muted); font-size: 13px; }
.contact-grid b { margin-top: 5px; color: var(--deep-blue); font-size: 16px; }

.footer { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 58px; background: var(--pale); border-top: 1px solid var(--line); }
.footer > small { color: var(--muted); font-size: 11px; }

@media (max-width: 980px) {
  .site-header { height: 76px; }
  .brand { width: auto; }
  .hero-content p { display: none; }
  .hero-line-button { display: inline-flex; }
  .hero h1 {
    width: 100%;
    text-align: center;
    color: var(--deep-blue);
  }
  .hero-content {
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  .menu-toggle {
    display: flex; width: 42px; height: 42px; margin-left: auto; padding: 10px;
    flex-direction: column; justify-content: space-between;
    border: 1px solid var(--line); background: var(--white); border-radius: 3px; cursor: pointer;
  }
  .menu-toggle span { display: block; width: 100%; height: 2px; background: var(--blue); }
  .main-nav {
    display: none; position: absolute; left: 0; right: 0; top: 76px;
    height: auto; margin: 0; padding: 8px 36px 14px;
    flex-direction: column; align-items: stretch; justify-content: flex-start; background: var(--white);
    border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
    box-shadow: 0 10px 18px rgba(31,41,55,.08);
    max-height: calc(100vh - 76px); overflow-y: auto;
  }
  .main-nav.is-open { display: flex; }
  .main-nav > a {
    height: 44px; margin: 0; padding: 0 6px; border-bottom: 1px solid var(--line);
    flex-shrink: 0;
  }
  .header-actions {
    position: static; display: flex; flex-direction: column; align-items: stretch;
    justify-content: flex-start; gap: 0; padding: 8px 0 0;
  }
  .header-actions a { min-height: 44px; padding: 0 6px; font-size: 16px; }
  .line-id { border-left: 0; border-top: 1px solid var(--line); }
  .hero { min-height: 360px; }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  #process .process-grid {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: min(80%, 320px);
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
  }
  #process .process-card { scroll-snap-align: start; }
  .process-card h3, .process-card p { text-align: left; }
  .process .section-heading { text-align: left; }
  .archive-grid, .featured.archive .archive-grid { grid-template-columns: repeat(2, 1fr); }
  #archive .archive-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-inline: 0; }
  #archive .archive-grid article:nth-child(n+11) { display: none; }
  .partner-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .site-header { height: 68px; padding: 0 16px; }
  .brand { width: auto; }
  .brand-text strong { font-size: 18px; }
  .main-nav { top: 68px; padding: 8px 16px 14px; max-height: calc(100vh - 68px); }
  .hero { min-height: 220px; }
  .hero-content { min-height: 220px; padding: 28px 20px; }
  .hero h1 { max-width: none; font-size: clamp(24px, 8vw, 38px); white-space: nowrap; }
  .section { padding: 38px 20px; }
  .section-heading { display: block; }
  .process .section-heading { text-align: left; }
  .outline-button { display: inline-block; margin-top: 12px; }
  .archive-preview .archive-more {
    width: calc(100% - 32px); max-width: 320px; padding: 14px 16px;
    text-align: center; white-space: normal;
  }
  .project-grid, .process-grid, .archive-grid, .contact-grid { grid-template-columns: 1fr; }
  .process-card img { height: 220px; }
  .partner-banner { margin: 24px 20px 0; padding: 24px 20px; }
  .partner-mark { display: none; }
  .contact { padding: 42px 20px; }
  .footer { height: auto; min-height: 92px; padding: 16px 20px; display: block; }
  .footer > small { display: block; margin-top: 12px; }
}
