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

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

body {
  min-height: 100vh;
  line-height: 1.6;
  font-family: Inter, system-ui, -apple-system, sans-serif;
  background-color: #F5F0E8;
  color: #1A1A1A;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul,
ol {
  list-style: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Compacta Bold', Impact, 'Arial Black', sans-serif;
  font-weight: 700;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

:focus-visible {
  outline: 3px solid #FB8500;
  outline-offset: 3px;
}

/* === CSS VARIABLES === */
:root {
  --cream-bg: #F5F0E8;
  --dark-brown: #2D1E14;
  --accent-red: #E63946;
  --accent-orange: #FB8500;
  --text-primary: #1A1A1A;
  --text-secondary: #4A4A4A;
  --border-light: #D6D0C4;
  --highlight-green: #06D6A0;
  --heading-font: 'Compacta Bold', Impact, 'Arial Black', sans-serif;
  --body-font: Inter, system-ui, sans-serif;
  --container-max: 1200px;
  --header-height-desktop: 180px;
  --header-height-mobile: 70px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
}

/* === UTILITY === */
.container {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--space-md);
  padding-right: var(--space-md);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* === SKIP LINK === */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-sm);
  z-index: 10000;
  padding: var(--space-xs) var(--space-sm);
  background: var(--dark-brown);
  color: #F5F0E8;
  font-weight: 600;
  font-size: 0.875rem;
  border-radius: 0 0 4px 4px;
  transition: top 0.2s;
}

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

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.75rem 1.75rem;
  font-family: var(--body-font);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border: 2px solid transparent;
  border-radius: 2px;
  transition: all 0.25s ease;
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}

.btn--primary {
  background: var(--accent-orange);
  color: #1A1A1A;
  border-color: var(--accent-orange);
}

.btn--primary:hover {
  background: var(--accent-red);
  border-color: var(--accent-red);
  color: #F5F0E8;
}

.btn--outline {
  background: transparent;
  color: var(--dark-brown);
  border-color: var(--dark-brown);
}

.btn--outline:hover {
  background: var(--dark-brown);
  color: #F5F0E8;
}

/* === BREADCRUMB === */
.breadcrumb {
  padding: var(--space-sm) 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.breadcrumb__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.5rem;
}

.breadcrumb__item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb__item + .breadcrumb__item::before {
  content: "/";
  color: var(--border-light);
  font-weight: 300;
}

.breadcrumb__link {
  color: var(--text-secondary);
  transition: color 0.2s;
}

.breadcrumb__link:hover {
  color: var(--accent-orange);
}

.breadcrumb__link[aria-current="page"] {
  color: var(--text-primary);
  font-weight: 600;
}

/* === SECTION === */
.section {
  padding: var(--space-xl) 0;
}

.section__title {
  font-size: 2.5rem;
  margin-bottom: var(--space-lg);
  color: var(--dark-brown);
  position: relative;
  display: inline-block;
}

.section__title::after {
  content: "";
  display: block;
  width: 60px;
  height: 4px;
  background: var(--accent-orange);
  margin-top: var(--space-xs);
  clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}

/* === PANEL CHAMFER === */
.panel--chamfer {
  background: #F5F0E8;
  border: 2px solid var(--border-light);
  padding: var(--space-md);
  clip-path: polygon(12px 0, 100% 0, calc(100% - 12px) 100%, 0 100%);
  transition: border-color 0.3s, box-shadow 0.3s;
}

.panel--chamfer:hover {
  border-color: var(--accent-orange);
  box-shadow: 8px 8px 0 rgba(45, 30, 20, 0.08);
}

/* === STAT NUMBER === */
.stat-number {
  font-family: var(--heading-font);
  font-size: 3.5rem;
  line-height: 1;
  color: var(--accent-red);
  letter-spacing: -0.02em;
}

/* === TIMELINE === */
.timeline {
  position: relative;
  padding-left: var(--space-lg);
}

.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--border-light);
}

.timeline__item {
  position: relative;
  padding-bottom: var(--space-md);
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--space-lg) + 2px);
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--cream-bg);
  border: 3px solid var(--accent-orange);
}

.timeline__item.active::before {
  background: var(--accent-orange);
}

