/* 智源有限公司 — Herman Co. Ltd. */

:root {
  --red: #c8161d;
  --red-hover: #e01e26;
  --red-deep: #9a1016;
  --red-soft: rgba(200, 22, 29, 0.16);
  --red-glow: rgba(200, 22, 29, 0.4);

  --bg: #0b0a0a;
  --bg-elevated: #121010;
  --bg-card: #161413;
  --bg-card-hover: #1c1917;
  --bg-header: rgba(11, 10, 10, 0.94);

  --ink: #f6f3f0;
  --ink-muted: #a39c97;
  --ink-subtle: #6f6a66;

  --line: rgba(246, 243, 240, 0.08);
  --line-strong: rgba(246, 243, 240, 0.16);

  --font: "Outfit", "Noto Sans TC", "Noto Sans CJK TC", system-ui, sans-serif;
  --font-cjk: "Noto Sans TC", "Noto Sans CJK TC", "Outfit", system-ui, sans-serif;

  --space: 1.25rem;
  --header-h: 4.5rem;
  --radius: 1rem;
  --radius-sm: 0.625rem;
  --max: 72rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-red: 0 10px 40px -12px rgba(200, 22, 29, 0.55);
  --shadow-card: none;
  --bg-footer: #090808;
  --bg-input: #0e0c0c;
  --wash: rgba(255, 255, 255, 0.03);
  --input-hover-border: rgba(246, 243, 240, 0.28);
  --hero-grid-line: rgba(246, 243, 240, 0.07);
  --hero-glow-red: rgba(200, 22, 29, 0.28);
  --hero-glow-soft: rgba(246, 243, 240, 0.06);
  --hero-beam: rgba(200, 22, 29, 0.55);
  --hero-cta-glow: rgba(200, 22, 29, 0.22);
  --hero-node-line: rgba(246, 243, 240, 0.13);
  --hero-node-ink: #f6f3f0;
}

html[data-theme="light"] {
  --bg: #f3efe9;
  --bg-elevated: #ebe6de;
  --bg-card: #fbf8f3;
  --bg-card-hover: #ffffff;
  --bg-header: rgba(243, 239, 233, 0.97);
  --bg-footer: #e6e0d7;
  --bg-input: #fffdf9;

  --ink: #1c1816;
  --ink-muted: #4c4742;
  --ink-subtle: #7a736c;

  --line: rgba(28, 24, 22, 0.09);
  --line-strong: rgba(28, 24, 22, 0.16);

  --red-soft: rgba(200, 22, 29, 0.14);
  --red-glow: rgba(200, 22, 29, 0.28);
  --shadow-red: 0 10px 32px -14px rgba(200, 22, 29, 0.38);
  --shadow-card: 0 1px 2px rgba(28, 24, 22, 0.04), 0 10px 28px -16px rgba(28, 24, 22, 0.12);
  --wash: rgba(28, 24, 22, 0.04);
  --input-hover-border: rgba(28, 24, 22, 0.28);

  --hero-grid-line: rgba(28, 24, 22, 0.08);
  --hero-glow-red: rgba(200, 22, 29, 0.16);
  --hero-glow-soft: rgba(255, 255, 255, 0.55);
  --hero-beam: rgba(200, 22, 29, 0.42);
  --hero-cta-glow: rgba(200, 22, 29, 0.14);
  --hero-node-line: rgba(28, 24, 22, 0.16);
  --hero-node-ink: #1c1816;
}

