:root {
  --color-bg: #fcf8f3;
  --color-surface: #ffffff;
  --color-text: #261e1a;
  --color-muted: #6d5f57;
  --color-accent: #cc6b2c;
  --color-accent-hover: #b85d22;
  --color-accent-dark: #7e3f17;
  --color-accent-soft: rgba(204, 107, 44, 0.12);
  --color-hero-overlay: rgba(41, 22, 13, 0.72);
  --header-h: 68px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 6px 24px rgba(72, 42, 22, 0.08);
  --shadow-lg: 0 20px 50px rgba(72, 42, 22, 0.16);
  --font: "Noto Sans TC", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text);
  background: var(--color-bg);
}

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

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1140px, 100% - 40px);
  margin-inline: auto;
}

.container.narrow {
  width: min(640px, 100% - 40px);
}

#scope,
#products,
#join {
  scroll-margin-top: calc(var(--header-h) + 20px);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(18, 24, 38, 0.06);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.header-inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-text);
  font-weight: 600;
  text-decoration: none;
  flex-shrink: 0;
  min-width: 0;
}

.logo:hover {
  text-decoration: none;
  color: var(--color-accent);
}

.logo-img {
  height: 40px;
  width: auto;
  max-width: min(200px, 45vw);
  display: block;
  flex-shrink: 0;
  object-fit: contain;
}

.logo-mark {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 11px;
  background: linear-gradient(145deg, #0b6bcb 0%, #22b8cf 100%);
  box-shadow: 0 6px 18px rgba(11, 107, 203, 0.35);
}

.logo-text {
  font-size: 1.08rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.1rem 0.25rem;
  font-size: 0.875rem;
}

.main-nav a {
  color: var(--color-text);
  padding: 0.4rem 0.55rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
}

.main-nav a:hover {
  color: var(--color-accent);
  background: var(--color-accent-soft);
  text-decoration: none;
}

.nav-sep {
  color: #d1d8e4;
  user-select: none;
  font-weight: 300;
  font-size: 0.75rem;
}

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

.nav-toggle span {
  display: block;
  height: 2px;
  width: 22px;
  background: var(--color-text);
  margin-inline: auto;
  transition: transform 0.2s, opacity 0.2s;
  border-radius: 1px;
}

.site-header.nav-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.site-header.nav-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.site-header.nav-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero */
.hero {
  position: relative;
  min-height: min(78vh, 600px);
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-color: #3e2417;
  background-image:
    linear-gradient(125deg, var(--color-hero-overlay) 0%, rgba(73, 41, 23, 0.56) 55%, rgba(204, 107, 44, 0.45) 100%),
    url("images/hero-banner.svg");
  background-size: cover;
  background-position: center;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 70% 20%, rgba(255, 190, 140, 0.18), transparent 55%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.hero-content {
  padding-block: 4.75rem 4.25rem;
  max-width: 44rem;
  margin-inline: auto;
  text-align: center;
}

.hero-tag {
  letter-spacing: 0.22em;
  font-size: 0.75rem;
  text-transform: uppercase;
  opacity: 0.95;
  margin: 0 0 1.1rem;
  color: #ffd7be;
}

.hero h1 {
  margin: 0 0 1.1rem;
  font-size: clamp(1.9rem, 4.5vw, 2.75rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.hero-desc {
  margin: 0 auto 2rem;
  max-width: 36em;
  opacity: 0.95;
  font-weight: 300;
  font-size: 1.06rem;
  line-height: 1.75;
  text-wrap: pretty;
}

.hero-content strong {
  color: #fff;
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  justify-content: center;
}

.btn-primary {
  display: inline-block;
  padding: 0.78rem 1.85rem;
  background: #fff;
  color: var(--color-accent-dark);
  font-weight: 600;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}

.btn-primary:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.2);
  background: #fff2ea;
}

.btn-ghost {
  display: inline-block;
  padding: 0.72rem 1.5rem;
  color: #fff;
  font-weight: 600;
  border-radius: 999px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.08);
  transition: background 0.15s, border-color 0.15s;
}

.btn-ghost:hover {
  text-decoration: none;
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.65);
}

.btn-outline {
  display: inline-block;
  padding: 0.68rem 1.45rem;
  border: 2px solid var(--color-accent);
  color: var(--color-accent);
  font-weight: 600;
  border-radius: 999px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.btn-outline:hover {
  background: var(--color-accent);
  color: #fff;
  text-decoration: none;
}

/* Sections */
.section {
  padding-block: 4.25rem 4.75rem;
}

.section-head {
  text-align: center;
  margin-bottom: 2.75rem;
}

.section-head h1,
.section-head h2 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  position: relative;
  display: inline-block;
}

