/* 三維工程有限公司 — 官網共用樣式
   色調：分深藍、石灰、米白；行動按鈕用穩重鏜金。
   無花巧動畫、無追蹤腳本。 */

:root {
  --navy: #1b2a4a;
  --navy-deep: #121c33;
  --navy-soft: #2a3b5f;
  --stone: #5c6570;
  --stone-light: #7a828c;
  --line: #d9d3c7;
  --line-strong: #c4bdb0;
  --bg: #f6f3ec;
  --paper: #fffcf7;
  --paper-alt: #efebe3;
  --brass: #c4a35a;
  --brass-dark: #8f7333;
  --brass-deep: #6e5724;
  --alert-bg: #fff4c2;
  --alert-border: #d4a017;
  --alert-text: #5a4308;
  --white: #ffffff;
  --focus: #c4a35a;
  --danger: #8a2b2b;
  --ok-muted: #3d4a3a;
  --shadow: 0 8px 24px rgba(27, 42, 74, 0.08);
  --radius: 6px;
  --header-h: 4.5rem;
  --max: 70rem;
  --font: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--navy);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--navy);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--brass-dark);
}

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 200;
  background: var(--brass);
  color: var(--navy-deep);
  padding: 0.5rem 1rem;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.5rem;
}

/* ---------- Header / Nav ---------- */

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0.7rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: var(--header-h);
}

.brand {
  text-decoration: none;
  color: var(--navy);
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  flex-shrink: 0;
}

.brand:hover {
  color: var(--navy);
}

.brand-zh {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.08em;
}

.brand-en {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
  margin-top: 0.15rem;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--line-strong);
  color: var(--navy);
  border-radius: var(--radius);
  padding: 0.45rem 0.7rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
}

.site-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.15rem 0.15rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a {
  text-decoration: none;
  color: var(--navy);
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.45rem 0.65rem;
  border-radius: 4px;
  white-space: nowrap;
}

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

.site-nav a[aria-current="page"] {
  color: var(--navy);
  box-shadow: inset 0 -2px 0 var(--brass);
  font-weight: 700;
}

.site-nav .nav-cta {
  background: var(--brass);
  color: var(--navy-deep);
  font-weight: 700;
  padding: 0.5rem 0.95rem;
  margin-left: 0.35rem;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  box-shadow: none;
}

.site-nav .nav-cta:hover,
.site-nav .nav-cta:focus-visible {
  background: #d4b56a;
  color: var(--navy-deep);
}

.site-nav .nav-cta[aria-current="page"] {
  box-shadow: inset 0 0 0 2px var(--navy-deep);
}

/* ---------- Layout ---------- */

main {
  flex: 1;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 3.5rem 0;
}

.section-alt {
  background: var(--paper);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.section-navy {
  background: var(--navy);
  color: var(--paper);
}

.section-navy a {
  color: #f0d48a;
}

.section-navy h2,
.section-navy .lead {
  color: var(--paper);
}

.kicker {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass-dark);
  margin: 0 0 0.6rem;
}

.section-navy .kicker {
  color: var(--brass);
}

h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.3;
  color: var(--navy);
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(1.9rem, 4vw, 2.85rem);
  letter-spacing: 0.02em;
}

h2 {
  font-size: clamp(1.45rem, 2.6vw, 1.9rem);
}

h3 {
  font-size: 1.15rem;
  font-family: var(--font);
}

.lead {
  font-size: 1.125rem;
  color: var(--stone);
  max-width: 42rem;
  margin: 0 0 1.5rem;
}

.muted {
  color: var(--stone);
}

.small {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--stone);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--radius);
  padding: 0.7rem 1.25rem;
  min-height: 48px;
  border: 2px solid transparent;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.2;
}

.btn-primary {
  background: var(--brass);
  color: var(--navy-deep);
  border-color: var(--brass);
}

.btn-primary:hover {
  background: #d4b56a;
  color: var(--navy-deep);
}

.btn-ghost {
  background: transparent;
  color: var(--paper);
  border-color: rgba(255, 252, 247, 0.55);
}

.btn-ghost:hover {
  background: rgba(255, 252, 247, 0.1);
  color: var(--paper);
}

.btn-outline {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}

.btn-outline:hover {
  background: var(--navy);
  color: var(--paper);
}

.btn[disabled],
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0 0;
}

/* ---------- Hero ---------- */

