@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@300;400;500;600;700&family=Noto+Sans:wght@300;400;500;600;700&display=swap');

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

:root {
  --bg: #fdfbf7;
  --bg2: #f5f5f5;
  --ink: #1a1a1a;
  --ink2: #444;
  --border: #d0cec9;
  --nav-w: 220px;
  --font: 'Be Vietnam Pro', 'Noto Sans', system-ui, sans-serif;
}

html {
  font-size: 16px;
  line-height: 1.6;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  scroll-behavior: auto;
}

body {
  min-height: 100vh;
  background: var(--bg);
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4'%3E%3Crect width='1' height='1' x='0' y='0' fill='%231a1a1a' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
a:hover {
  opacity: 0.65;
}

ul, ol {
  list-style: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ── 整体布局 ── */
.layout-wrap {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

/* ── 左侧固定竖排导航 ── */
.sidenav {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--nav-w);
  height: 100vh;
  background: var(--bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  overflow-y: auto;
}

.sidenav-brand {
  padding: 24px 16px 16px;
  border-bottom: 1px solid var(--border);
}
.sidenav-brand a {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
}
.nav-logo-text {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--ink);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidenav-search {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.sidenav-search form {
  display: flex;
  gap: 0;
}
.sidenav-search input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--border);
  border-right: none;
  background: var(--bg2);
  color: var(--ink);
  font-family: var(--font);
  font-size: 13px;
  padding: 8px 10px;
  outline: none;
  border-radius: 0;
  appearance: none;
}
.sidenav-search input::placeholder {
  color: var(--ink2);
}
.sidenav-search button {
  border: 1px solid var(--border);
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  padding: 8px 10px;
  cursor: pointer;
  border-radius: 0;
  min-height: 40px;
  min-width: 36px;
  transition: none;
}
.sidenav-search button:hover {
  background: var(--ink2);
}

.sidenav > ol {
  flex: 1;
  padding: 8px 0 24px;
  display: flex;
  flex-direction: column;
}
.sidenav > ol > li > a {
  display: block;
  padding: 11px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  letter-spacing: 0.02em;
  line-height: 1.4;
  min-height: 40px;
  display: flex;
  align-items: center;
}
.sidenav > ol > li > a:hover,
.sidenav > ol > li > a[aria-current="page"] {
  background: var(--bg2);
  border-bottom-color: var(--border);
}
.sidenav > ol > li > a[aria-current="page"] {
  font-weight: 700;
  border-left: 3px solid var(--ink);
  padding-left: 17px;
}

/* ── 页面主体 ── */
.page-body {
  margin-left: var(--nav-w);
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 200px;
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "hero hero"
    "main aside"
    "footer footer";
  min-height: 100vh;
  align-items: start;
}

.page-home .page-body {
  grid-template-areas:
    "hero hero"
    "main aside"
    "footer footer";
}

.page-body > main {
  grid-area: main;
  padding: 32px 32px 32px 40px;
  min-width: 0;
}

.page-body > aside {
  grid-area: aside;
  padding: 32px 20px 32px 8px;
  border-left: 1px solid var(--border);
  min-width: 0;
}

.page-body > footer {
  grid-area: footer;
}

/* no hero pages */
.page-body:not(:has(.hero)) {
  grid-template-areas:
    "main aside"
    "footer footer";
}

/* ── Hero ── */
.hero {
  grid-area: hero;
  min-height: 100vh;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-end;
  overflow: hidden;
  border-bottom: 2px solid var(--ink);
}

.hero-texture {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 32px 32px;
  opacity: 0.5;
  z-index: 0;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.12;
  z-index: 1;
}

.hero-text {
  position: relative;
  z-index: 2;
  text-align: right;
  padding: 60px 48px 80px;
  max-width: 700px;
}
.hero-text h1 {
  font-size: clamp(28px, 4vw, 52px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.hero-desc {
  font-size: 16px;
  color: var(--ink2);
  margin-bottom: 28px;
  line-height: 1.6;
  max-width: 500px;
  margin-left: auto;
}

.btn-outline {
  display: inline-block;
  border: 2px solid var(--ink);
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--ink);
  text-decoration: none;
  background: var(--bg);
  cursor: pointer;
  transition: none;
  min-height: 44px;
  line-height: 1.4;
}
.btn-outline:hover {
  background: var(--ink);
  color: var(--bg);
  opacity: 1;
}

/* ── main > section > article ── */
main > section {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.page-header-section {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
}
.page-eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink2);
  margin-bottom: 10px;
}

main > section > article h1,
.page-header-section h1 {
  font-size: clamp(22px, 3vw, 36px);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.page-meta {
  margin-top: 12px;
  font-size: 13px;
  color: var(--ink2);
}
.page-meta time {
  font-variant-numeric: tabular-nums;
}

.content-section {
  margin-bottom: 40px;
}

/* ── 正文 ── */
.prose {
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  max-width: 680px;
}
.prose h2 {
  font-size: 20px;
  font-weight: 700;
  margin: 2em 0 0.6em;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.prose h3 {
  font-size: 17px;
  font-weight: 600;
  margin: 1.6em 0 0.5em;
}
.prose p {
  margin-bottom: 1.1em;
}
.prose ul, .prose ol {
  list-style: disc;
  padding-left: 1.4em;
  margin-bottom: 1em;
}
.prose ol {
  list-style: decimal;
}
.prose li {
  margin-bottom: 0.4em;
}
.prose a {
  font-weight: 500;
}
.prose strong {
  font-weight: 700;
}
.prose blockquote {
  border-left: 3px solid var(--ink);
  padding: 8px 16px;
  margin: 1.2em 0;
  background: var(--bg2);
  font-style: italic;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.2em;
  font-size: 14px;
}
.prose th, .prose td {
  border: 1px solid var(--border);
  padding: 8px 12px;
  text-align: left;
}
.prose th {
  background: var(--bg2);
  font-weight: 600;
}
.prose--legal {
  max-width: 720px;
}

/* ── 卡片区 ── */
.cards-section {
  margin-bottom: 40px;
}
.cards-section > h2,
.cards-section > h3 {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.cards-section > h2 > span,
.cards-section > h3 > span {
  display: inline;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.card-grid > li {
  background: var(--bg);
}
.card-grid > li > section {
  padding: 20px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.card-grid > li > section h3 {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}
.card-grid > li > section h3 span {
  display: inline;
}
.card-grid > li > section h3 a {
  text-decoration: none;
  font-weight: 700;
}
.card-grid > li > section h3 a:hover {
  text-decoration: underline;
  opacity: 1;
}
.card-grid > li > section p {
  font-size: 13px;
  color: var(--ink2);
  line-height: 1.5;
  flex: 1;
}
.card-grid > li > section time {
  font-size: 12px;
  color: var(--ink2);
  font-variant-numeric: tabular-nums;
}

/* ── aside ── */
.sidebar {
  position: sticky;
  top: 0;
}
.sidebar h2, .sidebar h3 {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.sidebar h2 > span, .sidebar h3 > span {
  display: inline;
}
.sidebar h3 {
  margin-top: 24px;
}
.aside-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.aside-links li {
  font-size: 13px;
  line-height: 1.5;
}
.aside-links li a {
  display: block;
  padding: 5px 0;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px solid transparent;
}
.aside-links li a:hover {
  border-bottom-color: var(--border);
  opacity: 1;
}
.aside-links li:not(:has(a)) {
  padding: 5px 0;
  color: var(--ink2);
  font-size: 12px;
}

/* ── footer ── */
footer {
  grid-area: footer;
  border-top: 1px solid var(--border);
  padding: 20px 40px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
footer p {
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
}
footer small {
  font-size: 12px;
  color: var(--ink2);
}
footer small a {
  color: var(--ink2);
  text-decoration: none;
}
footer small a:hover {
  text-decoration: underline;
  opacity: 1;
}

/* ── h2 > span 标题装饰 ── */
h2 > span, h3 > span {
  display: inline;
}

/* ── about 页 ── */
.about-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.about-entry-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 24px;
}
.about-entry-list li a {
  font-size: 14px;
  font-weight: 500;
  padding: 6px 0;
  display: block;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}
.about-entry-list li a:hover {
  opacity: 0.65;
}

/* ── about-nav-section ── */
.about-nav-section {
  margin-bottom: 40px;
}
.about-nav-section h2 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

/* ── cases ── */
.card--case time {
  font-size: 12px;
  color: var(--ink2);
}

/* ── faq ── */
.faq-content .prose {
  max-width: 720px;
}
.faq-nav-section {
  margin-bottom: 40px;
  padding: 20px;
  border: 1px solid var(--border);
  background: var(--bg2);
}
.faq-nav-section h2 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
}
.faq-nav-section p {
  font-size: 14px;
  line-height: 1.6;
}

/* ── contact form ── */
.contact-form-section {
  margin-bottom: 40px;
}
.contact-form-section h2 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 480px;
}
.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-row label {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}
.form-row input,
.form-row textarea {
  border: 1px solid var(--border);
  background: var(--bg2);
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  padding: 10px 12px;
  border-radius: 0;
  outline: none;
  resize: vertical;
  appearance: none;
  width: 100%;
}
.form-row input:focus,
.form-row textarea:focus {
  border-color: var(--ink);
}
.required {
  color: #c00;
}

/* ── hero img on service ── */
.page-hero-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

/* ── privacy / about extra ── */
.privacy-links-section {
  margin-bottom: 40px;
}
.privacy-links-section h2 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

/* ── scroll reveal ── */
@media (prefers-reduced-motion: no-preference) {
  .card-grid > li {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }
  .card-grid > li.revealed {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .card-grid > li {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ── 移动端 ── */
@media (max-width: 768px) {
  :root {
    --nav-w: 0px;
  }

  .sidenav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    max-height: 56px;
    overflow: hidden;
    flex-direction: row;
    align-items: center;
    border-right: none;
    border-bottom: 1px solid var(--border);
    z-index: 200;
    transition: none;
  }
  .sidenav.open {
    max-height: 100vh;
    flex-direction: column;
    align-items: stretch;
    overflow-y: auto;
  }
  .sidenav-brand {
    border-bottom: none;
    flex: 1;
    padding: 8px 16px;
  }
  .sidenav.open .sidenav-brand {
    border-bottom: 1px solid var(--border);
  }
  .sidenav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    min-height: 56px;
    border: none;
    background: none;
    font-size: 20px;
    cursor: pointer;
    border-left: 1px solid var(--border);
    flex-shrink: 0;
    color: var(--ink);
  }
  .sidenav-search {
    display: none;
  }
  .sidenav.open .sidenav-search {
    display: block;
  }
  .sidenav > ol {
    display: none;
    padding: 0;
  }
  .sidenav.open > ol {
    display: flex;
  }
  .sidenav > ol > li > a {
    padding: 14px 20px;
    font-size: 15px;
    border-bottom: 1px solid var(--border);
  }

  .page-body {
    margin-left: 0;
    margin-top: 56px;
    grid-template-columns: 1fr;
    grid-template-areas:
      "hero"
      "main"
      "aside"
      "footer";
  }

  .hero-text {
    padding: 40px 24px 60px;
    text-align: right;
  }

  .page-body > main {
    padding: 24px 20px;
  }
  .page-body > aside {
    padding: 24px 20px;
    border-left: none;
    border-top: 1px solid var(--border);
  }
  footer {
    padding: 20px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .contact-form {
    max-width: 100%;
  }
}

@media (min-width: 769px) and (max-width: 1100px) {
  .page-body {
    grid-template-columns: 1fr 180px;
  }
}
