/* ============================================================
   RG Dendrology — "Botanic Report" design system
   Stage 1 (mobile-first, bilingual EN / 中文)
   ============================================================ */

:root {
  --ink: #1E2E25;
  --canopy: #2E5B43;
  --leaf: #4C7A5A;
  --sage: #DCE6DE;
  --mist: #F4F6F3;
  --paper: #FBFAF7;
  --timber: #A9713F;
  --timber-dark: #8F5D2F;
  --muted: #5E6E63;
  --line: #E3E8E2;
  --white: #ffffff;

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", "Courier New", monospace;

  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(30, 46, 37, 0.10);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--body);
  color: var(--ink);
  background: var(--mist);
  line-height: 1.65;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--canopy); text-decoration: none; }
a:hover { color: var(--leaf); }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 0.6rem;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn-primary { background: var(--timber); color: #fff; }
.btn-primary:hover { background: var(--timber-dark); color: #fff; }
.btn-canopy { background: var(--canopy); color: #fff; }
.btn-canopy:hover { background: var(--leaf); color: #fff; }
.btn-ghost { background: transparent; color: var(--canopy); border-color: var(--canopy); }
.btn-ghost:hover { background: rgba(46, 91, 67, 0.08); color: var(--canopy); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--sage); color: var(--ink); }
.btn-ghost-light { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.55); }
.btn-ghost-light:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(251, 250, 247, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 72px;
}
.brand img { height: 42px; width: auto; }
.site-nav {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}
.site-nav a.nav-link {
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a.nav-link:hover { color: var(--canopy); border-bottom-color: var(--timber); }
.nav-lang {
  display: flex;
  gap: 0.35rem;
  background: var(--sage);
  padding: 0.3rem 0.4rem;
  border-radius: 999px;
}
.nav-lang a {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  color: var(--muted);
}
.nav-lang a.active { background: var(--canopy); color: #fff; }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  width: 44px;
  height: 40px;
  cursor: pointer;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  background: var(--canopy);
  overflow: hidden;
}
.hero-photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(30, 46, 37, 0.78) 0%, rgba(30, 46, 37, 0.40) 50%, rgba(30, 46, 37, 0) 72%);
}
.hero-body {
  position: relative;
  padding: clamp(4rem, 10vw, 7rem) 0;
  max-width: 720px;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #CFE3D3;
  margin: 0 0 1rem;
}
.hero h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.4rem);
  color: #fff;
  margin: 0 0 1.1rem;
}
.hero-lede {
  font-size: clamp(1.02rem, 2vw, 1.2rem);
  color: rgba(255, 255, 255, 0.9);
  max-width: 600px;
  margin: 0 0 1.9rem;
}
.hero h1,
.page-hero h1 {
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.45);
}
.hero-lede {
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
}
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.8rem; }

