:root {
  --primary: #0a0a14;
  --secondary: #12122a;
  --accent: #f5a623;
  --accent2: #e8872a;
  --text: #1a1a2e;
  --muted: #6b7280;
  --light: #f9fafb;
  --border: #e5e7eb;
  --white: #ffffff;
  --card-bg: #ffffff;
  --radius: 14px;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 16px 48px rgba(0,0,0,0.14);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.7;
  font-size: 16px;
}

/* ── Navbar ── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 999;
  padding: 0 5%;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(10,10,20,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  transition: background 0.3s;
}
.navbar.scrolled { background: rgba(10,10,20,0.98); }
.logo {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--white);
  text-decoration: none;
  letter-spacing: -0.5px;
}
.logo span { color: var(--accent); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }
.nav-cta {
  background: var(--accent);
  color: var(--primary) !important;
  padding: 9px 22px;
  border-radius: 8px;
  font-weight: 700 !important;
  font-size: 0.88rem !important;
  transition: background 0.2s, transform 0.15s !important;
}
.nav-cta:hover { background: var(--accent2) !important; transform: translateY(-1px); }
.hamburger { display: none; cursor: pointer; flex-direction: column; gap: 5px; background: none; border: none; padding: 0; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.hamburger span { display: block; width: 24px; height: 2px; background: white; border-radius: 2px; transition: 0.3s; }

/* ── Hero ── */
.hero {
  min-height: 100vh;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 5% 80px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  width: 800px; height: 800px;
  background: radial-gradient(circle, rgba(245,166,35,0.12) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%,-50%);
  pointer-events: none;
}
.hero-badge {
  display: inline-block;
  background: rgba(245,166,35,0.12);
  color: var(--accent);
  border: 1px solid rgba(245,166,35,0.3);
  border-radius: 20px;
  padding: 6px 18px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 900;
  color: var(--white);
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 20px;
}
.hero h1 span { color: var(--accent); }
.hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.6);
  max-width: 520px;
  margin: 0 auto 40px;
}
.hero-btns {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn-primary {
  background: var(--accent);
  color: var(--primary);
  padding: 14px 32px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(245,166,35,0.3);
}
.btn-primary:hover { background: var(--accent2); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(245,166,35,0.4); }
.btn-outline {
  background: transparent;
  color: var(--white);
  padding: 14px 32px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid rgba(255,255,255,0.25);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  margin-top: 64px;
  flex-wrap: wrap;
}
.stat { text-align: center; }
.stat-num { font-size: 2rem; font-weight: 900; color: var(--accent); }
.stat-label { font-size: 0.82rem; color: rgba(255,255,255,0.5); margin-top: 4px; }

/* ── Section base ── */
section { padding: 96px 5%; }
.section-label {
  display: inline-block;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.5px;
}
.section-title span { color: var(--accent); }
.section-sub {
  font-size: 1rem;
  color: var(--muted);
  margin-top: 12px;
  max-width: 520px;
}
.section-head { margin-bottom: 56px; }
.container { max-width: 1100px; margin: 0 auto; }

/* ── Services ── */
#services { background: var(--light); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}
.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  transition: box-shadow 0.25s, transform 0.25s;
  position: relative;
  overflow: hidden;
}
.service-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.service-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(245,166,35,0.2);
}
.service-badge {
  position: absolute;
  top: 20px; right: 20px;
  background: var(--accent);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
}
.service-icon { font-size: 2.4rem; margin-bottom: 16px; }
.service-card h3 { font-size: 1.3rem; font-weight: 800; margin-bottom: 10px; }
.service-card p { color: var(--muted); font-size: 0.92rem; margin-bottom: 20px; }
.service-features { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.service-features li {
  font-size: 0.88rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.service-features li::before { content: '✓'; color: var(--accent); font-weight: 700; }

/* ── Why Us ── */
#why .container { max-width: 1100px; margin: 0 auto; }
.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.why-card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  transition: box-shadow 0.2s, transform 0.2s;
}
.why-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.why-icon {
  width: 52px; height: 52px;
  background: rgba(245,166,35,0.1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 16px;
}
.why-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.why-card p { font-size: 0.87rem; color: var(--muted); line-height: 1.6; }

/* ── Process ── */
#process { background: var(--primary); }
#process .section-title { color: var(--white); }
#process .section-sub { color: rgba(255,255,255,0.5); }
.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 24px;
  position: relative;
}
.process-step {
  text-align: center;
  padding: 32px 20px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius);
  position: relative;
  transition: background 0.2s;
}
.process-step:hover { background: rgba(255,255,255,0.07); }
.process-num {
  width: 48px; height: 48px;
  background: var(--accent);
  color: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 900;
  margin: 0 auto 16px;
}
.process-step h3 { font-size: 1rem; font-weight: 700; color: var(--white); margin-bottom: 8px; }
.process-step p { font-size: 0.85rem; color: rgba(255,255,255,0.5); line-height: 1.6; }

