:root {
  --paper: #f6f1e7;
  --paper-2: #efe7d8;
  --ink: #352a20;
  --ink-soft: #6b5c4c;
  --walnut: #8a5a3b;
  --olive: #7c8471;
  --olive-deep: #5f6a54;
  --terracotta: #c1734f;
  --line: rgba(53, 42, 32, 0.14);
  --serif: "Noto Serif TC", "Times New Roman", serif;
  --sans: "Noto Sans TC", -apple-system, BlinkMacSystemFont, sans-serif;
  --max: 1140px;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.5em;
  letter-spacing: 0.02em;
}

p { margin: 0 0 1em; color: var(--ink-soft); }

a { color: inherit; text-decoration: none; }

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

/* paper grain overlay */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 241, 231, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}
.brand-mark { width: 30px; height: 30px; color: var(--walnut); }
.brand-mark-img {
  width: 38px; height: 38px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--paper);
}
.brand-text {
  font-family: var(--serif);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}
.brand-text.small { font-size: 1.05rem; }

.main-nav {
  display: flex;
  gap: 34px;
}
.main-nav a {
  font-size: 0.92rem;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
  transition: color 0.25s ease;
}
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--terracotta);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}
.main-nav a:hover { color: var(--ink); }
.main-nav a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 34px;
  height: 34px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  width: 100%;
  height: 1.5px;
  background: var(--ink);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ---------- reveal ---------- */
.section, .hero-inner {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.section.in-view, .hero-inner.in-view { opacity: 1; transform: translateY(0); }

/* ---------- hero ---------- */
.hero {
  padding: 88px 0 60px;
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}
.eyebrow {
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  color: var(--terracotta);
  margin-bottom: 14px;
  font-weight: 500;
}
.hero-text h1 {
  font-size: clamp(2.1rem, 4vw, 3.1rem);
  line-height: 1.4;
  margin-bottom: 26px;
}
.hero-desc {
  max-width: 46ch;
  font-size: 1.02rem;
}
.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 2px;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  transition: all 0.25s ease;
  border: 1px solid transparent;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover { background: var(--walnut); }
.btn-ghost {
  border-color: var(--ink);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

.hero-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.photo-tone {
  filter: sepia(0.16) saturate(0.92) brightness(1.03) contrast(1.02);
}
.hero-photo-frame {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 3px;
  box-shadow: 0 22px 40px rgba(58, 46, 38, 0.22);
  border: 1px solid var(--line);
}
.hero-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.visual-caption {
  margin-top: 18px;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}

/* ---------- section shared ---------- */
.section { padding: 90px 0; }
.section-head { margin-bottom: 48px; max-width: 640px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.section-desc { font-size: 0.98rem; }

/* ---------- about ---------- */
.about { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.about-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 48px;
}
.about-lede {
  font-family: var(--serif);
  font-size: 1.35rem;
  color: var(--ink);
  line-height: 1.9;
  border-left: 2px solid var(--terracotta);
  padding-left: 22px;
}
.about-body p { font-size: 0.98rem; }

/* ---------- services ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 26px;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 34px 26px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 30px rgba(58, 46, 38, 0.08);
  border-color: var(--terracotta);
}
.card-icon {
  width: 52px; height: 52px;
  margin-bottom: 18px;
  color: var(--walnut);
}
.card-icon svg { width: 100%; height: 100%; }
.card-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 2px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
}
.card-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.card:hover .card-photo img { transform: scale(1.06); }
.card h3 { font-size: 1.08rem; margin-bottom: 10px; }
.card p { font-size: 0.9rem; margin: 0; }

/* ---------- materials ---------- */
.materials { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.material-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
}
.swatch {
  display: inline-block;
  width: 64px; height: 64px;
  border-radius: 50%;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  box-shadow: inset 0 -6px 10px rgba(0,0,0,0.06);
}
.swatch-bone   { background: #efe6d3; }
.swatch-tusq   { background: #f5f2ea; }
.swatch-ivory  { background: #ece2cf; }
.swatch-ebony  { background: #2c2622; }
.material h4 { font-size: 1rem; margin-bottom: 8px; }
.material p { font-size: 0.88rem; }

/* ---------- process ---------- */
.steps {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}
.step {
  position: relative;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.step-num {
  display: block;
  font-family: var(--serif);
  font-size: 1.6rem;
  color: var(--terracotta);
  margin-bottom: 10px;
}
.step h4 { font-size: 1rem; margin-bottom: 8px; }
.step p { font-size: 0.88rem; }

/* ---------- gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.gallery-item {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 2px;
  border: 1px solid var(--line);
  position: relative;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease, filter 0.5s ease;
}
.gallery-item:hover img {
  transform: scale(1.08);
  filter: sepia(0.05) saturate(1.05) brightness(1.05) contrast(1.02);
}

/* ---------- contact ---------- */
.contact-inner { text-align: center; }
.contact .section-head { margin-left: auto; margin-right: auto; text-align: center; }
.fb-card {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  margin-top: 12px;
  padding: 22px 34px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 3px;
  transition: transform 0.25s ease, background 0.25s ease;
}
.fb-card:hover { transform: translateY(-3px); background: var(--walnut); }
.fb-icon { width: 30px; height: 30px; flex-shrink: 0; }
.fb-text { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.fb-text strong { font-family: var(--serif); font-size: 1.05rem; }
.fb-text em { font-style: normal; font-size: 0.8rem; opacity: 0.75; }
.fb-arrow { width: 20px; height: 20px; margin-left: 6px; flex-shrink: 0; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--paper-2);
  padding: 40px 0;
}
.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-inner .brand-text { color: var(--paper); }
.footer-inner p { color: rgba(246, 241, 231, 0.6); font-size: 0.82rem; margin: 0; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .about-grid { grid-template-columns: 1fr; }
  .about-lede { border-left: none; border-top: 2px solid var(--terracotta); padding-left: 0; padding-top: 18px; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .material-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 680px) {
  .main-nav {
    position: absolute;
    top: 76px; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .main-nav.open { max-height: 300px; }
  .main-nav a { padding: 16px 28px; border-bottom: 1px solid var(--line); }
  .nav-toggle { display: flex; }
  .card-grid { grid-template-columns: 1fr; }
  .material-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .fb-card { flex-wrap: wrap; text-align: left; padding: 20px; }
}
