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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin-left: var(--header-width);
  background-color: var(--paper);
  background-image:
    linear-gradient(rgba(74, 93, 107, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(74, 93, 107, 0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.75;
}

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

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 2px;
}

::selection {
  background-color: var(--orange);
  color: var(--white);
}

:root {
  --paper: #F5F0E6;
  --ink: #2B2B2B;
  --slate: #4A5D6B;
  --orange: #FF6B35;
  --warm-orange: #FF9E00;
  --blue: #1E90FF;
  --light-gray: #E0E0E0;
  --white: #FFFFFF;
  --deep-gray: #333333;
  --header-width: 280px;
  --content-max: 1200px;
  --font-heading: "KaiTi", "STKaiti", "Noto Serif SC", serif;
  --font-body: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --shadow: 0 4px 20px rgba(43, 43, 43, 0.08);
  --radius: 12px;
  --transition: 0.3s ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}

.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
}

.section {
  padding: 4rem 0;
}

.section-title {
  display: inline-block;
  margin-bottom: 1rem;
  font-size: 2rem;
  position: relative;
}

.section-title::after {
  content: "";
  display: block;
  width: 50px;
  height: 4px;
  margin-top: 8px;
  background: var(--orange);
}

.page-content {
  padding: 2rem 0 4rem;
}

.main-content:focus {
  outline: none;
}

.btn {
  display: inline-block;
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.btn--primary {
  background-color: var(--orange);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.btn--primary:hover {
  background-color: var(--warm-orange);
  text-decoration: none;
}

.btn--outline {
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
}

.btn--outline:hover {
  background-color: var(--ink);
  color: var(--paper);
  text-decoration: none;
}

.card {
  background-color: var(--white);
  border: 1px solid var(--light-gray);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.card--accent {
  border-top: 4px solid var(--orange);
}

.breadcrumb {
  padding: 1rem 0;
  font-size: 0.875rem;
  color: var(--deep-gray);
}

.breadcrumb a {
  color: var(--slate);
}

.breadcrumb a:hover {
  color: var(--blue);
}

.breadcrumb__separator {
  margin: 0 0.5rem;
  color: var(--light-gray);
}

.img-frame {
  position: relative;
  overflow: hidden;
  min-height: 200px;
  border-radius: var(--radius);
  background-color: var(--slate);
}

.img-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, transparent 30%, rgba(255, 255, 255, 0.2));
}

.img-frame--ratio-wide {
  aspect-ratio: 16 / 9;
}

.img-frame--ratio-square {
  aspect-ratio: 1 / 1;
}

.skip-link {
  position: fixed;
  top: -100px;
  left: 20px;
  z-index: 300;
  background-color: var(--orange);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 8px 8px;
  font-weight: 600;
  text-decoration: none;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--header-width);
  height: 100vh;
  padding: 1.5rem;
  background-color: rgba(74, 93, 107, 0.9);
  background-image:
    radial-gradient(circle at 80% 20%, rgba(255, 107, 53, 0.15), transparent 60%),
    linear-gradient(160deg, rgba(43, 43, 43, 0.2), transparent);
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.08);
  color: var(--paper);
  z-index: 100;
}

.site-header::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 20% 80%, rgba(245, 240, 230, 0.08), transparent 40%);
}

.site-header::after {
  content: "";
  position: absolute;
  bottom: 20%;
  left: 10%;
  width: 80px;
  height: 80px;
  border: 2px solid rgba(245, 240, 230, 0.15);
  border-radius: 50%;
  pointer-events: none;
  filter: blur(2px);
}

.site-header__inner {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  z-index: 1;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand__seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  background-color: var(--ink);
  color: var(--paper);
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  border-radius: 8px 14px 10px 16px;
  box-shadow:
    inset 0 0 0 2px rgba(245, 240, 230, 0.25),
    0 2px 8px rgba(0, 0, 0, 0.3);
}

.brand__text {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--paper);
  white-space: nowrap;
}

.site-header .brand {
  margin-bottom: 2rem;
}

