/* ===== Brand Color System ===== */
:root {
  --primary: #1f2430;     /* 深藍灰 */
  --bg: #ffffff;          /* 主背景 */
  --surface: #f7f8fb;     /* 淺灰底 */
  --card-surface: #fbfcfe; /* 卡片淺底 */
  --gray: #6f7686;        /* 次要文字 */
  --light-gray: #d9dce3;  /* 分隔線 */
  --card-border: #cfd7e6; /* 卡片邊框 */
  --accent: #7c8796;      /* 低飽和藍灰 */
  --header-bg: #3f455a;   /* 頁首深灰藍 */
  --header-text: #cfd3da; /* 頁首次要文字 */
}

/* ===== Base ===== */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  background-color: var(--bg);
  color: var(--primary);
  line-height: 1.8;
  letter-spacing: 0.02em;
}

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

/* ===== Layout ===== */
.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Navbar ===== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  min-height: 76px;
  padding: 0;
  border-bottom: 1px solid rgba(217, 214, 207, 0.85);
  background: rgba(246, 244, 239, 0.9);
  backdrop-filter: blur(14px);
}

.nav-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.nav-links a {
  font-size: 13px;
  color: var(--gray);
  letter-spacing: 0.08em;
  transition: color 0.25s ease;
}

.nav-links a:hover {
  color: var(--primary);
}

/* ===== Logo ===== */
.logo {
  display: flex;
  align-items: center;
}

.logo-placeholder {
  width: 42px;
  height: 42px;
  border: 1px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  letter-spacing: 0.18em;
  background: transparent;
}

.logo img {
  height: 40px;
  width: auto;
  display: block;
}

/* ===== Hero ===== */
.hero {
  text-align: center;
  padding: 168px 0 140px;
}

.hero h1 {
  font-size: clamp(40px, 6vw, 64px);
  line-height: 1.28;
  letter-spacing: 0.08em;
  margin: 0 0 24px;
  font-weight: 400;
}

.hero p {
  color: var(--gray);
  max-width: 620px;
  margin: 0 auto;
  font-size: 15px;
  line-height: 2;
}

/* ===== Section ===== */
.section-title {
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.6;
  letter-spacing: 0.05em;
  margin: 0 0 24px;
  font-weight: 400;
}

.section-text {
  color: var(--gray);
  max-width: 760px;
  font-size: 15px;
  line-height: 2;
}

/* ===== Values ===== */
.values {
  display: flex;
  gap: 56px;
  margin-top: 84px;
}

.value-item {
  flex: 1;
}

.value-item h3 {
  font-size: 18px;
  margin: 0 0 14px;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.value-item p {
  color: var(--gray);
  font-size: 14px;
  line-height: 2;
  margin: 0;
}

/* ===== Button ===== */
.btn,
button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 36px;
  min-height: 48px;
  padding: 0 26px;
  border: 1px solid var(--primary);
  background: transparent;
  color: var(--primary);
  font-size: 12px;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn:hover,
button.btn:hover {
  background: var(--primary);
  color: #fff;
}

/* ===== Contact Box ===== */
.contact-box {
  text-align: center;
  padding: 112px 0;
  border-top: 1px solid var(--light-gray);
}

.contact-box h2 {
  font-size: clamp(24px, 3vw, 36px);
  line-height: 1.5;
  letter-spacing: 0.05em;
  font-weight: 400;
  margin: 0 0 12px;
}

.contact-box p {
  color: var(--gray);
  margin: 0;
}

/* ===== Form ===== */
form {
  max-width: 560px;
  margin: 56px auto 0;
}

input,
select,
textarea {
  width: 100%;
  padding: 14px 0;
  margin-bottom: 18px;
  border: 0;
  border-bottom: 1px solid var(--light-gray);
  background: transparent;
  color: var(--primary);
  font: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
}

textarea {
  height: 120px;
  resize: vertical;
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 32px 0 40px;
  font-size: 12px;
  color: var(--gray);
  border-top: 1px solid var(--light-gray);
}

/* ===== RWD ===== */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    gap: 16px;
  }

  .values {
    flex-direction: column;
    gap: 28px;
  }

  .hero {
    padding: 104px 0 88px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .container {
    padding: 0 20px;
  }

  .navbar {
    padding: 18px 0;
  }

  .section-title {
    margin-bottom: 20px;
  }

  .contact-box {
    padding: 88px 0;
  }
}

/* ===== Shared Site Pages ===== */
.site-header {
  margin-top: 16px;
  background: var(--header-bg);
  border-bottom: 1px solid #d4cfd9;
}

.nav-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  min-height: 96px;
  max-width: 1180px;
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  height: 100%;
  gap: 48px;
  color: #ffffff;
}

