/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand: #7c3aed;
  --brand-dark: #5b21b6;
  --brand-light: #ede9fe;
  --brand-mid: #a78bfa;
  --accent: #f59e0b;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #9ca3af;
  --bg-white: #ffffff;
  --bg-light: #f9fafb;
  --bg-purple-soft: #faf5ff;
  --border: #e5e7eb;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
  --shadow-md: 0 4px 16px rgba(0,0,0,.10);
  --shadow-brand: 0 4px 20px rgba(124,58,237,.25);
  --font: 'Noto Sans TC', sans-serif;
  --font-serif: 'Noto Serif TC', serif;
  --nav-h: 72px;
  --container: 1140px;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-primary);
  background: var(--bg-white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ===== Container ===== */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all .22s ease;
  white-space: nowrap;
}
.btn--primary {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.btn--primary:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-brand);
}
.btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.5);
}
.btn--ghost:hover {
  background: rgba(255,255,255,.12);
  border-color: #fff;
}
.btn--full { width: 100%; justify-content: center; }

/* ===== Navigation ===== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 1000;
  background: transparent;
  transition: background .3s, box-shadow .3s;
}
.nav.scrolled {
  background: rgba(91,33,182,.97);
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
  backdrop-filter: blur(8px);
}
.nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.nav__logo {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.nav__logo-main {
  font-size: 18px;
  font-weight: 900;
  color: #fff;
  transition: color .3s;
}
.nav.scrolled .nav__logo-main { color: #fff; }
.nav__logo-sub {
  font-size: 11px;
  color: rgba(255,255,255,.7);
  font-weight: 400;
  transition: color .3s;
}
.nav.scrolled .nav__logo-sub { color: rgba(255,255,255,.7); }

.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav__links a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: rgba(255,255,255,.9);
  transition: all .2s;
}
.nav__links a:hover { background: rgba(255,255,255,.12); color: #fff; }
.nav.scrolled .nav__links a { color: rgba(255,255,255,.9); }
.nav.scrolled .nav__links a:hover { background: rgba(255,255,255,.15); color: #fff; }
.nav__cta {
  background: var(--brand) !important;
  color: #fff !important;
  border-radius: var(--radius-sm) !important;
}
.nav__cta:hover { background: var(--brand-dark) !important; }
.nav.scrolled .nav__cta { background: rgba(255,255,255,.2) !important; color: #fff !important; }

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
}
.nav__toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all .25s;
}
.nav.scrolled .nav__toggle span { background: #fff; }

/* ===== Hero ===== */
.hero {
  min-height: 100vh;
  background: linear-gradient(135deg, #5b21b6 0%, #7c3aed 50%, #8b5cf6 100%);
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: calc(var(--nav-h) + 40px) 24px 80px;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero__bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 70% 50%, rgba(255,255,255,.06) 0%, transparent 70%);
}
.hero__content {
  position: relative;
  max-width: 540px;
  z-index: 1;
}
.hero__badge {
  display: inline-block;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.3);
  color: rgba(255,255,255,.9);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 100px;
  letter-spacing: .05em;
  margin-bottom: 20px;
}
.hero__title {
  font-family: var(--font-serif);
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  color: #fff;
  line-height: 1.25;
  margin-bottom: 16px;
}
.hero__title-em {
  display: block;
  color: #fcd34d;
}
.hero__desc {
  font-size: 18px;
  color: rgba(255,255,255,.85);
  margin-bottom: 28px;
  font-weight: 500;
  letter-spacing: .08em;
}
.hero__contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}
.hero__contact-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,.9);
  font-size: 15px;
  font-weight: 700;
  background: rgba(255,255,255,.1);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,.2);
  transition: background .2s;
}
.hero__contact-item:hover { background: rgba(255,255,255,.18); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero__image-wrap {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 80px 40px;
  z-index: 0;
}
.hero__image-placeholder {
  width: 100%;
  max-width: 480px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: rgba(255,255,255,.08);
}
.hero__image-placeholder svg { width: 100%; height: auto; }

/* ===== Sections ===== */
.section { padding: 100px 0; }
.section--alt { background: var(--bg-light); }
.section__header { text-align: center; max-width: 640px; margin: 0 auto 60px; }
.section__label {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--brand);
  background: var(--brand-light);
  padding: 5px 14px;
  border-radius: 100px;
  margin-bottom: 14px;
}
.section__title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: 14px;
}
.section__desc { font-size: 16px; color: var(--text-secondary); line-height: 1.7; }