.section-head h1::after,
.section-head h2::after {
  content: "";
  display: block;
  width: 40px;
  height: 3px;
  margin: 0.65rem auto 0;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--color-accent), #f29d5f);
}

.section-en {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  color: var(--color-muted);
  text-transform: uppercase;
}

.section-head--light h2,
.section-head--light .section-en {
  color: #fff;
}

.section-head--light .section-en {
  opacity: 0.88;
}

.section-head--light h1::after,
.section-head--light h2::after {
  background: linear-gradient(90deg, #ffc59d, #ffe2cc);
}

/* Scope */
.scope {
  background: var(--color-surface);
  border-top: 1px solid rgba(18, 24, 38, 0.05);
}

.scope-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}

.scope-grid--two {
  max-width: 940px;
  margin-inline: auto;
}

.scope-card {
  padding: 0;
  border-radius: var(--radius);
  border: 1px solid rgba(18, 24, 38, 0.07);
  background: var(--color-surface);
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  overflow: hidden;
}

.scope-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.scope-card-visual {
  margin: 0;
  overflow: hidden;
  background: #e8ecf3;
}

.scope-card-visual img {
  display: block;
  width: 100%;
  height: 220px;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.scope-card:hover .scope-card-visual img {
  transform: scale(1.04);
}

.scope-card h3 {
  margin: 0;
  padding: 1.35rem 1.5rem 0.5rem;
  font-size: 1.2rem;
}

.scope-card p {
  margin: 0;
  padding: 0 1.5rem 1.5rem;
  font-size: 0.96rem;
  color: var(--color-muted);
  line-height: 1.7;
}

/* About */
.about {
  background: linear-gradient(155deg, #3d2417 0%, #6a3b1f 42%, #cc6b2c 108%);
  color: #e8eef7;
  position: relative;
  overflow: hidden;
}

.about::before {
  content: "";
  position: absolute;
  top: -30%;
  right: -15%;
  width: 55%;
  height: 80%;
  background: radial-gradient(circle, rgba(255, 206, 171, 0.2), transparent 70%);
  pointer-events: none;
}

.about-layout {
  position: relative;
  z-index: 1;
}

.about-body {
  max-width: 700px;
  margin-inline: auto;
  text-align: center;
}

.about-company-name {
  margin: 0 0 0.35rem;
  font-size: clamp(1.2rem, 2.5vw, 1.45rem);
  color: #fff;
  font-weight: 600;
}

.about-founded {
  margin: 0 0 1.35rem;
  font-size: 0.94rem;
  color: rgba(255, 255, 255, 0.86);
  letter-spacing: 0.04em;
}

.about-body p {
  margin: 0 0 1.05rem;
  color: rgba(232, 238, 247, 0.9);
  font-weight: 300;
}

.about-body p:last-child {
  margin-bottom: 0;
}

.about-body strong {
  color: #fff;
  font-weight: 600;
}

/* 內頁：關於我們（與首頁區塊同一套淺色體系） */
.about-page {
  background: var(--color-bg);
}

.page-main {
  min-height: 50vh;
}

.about-page-main {
  flex: 1;
}

.about-page-panel {
  background: var(--color-surface);
  border-top: 1px solid rgba(18, 24, 38, 0.05);
  border-bottom: 1px solid rgba(18, 24, 38, 0.06);
  padding-block: 3.5rem 4.5rem;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.about-page-container {
  max-width: 720px;
  margin-inline: auto;
}

.about-page-panel .section-head {
  margin-bottom: 2rem;
}

.about-page-intro {
  padding: 1.75rem 1.5rem 2rem;
  border-radius: var(--radius);
  background: var(--color-bg);
  border: 1px solid rgba(18, 24, 38, 0.06);
}

.about-page-intro p {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.85;
  font-weight: 400;
  color: #5f6b7c;
  text-align: justify;
  text-justify: inter-ideograph;
}

.about-page-intro strong {
  font-weight: 600;
  color: #4a5568;
}

.main-nav a[aria-current="page"] {
  color: var(--color-accent);
  background: var(--color-accent-soft);
}

/* 員工發展頁 */
.careers-page {
  background: var(--color-bg);
}

.careers-page-panel {
  background: var(--color-surface);
  border-top: 1px solid rgba(18, 24, 38, 0.05);
  border-bottom: 1px solid rgba(18, 24, 38, 0.06);
  padding-block: 3.5rem 4.5rem;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
}

.careers-page-container {
  max-width: 720px;
  margin-inline: auto;
}

.careers-prose {
  text-align: left;
}

.careers-prose-block {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(18, 24, 38, 0.08);
}

.careers-prose-block:first-of-type {
  margin-top: 1.5rem;
  padding-top: 0;
  border-top: none;
}

.careers-prose-block h2 {
  margin: 0 0 0.65rem;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.careers-prose-block p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.8;
  color: var(--color-muted);
}

/* 產品展示 — 圖文分條縱向排列 */
.section-products {
  background: var(--color-bg);
}

.product-showcase-list {
  margin-top: 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 1000px;
  margin-inline: auto;
}

.product-showcase-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem 2.5rem;
  align-items: center;
  padding: 2.25rem 0;
  border-bottom: 1px solid rgba(18, 24, 38, 0.08);
}

.product-showcase-block:first-child {
  padding-top: 0.5rem;
}

.product-showcase-block:last-child {
  border-bottom: none;
  padding-bottom: 0.5rem;
}

.product-showcase-block--reverse .product-showcase-text {
  order: 2;
}

.product-showcase-block--reverse .product-showcase-media {
  order: 1;
}

.product-showcase-text h3 {
  margin: 0 0 0.75rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-text);
}

.product-showcase-text p {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.75;
  color: var(--color-muted);
}

.product-showcase-media {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid rgba(18, 24, 38, 0.08);
  background: #e8ecf3;
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-showcase-media img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
}

@media (max-width: 768px) {
  .product-showcase-block,
  .product-showcase-block--reverse {
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 1.75rem 0;
  }

  .product-showcase-block--reverse .product-showcase-text,
  .product-showcase-block--reverse .product-showcase-media {
    order: unset;
  }
}

/* Join */
.section-join {
  background: var(--color-surface);
  border-top: 1px solid rgba(18, 24, 38, 0.06);
}

.join-panel {
  margin-top: 0.5rem;
  padding: 2rem 1.75rem 2.25rem;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border-radius: var(--radius);
  border: 1px solid rgba(18, 24, 38, 0.08);
  box-shadow: var(--shadow);
  text-align: center;
}

.join-lead {
  margin: 0 0 1.5rem;
  color: var(--color-muted);
  font-size: 1.02rem;
  line-height: 1.75;
}

.join-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  justify-content: center;
  align-items: center;
}