@media (prefers-color-scheme: light) {
  html:not([data-theme]) {
    --bg: #f3efe9;
    --bg-elevated: #ebe6de;
    --bg-card: #fbf8f3;
    --bg-card-hover: #ffffff;
    --bg-header: rgba(243, 239, 233, 0.97);
    --bg-footer: #e6e0d7;
    --bg-input: #fffdf9;
    --ink: #1c1816;
    --ink-muted: #4c4742;
    --ink-subtle: #7a736c;
    --line: rgba(28, 24, 22, 0.09);
    --line-strong: rgba(28, 24, 22, 0.16);
    --red-soft: rgba(200, 22, 29, 0.14);
    --red-glow: rgba(200, 22, 29, 0.28);
    --shadow-red: 0 10px 32px -14px rgba(200, 22, 29, 0.38);
    --shadow-card: 0 1px 2px rgba(28, 24, 22, 0.04), 0 10px 28px -16px rgba(28, 24, 22, 0.12);
    --wash: rgba(28, 24, 22, 0.04);
    --input-hover-border: rgba(28, 24, 22, 0.28);
    --hero-grid-line: rgba(28, 24, 22, 0.08);
    --hero-glow-red: rgba(200, 22, 29, 0.16);
    --hero-glow-soft: rgba(255, 255, 255, 0.55);
    --hero-beam: rgba(200, 22, 29, 0.42);
    --hero-cta-glow: rgba(200, 22, 29, 0.14);
    --hero-node-line: rgba(28, 24, 22, 0.16);
    --hero-node-ink: #1c1816;
  }
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  color-scheme: dark;
  hanging-punctuation: first allow-end last;
  background: var(--bg);
}
html[data-theme="light"] { color-scheme: light; }
html[data-theme="dark"] { color-scheme: dark; }
@media (prefers-color-scheme: light) {
  html:not([data-theme]) { color-scheme: light; }
}

html:lang(zh-Hant) { font-family: var(--font-cjk); }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink-muted);
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

:lang(zh-Hant) body { line-height: 1.8; word-break: keep-all; line-break: strict; overflow-wrap: break-word; }
:lang(zh-Hant) h1,
:lang(zh-Hant) h2,
:lang(zh-Hant) h3,
:lang(zh-Hant) .hero-lead,
:lang(zh-Hant) .lead,
:lang(zh-Hant) .footer-address,
:lang(zh-Hant) .contact-list .value { word-break: keep-all; line-break: strict; }

html[data-theme="light"] body { -webkit-font-smoothing: auto; }
@media (prefers-color-scheme: light) {
  html:not([data-theme]) body { -webkit-font-smoothing: auto; }
}

body.nav-open { overflow: hidden; }

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }

h1, h2, h3, h4 {
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.15;
  text-wrap: balance;
}

:lang(zh-Hant) h1,
:lang(zh-Hant) h2,
:lang(zh-Hant) h3 {
  font-family: var(--font-cjk);
  letter-spacing: 0.02em;
  font-weight: 600;
  line-height: 1.28;
}

::selection {
  background: var(--red);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 1000;
  padding: 0.6rem 1rem;
  background: var(--red);
  color: #fff;
  text-decoration: none;
  border-radius: 0.4rem;
  font-weight: 500;
}
.skip-link:focus { top: 1rem; }

/* ── Layout ── */
.wrap {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.wrap-wide {
  width: min(100% - 2.5rem, 80rem);
  margin-inline: auto;
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  background: transparent;
  transition: background 0.35s var(--ease), border-color 0.35s var(--ease), backdrop-filter 0.35s var(--ease);
}

.site-header.is-scrolled {
  background: var(--bg-header);
  border-bottom-color: var(--line);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}
.site-header.is-open {
  background: var(--bg);
  border-bottom-color: var(--line);
}
html[data-theme="light"] .site-header.is-scrolled,
html[data-theme="light"] .site-header.is-open {
  background: #f3efe9;
}
@media (prefers-color-scheme: light) {
  html:not([data-theme]) .site-header.is-scrolled,
  html:not([data-theme]) .site-header.is-open {
    background: #f3efe9;
  }
}


.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.logo {
  display: flex;
  align-items: center;
  position: relative;
  flex: 0 0 auto;
  z-index: 2;
}
.logo img {
  height: 2.35rem;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin-left: auto;
}

.nav a {
  text-decoration: none;
  padding: 0.45rem 0.85rem;
  border-radius: 0.45rem;
  color: var(--ink-muted);
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] {
  color: var(--ink);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: 0.5rem;
  z-index: 2;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.15rem;
  background: var(--wash);
}
.lang-switch a,
.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-subtle);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  padding: 0.28rem 0.62rem;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1;
}
.lang-switch a.is-active,
.lang-switch button.is-active {
  background: var(--ink);
  color: var(--bg);
}
.lang-switch a:hover:not(.is-active),
.lang-switch button:hover:not(.is-active) {
  color: var(--ink);
}