/* ===== About ===== */
.about { background: var(--bg-purple-soft); }
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}
.about__image-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.about__image-placeholder svg { width: 100%; height: auto; }
.about__text-col .section__label,
.about__text-col .section__title { text-align: left; }
.about__desc { color: var(--text-secondary); margin-bottom: 36px; }
.about__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.stat-card {
  background: #fff;
  border-radius: var(--radius-md);
  padding: 20px 16px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
}
.stat-card__number {
  font-size: 32px;
  font-weight: 900;
  color: var(--brand);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-card__number span { font-size: 20px; }
.stat-card__label { font-size: 13px; color: var(--text-muted); font-weight: 500; }

/* ===== Services ===== */
.services { background: var(--bg-white); }
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  position: relative;
  transition: all .25s ease;
}
.service-card:hover {
  border-color: var(--brand-mid);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}
.service-card--featured {
  border-color: var(--brand);
  background: var(--bg-purple-soft);
  box-shadow: var(--shadow-brand);
}
.service-card__badge {
  position: absolute;
  top: -13px;
  left: 28px;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 100px;
  letter-spacing: .05em;
}
.service-card__icon {
  width: 56px;
  height: 56px;
  background: var(--brand-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  margin-bottom: 20px;
}
.service-card--featured .service-card__icon { background: var(--brand); color: #fff; }
.service-card__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-primary);
}
.service-card__desc { font-size: 14px; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.6; }
.service-card__list { border-top: 1px solid var(--border); padding-top: 16px; }
.service-card__list li {
  font-size: 13px;
  color: var(--text-secondary);
  padding: 4px 0;
  padding-left: 16px;
  position: relative;
}
.service-card__list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--brand);
  font-size: 11px;
}

/* ===== Process ===== */
.process { background: var(--brand); }
.process .section__label { background: rgba(255,255,255,.15); color: #fff; }
.process .section__title { color: #fff; }
.process__steps {
  display: flex;
  align-items: flex-start;
  gap: 0;
  flex-wrap: wrap;
}
.process__step {
  flex: 1;
  min-width: 200px;
  text-align: center;
  padding: 0 20px;
}
.process__step-num {
  font-size: 64px;
  font-weight: 900;
  color: rgba(255,255,255,.15);
  line-height: 1;
  margin-bottom: 12px;
  font-family: var(--font-serif);
}
.process__step-content h3 {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}
.process__step-content p { font-size: 14px; color: rgba(255,255,255,.75); line-height: 1.6; }
.process__connector {
  width: 40px;
  height: 2px;
  background: rgba(255,255,255,.2);
  align-self: center;
  margin-top: -60px;
  flex-shrink: 0;
}

/* ===== Certifications ===== */
.certifications { background: var(--bg-light); }
.certs__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.cert-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: all .25s;
}
.cert-card:hover {
  border-color: var(--brand-mid);
  box-shadow: var(--shadow-md);
}
.cert-card__icon {
  width: 64px;
  height: 64px;
  background: var(--brand-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--brand);
}
.cert-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.cert-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

/* ===== Contact ===== */
.contact { background: var(--bg-purple-soft); }
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }
.contact__info .section__label, .contact__info .section__title { text-align: left; }
.contact__desc { color: var(--text-secondary); margin-bottom: 36px; }
.contact__methods { display: flex; flex-direction: column; gap: 16px; }
.contact__method {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: all .2s;
}
a.contact__method:hover { border-color: var(--brand-mid); box-shadow: var(--shadow-sm); }
.contact__method-icon {
  width: 44px; height: 44px;
  background: var(--brand-light);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  flex-shrink: 0;
}
.contact__method-icon--line { background: #06c755; color: #fff; }
.contact__method-label { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.contact__method-value { font-size: 15px; font-weight: 700; color: var(--text-primary); }

/* ===== Form ===== */
.contact__form-wrap {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-md);
}
.contact__form-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 28px;
  color: var(--text-primary);
}
.form__group { margin-bottom: 20px; }
.form__label { display: block; font-size: 13px; font-weight: 700; color: var(--text-secondary); margin-bottom: 6px; }
.form__input,
.form__select,
.form__textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-white);
  transition: border-color .2s;
  outline: none;
}
.form__input:focus,
.form__select:focus,
.form__textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(124,58,237,.1); }
.form__textarea { min-height: 100px; resize: vertical; }
.form__note { font-size: 12px; color: var(--text-muted); text-align: center; margin-top: 12px; }