.hero {
  background:
    linear-gradient(165deg, var(--navy-deep) 0%, var(--navy) 55%, #243556 100%);
  color: var(--paper);
  padding: 4.25rem 0 4.5rem;
  position: relative;
  overflow: hidden;
}

.hero-visual {
  min-height: 28rem;
  display: flex;
  align-items: center;
  padding: 4.5rem 0 4.75rem;
  background: var(--navy-deep);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(105deg, rgba(18, 28, 51, 0.92) 0%, rgba(27, 42, 74, 0.78) 48%, rgba(18, 28, 51, 0.55) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero h1,
.hero .lead {
  color: var(--paper);
}

.hero .lead {
  font-size: 1.15rem;
  max-width: 38rem;
}

.hero-rule {
  width: 3.5rem;
  height: 3px;
  background: var(--brass);
  border: 0;
  margin: 0 0 1.4rem;
}

.hero .kicker {
  color: rgba(255, 252, 247, 0.85);
}

/* ---------- Stock / type / case media ---------- */

.stock-note {
  background: var(--paper-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  margin: 1.25rem 0 0;
  color: var(--stone);
  font-size: 0.92rem;
}

.stock-note strong {
  color: var(--navy);
  font-weight: 700;
}

.type-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.25rem;
}

.type-card {
  margin: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.type-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.type-card figcaption {
  padding: 0.7rem 0.85rem 0.85rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy);
  border-top: 1px solid var(--line);
}

.type-card .type-sub {
  display: block;
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--stone);
  margin-top: 0.2rem;
}

.case-media {
  margin: 0 -1.3rem 0.9rem;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.case-media img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.case-media figcaption {
  background: var(--alert-bg);
  color: var(--alert-text);
  border-top: 1px solid var(--alert-border);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 0.4rem 0.75rem;
}

.page-figure {
  margin: 0 0 1.75rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.page-figure img {
  width: 100%;
  max-height: 22rem;
  object-fit: cover;
  display: block;
}

.page-figure figcaption {
  padding: 0.65rem 1rem 0.8rem;
  font-size: 0.88rem;
  color: var(--stone);
  border-top: 1px solid var(--line);
}

/* ---------- Cards / grids ---------- */

.grid-6,
.grid-3,
.grid-2,
.grid-4 {
  display: grid;
  gap: 1rem;
}

.grid-6 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-3,
.grid-4 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.card,
.service-card,
.case-card,
.info-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.3rem 1.35rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.service-card {
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.service-card:hover {
  border-color: var(--brass);
  color: inherit;
  transform: translateY(-2px);
}

.service-num {
  font-family: var(--serif);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--brass-dark);
  margin-bottom: 0.4rem;
}

.service-card h3 {
  margin-bottom: 0.4rem;
}

.service-card p {
  margin: 0;
  color: var(--stone);
  font-size: 0.95rem;
}

.list-plain {
  margin: 0;
  padding: 0;
  list-style: none;
}

.list-plain li {
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

.list-plain li:last-child {
  border-bottom: 0;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  counter-reset: step;
}

.step {
  background: rgba(255, 252, 247, 0.06);
  border: 1px solid rgba(196, 163, 90, 0.35);
  border-radius: var(--radius);
  padding: 1.15rem 1.1rem;
}

.step::before {
  counter-increment: step;
  content: "0" counter(step);
  display: block;
  font-family: var(--serif);
  font-weight: 700;
  color: var(--brass);
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.step h3 {
  color: var(--paper);
  font-size: 1.05rem;
}

.step p {
  margin: 0;
  color: rgba(255, 252, 247, 0.82);
  font-size: 0.95rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.chip {
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.9rem;
  color: var(--navy);
}

/* ---------- Alert / cases ---------- */

.notice {
  background: var(--alert-bg);
  border: 2px solid var(--alert-border);
  color: var(--alert-text);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem 1.15rem;
  margin: 0 0 2rem;
}

.notice strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 0.35rem;
  color: #4a3600;
}

.notice p {
  margin: 0.35rem 0 0;
}

.notice p:first-of-type {
  margin-top: 0;
}

.case-card {
  border-top: 4px solid var(--brass);
  overflow: hidden;
  padding-top: 0;
}

.case-flag {
  display: inline-block;
  background: var(--alert-bg);
  color: var(--alert-text);
  border: 1px solid var(--alert-border);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  margin-bottom: 0.7rem;
}

.case-card h3 {
  font-family: var(--serif);
  font-size: 1.25rem;
}

.case-card dt {
  font-weight: 700;
  font-size: 0.85rem;
  margin: 0.7rem 0 0.15rem;
  color: var(--navy);
}

.case-card dd {
  margin: 0;
  color: var(--stone);
}

.sources {
  margin-top: 0.9rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
}

.sources ul {
  margin: 0.3rem 0 0;
  padding-left: 1.15rem;
}

.sources a {
  color: var(--navy-soft);
  word-break: break-all;
}

/* ---------- Forms ---------- */

.form-page {
  max-width: 52rem;
}

.form-embed {
  width: 100%;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

.form-embed iframe {
  display: block;
  width: 100%;
  height: 1280px;
  border: 0;
  background: var(--white);
}

.form-fallback {
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.form-fallback-below {
  margin: 1rem 0 0;
  color: var(--stone);
}


.form-banner {
  background: #eef2f7;
  border: 1px solid #c5ced9;
  border-left: 4px solid var(--navy);
  padding: 1rem 1.15rem;
  border-radius: var(--radius);
  margin-bottom: 1.75rem;
}

.form-banner strong {
  display: block;
  margin-bottom: 0.25rem;
}

fieldset {
  border: 1px solid var(--line);
  background: var(--paper);
  border-radius: var(--radius);
  margin: 0 0 1.35rem;
  padding: 1.15rem 1.2rem 1.3rem;
}

legend {
  font-weight: 700;
  padding: 0 0.4rem;
  font-family: var(--serif);
}

.field {
  margin: 0 0 1rem;
}

.field:last-child {
  margin-bottom: 0;
}

label,
.legend-like {
  display: block;
  font-weight: 700;
  font-size: 0.92rem;
  margin-bottom: 0.3rem;
}

.req {
  color: var(--danger);
  font-weight: 700;
}

.hint {
  display: block;
  font-size: 0.82rem;
  color: var(--stone);
  font-weight: 400;
  margin-top: 0.2rem;
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="date"],
select,
textarea {
  width: 100%;
  max-width: 100%;
  font: inherit;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--white);
  color: var(--navy);
  min-height: 44px;
}

textarea {
  min-height: 8rem;
  resize: vertical;
}

input:disabled,
select:disabled,
textarea:disabled,
input[type="file"]:disabled {
  background: #f0eee9;
  color: var(--stone);
}

.checks {
  display: grid;
  gap: 0.35rem;
}

.checks label,
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-weight: 400;
  font-size: 0.95rem;
}

.checks input,
.check-row input {
  margin-top: 0.3rem;
  width: 1.15rem;
  height: 1.15rem;
  flex-shrink: 0;
}

.form-status {
  display: none;
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  background: var(--alert-bg);
  border: 1px solid var(--alert-border);
  color: var(--alert-text);
  border-radius: var(--radius);
}

.form-status.is-visible {
  display: block;
}

/* ---------- Tables / process ---------- */

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--paper);
  font-size: 0.98rem;
}

th,
td {
  text-align: left;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  background: var(--navy);
  color: var(--paper);
  font-weight: 700;
}

tr:nth-child(even) td {
  background: #faf7f1;
}

.ol-process {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: proc;
}

.ol-process li {
  position: relative;
  padding: 1rem 0 1rem 3.4rem;
  border-bottom: 1px solid var(--line);
  counter-increment: proc;
}

.ol-process li::before {
  content: counter(proc);
  position: absolute;
  left: 0;
  top: 1rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--navy);
  color: var(--paper);
  font-family: var(--serif);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
}

.ol-process h3 {
  margin-bottom: 0.25rem;
}

.ol-process p {
  margin: 0;
  color: var(--stone);
}

/* ---------- Footer ---------- */

.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 252, 247, 0.86);
  padding: 2.5rem 0 1.5rem;
  margin-top: auto;
  font-size: 0.92rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 1.75rem;
}

.site-footer h2,
.site-footer .footer-name {
  font-family: var(--serif);
  color: var(--paper);
  font-size: 1.1rem;
  margin: 0 0 0.2rem;
  letter-spacing: 0.06em;
}

.footer-en {
  font-family: var(--serif);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass);
  margin: 0 0 0.8rem;
}