.menu-toggle {
  display: none;
  appearance: none;
  border: 0;
  background: transparent;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  cursor: pointer;
  position: relative;
  border-radius: 0.4rem;
  color: var(--ink);
}
.menu-toggle span {
  position: absolute;
  left: 0.6rem;
  right: 0.6rem;
  top: 50%;
  height: 1.5px;
  background: currentColor;
  transform: translateY(-50%);
  transition: background 0.2s var(--ease);
}
.menu-toggle span::before,
.menu-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s var(--ease), top 0.3s var(--ease);
}
.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }
.menu-toggle[aria-expanded="true"] span { background: transparent; }
.menu-toggle[aria-expanded="true"] span::before {
  top: 0;
  transform: rotate(45deg);
}
.menu-toggle[aria-expanded="true"] span::after {
  top: 0;
  transform: rotate(-45deg);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.8rem 1.35rem;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease), box-shadow 0.2s var(--ease), color 0.2s var(--ease);
}
.btn-primary {
  background: var(--red);
  color: #fff;
  box-shadow: var(--shadow-red);
}
.btn-primary:hover {
  background: var(--red-hover);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn-ghost:hover {
  border-color: var(--ink-muted);
  background: var(--wash);
}
.btn-header {
  padding: 0.58rem 1.05rem;
  font-size: 0.875rem;
}

/* ── Hero ── */
.hero {
  position: relative;
  isolation: isolate;
  min-height: calc(100svh - var(--header-h));
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 4.5rem 0 5.5rem;
}

.hero-visual {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  left: -20%;
  right: -20%;
  bottom: -35%;
  height: 95%;
  background-image:
    linear-gradient(to right, var(--hero-grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--hero-grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  transform: perspective(700px) rotateX(62deg);
  transform-origin: center top;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.75), transparent 85%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.75), transparent 85%);
}

.hero-glow {
  position: absolute;
  width: 52rem;
  height: 32rem;
  left: 50%;
  top: 12%;
  translate: -50% -30%;
  background:
    radial-gradient(closest-side, var(--hero-glow-red), transparent 70%),
    radial-gradient(closest-side, var(--hero-glow-soft), transparent 70%);
  filter: blur(8px);
}

.hero-beam {
  position: absolute;
  width: 1px;
  height: 42%;
  left: 18%;
  top: 0;
  background: linear-gradient(to bottom, transparent, var(--hero-beam), transparent);
  opacity: 0.55;
}
.hero-beam:nth-child(3) { left: auto; right: 22%; opacity: 0.35; height: 32%; }

.hero-nodes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-inner {
  position: relative;
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 1.5rem;
}
.eyebrow::before {
  content: "";
  width: 1.5rem;
  height: 1px;
  background: var(--red);
}

.hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 5.15rem);
  max-width: 16ch;
  margin-bottom: 1.35rem;
}
:lang(zh-Hant) .hero h1,
:lang(zh-Hant) .page-hero h1 {
  max-width: 12em;
}

.hero-lead {
  max-width: 38rem;
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--ink-muted);
  margin-bottom: 2.15rem;
}
:lang(zh-Hant) .hero-lead { max-width: 32em; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 3.25rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 3rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
  max-width: 40rem;
}
.hero-meta dt {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  margin-bottom: 0.25rem;
}
.hero-meta dd {
  margin: 0;
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.01em;
}

/* ── Sections ── */
.section {
  padding: 6.5rem 0;
  position: relative;
  scroll-margin-top: var(--header-h);
}

.section-tight {
  padding-top: 2.25rem;
  padding-bottom: 7rem;
}
.page-hero-compact {
  padding: 2.1rem 0 1.7rem;
}
.page-hero-compact h1 {
  font-size: clamp(2.05rem, 4.4vw, 3.15rem);
  margin-bottom: 0.7rem;
}
.section-tight .form-card { padding: 1.45rem 1.45rem 1.35rem; }
.section-tight textarea { min-height: 5.75rem; }
.section-tight .contact-list li { padding: 1.05rem 0; }
.section-tight .form-note { margin-bottom: 1.1rem; }
.section-alt {
  background: var(--bg-elevated);
  border-block: 1px solid var(--line);
}

.section-head {
  margin-bottom: 3rem;
  max-width: 40rem;
}

.section-kicker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 0.9rem;
}