/* ===== Footer ===== */
.footer { background: #1a0a3c; color: rgba(255,255,255,.75); padding: 64px 0 32px; }
.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer__logo { font-size: 18px; font-weight: 900; color: #fff; margin-bottom: 8px; }
.footer__tagline { font-size: 14px; color: rgba(255,255,255,.5); margin-bottom: 6px; }
.footer__license { font-size: 12px; color: rgba(255,255,255,.4); }
.footer h4 { font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 16px; }
.footer ul li { margin-bottom: 10px; }
.footer ul li a { font-size: 14px; color: rgba(255,255,255,.6); transition: color .2s; }
.footer ul li a:hover { color: var(--brand-mid); }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 24px;
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,.35);
}

/* ===== Toast notification ===== */
.toast {
  position: fixed;
  bottom: 24px; right: 24px;
  background: #10b981;
  color: #fff;
  padding: 14px 24px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  box-shadow: var(--shadow-md);
  transform: translateY(80px);
  opacity: 0;
  transition: all .4s ease;
  z-index: 9999;
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ===== Mobile ===== */
@media (max-width: 1024px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); }
  .certs__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .nav__toggle { display: flex; }
  .nav__links {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; right: 0;
    width: 120px;
    height: 100vh;
    height: 100dvh;
    background: rgba(91,33,182,.98);
    padding: calc(var(--nav-h) + 16px) 20px 32px;
    gap: 4px;
    box-shadow: -4px 0 24px rgba(0,0,0,.25);
    backdrop-filter: blur(8px);
    transform: translateX(100%);
    transition: transform .3s ease;
    z-index: 999;
    overflow-y: auto;
  }
  .nav__links.open { transform: translateX(0); }
  .nav__links a { color: rgba(255,255,255,.9) !important; width: 100%; padding: 12px 14px; border-radius: var(--radius-sm); }
  .nav__links a:hover { background: rgba(255,255,255,.15); color: #fff !important; }
  .nav__cta { background: rgba(255,255,255,.2) !important; color: #fff !important; text-align: center; border: 1px solid rgba(255,255,255,.4) !important; margin-top: 8px; }

  .hero { min-height: 100svh; padding: calc(var(--nav-h) + 32px) 24px 64px; }
  .hero__image-wrap { display: none; }
  .hero__content { max-width: 100%; }

  .about__grid, .contact__grid { grid-template-columns: 1fr; gap: 40px; }
  .about__image-col { order: -1; }
  .services__grid { grid-template-columns: 1fr; }
  .certs__grid { grid-template-columns: 1fr 1fr; }
  .footer__inner { grid-template-columns: 1fr; gap: 32px; }
  .contact__form-wrap { padding: 28px 20px; }

  .process__steps { flex-direction: column; align-items: center; }
  .process__connector { width: 2px; height: 32px; margin: 0; }

  .section { padding: 64px 0; }
  .about__stats { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 480px) {
  .certs__grid { grid-template-columns: 1fr; }
  .about__stats { grid-template-columns: repeat(3, 1fr); }
  .hero__contacts { flex-direction: column; }
}

/* Service card image */
.service-card__img {
  width: 100%;
  height: 180px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 16px;
}
.service-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.service-card:hover .service-card__img img { transform: scale(1.05); }

/* Cert card image */
.cert-card__img {
  width: 100%;
  height: 160px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 16px;
}
.cert-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Service card image */
.service-card__img {
  width: 100%;
  height: 180px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 16px;
}
.service-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}
.service-card:hover .service-card__img img { transform: scale(1.05); }

/* Cert card image */
.cert-card__img {
  width: 100%;
  height: 140px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin-bottom: 16px;
}
.cert-card__img img { width: 100%; height: 100%; object-fit: cover; }
