/* NDEX — company site (light theme) */
:root {
  --bg: #ffffff;
  --bg-alt: #f6f8fb;
  --surface: #ffffff;
  --ink: #0b1727;
  --text: #334155;
  --muted: #5b6b80;
  --accent: #0b7fa0;
  --accent-hover: #086a86;
  --accent-soft: rgba(11, 127, 160, 0.08);
  --line: #e2e8f0;
  --header-h: 72px;
  --max: 1200px;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  --font: "Inter", "Noto Sans TC", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}

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

html {
  scroll-behavior: smooth;
}

html[data-lang="zh"] {
  letter-spacing: 0.01em;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
}

img {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  color: var(--ink);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

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

.nw {
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 100;
  padding: 8px 14px;
  background: var(--accent);
  color: #ffffff;
  border-radius: 8px;
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
  color: #ffffff;
}

.container {
  width: min(var(--max), calc(100% - 48px));
  margin-inline: auto;
}

/* Shared section furniture */
.section {
  padding: 120px 0;
  background: var(--bg);
}

.section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--line);
}

#about,
#services,
#why,
#contact {
  scroll-margin-top: calc(var(--header-h) + 16px);
}

.eyebrow,
.section-label {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.eyebrow::before,
.section-label::before {
  content: "";
  flex: 0 0 auto;
  width: 28px;
  height: 1px;
  background: var(--accent);
}

html[data-lang="zh"] .eyebrow,
html[data-lang="zh"] .section-label {
  text-transform: none;
}

h2 {
  margin: 0;
  font-size: clamp(30px, 3.6vw, 44px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

html[data-lang="zh"] h2 {
  letter-spacing: 0.02em;
  line-height: 1.3;
}

html[data-lang="zh"] h1,
html[data-lang="zh"] h2,
html[data-lang="zh"] h3 {
  word-break: keep-all;
  line-break: strict;
  overflow-wrap: anywhere;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
  gap: 56px;
  align-items: start;
}

.split-body {
  padding-top: 10px;
}

.legal-name {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 500;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  width: min(var(--max), calc(100% - 48px));
  margin-inline: auto;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 24px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  margin-right: auto;
  line-height: 0;
}

.wordmark .logo-img {
  height: 32px;
  width: auto;
}

.wordmark:hover {
  color: var(--ink);
}

.site-nav {
  display: flex;
  gap: 4px;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 999px;
}

.site-nav a:hover {
  color: var(--ink);
  background: var(--bg-alt);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  line-height: 1;
}

.lang-toggle:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.lang-toggle .lang-sep {
  color: #cbd5e1;
  font-weight: 500;
}

.lang-toggle [data-lang-label] {
  color: #94a3b8;
}

.lang-toggle [data-lang-label].is-active {
  color: var(--accent);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #ffffff;
}

.btn-sm {
  padding: 8px 18px;
  font-size: 0.85rem;
}

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  padding: 104px 0 116px;
  overflow: hidden;
  background: #fbfdfe;
  border-bottom: 1px solid var(--line);
}

.hero-glow {
  position: absolute;
  inset: -24% -12% auto auto;
  width: 640px;
  height: 640px;
  background: radial-gradient(circle, rgba(11, 127, 160, 0.10), transparent 66%);
  pointer-events: none;
  z-index: -1;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(11, 127, 160, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(11, 127, 160, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 78% 8%, #000 15%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse at 78% 8%, #000 15%, transparent 72%);
  pointer-events: none;
  z-index: -1;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 64px;
  align-items: center;
}

.hero h1 {
  margin: 0 0 22px;
  font-size: clamp(38px, 5.4vw, 66px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

html[data-lang="zh"] .hero h1 {
  letter-spacing: 0.02em;
  line-height: 1.25;
}

.lede {
  margin: 0 0 34px;
  color: var(--text);
  font-size: 1.08rem;
  max-width: 42em;
}

.hero-media {
  position: relative;
}

.hero-media::before {
  content: "";
  position: absolute;
  inset: 26px -22px -22px 26px;
  border-radius: 24px;
  background: var(--accent-soft);
  border: 1px solid rgba(11, 127, 160, 0.14);
  z-index: -1;
}

.hero-media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: var(--shadow);
}

/* Service cards */
.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
  margin-top: 64px;
  counter-reset: svc;
}

.card {
  position: relative;
  background: var(--surface);
  border: 1px solid #e5eaf0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent);
  z-index: 1;
}

.card-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.card-body {
  position: relative;
  padding: 30px 32px 34px;
}

.card-body::after {
  counter-increment: svc;
  content: "0" counter(svc);
  position: absolute;
  top: 30px;
  right: 32px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 22px;
}

.card h3 {
  margin: 0 0 12px;
  font-size: 1.28rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.card p {
  margin: 0;
  color: var(--text);
}

/* Why */
.why-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 56px;
  align-items: center;
  margin-top: 56px;
}

.why-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: var(--shadow);
}

.why-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  counter-reset: why;
}

.why-list li {
  position: relative;
  margin: 0;
  padding: 26px 4px 26px 0;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 1.06rem;
  font-weight: 500;
  line-height: 1.55;
}

.why-list li::before {
  counter-increment: why;
  content: "0" counter(why);
  display: block;
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 72px;
  align-items: center;
}

.contact-intro > p:not(.section-label) {
  margin: 18px 0 0;
  color: var(--text);
  font-size: 1.08rem;
}

.contact-intro .btn {
  margin-top: 30px;
}

.contact-note {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.contact-card {
  background: var(--surface);
  border: 1px solid #e5eaf0;
  border-radius: var(--radius);
  padding: 36px 40px;
  box-shadow: var(--shadow);
}

.contact-details {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}

.contact-details li {
  display: grid;
  gap: 2px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
}

.contact-details li:first-child {
  border-top: 0;
  padding-top: 0;
}

.contact-details li:last-child {
  padding-bottom: 0;
}

.contact-k {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

html[data-lang="zh"] .contact-k {
  text-transform: none;
}

.contact-details a,
.contact-details span:not(.contact-k) {
  color: var(--ink);
}

/* Footer */
.site-footer {
  background: #06182b;
  color: #cbd5e1;
  padding: 64px 0 36px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(203, 213, 225, 0.16);
}

.footer-brand {
  display: inline-block;
  margin: 0 0 14px;
  line-height: 0;
}

.footer-brand .logo-img {
  height: 30px;
  width: auto;
}

.footer-legal {
  margin: 0;
  color: #cbd5e1;
  font-size: 0.92rem;
}

.footer-nav {
  display: grid;
  gap: 10px;
  justify-items: start;
  align-content: start;
}

.footer-nav a {
  color: #cbd5e1;
  font-size: 0.95rem;
}

.footer-nav a:hover {
  color: #ffffff;
}

.footer-contact {
  align-self: start;
  justify-self: end;
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  gap: 10px 14px;
}

.footer-contact-row {
  display: contents;
}

.footer-contact-k {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: #94a3b8;
  white-space: nowrap;
}

.footer-contact a {
  color: #ffffff;
  font-size: 0.95rem;
}

.footer-bottom {
  padding-top: 28px;
}

.footer-copy {
  margin: 0;
  color: #94a3b8;
  font-size: 0.88rem;
}

/* Responsive */
@media (min-width: 1024px) {
  .cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .hero-inner,
  .split,
  .contact-grid,
  .why-grid {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    gap: 40px;
  }

  .split {
    gap: 20px;
  }

  .split-body {
    padding-top: 0;
  }

  .contact-grid {
    gap: 48px;
  }

  .why-grid {
    gap: 32px;
    margin-top: 40px;
  }

  .footer-contact {
    justify-self: start;
  }
}

@media (max-width: 860px) {
  .section {
    padding: 72px 0;
  }

  .hero {
    padding: 72px 0 84px;
  }

  .cards {
    grid-template-columns: 1fr;
    margin-top: 40px;
  }

  .why-list li {
    padding: 22px 4px 22px 0;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

@media (max-width: 680px) {
  :root {
    --header-h: 104px;
  }

  body {
    font-size: 16px;
  }

  .container,
  .header-inner {
    width: calc(100% - 32px);
  }

  .header-inner {
    flex-wrap: wrap;
    row-gap: 0;
    padding: 10px 0 8px;
  }

  .wordmark {
    margin-right: auto;
  }

  .wordmark .logo-img {
    height: 28px;
  }

  .header-actions {
    gap: 8px;
  }

  .site-nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    gap: 0;
    padding-top: 4px;
  }

  .site-nav a {
    padding: 6px 10px 6px 0;
    font-size: 0.86rem;
  }

  .site-nav a:hover {
    background: transparent;
  }

  .hero {
    padding: 56px 0 64px;
  }

  .hero-media::before {
    inset: 16px -12px -12px 16px;
    border-radius: 18px;
  }

  .card-body {
    padding: 28px 24px;
  }

  .card-body::after {
    top: 28px;
    right: 24px;
  }

  .contact-card {
    padding: 26px 24px;
  }
}