.section-kicker .idx {
  color: var(--ink-subtle);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.section-head h2 {
  font-size: clamp(1.85rem, 3.4vw, 2.65rem);
  margin-bottom: 0.85rem;
}

.section-head p { max-width: 36rem; }

/* ── Value cards ── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.15rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 1.6rem 1.7rem;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease), background 0.25s var(--ease);
  position: relative;
  overflow: hidden;
}
.card:hover {
  border-color: var(--line-strong);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}

.card-icon {
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 1.35rem;
  color: var(--red);
  display: grid;
  place-items: center;
}
.card-icon svg {
  width: 1.85rem;
  height: 1.85rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.card h3 {
  font-size: 1.25rem;
  margin-bottom: 0.65rem;
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
}
.card h3 span.en-label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  font-family: var(--font);
}

.card p { font-size: 0.98rem; }

/* ── Services ── */
.service-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.service-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.15rem;
  padding: 1.5rem 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  text-decoration: none;
  color: inherit;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), transform 0.25s var(--ease);
}
.service-item {
  flex: 1 1 calc(50% - 0.5rem);
  min-width: min(100%, 16.5rem);
}
@media (min-width: 901px) {
  .service-item { flex: 1 1 calc(33.333% - 0.67rem); }
}
a.service-item:hover {
  border-color: var(--line-strong);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
}
.service-item h3 {
  font-size: 1.12rem;
  margin-bottom: 0.35rem;
}
.service-item p { font-size: 0.95rem; }


/* ── Industries ── */
.industry-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.industry {
  padding: 1.6rem 1.3rem 1.45rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  min-height: 8.75rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.85rem;
  position: relative;
  overflow: hidden;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.industry:hover {
  border-color: var(--line-strong);
  background: var(--bg-card);
}
.industry svg {
  width: 1.7rem;
  height: 1.7rem;
  stroke: var(--red);
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: auto;
}
.industry h3 {
  font-size: 1.12rem;
  letter-spacing: 0;
}

/* ── CTA band ── */
.cta-band {
  padding: 5.5rem 0;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-top: 1px solid var(--line);
}
.cta-band .glow {
  position: absolute;
  inset: auto 0 -40% 0;
  height: 80%;
  z-index: -1;
  background: radial-gradient(closest-side, var(--hero-cta-glow), transparent 70%);
}
.cta-band h2 {
  font-size: clamp(1.85rem, 3.5vw, 2.8rem);
  max-width: 16ch;
  margin-bottom: 0.9rem;
}
:lang(zh-Hant) .cta-band h2 { max-width: 12em; }
.cta-band p {
  max-width: 32rem;
  margin-bottom: 1.75rem;
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 3.5rem 0 2rem;
  background: var(--bg-footer);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.2fr;
  gap: 2.5rem 2rem;
  padding-bottom: 2.5rem;
}
.footer-brand img {
  height: 2.15rem;
  width: auto;
  margin-bottom: 1rem;
}
.footer-brand p {
  font-size: 0.92rem;
  max-width: 24rem;
}
.footer-col h2 {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  margin-bottom: 0.9rem;
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col li + li { margin-top: 0.45rem; }
.footer-col a {
  text-decoration: none;
  color: var(--ink-muted);
  transition: color 0.2s var(--ease);
}
.footer-col a:hover { color: var(--ink); }

.footer-contact a { display: inline-block; }
.footer-contact p + p { margin-top: 0.55rem; }
.footer-address { max-width: 18rem; }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.6rem 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.8125rem;
  color: var(--ink-subtle);
}
.footer-credit a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.footer-credit a:hover { color: var(--ink); }

/* ── Page hero (inner pages) ── */
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 2.75rem 0 2.35rem;
  border-bottom: 1px solid var(--line);
}
.page-hero .hero-visual { opacity: 0.7; }
.page-hero .hero-grid { height: 140%; bottom: -60%; }
.page-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.75rem);
  margin-bottom: 1rem;
  max-width: 16ch;
}
.page-hero .lead {
  max-width: 36rem;
  font-size: 1.125rem;
}

/* ── About ── */
.story {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 3rem 4rem;
  align-items: start;
}
.story-year {
  font-size: clamp(5rem, 12vw, 8.5rem);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 0.85;
  color: var(--ink);
  font-family: var(--font);
}
.story-year span {
  display: block;
  margin-top: 0.8rem;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  font-weight: 500;
}
.story-copy p + p { margin-top: 1.1rem; }
.story-copy p { max-width: 40rem; font-size: 1.0625rem; }

