/* HCI 心創顧問 — 靜態站樣式 v1（白天 / 黑夜） */
:root {
  --navy: #14284B;
  --navy-deep: #0F1D36;
  --red: #C33A2C;
  --red-soft: #E8A79E;

  --bg: #FFFFFF;
  --bg-alt: #F7F6F2;
  --bg-band: #14284B;
  --bg-band-text: #FFFFFF;
  --bg-band-muted: #C9D2E3;
  --text: #1F2733;
  --text-muted: #4B5563;
  --text-faint: #6B7280;
  --heading: #14284B;
  --line: #E5E3DC;
  --card: #F7F6F2;
  --card-border: #E5E3DC;
  --ph-bg: #EEECE6;
  --ph-border: #9CA3AF;
  --ph-text: #6B7280;
  --footer-bg: #0F1D36;
  --footer-text: #B8C2D6;
  --footer-line: #2A3D62;
  --input-bg: #FFFFFF;
  --input-border: #C9CCD3;
  --eyebrow: #C33A2C;
  --nav-active: #C33A2C;
  --btn-outline: #14284B;
  --logo-bg: transparent;
}

:root[data-theme="dark"] {
  --bg: #14284B;
  --bg-alt: #0F1D36;
  --bg-band: #0B162B;
  --bg-band-text: #FFFFFF;
  --bg-band-muted: #C9D2E3;
  --text: #E6EAF2;
  --text-muted: #C9D2E3;
  --text-faint: #98A6C2;
  --heading: #FFFFFF;
  --line: #2A3D62;
  --card: #1D3560;
  --card-border: #2A3D62;
  --ph-bg: #1D3560;
  --ph-border: #6B7A99;
  --ph-text: #B8C2D6;
  --footer-bg: #0B162B;
  --footer-text: #B8C2D6;
  --footer-line: #2A3D62;
  --input-bg: #0F1D36;
  --input-border: #3B4F78;
  --eyebrow: #E8A79E;
  --nav-active: #E8A79E;
  --btn-outline: #FFFFFF;
  --logo-bg: #FFFFFF;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14284B;
    --bg-alt: #0F1D36;
    --bg-band: #0B162B;
    --text: #E6EAF2;
    --text-muted: #C9D2E3;
    --text-faint: #98A6C2;
    --heading: #FFFFFF;
    --line: #2A3D62;
    --card: #1D3560;
    --card-border: #2A3D62;
    --ph-bg: #1D3560;
    --ph-border: #6B7A99;
    --ph-text: #B8C2D6;
    --footer-bg: #0B162B;
    --input-bg: #0F1D36;
    --input-border: #3B4F78;
    --eyebrow: #E8A79E;
    --nav-active: #E8A79E;
    --btn-outline: #FFFFFF;
    --logo-bg: #FFFFFF;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Times New Roman", Times, "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  transition: background-color .25s ease, color .25s ease;
}
a { color: var(--heading); text-decoration: none; }
a:hover { color: var(--red); }
h1, h2, h3 { font-family: "Times New Roman", Times, "Noto Serif TC", "Noto Sans TC", serif; color: var(--heading); margin: 0; line-height: 1.3; }
p { margin: 0; }
img { max-width: 100%; display: block; }

.wrap { width: min(1152px, 100% - 32px); margin-inline: auto; }
.eyebrow { font-size: 13px; letter-spacing: 3px; color: var(--eyebrow); font-weight: 700; text-transform: uppercase; }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); font-size: 13px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo { height: 32px; width: auto; padding: 3px 6px; border-radius: 4px; background: var(--logo-bg); }
.brand span { font-size: 15px; font-weight: 500; color: var(--heading); }
.nav { display: flex; align-items: center; gap: 28px; font-size: 15px; font-weight: 500; }
.nav a.active { color: var(--nav-active); border-bottom: 2px solid var(--red); padding-bottom: 3px; }
.nav-toggle { display: none; }
.lang-switch { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 500; color: var(--text-muted); white-space: nowrap; }
.lang-switch .on { color: var(--heading); font-weight: 700; }
.lang-switch .sep { color: var(--line); }
.lang-switch:hover span:not(.sep) { color: var(--red); }
.media-img { display: block; width: 100%; height: auto; border-radius: 6px; }
.card-img { display: block; width: 100%; height: 180px; object-fit: cover; border-radius: 4px; }
.founder-photo { display: block; width: 100%; height: auto; border-radius: 6px; object-fit: cover; }
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 999px;
  border: 1px solid var(--line); background: transparent; color: var(--heading); cursor: pointer;
}
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}