/* === IMG CONTAINER === */
.img-container {
  position: relative;
  overflow: hidden;
  background: var(--border-light);
  aspect-ratio: 16 / 9;
}

.img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* === BACK TO TOP === */
.back-to-top {
  position: fixed;
  bottom: var(--space-md);
  right: var(--space-md);
  z-index: 9000;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--dark-brown);
  color: #F5F0E8;
  border-radius: 2px;
  font-size: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.35s ease, background 0.25s;
  clip-path: polygon(4px 0, 100% 0, calc(100% - 4px) 100%, 0 100%);
}

.back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--accent-orange);
  color: #1A1A1A;
}

.back-to-top svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

/* === HEADER === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 9500;
  background: #F5F0E8;
  border-bottom: 2px solid var(--border-light);
  transition: box-shadow 0.3s, border-color 0.3s;
}

.site-header[data-scrolled="true"] {
  box-shadow: 0 4px 20px rgba(45, 30, 20, 0.06);
  border-bottom-color: var(--accent-orange);
}

.header__inner {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding: var(--space-sm) var(--space-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: padding 0.3s;
}

.site-header[data-scrolled="true"] .header__inner {
  padding-top: var(--space-xs);
  padding-bottom: var(--space-xs);
}

.header__brand {
  text-align: center;
}

.header__logo {
  font-family: var(--heading-font);
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--dark-brown);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: font-size 0.3s;
  display: inline-block;
}

.site-header[data-scrolled="true"] .header__logo {
  font-size: 1.75rem;
}

.header__tagline {
  font-size: 0.8rem;
  color: var(--text-secondary);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 2px;
}

.header__nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
}

.nav-toggle__bar {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--dark-brown);
  transition: transform 0.3s, opacity 0.3s;
  border-radius: 1px;
}

[data-nav-toggle][aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

[data-nav-toggle][aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

[data-nav-toggle][aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.header__nav {
  width: 100%;
}

.nav__list {
  display: flex;
  justify-content: center;
  gap: 0.25rem;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border-light);
  margin-top: var(--space-sm);
  flex-wrap: wrap;
}

.nav__link {
  display: block;
  padding: 0.45rem 1rem;
  font-family: var(--body-font);
  font-weight: 500;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  border-radius: 2px;
  transition: color 0.25s, background 0.25s;
  position: relative;
}

.nav__link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: var(--accent-orange);
  transition: width 0.3s ease;
}

.nav__link:hover {
  color: var(--dark-brown);
  background: rgba(251, 133, 0, 0.06);
}

.nav__link:hover::after {
  width: 60%;
}

.nav__link[aria-current="page"] {
  color: var(--accent-red);
  font-weight: 700;
  background: rgba(230, 57, 70, 0.06);
}

.nav__link[aria-current="page"]::after {
  width: 60%;
  background: var(--accent-red);
}

/* === FOOTER === */
.site-footer {
  background: var(--dark-brown);
  color: #E8E0D4;
  border-top: 4px solid var(--accent-orange);
  margin-top: var(--space-xl);
}

.footer__inner {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding: var(--space-xl) var(--space-md) var(--space-md);
}

.footer__top {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr;
  gap: var(--space-lg);
  padding-bottom: var(--space-lg);
  border-bottom: 1px solid rgba(214, 208, 196, 0.2);
}

.footer__logo {
  font-family: var(--heading-font);
  font-size: 1.75rem;
  font-weight: 700;
  color: #F5F0E8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: inline-block;
}