.prose { max-width: 42rem; }
.prose p + p { margin-top: 1.1rem; }

/* Services page detail */
.service-detail {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
.service-row {
  display: grid;
  grid-template-columns: 4.5rem 1fr 1.4fr;
  gap: 1.5rem 2rem;
  padding: 2.15rem 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.service-row .num {
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--ink-subtle);
  padding-top: 0.35rem;
}
.service-row h2 {
  font-size: 1.45rem;
}
.service-row p { max-width: 36rem; }

/* ── Contact ── */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3rem 4rem;
  align-items: start;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.contact-list li {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--line);
}
.contact-list .label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-subtle);
  margin-bottom: 0.4rem;
}
.contact-list a,
.contact-list .value {
  color: var(--ink);
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.contact-list a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 0.2em; }
.contact-list .value { display: block; max-width: 18em; }

.form-card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 0.15rem);
  padding: 1.75rem;
}
.form-card h2 {
  font-size: 1.25rem;
  margin-bottom: 0.4rem;
}
.form-note {
  font-size: 0.9rem;
  margin-bottom: 1.4rem;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 1rem;
}
.field { display: flex; flex-direction: column; gap: 0.4rem; }
.field.full { grid-column: 1 / -1; }
.field label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink-muted);
}
.field .req { color: var(--red); }
.field input,
.field textarea {
  appearance: none;
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink);
  font: inherit;
  font-size: 0.98rem;
  padding: 0.7rem 0.85rem;
  transition: border-color 0.2s var(--ease);
}
.field input:hover,
.field textarea:hover { border-color: var(--input-hover-border); }
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--red);
  box-shadow: 0 0 0 3px var(--red-soft);
}
.field textarea { min-height: 8.5rem; resize: vertical; }

.form-actions {
  margin-top: 1.15rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1.1rem;
}
.form-actions .hint {
  font-size: 0.8rem;
  color: var(--ink-subtle);
}

/* ── Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.8s var(--ease) forwards;
}
.hero-inner > * { animation-delay: 0.05s; }
.hero-inner > *:nth-child(2) { animation-delay: 0.14s; }
.hero-inner > *:nth-child(3) { animation-delay: 0.22s; }
.hero-inner > *:nth-child(4) { animation-delay: 0.3s; }

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-reveal].is-in {
  opacity: 1;
  transform: none;
}
[data-reveal-stagger] > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-reveal-stagger].is-in > *:nth-child(1) { transition-delay: 0.02s; }
[data-reveal-stagger].is-in > *:nth-child(2) { transition-delay: 0.1s; }
[data-reveal-stagger].is-in > *:nth-child(3) { transition-delay: 0.18s; }
[data-reveal-stagger].is-in > *:nth-child(4) { transition-delay: 0.26s; }
[data-reveal-stagger].is-in > *:nth-child(5) { transition-delay: 0.34s; }
[data-reveal-stagger].is-in > * {
  opacity: 1;
  transform: none;
}

@keyframes rise {
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal,
  [data-reveal],
  [data-reveal-stagger] > * {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .card-grid,
  .industry-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .story { grid-template-columns: 1fr; gap: 1.25rem; }
  .story-year { font-size: 4.5rem; }
  .contact-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .service-row { grid-template-columns: 3rem 1fr; }
  .service-row p { grid-column: 2; }
}

@media (max-width: 800px) {
  :root { --header-h: 4rem; }
  .logo img { height: 2.05rem; }
  .btn-header { display: none; }

  .nav {
    display: none;
    position: fixed;
    inset: var(--header-h) 0 0 0;
    margin: 0;
    background: var(--bg);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: 1.5rem 1.25rem 2rem;
    gap: 0.25rem;
    overflow: auto;
    z-index: 120;
  }
  body.nav-open .nav { display: flex; }
  .nav a {
    font-size: 1.5rem;
    padding: 0.85rem 0.4rem;
    border-radius: 0.4rem;
    color: var(--ink);
    letter-spacing: 0.02em;
  }
  .nav .nav-cta {
    display: inline-flex;
    margin-top: 1.25rem;
    align-self: flex-start;
    background: var(--red);
    color: #fff;
    border-radius: 999px;
    padding: 0.85rem 1.3rem;
    font-size: 1rem;
    box-shadow: var(--shadow-red);
  }

  .menu-toggle { display: inline-flex; }

  .service-list { display: grid; grid-template-columns: 1fr; }
  .hero { padding: 3.25rem 0 4rem; min-height: calc(100svh - var(--header-h)); }
  .section { padding: 4.5rem 0; }
  .page-hero { padding: 3rem 0 2.5rem; }
}

@media (max-width: 600px) {
  .wrap, .wrap-wide, .hero-inner { width: min(100% - 1.75rem, var(--max)); }
  .card-grid,
  .industry-grid,
  .form-grid,
  .footer-grid { grid-template-columns: 1fr; }
  .hero-meta { gap: 1.25rem 2rem; }
  .hero h1 { font-size: clamp(2.15rem, 11vw, 3.1rem); }
  :lang(zh-Hant) .hero h1 { font-size: clamp(1.95rem, 8.1vw, 2.4rem); }
  .industry { min-height: auto; }
  .form-card { padding: 1.25rem; }
  .cta-band { padding: 4rem 0; }
  .service-row { grid-template-columns: 1fr; gap: 0.5rem; }
  .service-row p { grid-column: auto; }
}

@media (min-width: 801px) {
  .nav .nav-cta { display: none; }
}


.logo {
  position: relative;
}
.logo-img-light { display: none; }
html[data-theme="light"] .logo-img-dark { display: none; }
html[data-theme="light"] .logo-img-light { display: block; }
@media (prefers-color-scheme: light) {
  html:not([data-theme]) .logo-img-dark { display: none; }
  html:not([data-theme]) .logo-img-light { display: block; }
}

.hero-nodes .hero-node-lines { color: var(--hero-node-line); }
.hero-nodes .is-ink { fill: var(--hero-node-ink); }
.hero-nodes .is-red { fill: var(--red); }

html[data-theme="light"] .card,
html[data-theme="light"] .service-item,
html[data-theme="light"] .form-card,
html[data-theme="light"] .industry,
html[data-theme="light"] .theme-menu {
  box-shadow: var(--shadow-card);
}
@media (prefers-color-scheme: light) {
  html:not([data-theme]) .card,
  html:not([data-theme]) .service-item,
  html:not([data-theme]) .form-card,
  html:not([data-theme]) .industry,
  html:not([data-theme]) .theme-menu {
    box-shadow: var(--shadow-card);
  }
}

/* ── Theme switch ── */
.theme-switch {
  position: relative;
  flex: 0 0 auto;
}
.theme-toggle {
  appearance: none;
  width: 2.15rem;
  height: 2.15rem;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--wash);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.theme-toggle:hover { border-color: var(--ink-muted); }
.theme-toggle svg {
  width: 1.1rem;
  height: 1.1rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: none;
}
html[data-theme="light"] .theme-toggle .icon-sun { display: block; }
html[data-theme="dark"] .theme-toggle .icon-moon,
html:not([data-theme]) .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: light) {
  html:not([data-theme]) .theme-toggle .icon-moon { display: none; }
  html:not([data-theme]) .theme-toggle .icon-sun { display: block; }
}
.theme-toggle[aria-expanded="true"] { border-color: var(--ink-muted); }

.theme-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  z-index: 200;
  min-width: 9.5rem;
  padding: 0.3rem;
  margin: 0;
  list-style: none;
  background: var(--bg-card);
  border: 1px solid var(--line-strong);
  border-radius: 0.75rem;
  box-shadow: 0 16px 40px -16px rgba(0, 0, 0, 0.45);
}
html[data-theme="light"] .theme-menu {
  box-shadow: 0 16px 40px -18px rgba(28, 24, 22, 0.28);
}
.theme-menu[hidden] { display: none; }
.theme-menu button {
  appearance: none;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.5rem 0.65rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--ink-muted);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  line-height: 1.2;
}
.theme-menu button:hover,
.theme-menu button:focus-visible {
  background: var(--wash);
  color: var(--ink);
  outline: none;
}
.theme-menu button[aria-checked="true"] {
  color: var(--ink);
  background: var(--wash);
}
.theme-menu button svg {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.theme-menu button[aria-checked="true"] svg { color: var(--red); }

