:root {
  --bg: #0e0e0e;
  --card: #171717;
  --alt: #101214;
  --text: #f4f4f5;
  --muted: #dcdce6;
  --primary: #10b981; /* teal-500 */
  --primary-600: #059669;
  --border: #262626;
  --brand: #e8e2d9; /* warm light */
  --fab-bottom: 24px; /* default distance of floating button from bottom */
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Noto Sans TC', system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.6;
  overflow-x: hidden;
}

img, svg { display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: min(1100px, 92%);
  margin: 0 auto;
}

.site-header { position: sticky; top: 0; z-index: 40; border-bottom: none; transition: background .25s ease, backdrop-filter .25s ease; will-change: transform; }
.site-header:not(.scrolled) { background: transparent; backdrop-filter: none; }
.site-header.scrolled { background: rgba(14,14,14,0.7); backdrop-filter: blur(8px); }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
}
.brand { display: inline-flex; align-items: center; }
.brand-logo { height: 34px; width: auto; display: block; }
.brand-logo.small { height: 26px; }

.main-nav { display: flex; gap: 20px; }
.main-nav a { color: var(--muted); font-weight: 500; }
.main-nav a:hover { color: var(--text); }

.menu-toggle { display: none; background: none; border: 0; cursor: pointer; }
.menu-toggle span { display: block; width: 22px; height: 2px; margin: 5px 0; background: var(--text); }

.hero { position: relative; min-height: calc(100vh - 68px); display: grid; grid-template-rows: 1fr auto; }
.hero-content { position: relative; z-index: 3; text-align: center; padding-bottom: 24px; display: grid; place-items: center; gap: 10px; }
.hero { align-items: center; }
.hero h1 { font-family: 'Playfair Display', serif; font-size: clamp(32px, 6vw, 56px); line-height: 1.15; margin: 0 0 6px; }
.hero p:not(.tagline) { color: var(--muted); margin: 0 0 20px; }
.tagline { font-weight: 600; color: #ffffff; }
.stroke-white { 
  color: var(--text);
  text-shadow: 
    -1px -1px 0 rgba(255,255,255,.35),
     1px -1px 0 rgba(255,255,255,.35),
    -1px  1px 0 rgba(255,255,255,.35),
     1px  1px 0 rgba(255,255,255,.35);
}
.hero-ctas { display: flex; gap: 12px; justify-content: center; }

/* Slider */
.slider { position: absolute; inset: 0; overflow: hidden; z-index: 1; }
.slides { position: absolute; inset: 0; }
.slide { position: absolute; inset: 0; opacity: 0; transition: opacity 600ms ease; }
.slide.is-active { opacity: 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.9) brightness(0.8); }

.slider-btn { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--border); background: rgba(17,17,17,0.55); color: var(--text); cursor: pointer; display: grid; place-items: center; }
.slider-btn:hover { background: rgba(17,17,17,0.7); }
.slider-btn.prev { left: 14px; }
.slider-btn.next { right: 14px; }
.slider-btn span { font-size: 28px; line-height: 1; }

.slider-dots { position: absolute; left: 50%; transform: translateX(-50%); bottom: 14px; display: flex; gap: 8px; z-index: 2; }
.dot { width: 8px; height: 8px; border-radius: 999px; background: rgba(255,255,255,0.4); border: none; cursor: pointer; }
.dot.is-active { background: var(--primary); }