/* Buttons */
.btn { display: inline-block; padding: 14px 28px; border-radius: 4px; font-size: 16px; font-weight: 700; line-height: 1.2; }
.btn-primary { background: var(--red); color: #FFFFFF; }
.btn-primary:hover { background: #A93023; color: #FFFFFF; }
.btn-outline { border: 2px solid var(--btn-outline); color: var(--btn-outline); padding: 12px 26px; }
.btn-outline:hover { border-color: var(--red); color: var(--red); }
.btn-sm { padding: 10px 18px; font-size: 14px; }

/* Sections */
.section { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { display: flex; flex-direction: column; gap: 10px; margin-bottom: 40px; }
.section-head.center { align-items: center; text-align: center; }
.section-head h2 { font-size: clamp(28px, 3.5vw, 36px); }

.band { background: var(--bg-band); color: var(--bg-band-text); padding: 64px 0; }
.band h1 { color: #FFFFFF; font-size: clamp(32px, 4.5vw, 44px); }
.band p { color: var(--bg-band-muted); max-width: 720px; font-size: 17px; margin-top: 12px; }
.band .eyebrow { color: var(--red-soft); }

/* Hero */
.hero { background: var(--bg-alt); padding: 80px 0; }
.hero .wrap { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(30px, 4vw, 48px); font-weight: 700; margin: 20px 0 22px; }
.hero h1 .nowrap { white-space: nowrap; }
.hero .lead { font-size: 18px; max-width: 520px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.carousel { display: flex; flex-direction: column; gap: 12px; }
.carousel .slides { position: relative; aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden; background: var(--ph-bg); }
.carousel .slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .7s ease; }
.carousel .slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.carousel .slide figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 16px 12px; color: #fff; font-size: 14px; line-height: 1.4; background: linear-gradient(to top, rgba(20, 40, 75, .78), rgba(20, 40, 75, 0)); }
.carousel .slide.on { opacity: 1; }
.dots { display: flex; gap: 8px; justify-content: center; }
.dots button, .dots span { width: 28px; height: 6px; border-radius: 3px; background: var(--line); border: 0; padding: 0; cursor: pointer; }
.dots button.on, .dots span.on { background: var(--red); }
@media (prefers-reduced-motion: reduce) { .carousel .slide { transition: none; } }

/* Placeholder */
.ph {
  border: 2px dashed var(--ph-border); border-radius: 8px; background: var(--ph-bg);
  color: var(--ph-text); font-size: 14px; text-align: center;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 24px;
}
.ph strong { color: var(--text-muted); }

/* Grids and cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; align-items: center; }
.card { background: var(--card); border: 1px solid var(--card-border); border-radius: 8px; padding: 36px 28px; display: flex; flex-direction: column; gap: 14px; }
.card h3 { font-size: 21px; }
.card .num {
  width: 46px; height: 46px; border-radius: 50%; color: #FFFFFF; background: var(--navy);
  display: flex; align-items: center; justify-content: center; font-family: "Times New Roman", Times, "Noto Serif TC", serif; font-size: 20px; font-weight: 700;
}
.card.accent { border-top: 4px solid var(--red); }
.card.accent .num { background: var(--red); }
.card.navy { border-top: 4px solid var(--navy); }
:root[data-theme="dark"] .card.navy { border-top-color: var(--red-soft); }
:root[data-theme="dark"] .card .num { background: #2A4A80; }
:root[data-theme="dark"] .card.accent .num { background: var(--red); }

.logo-cell {
  min-height: 72px; border: 1px solid var(--card-border); border-radius: 6px; background: var(--card);
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 10px 12px; font-size: 15px; color: var(--text);
}

.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags span { font-size: 13px; padding: 5px 12px; border: 1px solid var(--heading); border-radius: 999px; color: var(--heading); }

.big-num { font-family: "Times New Roman", Times, "Noto Serif TC", serif; font-size: 48px; color: var(--line); font-weight: 700; line-height: 1; }
:root[data-theme="dark"] .big-num { color: #2A3D62; }

.service-block { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 56px; align-items: center; padding: 72px 0; }
.service-block .text { display: flex; flex-direction: column; gap: 18px; }
.service-block h2 { font-size: clamp(26px, 3vw, 32px); }
.service-block ul { margin: 0; padding-left: 20px; }
.service-block.flip .media { order: 2; }

.quote { padding: 22px 26px; border-left: 4px solid var(--red); background: var(--card); font-family: "Times New Roman", Times, "Noto Serif TC", serif; font-size: 18px; color: var(--heading); }

.timeline { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.timeline > div { border-top: 3px solid var(--navy); padding-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.timeline > div:first-child { border-top-color: var(--red); }
:root[data-theme="dark"] .timeline > div { border-top-color: #3B4F78; }
:root[data-theme="dark"] .timeline > div:first-child { border-top-color: var(--red); }
.timeline .year { font-family: "Times New Roman", Times, "Noto Serif TC", serif; font-size: 24px; font-weight: 700; color: var(--heading); }

.cta {
  padding: 48px 56px; border-radius: 8px; background: var(--card); border-left: 6px solid var(--red);
  display: flex; align-items: center; justify-content: space-between; gap: 32px;
}
.cta h2 { font-size: clamp(22px, 2.6vw, 28px); }
.cta.dark { background: var(--navy); border-left: 0; }
.cta.dark h2 { color: #FFFFFF; }
.cta.dark p { color: #C9D2E3; }
:root[data-theme="dark"] .cta.dark { background: #0B162B; }

/* Form */
.form { display: flex; flex-direction: column; gap: 20px; padding: 36px; background: var(--card); border: 1px solid var(--card-border); border-radius: 8px; }
.form h2 { font-size: 26px; }
.form .row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 14px; font-weight: 500; color: var(--heading); }
.field label b { color: var(--red); font-weight: 700; }
.field input, .field select, .field textarea {
  font: inherit; font-size: 15px; color: var(--text);
  background: var(--input-bg); border: 1px solid var(--input-border); border-radius: 4px;
  padding: 12px 14px; min-height: 48px; width: 100%;
}
.field textarea { min-height: 150px; resize: vertical; }
.form button { font: inherit; font-size: 16px; font-weight: 700; color: #FFFFFF; background: var(--red); border: 0; border-radius: 4px; min-height: 52px; cursor: pointer; }
.form button:hover { background: #A93023; }

.contact-info { display: flex; flex-direction: column; gap: 12px; }
.contact-info .k { font-size: 12px; color: var(--text-faint); letter-spacing: 1px; }
.contact-info .v { font-size: 15px; }
.map { width: 100%; height: 300px; border: 0; border-radius: 8px; }

.legal { padding: 36px 44px; border-radius: 8px; background: var(--card); border: 1px solid var(--card-border); display: flex; flex-direction: column; gap: 14px; }
.legal h2 { font-size: 20px; }

/* Footer */
.site-footer { background: var(--footer-bg); color: var(--footer-text); padding: 48px 0 28px; margin-top: auto; }
.site-footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
.site-footer .col { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.site-footer .col b { color: #FFFFFF; }
.site-footer .col a { color: var(--footer-text); }
.site-footer .col a:hover { color: #FFFFFF; }
.site-footer .brandmark { font-family: "Times New Roman", Times, "Noto Serif TC", serif; font-size: 22px; color: #FFFFFF; font-weight: 700; }
.site-footer .legal-line { border-top: 1px solid var(--footer-line); margin-top: 28px; padding-top: 18px; font-size: 12px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }

.page { min-height: 100vh; display: flex; flex-direction: column; }

/* Mobile */
@media (max-width: 900px) {
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav a.active { border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 12px; text-align: center; }
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 6px; background: transparent; color: var(--heading); cursor: pointer; }
  .header-actions { display: flex; gap: 8px; flex-shrink: 0; }
  .site-header .wrap { gap: 8px; }
  .brand { flex-shrink: 0; min-width: 0; gap: 8px; }
  .brand span { white-space: nowrap; font-size: 13px; }
  .lang-switch { font-size: 13px; }
  .hero .wrap, .grid-2, .service-block, .form .row { grid-template-columns: 1fr; }
  .service-block.flip .media { order: 0; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4, .timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-footer .cols { grid-template-columns: 1fr; }
  .cta { flex-direction: column; align-items: flex-start; padding: 32px 24px; }
  .section { padding: 56px 0; }
  .hero { padding: 48px 0; }
  .form { padding: 24px; }
  .legal { padding: 24px; }
}

@media (max-width: 520px) {
  .brand span { display: none; }
}