.join-actions .btn-primary {
  box-shadow: 0 8px 22px rgba(11, 107, 203, 0.25);
}

.lead {
  margin: 0;
  text-align: center;
  color: var(--color-muted);
  font-size: 1.02rem;
  line-height: 1.75;
}

.lead--wide {
  max-width: 680px;
  margin-inline: auto;
}

.lead code {
  font-size: 0.86em;
  padding: 0.12em 0.4em;
  background: var(--color-accent-soft);
  border-radius: 5px;
  color: var(--color-accent-dark);
}

/* Footer */
.site-footer {
  padding: 2.25rem 0 2.75rem;
  background: #0a0f1a;
  color: #94a3b8;
  font-size: 0.875rem;
  text-align: center;
}

.site-footer .footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-brand {
  margin: 0 0 0.5rem;
  color: #e2e8f0;
  font-weight: 600;
  font-size: 0.85rem;
  line-height: 1.45;
  max-width: 28rem;
  width: 100%;
  text-align: center;
  text-wrap: balance;
}

.site-footer .copyright {
  text-align: center;
  max-width: 28rem;
  width: 100%;
  text-wrap: balance;
}

.footer-inner p {
  margin: 0.35rem 0;
}

.site-footer a {
  color: #cbd5e1;
}

.site-footer a:hover {
  color: #fff;
}

/* 關於頁等：淺色頁腳（須寫在 .site-footer 之後，避免被深色覆蓋） */
.site-footer.site-footer--slim {
  padding: 1.25rem 0 1.5rem;
  background: var(--color-bg);
  color: #7a8798;
  font-size: 0.8125rem;
  border-top: 1px solid rgba(18, 24, 38, 0.06);
}

.site-footer.site-footer--slim .footer-inner p {
  margin: 0;
}

.site-footer.site-footer--slim .copyright {
  margin: 0;
  color: #7a8798;
  font-size: inherit;
}

.site-footer.site-footer--slim a {
  color: #7a8798;
}

.site-footer.site-footer--slim a:hover {
  color: var(--color-accent);
}

/* Mobile */
@media (max-width: 900px) {
  .scope-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: 0.75rem 1.25rem 1.25rem;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(18, 24, 38, 0.08);
    gap: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.32s ease, opacity 0.25s ease;
    box-shadow: 0 12px 40px rgba(15, 35, 71, 0.08);
  }

  .site-header.nav-open .main-nav {
    max-height: 380px;
    opacity: 1;
  }

  .main-nav a {
    padding: 0.8rem 0.5rem;
    border-radius: 8px;
  }

  .nav-sep {
    display: none;
  }

  .hero-content {
    padding-block: 3.5rem 3rem;
  }
}