/* Mouse spotlight over hero */
.hero::before {
  content: '';
  position: absolute;
  inset: -20%;
  background: radial-gradient(300px 300px at var(--mx, -100px) var(--my, -100px), rgba(255,255,255,0.22), transparent 60%);
  pointer-events: none;
  z-index: 2;
  transition: opacity .2s ease;
  opacity: .85;
}

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 999px; border: 1px solid var(--border); color: var(--text); font-weight: 600; transition: transform 0.15s ease, background 0.2s ease, border-color 0.2s ease; }
.btn:hover { transform: translateY(-1px); }
.btn.primary { background: var(--primary); color: #06110e; border-color: transparent; }
.btn.primary:hover { background: var(--primary-600); color: #06110e; }
.btn.secondary { background: #1f2937; }
.btn.ghost { background: transparent; }
.btn.wide { width: 100%; justify-content: center; }

.section { padding: 72px 0; }
.section.alt { background: var(--alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section h2 { font-family: 'Playfair Display', serif; font-size: clamp(26px, 3.5vw, 36px); margin: 0 0 24px; }

.grid { display: grid; gap: 18px; }
.cards { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--card); border: 1px solid var(--border); padding: 20px; border-radius: 14px; }
.card.service { padding: 0; overflow: hidden; }
.service-media { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.service-media img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.02); transition: transform .5s ease, filter .4s ease; filter: saturate(.9) brightness(.95); }
.card.service:hover .service-media img { transform: scale(1.07); filter: saturate(1.05) brightness(1.02); }
.card.service h3, .card.service p { padding: 14px 16px 0; }
.card.service p { padding-top: 4px; padding-bottom: 16px; color: var(--muted); }

.card h3 { margin: 4px 0 8px; }
.card p { color: var(--muted); margin: 0; }

.works { grid-template-columns: repeat(4, 1fr); }
.work { background: var(--card); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.work:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,0.25);} 
.work-img { aspect-ratio: 4 / 3; overflow: hidden; }
.work-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,0.92); display: none; align-items: center; justify-content: center; z-index: 60; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.lightbox .close { position: absolute; top: 18px; right: 18px; width: 40px; height: 40px; border-radius: 999px; border: 1px solid var(--border); background: #151515; color: var(--text); display: grid; place-items: center; cursor: pointer; }
.lightbox .close:hover { background: #1c1c1c; }
.work-title { padding: 12px 14px; color: var(--muted); }

.about { display: grid; grid-template-columns: 1.3fr 1fr; gap: 24px; align-items: start; }
.about-card { background: linear-gradient(180deg, #1b1b1b, #131313); border: 1px solid var(--border); border-radius: 14px; padding: 22px; display: grid; gap: 16px; }
.stat { display: grid; grid-template-columns: auto 1fr; align-items: end; gap: 10px; }
.num { font-family: 'Playfair Display', serif; font-size: 44px; }
.label { color: var(--muted); }
.ticks { list-style: none; padding: 0; margin: 16px 0 0; }
.ticks li { position: relative; padding-left: 22px; margin: 6px 0; }
.ticks li::before { content: '✓'; color: var(--primary); position: absolute; left: 0; }

.site-footer { border-top: 1px solid var(--border); background: #0c0c0c; }
.footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 26px 0; }
.social { width: 36px; height: 36px; display: inline-grid; place-items: center; color: var(--muted); background: #151515; border: 1px solid var(--border); border-radius: 999px; transition: transform 0.15s ease, color 0.2s ease, background 0.2s ease; }
.social:hover { color: #0b1412; background: var(--primary); transform: translateY(-1px); }
.footer-right { display: flex; gap: 10px; }
.copyright { color: var(--muted); font-size: 14px; }

.floating-whatsapp { position: fixed; right: 20px; bottom: var(--fab-bottom); z-index: 50; display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; border-radius: 999px; background: var(--primary); color: #06110e; border: 1px solid #0a3b2f; font-weight: 700; box-shadow: 0 8px 30px rgba(16,185,129,0.35); transition: transform 0.2s ease, box-shadow 0.2s ease; }
.floating-whatsapp:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(16,185,129,0.5); }
.floating-whatsapp svg { width: 22px; height: 22px; }

/* Safe-area support */
@supports (bottom: env(safe-area-inset-bottom)) {
  :root { --fab-bottom: calc(24px + env(safe-area-inset-bottom)); }
}


@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .works { grid-template-columns: repeat(3, 1fr); }
  .about { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .site-header { position: fixed; top: 0; left: 0; right: 0; }
  .main-nav { display: none; position: absolute; right: 0; top: 56px; background: #0f0f0f; border: 1px solid var(--border); border-right: 0; border-radius: 8px 0 0 8px; padding: 12px; flex-direction: column; gap: 12px; }
  .main-nav.open { display: flex; }
  .menu-toggle { display: block; }
  .hero { margin-top: 68px; min-height: calc(100vh - 136px); }
  .cards { grid-template-columns: 1fr; }
  .works { grid-template-columns: repeat(2, 1fr); }
  .footer { flex-direction: column; align-items: flex-start; }
  .floating-whatsapp { padding: 12px; right: 16px; }
  .floating-whatsapp span { display: none; }
}


