:root {
  color-scheme: dark;
  --bg: #0b1110;
  --surface: #111c1a;
  --surface-2: #162521;
  --text: #eef7f2;
  --muted: #a6bbb3;
  --line: rgba(238, 247, 242, 0.12);
  --accent: #8ee8c7;
  --accent-2: #d7b56d;
  --mark-filter: invert(92%) sepia(15%) saturate(287%) hue-rotate(103deg) brightness(104%) contrast(94%);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}
:root[data-theme="day"] {
  color-scheme: light;
  --bg: #f6f3ea;
  --surface: #fffdf7;
  --surface-2: #ede5d6;
  --text: #17211d;
  --muted: #5f6f66;
  --line: rgba(23, 33, 29, 0.13);
  --accent: #2f7d62;
  --accent-2: #c99a3e;
  --mark-filter: none;
  --shadow: 0 24px 80px rgba(47, 62, 52, 0.16);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Manrope", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Heiti TC", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--accent) 18%, transparent), transparent 34rem),
    radial-gradient(circle at 85% 8%, color-mix(in srgb, var(--accent-2) 16%, transparent), transparent 28rem),
    var(--bg);
  color: var(--text);
  line-height: 1.6;
  transition: background .25s ease, color .25s ease;
}
a { color: inherit; }
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1.5rem;
  padding: .9rem clamp(1rem, 4vw, 4rem);
  padding-right: clamp(4.8rem, 7vw, 6.2rem);
  backdrop-filter: blur(18px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: .75rem; text-decoration: none; font-weight: 800; letter-spacing: -.02em; }