.site-footer a {
  color: #f0d48a;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
}

.footer-note {
  font-size: 0.8rem;
  color: rgba(255, 252, 247, 0.65);
  margin-top: 0.5rem;
}

.footer-nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav li {
  margin: 0 0 0.35rem;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 252, 247, 0.15);
  font-size: 0.8rem;
  color: rgba(255, 252, 247, 0.55);
}

address {
  font-style: normal;
}

/* ---------- Page title band ---------- */

.page-head {
  padding: 2.6rem 0 2.2rem;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.page-head .lead {
  margin-bottom: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .grid-6,
  .grid-4,
  .grid-3,
  .steps,
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 800px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 0.5rem 1.25rem 1rem;
    margin: 0;
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 0.75rem 0.5rem;
    min-height: 44px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
  }

  .site-nav a[aria-current="page"] {
    box-shadow: inset 4px 0 0 var(--brass);
  }

  .site-nav .nav-cta {
    margin: 0.7rem 0 0;
    justify-content: center;
    border-bottom: 0;
  }

  .header-inner {
    position: relative;
  }
}

@media (max-width: 900px) {
  .type-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .grid-6,
  .grid-4,
  .grid-3,
  .grid-2,
  .steps,
  .footer-grid,
  .type-grid {
    grid-template-columns: 1fr;
  }

  .hero,
  .hero-visual {
    padding: 2.75rem 0 3rem;
    min-height: 0;
  }

  .section {
    padding: 2.4rem 0;
  }

  .page-figure img {
    max-height: 16rem;
  }
}

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

  .service-card {
    transition: none;
  }
}
