/* 竣逸專業秘書 — design tokens & components
   Visual direction: professional licensed secretarial firm
   Navy authority + gold emblem accent, generous whitespace
*/

:root {
  --navy: #14325c;
  --navy-deep: #0d2342;
  --navy-mid: #1e4d86;
  --navy-soft: #e8eef6;
  --gold: #c4a35a;
  --gold-dark: #9a7a32;
  --ink: #1c2430;
  --muted: #5a6573;
  --line: #d7e0ea;
  --paper: #ffffff;
  --mist: #f3f6fa;
  --danger: #b42318;
  --success: #1b7a4e;
  --shadow: 0 10px 30px rgba(13, 35, 66, 0.08);
  --shadow-lg: 0 18px 44px rgba(13, 35, 66, 0.14);
  --radius: 8px;
  --radius-lg: 14px;
  --container: 1160px;
  --header-h: 78px;
  --font: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", Arial, Helvetica, sans-serif;
  --space-section: clamp(3.2rem, 6vw, 5.5rem);
}

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

html {
  scroll-behavior: smooth;
}

html:focus-within {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.75;
  font-size: 16px;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden;
}

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

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

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

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

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 400;
  background: var(--gold);
  color: var(--navy-deep);
  padding: 0.5rem 0.9rem;
  font-weight: 700;
}

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

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 46px;
  padding: 0.55rem 1.35rem;
  border-radius: 4px;
  border: 2px solid transparent;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--navy-mid);
  color: #fff;
  border-color: var(--navy-mid);
}

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

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

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

.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}

.btn-ghost:hover {
  background: #fff;
  color: var(--navy);
}

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

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

.btn-sm {
  min-height: 36px;
  padding: 0.3rem 0.9rem;
  font-size: 0.82rem;
}

.btn-block {
  width: 100%;
}

/* Top bar */
.topbar {
  background: var(--navy-deep);
  color: #d7e2ef;
  font-size: 0.82rem;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 40px;
}

.topbar-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
}

.topbar a {
  color: #e8eef6;
}

.topbar a:hover {
  color: var(--gold);
}

/* Sticky header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #fff;
  border-bottom: 1px solid var(--line);
  height: var(--header-h);
  transition: box-shadow 0.2s ease;
}

.site-header.is-scrolled {
  box-shadow: 0 8px 24px rgba(13, 35, 66, 0.1);
}

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

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand img {
  height: 52px;
  width: auto;
}

.nav-desktop {
  display: flex;
  align-items: center;
  gap: 0.15rem;
}

.nav-desktop a {
  color: var(--navy);
  font-size: 0.86rem;
  font-weight: 600;
  padding: 0.45rem 0.55rem;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
}

.nav-desktop a:hover,
.nav-desktop a.is-active {
  color: var(--navy-mid);
  border-bottom-color: var(--gold);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 10px;
}

.menu-toggle span {
  display: block;
  height: 2px;
  background: var(--navy);
  margin: 6px 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Independent full-screen mobile overlay */
.mobile-menu {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100dvh;
  z-index: 300;
  background: var(--navy-deep);
  color: #fff;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 1rem 1.25rem calc(2rem + env(safe-area-inset-bottom));
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.28s ease, visibility 0.28s ease;
}

.mobile-menu.is-open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.mobile-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  margin-bottom: 1rem;
}

.mobile-menu-close {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 4px;
}

.mobile-menu nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.mobile-menu a {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 600;
  padding: 0.85rem 0.2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-menu a.is-active {
  color: var(--gold);
}

.mobile-menu-cta {
  margin-top: auto;
  padding-top: 1.5rem;
  display: grid;
  gap: 0.7rem;
}

.mobile-menu-cta a {
  border: 0;
  text-align: center;
}

/* Hero */
.hero {
  position: relative;
  min-height: min(72vh, 620px);
  display: grid;
  place-items: center;
  color: #fff;
  text-align: center;
  background: var(--navy-deep) center / cover no-repeat;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(13, 35, 66, 0.62) 0%, rgba(13, 35, 66, 0.78) 100%);
  z-index: -1;
}

.hero-inner {
  width: min(100% - 2rem, 860px);
  padding: 4.5rem 0;
}

.hero-kicker {
  display: inline-block;
  color: var(--gold);
  font-weight: 700;
  letter-spacing: 0.18em;
  font-size: 0.78rem;
  text-transform: uppercase;
  margin-bottom: 0.8rem;
}