/* ── Portfolio ── */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 350px));
  justify-content: center;
  gap: 24px;
}
.portfolio-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.25s;
}
.portfolio-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.portfolio-thumb {
  height: 180px;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}
.portfolio-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.35s ease;
}
.portfolio-card:hover .portfolio-thumb img { transform: scale(1.04); }
.portfolio-body { padding: 24px; }
.portfolio-type {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.portfolio-card h3 { font-size: 1.1rem; font-weight: 800; margin-bottom: 8px; }
.portfolio-body p { font-size: 0.87rem; color: var(--muted); line-height: 1.65; margin-bottom: 16px; }
.portfolio-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.portfolio-tags span {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text);
  background: var(--light);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3px 12px;
}

/* ── Pricing ── */
#pricing { background: var(--light); }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  align-items: start;
}
.pricing-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
  transition: box-shadow 0.25s, transform 0.25s;
}
.pricing-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-4px); }
.pricing-card.popular {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(245,166,35,0.2);
  position: relative;
}
.popular-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 18px;
  border-radius: 20px;
  white-space: nowrap;
}
.pricing-name { font-size: 0.85rem; font-weight: 700; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 8px; }
.pricing-price { font-size: 2.4rem; font-weight: 900; color: var(--text); margin-bottom: 4px; line-height: 1; }
.pricing-price sup { font-size: 1.2rem; font-weight: 600; vertical-align: super; }
.pricing-note { font-size: 0.82rem; color: var(--muted); margin-bottom: 24px; }
.pricing-divider { border: none; border-top: 1px solid var(--border); margin: 24px 0; }
.pricing-features { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-bottom: 32px; }
.pricing-features li { font-size: 0.88rem; display: flex; align-items: center; gap: 8px; }
.pricing-features li::before { content: '✓'; color: var(--accent); font-weight: 700; flex-shrink: 0; }
.pricing-features li.no::before { content: '✗'; color: #d1d5db; }
.pricing-features li.no { color: var(--muted); }

/* ── FAQ ── */
.faq-list { display: flex; flex-direction: column; gap: 12px; max-width: 760px; margin: 0 auto; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}
.faq-q {
  width: 100%;
  padding: 20px 24px;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.97rem;
  font-weight: 600;
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-family: inherit;
  transition: background 0.2s;
}
.faq-q:hover { background: var(--light); }
.faq-chevron {
  flex-shrink: 0;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--muted);
  transition: transform 0.3s, background 0.2s;
}
.faq-item.open .faq-chevron { transform: rotate(180deg); background: var(--accent); color: var(--primary); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.faq-a-inner { padding: 0 24px 20px; font-size: 0.9rem; color: var(--muted); line-height: 1.75; }
.faq-item.open .faq-a { max-height: 300px; }

/* ── Contact ── */
#contact { background: var(--primary); }
#contact .section-title { color: var(--white); }
#contact .section-sub { color: rgba(255,255,255,0.5); }
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 56px;
  align-items: start;
}
.contact-info { display: flex; flex-direction: column; gap: 28px; }
.contact-item { display: flex; gap: 16px; align-items: flex-start; }
.contact-ico {
  width: 44px; height: 44px;
  background: rgba(245,166,35,0.1);
  border: 1px solid rgba(245,166,35,0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.contact-item h4 { font-size: 0.85rem; font-weight: 700; color: rgba(255,255,255,0.5); margin-bottom: 4px; }
.contact-item p { font-size: 0.95rem; color: var(--white); }
.contact-item a { color: var(--accent); text-decoration: none; }
.contact-item a:hover { text-decoration: underline; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: 0.82rem; font-weight: 600; color: rgba(255,255,255,0.6); }
.form-group input,
.form-group select,
.form-group textarea {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 12px 16px;
  color: var(--white);
  font-size: 0.92rem;
  font-family: inherit;
  transition: border-color 0.2s;
  outline: none;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(255,255,255,0.3); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--accent); }
.form-group select option { background: #1a1a2e; color: white; }
.form-group textarea { resize: vertical; min-height: 110px; }

/* ── Footer ── */
footer {
  background: #060610;
  padding: 48px 5% 32px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.footer-brand .logo { font-size: 1.2rem; }
.footer-brand p { font-size: 0.85rem; color: rgba(255,255,255,0.35); margin-top: 8px; max-width: 240px; line-height: 1.6; }
.footer-links h4 { font-size: 0.8rem; font-weight: 700; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 14px; }
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-links a { font-size: 0.88rem; color: rgba(255,255,255,0.55); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom p { font-size: 0.82rem; color: rgba(255,255,255,0.3); }

/* ── Guarantee band ── */
#guarantee { padding-top: 0; padding-bottom: 0; margin: 88px 0; }
.guarantee-band {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  border: 1px solid rgba(245,166,35,0.18);
  border-radius: 20px;
  padding: 48px 44px;
  box-shadow: var(--shadow-lg);
}
.guarantee-item { text-align: center; }
.guarantee-ico {
  width: 56px; height: 56px;
  margin: 0 auto 16px;
  background: rgba(245,166,35,0.12);
  border: 1px solid rgba(245,166,35,0.25);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}
.guarantee-item h4 { font-size: 1rem; font-weight: 700; color: var(--white); margin-bottom: 8px; }
.guarantee-item p { font-size: 0.85rem; color: rgba(255,255,255,0.55); line-height: 1.65; }

/* ── Animations ── */
.fade-up { opacity: 0; transform: translateY(28px); transition: opacity 0.6s ease, transform 0.6s ease; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* Stagger cards inside grids */
.services-grid .fade-up:nth-child(2),
.why-grid .fade-up:nth-child(2),
.process-steps .fade-up:nth-child(2),
.portfolio-grid .fade-up:nth-child(2),
.pricing-grid .fade-up:nth-child(2),
.faq-list .fade-up:nth-child(2) { transition-delay: 0.08s; }
.why-grid .fade-up:nth-child(3),
.process-steps .fade-up:nth-child(3),
.portfolio-grid .fade-up:nth-child(3),
.pricing-grid .fade-up:nth-child(3),
.faq-list .fade-up:nth-child(3) { transition-delay: 0.16s; }
.why-grid .fade-up:nth-child(4),
.process-steps .fade-up:nth-child(4),
.pricing-grid .fade-up:nth-child(4),
.faq-list .fade-up:nth-child(4) { transition-delay: 0.24s; }
.faq-list .fade-up:nth-child(5) { transition-delay: 0.32s; }

/* Hero entrance */
@keyframes heroIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
.hero-badge { opacity: 0; animation: heroIn 0.7s ease forwards 0.05s; }
.hero h1 { opacity: 0; animation: heroIn 0.7s ease forwards 0.18s; }
.hero p { opacity: 0; animation: heroIn 0.7s ease forwards 0.32s; }
.hero-btns { opacity: 0; animation: heroIn 0.7s ease forwards 0.46s; }
.hero-stats { opacity: 0; animation: heroIn 0.7s ease forwards 0.6s; }

/* Hero glow pulse */
@keyframes heroGlow { 0%,100% { opacity: 0.7; transform: translate(-50%,-50%) scale(1); } 50% { opacity: 1; transform: translate(-50%,-50%) scale(1.12); } }
.hero::before { animation: heroGlow 7s ease-in-out infinite; }

/* Accent gradient on hero highlight & stat numbers */
.hero h1 span, .stat-num {
  background: linear-gradient(90deg, var(--accent), #ffcf6e);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

@media (prefers-reduced-motion: reduce) {
  .hero-badge, .hero h1, .hero p, .hero-btns, .hero-stats { animation: none; opacity: 1; }
  .hero::before { animation: none; }
  .fade-up { transition: none; }
}

/* ── Scrollspy active nav ── */
.nav-links a.active { color: var(--accent); }

/* ── Back-to-top ── */
.back-top {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--primary);
  border: none;
  cursor: pointer;
  font-size: 1.3rem;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(0,0,0,0.28);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s, background 0.2s;
  z-index: 900;
}
.back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-top:hover { background: var(--accent2); }

/* ── Mobile floating CTA ── */
.float-cta { display: none; }
body.at-contact .float-cta { opacity: 0; visibility: hidden; pointer-events: none; }

/* ── Mobile ── */
@media (max-width: 768px) {
  .float-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 20px; left: 20px; right: 78px;
    background: var(--accent);
    color: var(--primary);
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(245,166,35,0.4);
    z-index: 900;
    transition: opacity 0.25s, visibility 0.25s;
  }
  .back-top { bottom: 20px; right: 20px; }
  .nav-links { display: none; flex-direction: column; position: fixed; top: 68px; left: 0; right: 0; background: rgba(10,10,20,0.98); padding: 24px; gap: 20px; }
  .nav-links.open { display: flex; }
  .hamburger { display: flex; }
  .hero h1 { font-size: 2.2rem; }
  .hero-stats { gap: 32px; }
  .contact-wrap { grid-template-columns: 1fr; gap: 40px; }
  .form-grid { grid-template-columns: 1fr; }
  section { padding: 72px 5%; }
  #guarantee { margin: 64px 0; }
  .guarantee-band { padding: 36px 24px; gap: 28px; }
}