.logo-mark {
  display: block;
  width: 76px;
  height: 76px;
  flex-shrink: 0;
  background: transparent;
  object-fit: contain;
  object-position: center;
  transform: scale(1.65);
  transform-origin: center center;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  justify-content: center;
  min-height: 76px;
}

.logo-text strong {
  font-size: 40px;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: #ffffff;
  line-height: 1.05;
}

.logo-text small {
  font-size: 16px;
  letter-spacing: 0.08em;
  color: var(--header-text);
  line-height: 1.1;
}

.site-nav {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 28px;
  align-self: flex-end;
  margin-bottom: 6px;
}

.site-nav a {
  display: inline-block;
  color: var(--header-text);
  font-size: 16px;
  letter-spacing: 0.08em;
  transition: color 0.2s ease;
  position: relative;
  padding-bottom: 8px;
}

.site-nav a:hover,
.site-nav a.active {
  color: #ffffff;
}

.page-active-blue .site-nav a.active {
  color: #69a3ff;
  font-weight: 700;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  flex-direction: column;
  gap: 4px;
}

.nav-toggle span {
  display: block;
  width: 12px;
  height: 2px;
  background: #ffffff;
}

.page-hero {
  background: #ffffff;
  border-bottom: 1px solid #e6e9ef;
}

.small-hero {
  padding: 120px 0 110px;
}

.narrow {
  max-width: 980px;
}

.eyebrow {
  margin: 0 0 18px;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--gray);
}

.page-hero h1,
.section-heading h2,
.team-card h3,
.philosophy-grid h3,
.contact-card h3 {
  color: var(--primary);
}

.page-hero h1 {
  margin: 0;
  font-size: 52px;
  line-height: 1.45;
  font-weight: 400;
  letter-spacing: 0.09em;
}

.home-hero {
  position: relative;
  background: url('/assets/images/hero-bg.jpg') center/cover no-repeat;
  border-bottom: 1px solid #e6e9ef;
}

.home-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.75);
}

.home-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 980px;
  padding-top: 160px;
  padding-bottom: 140px;
}

.home-hero-title {
  margin: 0;
  font-size: 52px;
  line-height: 1.45;
  font-weight: 400;
  letter-spacing: 0.09em;
  color: var(--primary);
}

.home-hero-copy {
  margin: 32px 0 0;
  max-width: 520px;
  font-size: 14px;
  line-height: 2.1;
  color: var(--gray);
}

.lead,
.two-col-story p,
.philosophy-grid p,
.team-card p,
.site-footer p,
.contact-card p,
.contact-card small,
.form-note,
.form-status {
  color: var(--gray);
}

.lead {
  margin: 32px 0 0;
  max-width: 620px;
  font-size: 14px;
  line-height: 2.1;
}

.about-intro .lead {
  margin-left: auto;
  margin-right: auto;
  text-align: left;
}

.contact-page .page-hero,
.contact-page .section-heading,
.contact-page .contact-form-panel,
.contact-page .contact-form,
.contact-page .form-note,
.contact-page .form-status {
  text-align: center;
}

.contact-page .lead {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.contact-page .contact-form label,
.contact-page .contact-form label span,
.contact-page .contact-form input,
.contact-page .contact-form select,
.contact-page .contact-form textarea {
  text-align: left;
}

.section {
  background: #ffffff;
  border-top: 1px solid var(--light-gray);
}

.section .container {
  padding-top: 90px;
  padding-bottom: 90px;
}

.home-values-wrap,
.home-placeholder-wrap {
  padding-top: 90px;
  padding-bottom: 90px;
}

.two-col-story,
.contact-grid {
  display: grid;
  gap: 48px;
  align-items: start;
}

.two-col-story {
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.9fr);
}

.contact-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.95fr);
}

.contact-grid-single {
  grid-template-columns: 1fr;
  justify-items: center;
}

.contact-form-wrap {
  width: 100%;
}

.contact-form-panel {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 36px;
  border: 1px solid var(--light-gray);
  background: #ffffff;
}

.home-values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}

.home-value-card {
  min-height: 100%;
  padding: 32px 28px;
  border: 1px solid var(--card-border);
  background: var(--card-surface);
  box-shadow: 0 10px 30px rgba(31, 36, 48, 0.04);
}

.home-value-title {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 500;
  color: var(--primary);
}

.home-value-copy {
  margin: 0;
  font-size: 14px;
  line-height: 2;
  color: var(--gray);
}

.home-placeholder-title {
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--primary);
  text-align: center;
}

.section-heading h2 {
  margin: 0 0 20px;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: 0.05em;
}