.hero h1 {
  margin: 0 0 0.8rem;
  font-size: clamp(1.8rem, 4.4vw, 3rem);
  line-height: 1.25;
  font-weight: 800;
}

.hero p {
  margin: 0 auto 1.6rem;
  max-width: 42rem;
  color: #e4ebf4;
  font-size: 1.05rem;
}

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

.page-hero {
  min-height: 280px;
  background-position: center;
  background-size: cover;
}

.page-hero h1 {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
}

/* Sections */
.section {
  padding: var(--space-section) 0;
}

.section-mist {
  background: var(--mist);
}

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

.section-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  color: var(--navy);
  line-height: 1.35;
}

.section-navy .section-title {
  color: #fff;
}

.section-lead {
  margin: 0 0 2rem;
  color: var(--muted);
  max-width: 46rem;
}

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

.section-head .section-lead {
  margin-inline: auto;
}

.eyebrow {
  display: inline-block;
  color: var(--gold-dark);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  margin-bottom: 0.4rem;
}

.section-navy .eyebrow {
  color: var(--gold);
}

/* Split intro */
.split {
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 3rem;
  align-items: center;
}

.split img {
  width: 100%;
  height: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.split-copy .section-title {
  margin-bottom: 1rem;
}

.split-copy p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.split-copy p:last-of-type {
  margin-bottom: 1.4rem;
}

.split.reverse {
  grid-template-columns: 1.08fr 0.92fr;
}

.split.reverse img {
  order: 2;
}

/* Cards */
.grid-3,
.grid-4,
.grid-2 {
  display: grid;
  gap: 1.25rem;
}

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

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

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

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.card img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}

.card-body {
  padding: 1.2rem 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.card h3 {
  margin: 0 0 0.55rem;
  color: var(--navy);
  font-size: 1.05rem;
}

.card p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
  flex: 1;
}

.card-link {
  font-weight: 700;
  color: var(--navy-mid);
}

.icon-card {
  text-align: left;
}

.icon-card .icon {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: var(--navy-soft);
  color: var(--navy);
  display: grid;
  place-items: center;
  font-weight: 800;
  margin-bottom: 0.85rem;
}

.scope-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem 1.2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.scope-list li {
  position: relative;
  padding: 0.85rem 0.95rem 0.85rem 2.4rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.scope-list li::before {
  content: "";
  position: absolute;
  left: 0.95rem;
  top: 1.15rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
}

/* Pricing */
.pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
  align-items: stretch;
}

.price-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}

.price-card.featured {
  border-color: var(--navy);
  transform: translateY(-10px);
  box-shadow: var(--shadow-lg);
}

.price-card header {
  background: var(--navy-mid);
  color: #fff;
  padding: 1.2rem 1.3rem 1.1rem;
  text-align: center;
}

.price-card.featured header {
  background: var(--navy-deep);
}

.price-card header h3 {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
}

.price-card .price {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--gold);
}

.price-card .price small {
  font-size: 0.85rem;
  font-weight: 600;
  color: #d7e2ef;
}

.price-card ul {
  margin: 0;
  padding: 1.2rem 1.3rem 0.4rem;
  list-style: none;
  flex: 1;
}

.price-card li {
  position: relative;
  padding: 0.45rem 0 0.45rem 1.4rem;
  color: var(--muted);
}

.price-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--navy-mid);
  font-weight: 800;
}

.price-card .card-cta {
  padding: 0 1.3rem 1.3rem;
}

.badge {
  display: inline-block;
  background: var(--gold);
  color: var(--navy-deep);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  margin-bottom: 0.45rem;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.table-custom {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

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

.table-custom th {
  background: var(--navy);
  color: #fff;
  font-weight: 700;
}

.table-custom tbody tr:nth-child(even) {
  background: var(--navy-soft);
}

.table-custom tbody tr:hover {
  background: #dce6f2;
}

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

.include-list li {
  padding: 0.35rem 0 0.35rem 1.25rem;
  position: relative;
}

.include-list li::before {
  content: "•";
  position: absolute;
  left: 0.2rem;
  color: var(--navy-mid);
  font-weight: 800;
}

/* Trust / stats */
.trust {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: center;
}

.trust-item strong {
  display: block;
  font-size: 1.7rem;
  color: var(--gold);
  font-weight: 800;
}

.trust-item span {
  color: #d7e2ef;
  font-size: 0.92rem;
}

/* FAQ */
.faq {
  display: grid;
  gap: 1rem;
}

.faq-item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
}

.faq-item h3 {
  margin: 0 0 0.45rem;
  color: var(--navy);
  font-size: 1.05rem;
}

.faq-item p,
.faq-item ul {
  margin: 0;
  color: var(--muted);
}

.more-services .card img {
  height: 140px;
}

/* CTA banner */
.cta-banner {
  background: linear-gradient(120deg, var(--navy-deep), var(--navy-mid));
  color: #fff;
  text-align: center;
  padding: 3.4rem 1rem;
}

.cta-banner h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.4rem, 2.6vw, 2rem);
}

