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

:root {
  --bg: #ffffff;
  --bg-warm: #FAF7F2;
  --bg-warm-dark: #F2EDE4;
  --text: #1D1D1F;
  --text-secondary: #6E6E73;
  --text-tertiary: #AEAEB2;
  --accent: #C8945C;
  --accent-dark: #B07D45;
  --accent-light: #F5EDE0;
  --accent-bg: #FDF8F3;
  --border: rgba(0,0,0,0.08);
  --border-strong: rgba(0,0,0,0.14);
  --radius-sm: 12px;
  --radius: 20px;
  --radius-lg: 28px;
  --max-width: 1200px;
  --nav-height: 52px;
}

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  font-size: 16px;
}

::selection { background: var(--accent-light); color: var(--text); }

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

h1 { font-size: clamp(42px, 6vw, 68px); font-weight: 600; letter-spacing: -1.5px; line-height: 1.1; }
h2 { font-size: clamp(32px, 4.5vw, 48px); font-weight: 600; letter-spacing: -0.8px; line-height: 1.15; }
h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.2px; }

.section-label {
  font-size: 12px; font-weight: 600; color: var(--accent);
  letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 12px;
}
.section-title { margin-bottom: 16px; }
.section-desc {
  font-size: 17px; color: var(--text-secondary); max-width: 560px; line-height: 1.5;
}

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

/* ===== Navigation ===== */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-height);
  background: rgba(255,255,255,0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
nav.scrolled {
  background: rgba(255,255,255,0.92);
  border-bottom-color: var(--border);
}
nav .container {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.nav-logo {
  font-size: 19px; font-weight: 600; letter-spacing: -0.3px; color: var(--text);
  flex-shrink: 0;
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a {
  text-decoration: none; color: var(--text-secondary); font-size: 13px;
  font-weight: 450; transition: color 0.2s; padding: 4px 0;
  position: relative;
}
.nav-links a::after {
  content: ''; position: absolute; bottom: -2px; left: 0; right: 0; height: 1.5px;
  background: var(--accent); transform: scaleX(0); transition: transform 0.3s;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-links a.active::after, .nav-links a:hover::after { transform: scaleX(1); }
.nav-cta {
  background: var(--text); color: #fff; border: none;
  padding: 7px 20px; border-radius: 20px; font-size: 12px;
  font-weight: 500; cursor: pointer; transition: all 0.2s;
  font-family: inherit; flex-shrink: 0;
}
.nav-cta:hover { background: #333; transform: translateY(-1px); }

/* Mobile nav toggle */
.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 20px; height: 1.5px; background: var(--text); margin: 5px 0; transition: 0.3s; border-radius: 1px; }

/* ===== Buttons ===== */
.btn-primary {
  background: var(--text); color: #fff; border: none;
  padding: 13px 30px; border-radius: 28px; font-size: 15px;
  font-weight: 500; cursor: pointer; transition: all 0.2s;
  font-family: inherit; text-decoration: none; display: inline-block;
  letter-spacing: -0.1px;
}
.btn-primary:hover { background: #333; transform: translateY(-1px); }
.btn-primary.accent { background: var(--accent); }
.btn-primary.accent:hover { background: var(--accent-dark); }
.btn-secondary {
  background: transparent; color: var(--text); border: 1px solid var(--border-strong);
  padding: 13px 30px; border-radius: 28px; font-size: 15px;
  font-weight: 500; cursor: pointer; transition: all 0.2s;
  font-family: inherit; text-decoration: none; display: inline-block;
  letter-spacing: -0.1px;
}
.btn-secondary:hover { border-color: var(--text); }

/* ===== Footer ===== */
footer {
  background: var(--bg-warm); border-top: 1px solid var(--border);
  padding: 56px 0 32px;
}
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; }
.footer-brand { font-size: 19px; font-weight: 600; letter-spacing: -0.3px; margin-bottom: 12px; }
.footer-brand span { color: var(--accent); }
.footer-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.7; }
.footer-col h4 { font-size: 13px; font-weight: 600; margin-bottom: 16px; letter-spacing: 0.3px; }
.footer-col a { display: block; font-size: 13px; color: var(--text-secondary); text-decoration: none; margin-bottom: 10px; transition: color 0.2s; }
.footer-col a:hover { color: var(--text); }
.footer-bottom {
  margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; font-size: 12px; color: var(--text-tertiary);
}
.footer-bottom a { color: var(--text-tertiary); transition: color 0.2s; }
.footer-bottom a:hover { color: var(--text); }

/* ===== Scroll Animation ===== */
.fade-in {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }
.fade-in-delay-1 { transition-delay: 0.1s; }
.fade-in-delay-2 { transition-delay: 0.2s; }
.fade-in-delay-3 { transition-delay: 0.3s; }

/* ===== Back to top ===== */
.back-to-top {
  position: fixed; bottom: 32px; right: 32px; z-index: 99;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--text); color: #fff; border: none; cursor: pointer;
  font-size: 18px; display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(10px); transition: all 0.3s;
  pointer-events: none; font-family: inherit;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.back-to-top:hover { background: #333; }

/* ===== Page hero (subpages) ===== */
.page-hero {
  padding: 140px 0 72px; text-align: center;
  background: linear-gradient(180deg, var(--bg-warm) 0%, var(--bg) 100%);
}
.page-hero .section-label { margin-bottom: 16px; }
.page-hero h1 { margin-bottom: 16px; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .container { padding: 0 24px; }
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column; position: absolute;
    top: var(--nav-height); left: 0; right: 0;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    padding: 16px 24px 24px; gap: 8px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links.open a { font-size: 15px; padding: 10px 0; }
  .nav-cta { font-size: 11px; padding: 6px 14px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .back-to-top { bottom: 20px; right: 20px; }
}

@media (max-width: 480px) {
  .container { padding: 0 20px; }
  h1 { font-size: 36px; }
  h2 { font-size: 28px; }
  .footer-grid { grid-template-columns: 1fr; }
  .section-desc { font-size: 15px; }
}