.main-nav {
  flex: 1;
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-link {
  display: block;
  padding: 0.75rem 1rem;
  border: 1px solid transparent;
  border-radius: 999px;
  color: rgba(245, 240, 230, 0.9);
  font-weight: 500;
  text-decoration: none;
  transition: var(--transition);
}

.nav-link:hover {
  background-color: rgba(245, 240, 230, 0.12);
  border-color: rgba(245, 240, 230, 0.25);
  color: var(--white);
  text-decoration: none;
}

.nav-link[aria-current="page"] {
  background-color: var(--orange);
  border-color: transparent;
  color: var(--white);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

.site-header__meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(245, 240, 230, 0.15);
  font-size: 0.875rem;
  color: rgba(245, 240, 230, 0.8);
}

.site-header__status {
  display: inline-flex;
  align-items: center;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 0.35rem;
  border-radius: 50%;
  background-color: #4CD964;
}

.nav-toggle {
  display: none;
}

.site-footer {
  position: relative;
  margin-top: 4rem;
  padding: 3rem 0;
  background-color: var(--ink);
  color: var(--paper);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--orange), var(--warm-orange), var(--blue));
}

.site-footer__inner {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2rem);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.site-footer a {
  color: rgba(245, 240, 230, 0.75);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--orange);
  text-decoration: underline;
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.site-footer__trust {
  font-size: 0.875rem;
  color: rgba(245, 240, 230, 0.6);
}

.site-footer__nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.site-footer__nav-title,
.site-footer__contact-title {
  margin-bottom: 0.25rem;
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--paper);
}

.site-footer__contact {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: rgba(245, 240, 230, 0.75);
}

.site-footer__copy {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(245, 240, 230, 0.15);
  font-size: 0.875rem;
  color: rgba(245, 240, 230, 0.6);
}

[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition:
    opacity 0.5s ease,
    transform 0.5s ease,
    transition-delay 0s;
  transition-delay: var(--reveal-delay, 0s);
}

[data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (min-width: 769px) and (max-width: 1024px) {
  :root {
    --header-width: 240px;
  }

  .site-header {
    padding: 1rem;
  }

  .nav-link {
    padding: 0.65rem 0.9rem;
  }
}

@media (max-width: 768px) {
  body {
    margin-left: 0;
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
  }

  .site-header {
    width: auto;
    height: calc(64px + env(safe-area-inset-bottom));
    top: auto;
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    background-color: rgba(74, 93, 107, 0.92);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  }

  .site-header::before,
  .site-header::after {
    display: none;
  }

  .site-header__inner {
    height: auto;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }

  .site-header .brand {
    margin-bottom: 0;
  }

  .brand__seal {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .brand__text {
    font-size: 1.1rem;
  }

  .site-header__meta {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    border-radius: 999px;
    background-color: var(--orange);
    color: var(--white);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
  }

  .nav-toggle__icon {
    position: relative;
    display: inline-block;
    width: 16px;
    height: 2px;
    background-color: var(--white);
    transition: background-color 0.2s;
  }

  .nav-toggle__icon::before,
  .nav-toggle__icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 16px;
    height: 2px;
    background-color: var(--white);
    transition: transform 0.2s;
  }

  .nav-toggle__icon::before {
    top: -5px;
  }

  .nav-toggle__icon::after {
    top: 5px;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__icon {
    background-color: transparent;
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__icon::before {
    top: 0;
    transform: rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] .nav-toggle__icon::after {
    top: 0;
    transform: rotate(-45deg);
  }

  .main-nav {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    min-width: 200px;
    padding: 1rem;
    border-radius: 20px;
    background-color: var(--white);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    color: var(--ink);
    transform: translateX(-50%) translateY(10px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity 0.3s ease,
      transform 0.3s ease,
      visibility 0.3s;
  }

  .main-nav[data-open] {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
  }

  .nav-list {
    flex-direction: column;
    gap: 0.25rem;
  }

  .nav-link {
    padding: 0.6rem 0.75rem;
    color: var(--ink);
    border-color: transparent;
  }

  .nav-link:hover {
    background-color: var(--paper);
    border-color: var(--light-gray);
    color: var(--ink);
  }

  .nav-link[aria-current="page"] {
    background-color: var(--orange);
    color: var(--white);
    border-color: transparent;
  }

  .section {
    padding: 3rem 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