.cta-banner p {
  margin: 0 auto 1.4rem;
  max-width: 38rem;
  color: #d7e2ef;
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 2rem;
}

.contact-card {
  background: var(--mist);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
  margin-bottom: 1rem;
}

.contact-card h3 {
  margin: 0 0 0.5rem;
  color: var(--navy);
}

.contact-card p {
  margin: 0.25rem 0;
  color: var(--muted);
}

.map-embed {
  margin-top: 0.8rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: #e8eef6;
}

.map-embed iframe {
  display: block;
  width: 100%;
  height: 220px;
  border: 0;
}

.form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.form-row {
  margin-bottom: 1rem;
}

.form label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.35rem;
  color: var(--navy);
}

.form .req {
  color: var(--danger);
}

.form input,
.form textarea {
  width: 100%;
  font: inherit;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
}

.form input:focus,
.form textarea:focus {
  border-color: var(--navy-mid);
  outline: none;
  box-shadow: 0 0 0 3px rgba(30, 77, 134, 0.15);
}

.form-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.6rem;
}

.form-error {
  color: var(--danger);
  font-size: 0.88rem;
  min-height: 1.2em;
  margin: 0 0 0.6rem;
}

.form-success {
  display: none;
  background: #e8f6ee;
  color: var(--success);
  padding: 0.7rem 0.9rem;
  border-radius: 4px;
  margin-bottom: 0.8rem;
}

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

/* Footer */
.site-footer {
  background: #fff;
  border-top: 4px solid var(--navy);
}

.footer-main {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2rem;
  padding: 3rem 0 2.2rem;
}

.footer-brand img {
  height: 48px;
  width: auto;
  margin-bottom: 0.9rem;
}

.footer-brand p,
.footer-brand address {
  color: var(--muted);
  font-style: normal;
  margin: 0 0 0.5rem;
  font-size: 0.92rem;
}

.site-footer h3 {
  margin: 0 0 0.8rem;
  color: var(--navy);
  font-size: 1rem;
}

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

.site-footer li {
  margin: 0 0 0.45rem;
}

.site-footer a {
  color: var(--muted);
}

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

.footer-bottom {
  background: var(--navy-deep);
  color: #b7c4d4;
  font-size: 0.85rem;
}

.footer-bottom .container {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.9rem 0;
}

.footer-bottom a {
  color: #d7e2ef;
}

/* Back to top */
.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 4px;
  background: var(--navy-mid);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.back-to-top:hover {
  background: var(--navy-deep);
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

.prose h2,
.prose h3 {
  color: var(--navy);
}

.prose p {
  color: var(--muted);
}

.steps {
  counter-reset: step;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  counter-increment: step;
  position: relative;
  padding: 0.85rem 1rem 0.85rem 3.2rem;
  margin-bottom: 0.6rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0.8rem;
  top: 0.85rem;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.gov-card a {
  word-break: break-all;
  font-size: 0.9rem;
}

@media (max-width: 1180px) {
  .nav-desktop {
    display: none;
  }

  .menu-toggle {
    display: block;
  }

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

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

  .footer-main {
    grid-template-columns: 1fr 1fr;
  }
}

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

  .split.reverse img {
    order: 0;
  }

  .pricing {
    grid-template-columns: 1fr;
  }

  .price-card.featured {
    transform: none;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .grid-3 {
    grid-template-columns: 1fr;
  }

  .scope-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar-contacts span:last-child,
  .topbar-contacts a:nth-child(n + 3) {
    display: none;
  }

  .grid-2,
  .grid-4,
  .trust,
  .footer-main {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: 68dvh;
  }

  .brand img {
    height: 42px;
  }
}