/* Interior page hero (shorter) */
.page-hero {
  position: relative;
  color: #fff;
  background: var(--ink);
  overflow: hidden;
}
.page-hero .hero-photo { opacity: 0.5; }
.page-hero .hero-overlay { background: linear-gradient(90deg, rgba(30, 46, 37, 0.72) 0%, rgba(30, 46, 37, 0.36) 52%, rgba(30, 46, 37, 0) 74%); }
.page-hero .hero-body { padding: clamp(3rem, 7vw, 4.5rem) 0; }

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section-alt { background: var(--paper); }
.section-tight { padding: clamp(2rem, 4vw, 3rem) 0; }
.section-head { max-width: 680px; margin-bottom: 2.25rem; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-title { font-size: clamp(1.6rem, 3.4vw, 2.3rem); }
.section-lede { color: var(--muted); font-size: 1.02rem; margin: 0; }

/* ---------- Trust strip ---------- */
.trust-strip { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.badge-img { height: 64px; width: auto; }
.trust-pill {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.trust-pill strong { color: var(--canopy); font-weight: 700; }

/* ---------- Service cards ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.1rem;
}
.service-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.service-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.service-card .thumb {
  height: 168px;
  background-size: cover;
  background-position: center;
}
.service-card .card-body { padding: 1.15rem 1.3rem 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.service-card h3 { font-size: 1.28rem; }
.service-card p { margin: 0; color: var(--muted); font-size: 0.94rem; flex: 1; }
.service-card .card-link { font-weight: 600; font-size: 0.9rem; }

/* ---------- Proof / Why choose us ---------- */
.proof-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 1.25rem;
}
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.7rem;
  box-shadow: var(--shadow-sm);
}
.panel.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.panel.dark h3 { color: #fff; }
.panel h3 { font-size: 1.35rem; }
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 0.65rem;
  align-items: baseline;
  font-size: 0.96rem;
}
.check-list li:last-child { border-bottom: 0; }
.check-list .mark { color: var(--timber); font-weight: 700; flex: none; }
.panel.dark .check-list li { border-bottom-color: rgba(255, 255, 255, 0.14); }
.panel.dark .check-list .mark { color: #D9A267; }
.quote {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--canopy);
  margin: 1.1rem 0 0;
  line-height: 1.4;
}
.panel.dark .quote { color: #CFE3D3; }
.panel.dark p { color: rgba(255, 255, 255, 0.82); }

/* ---------- Case studies ---------- */
.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.1rem;
}
.case-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.case-card .thumb { height: 190px; background-size: cover; background-position: center; }
.case-card .card-body { padding: 1.1rem 1.3rem 1.4rem; }
.case-card h3 { font-size: 1.2rem; }
.case-card p { color: var(--muted); font-size: 0.93rem; margin: 0 0 0.5rem; }
.case-note { font-size: 0.78rem; color: var(--muted); font-style: italic; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 1.25rem;
  align-items: start;
}
.contact-panel {
  background: var(--sage);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.7rem;
}
.contact-panel h3 { font-size: 1.35rem; }
.contact-line { display: flex; gap: 0.7rem; margin: 0.8rem 0; align-items: baseline; }
.contact-line .label { color: var(--muted); font-size: 0.9rem; min-width: 76px; flex: none; }
.contact-line a { color: var(--canopy); font-weight: 600; }
.contact-note { margin-top: 1.2rem; font-size: 0.88rem; color: var(--muted); }

.form-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.7rem;
  box-shadow: var(--shadow-sm);
}
.form-card h3 { font-size: 1.35rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.field { margin-bottom: 0.9rem; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 0.3rem; }
.field input,
.field textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-family: var(--body);
  font-size: 0.95rem;
  color: var(--ink);
  background: #fff;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--canopy);
  box-shadow: 0 0 0 3px rgba(46, 91, 67, 0.14);
}
.field textarea { resize: vertical; min-height: 96px; }
.form-card .btn { width: 100%; }
.form-note { font-size: 0.8rem; color: var(--muted); margin: 0.7rem 0 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #fff; padding: clamp(2.5rem, 5vw, 4rem) 0 1.75rem; }
.footer-top {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
  padding-bottom: 1.6rem;
  margin-bottom: 1.6rem;
}
.footer-top img { height: 42px; width: auto; }
.footer-badges { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.footer-badge {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  color: #DCE6DE;
}
.footer-badge-img {
  height: 44px;
  width: auto;
  background: #fff;
  border-radius: 8px;
  padding: 6px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.5rem;
}
.footer-grid h4 { color: #fff; font-size: 1rem; margin: 0 0 0.7rem; }
.footer-grid p { margin: 0.3rem 0; font-size: 0.9rem; color: rgba(255, 255, 255, 0.72); }
.footer-grid a { color: #CFE3D3; }
.footer-bottom {
  margin-top: 1.6rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.6);
}
.footer-bottom p { margin: 0.25rem 0; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.75rem 1.25rem 1.25rem;
    box-shadow: var(--shadow-md);
  }
  .site-nav.open { display: flex; }
  .site-nav a.nav-link { padding: 0.7rem 0; border-bottom: 1px solid var(--line); }
  .nav-lang { align-self: flex-start; margin-top: 0.9rem; }
  .nav-cta { margin-top: 0.9rem; text-align: center; }

  .proof-grid, .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero-body { padding: clamp(3rem, 8vw, 4.5rem) 0; }
}

@media (max-width: 480px) {
  .brand img { height: 36px; }
  .service-grid, .case-grid { grid-template-columns: 1fr; }
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translate(-50%, 1rem);
  z-index: 100;
  max-width: min(92vw, 480px);
  padding: 0.85rem 1.2rem;
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  font-weight: 500;
  color: #fff;
  opacity: 0;
  transition: opacity 0.25s ease, transform 0.25s ease;
  box-shadow: var(--shadow-md);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast-ok { background: var(--canopy); }
.toast-error { background: #8a3b2f; }