.section-heading.left {
  text-align: left;
}

.section-heading.center {
  text-align: center;
}

.two-col-story p,
.team-card p,
.philosophy-grid p,
.contact-card p {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 2;
}

.info-panel,
.contact-card,
.team-card,
.philosophy-grid article {
  border: 1px solid var(--light-gray);
  background: #ffffff;
  padding: 32px 28px;
}

.info-panel,
.contact-info {
  background: var(--surface);
}

.info-item + .info-item {
  margin-top: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--light-gray);
}

.info-item span,
.contact-form label span {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--gray);
}

.info-item strong {
  color: var(--primary);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.8;
}

.tone-block {
  background: var(--surface);
}

.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 40px;
}

.philosophy-grid h3,
.team-card h3,
.contact-card h3 {
  margin: 0 0 14px;
  font-size: 22px;
  font-weight: 500;
}

.team-card p:last-child,
.philosophy-grid p:last-child,
.contact-card p:last-child {
  margin-bottom: 0;
}

.contact-form {
  max-width: none;
  margin: 0;
}

.contact-form-panel .contact-form {
  max-width: 560px;
  margin: 0 auto;
}

.contact-form label {
  display: block;
  margin-bottom: 18px;
}

.contact-form label input.is-invalid,
.contact-form label textarea.is-invalid {
  border-bottom-color: #c94b4b;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  margin-bottom: 0;
}

.field-error {
  display: block;
  min-height: 20px;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.4;
  color: #c94b4b;
}

.form-status {
  min-height: 24px;
  margin-top: 16px;
}

.btn-dark {
  border-color: #2f5fa7;
  background: #2f5fa7;
  color: #ffffff;
}

.btn-dark:hover {
  background: #244b84;
}

.form-note,
.form-status,
.contact-card small {
  font-size: 13px;
  line-height: 1.8;
}

.contact-info {
  padding: 32px 28px;
  border: 1px solid var(--light-gray);
}

.contact-info .contact-card + .contact-card {
  margin-top: 18px;
}

.site-footer {
  background: #ffffff;
  border-top: 1px solid var(--light-gray);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-top: 40px;
  padding-bottom: 40px;
}

.footer-grid.footer-grid-center {
  grid-template-columns: 1fr;
  text-align: center;
}

.footer-title {
  margin: 0 0 8px;
  color: var(--primary);
  font-weight: 500;
}

.site-footer p {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.9;
}

.contact-cta {
  background: var(--surface);
  border-top: 1px solid var(--light-gray);
}

.contact-cta .container {
  padding-top: 120px;
  padding-bottom: 120px;
  text-align: center;
}

.contact-cta-title {
  margin: 0 0 28px;
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--primary);
}

.contact-cta-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #2f5fa7;
}

.contact-cta-link svg {
  width: 22px;
  height: 22px;
  display: block;
  stroke: currentColor;
}

.contact-cta-link span {
  font-size: 26px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: currentColor;
}

.copyright-bar {
  background: #ffffff;
  border-top: 1px solid var(--light-gray);
}

.copyright-bar .container {
  padding-top: 40px;
  padding-bottom: 40px;
  text-align: center;
}

.copyright-bar p {
  margin: 0;
  font-size: 13px;
  line-height: 1.9;
  color: var(--gray);
}

@media (max-width: 768px) {
  .nav-wrap {
    min-height: 96px;
  }

  .logo-mark {
    width: 56px;
    height: 56px;
  }

  .nav-wrap {
    position: relative;
  }

  .nav-toggle {
    display: flex;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    right: 0;
    background: var(--header-bg);
    padding: 8px 20px 20px;
    flex-direction: column;
    gap: 0;
    border-top: 1px solid rgba(255,255,255,0.12);
    z-index: 999;
    margin-bottom: 0;
  }

  .site-nav.open {
    display: flex;
  }

  .site-nav a {
    display: block;
    width: 100%;
    padding: 18px 0;
    border-bottom: 1px solid rgba(255,255,255,0.12);
    font-size: 18px;
  }

  .small-hero {
    padding: 96px 0 84px;
  }

  .page-hero h1 {
    font-size: 38px;
  }

  .home-hero-inner {
    padding-top: 120px;
    padding-bottom: 104px;
  }

  .home-hero-title {
    font-size: 38px;
  }

  .two-col-story,
  .contact-grid,
  .philosophy-grid,
  .home-values-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .section .container {
    padding-top: 72px;
    padding-bottom: 72px;
  }

  .contact-cta .container {
    padding-top: 96px;
    padding-bottom: 96px;
  }

  .contact-form-panel {
    padding: 32px 20px;
  }
}