.brand-mark { width: 2.7rem; height: 2.7rem; object-fit: contain; filter: var(--mark-filter); }
nav { justify-self: center; display: flex; gap: 1rem; color: var(--muted); font-size: .95rem; }
nav a { text-decoration: none; }
nav a:hover { color: var(--text); }
.theme-toggle {
  width: 2.75rem;
  height: 2.75rem;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  color: var(--text);
  border-radius: 999px;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 10px 30px color-mix(in srgb, var(--bg) 35%, transparent);
  backdrop-filter: blur(16px);
}
.theme-toggle .theme-icon { grid-area: 1 / 1; width: 1.2rem; height: 1.2rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: opacity .18s ease, transform .18s ease; }
.theme-toggle .sun circle { fill: currentColor; stroke: none; }
:root[data-theme="day"] .theme-toggle .moon,
:root:not([data-theme="day"]) .theme-toggle .sun { opacity: 0; transform: scale(.7) rotate(-20deg); }
:root[data-theme="day"] .theme-toggle .sun,
:root:not([data-theme="day"]) .theme-toggle .moon { opacity: 1; transform: scale(1) rotate(0deg); }
.section { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; padding: clamp(4rem, 8vw, 7rem) 0; }
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(320px, .85fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; min-height: 78vh; }
.eyebrow { margin: 0 0 .9rem; color: var(--accent); text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; font-weight: 850; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(2.55rem, 6.6vw, 5.6rem); line-height: 1.04; letter-spacing: -.045em; margin-bottom: 1.4rem; text-wrap: balance; }
h2 { font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.12; letter-spacing: -.03em; margin-bottom: 1rem; text-wrap: balance; }
h3 { font-size: 1.24rem; margin-bottom: .7rem; }
:lang(zh-Hant) h1,
:lang(zh-Hant) h2,
:lang(zh-Hant) h3,
:lang(zh-Hant) .lead,
:lang(zh-Hant) nav,
:lang(zh-Hant) .button {
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", "Heiti TC", "Manrope", sans-serif;
}
:lang(zh-Hant) h1 { line-height: 1.28; letter-spacing: .005em; font-weight: 600; }
:lang(zh-Hant) h2 { line-height: 1.24; letter-spacing: 0; font-weight: 700; }
.lead { color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.25rem); max-width: 43rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 3rem; padding: .8rem 1.15rem; border-radius: 999px; text-decoration: none; font-weight: 850; border: 1px solid var(--line); transition: transform .2s ease, background .2s ease; }
.button.primary { background: var(--text); color: var(--bg); }
.button.secondary { color: var(--text); background: color-mix(in srgb, var(--surface) 72%, transparent); }
.button:hover, .text-link:hover { transform: translateY(-1px); }
.emblem-card, .card, .work-preview, .contact { background: linear-gradient(180deg, color-mix(in srgb, var(--surface) 88%, transparent), color-mix(in srgb, var(--surface-2) 54%, transparent)); border: 1px solid var(--line); border-radius: 1.6rem; box-shadow: var(--shadow); }
.emblem-card { padding: clamp(1.4rem, 4vw, 2.4rem); text-align: center; overflow: hidden; position: relative; }
.emblem-card::before { content: ""; position: absolute; inset: 8%; border-radius: 999px; background: radial-gradient(circle, color-mix(in srgb, var(--accent-2) 18%, transparent), transparent 62%); }
.emblem-card img { position: relative; width: min(420px, 92%); filter: var(--mark-filter); }
.emblem-card p { position: relative; color: var(--muted); margin: 1rem auto 0; max-width: 24rem; }
.section-heading { max-width: 760px; margin-bottom: 2rem; }
.section-heading p { color: var(--muted); max-width: 44rem; }
.cards.three { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.card { padding: 1.45rem; }
.card-number { display: inline-flex; margin-bottom: 2rem; color: var(--accent-2); font-weight: 950; }
.card p, .split p, .contact p, .steps span, .fit-grid span { color: var(--muted); }
.fit-section { padding-top: 0; }
.fit-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.fit-grid div { border-top: 1px solid var(--line); padding: 1.1rem 0 0; }
.fit-grid strong, .fit-grid span { display: block; }
.fit-grid strong { margin-bottom: .35rem; }
.split { display: grid; grid-template-columns: .9fr 1.1fr; gap: 2rem; align-items: center; }
.text-link { color: var(--accent); font-weight: 850; text-decoration: none; display: inline-block; margin-top: .7rem; }
.check-list { padding: 0; margin: 1.25rem 0 0; list-style: none; color: var(--muted); }
.check-list li { margin: .35rem 0; }
.check-list li::before { content: "✓"; color: var(--accent); font-weight: 900; margin-right: .55rem; }
.work-preview { min-height: 24rem; padding: 1.2rem; overflow: hidden; }
.mock-browser { display: flex; gap: .45rem; padding-bottom: 1rem; border-bottom: 1px solid var(--line); }
.mock-browser span { width: .7rem; height: .7rem; border-radius: 999px; background: var(--line); }
.mock-hero { height: 6rem; margin-top: 1.2rem; border-radius: 1rem; background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 25%, transparent), color-mix(in srgb, var(--accent-2) 16%, transparent)); border: 1px solid var(--line); }
.mock-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; padding-top: 1rem; }
.mock-grid div { min-height: 6.5rem; border-radius: 1rem; background: color-mix(in srgb, var(--surface) 70%, transparent); border: 1px solid var(--line); }
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; counter-reset: step; }
.steps li { counter-increment: step; padding: 1.3rem; border-top: 1px solid var(--line); }
.steps li::before { content: "0" counter(step); display: block; color: var(--accent-2); font-weight: 950; margin-bottom: 1rem; }
.steps strong, .steps span { display: block; }
.contact { text-align: center; padding: clamp(2rem, 6vw, 4rem); }
.contact p { max-width: 36rem; margin-left: auto; margin-right: auto; }
footer { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; padding: 2rem 0 3rem; color: var(--muted); border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.footer-copy { display: flex; flex-direction: column; gap: .25rem; }
.footer-controls { display: inline-flex; align-items: center; gap: .75rem; }
.segmented-control { display: inline-flex; padding: .22rem; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--surface) 78%, transparent); }
.segmented-control button { min-width: 3.1rem; min-height: 2.3rem; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font: inherit; font-size: .88rem; font-weight: 800; cursor: pointer; }
.segmented-control button.is-active { background: var(--text); color: var(--bg); }
@media (max-width: 860px) {
  .site-header { grid-template-columns: 1fr; }
  nav { justify-self: center; flex-wrap: wrap; row-gap: .55rem; font-size: .9rem; }
  .theme-toggle { width: 2.75rem; height: 2.75rem; }
  .theme-toggle .theme-icon { width: 1.1rem; height: 1.1rem; }
  footer { flex-direction: column; align-items: flex-start; }
  .footer-controls { width: 100%; justify-content: space-between; }
  .hero, .split, .cards.three, .steps, .fit-grid { grid-template-columns: 1fr; }
  .hero { min-height: auto; }
}
@media (max-width: 430px) {
  .site-header { padding-left: 1rem; padding-right: 1rem; gap: .75rem; }
  .brand-mark { width: 2.35rem; height: 2.35rem; }
  nav { gap: .7rem; }
  .theme-toggle { width: 2.75rem; height: 2.75rem; }
  .segmented-control button { min-height: 2.45rem; }
  h1 { font-size: clamp(2.2rem, 10.5vw, 3.15rem); }
  :lang(zh-Hant) h1 { line-height: 1.42; letter-spacing: .012em; font-weight: 600; max-width: 11em; }
  .lead { line-height: 1.95; }
}
.hero-note { flex-basis: 100%; margin: .25rem 0 0; max-width: 34rem; color: var(--muted); font-size: .95rem; line-height: 1.7; }

/* Contact CTA polish — avoid cramped two-line button text on mobile. */
.contact-email-button {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: .18rem;
  min-width: min(100%, 25rem);
  padding: .95rem 1.4rem 1.05rem;
  line-height: 1.25;
  white-space: normal;
}
.contact-email-label {
  display: block;
  font-size: .92rem;
  font-weight: 850;
  letter-spacing: .01em;
}
.contact-email-address {
  display: block;
  font-family: "Manrope", ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(.94rem, 3.9vw, 1.08rem);
  font-weight: 780;
  letter-spacing: .005em;
  overflow-wrap: anywhere;
}
@media (max-width: 430px) {
  .contact { padding: 2rem 1.35rem; }
  .contact-email-button {
    width: 100%;
    min-height: 4.25rem;
    padding: .88rem 1rem .98rem;
    border-radius: 1.55rem;
  }
  .contact-email-label { font-size: .84rem; opacity: .82; }
  .contact-email-address { font-size: .98rem; }
}