.footer__tagline {
  font-size: 0.75rem;
  color: rgba(245, 240, 232, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: var(--space-xs);
}

.footer__heading {
  font-family: var(--heading-font);
  font-size: 1rem;
  color: #F5F0E8;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-sm);
  position: relative;
  display: inline-block;
}

.footer__heading::after {
  content: "";
  display: block;
  width: 30px;
  height: 2px;
  background: var(--accent-orange);
  margin-top: 4px;
}

.footer__nav-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.footer__link {
  color: rgba(245, 240, 232, 0.75);
  font-size: 0.9rem;
  transition: color 0.25s;
}

.footer__link:hover {
  color: var(--accent-orange);
}

.footer__contact {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.footer__contact-item {
  font-size: 0.85rem;
  color: rgba(245, 240, 232, 0.7);
  line-height: 1.5;
}

.footer__bottom {
  display: flex;
  justify-content: center;
  padding-top: var(--space-md);
  text-align: center;
}

.footer__copyright {
  font-size: 0.8rem;
  color: rgba(245, 240, 232, 0.5);
  letter-spacing: 0.04em;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .footer__top {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
  }
}

@media (max-width: 768px) {
  :root {
    --header-height-desktop: 60px;
    --space-xl: 3rem;
  }

  .header__inner {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-xs) var(--space-sm);
  }

  .header__brand {
    text-align: left;
    flex: 1;
  }

  .header__logo {
    font-size: 1.5rem;
  }

  .site-header[data-scrolled="true"] .header__logo {
    font-size: 1.25rem;
  }

  .header__tagline {
    font-size: 0.65rem;
    margin-top: 0;
  }

  .header__nav-toggle {
    display: flex;
  }

  .header__nav {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
    opacity: 0;
    padding-top: 0;
    margin-top: 0;
  }

  .header__nav[data-open="true"] {
    max-height: 500px;
    opacity: 1;
    padding-top: var(--space-sm);
    margin-top: var(--space-sm);
  }

  .nav__list {
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
    border-top: 1px solid var(--border-light);
    padding-top: var(--space-sm);
  }

  .nav__link {
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
    width: 100%;
    text-align: center;
  }

  .nav__link::after {
    display: none;
  }

  .nav__link[aria-current="page"] {
    background: rgba(230, 57, 70, 0.08);
  }

  .footer__top {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .footer__brand {
    text-align: center;
  }

  .footer__heading::after {
    margin-left: auto;
    margin-right: auto;
  }

  .footer__nav-list {
    align-items: center;
  }

  .footer__contact {
    align-items: center;
    text-align: center;
  }

  .section__title {
    font-size: 1.75rem;
  }

  .stat-number {
    font-size: 2.5rem;
  }

  .back-to-top {
    bottom: var(--space-sm);
    right: var(--space-sm);
    width: 42px;
    height: 42px;
  }
}

@media (max-width: 480px) {
  .header__logo {
    font-size: 1.25rem;
  }

  .header__tagline {
    font-size: 0.6rem;
  }

  .nav__link {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
  }
}

/* === PREFERS REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  html {
    scroll-behavior: auto;
  }

  .back-to-top {
    transition: none;
  }

  .header__nav {
    transition: none;
  }
}

/* === SLANTED LINE DECORATION (shared) === */
.slant-decoration {
  position: relative;
}

.slant-decoration::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  width: 40%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-orange));
  transform: skewY(-2deg);
  transform-origin: right top;
}

/* === MOTION TRAIL (shared decorative) === */
.motion-trail {
  position: relative;
  overflow: hidden;
}

.motion-trail::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, transparent 0%, var(--accent-red) 30%, var(--accent-orange) 70%, transparent 100%);
  transform: skewX(-8deg);
  opacity: 0.3;
}

/* === GRID UTILITY (for bento pages) === */
.grid-bento {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-md);
}

@media (max-width: 768px) {
  .grid-bento {
    grid-template-columns: 1fr;
  }
}

/* === CONTENT CONTAINER (正文容器) === */
.content-body {
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-primary);
}

.content-body h2 {
  font-size: 1.75rem;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
  color: var(--dark-brown);
}

.content-body h3 {
  font-size: 1.25rem;
  margin-top: var(--space-md);
  margin-bottom: var(--space-xs);
  color: var(--dark-brown);
}

.content-body p {
  margin-bottom: var(--space-sm);
}

.content-body a {
  color: var(--accent-red);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.content-body a:hover {
  color: var(--accent-orange);
}

.content-body ul,
.content-body ol {
  margin-bottom: var(--space-sm);
  padding-left: var(--space-md);
}

.content-body li {
  margin-bottom: var(--space-xs);
}

.content-body ul li {
  list-style: disc;
}

.content-body ol li {
  list-style: decimal;
}

/* === SEPARATOR (斜线分割) === */
.separator-slant {
  height: 4px;
  background: linear-gradient(90deg, var(--accent-orange) 0%, var(--accent-red) 50%, transparent 100%);
  transform: skewY(-1deg);
  margin: var(--space-lg) 0;
  width: 100%;
}
