@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:wght@400;500;600;700&family=Lato:wght@300;400;700&display=swap');

/* =====================
   CSS Reset & Base
   ===================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: 'Lato', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: #1f1f1f;
  background: #f5f5f5;
}

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

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

ol, ul {
  list-style: none;
}

/* =====================
   CSS Variables
   ===================== */
:root {
  --white: #ffffff;
  --surface: #f5f5f5;
  --ink: #1f1f1f;
  --ink-light: #444444;
  --ink-muted: #888888;
  --accent: #1f1f1f;
  --accent-hover: #3a3a3a;
  --radius-card: 20px;
  --radius-btn: 6px;
  --shadow-card: 0 4px 24px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
  --shadow-hover: 0 8px 32px rgba(0,0,0,0.14), 0 2px 8px rgba(0,0,0,0.06);
  --gap: 16px;
  --nav-height: 110px;
  --transition: 0.28s cubic-bezier(0.4,0,0.2,1);
}

/* =====================
   Scroll margin for anchors
   ===================== */
article[id] {
  scroll-margin-top: calc(var(--nav-height) + 16px);
}

/* =====================
   Site Header
   ===================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--white);
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
}

.header-brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  height: 40px;
  width: auto;
}

.brand-text {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--white);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* CTA Button */
.cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 24px;
  background: var(--white);
  color: var(--ink);
  font-family: 'Lato', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: var(--radius-btn);
  letter-spacing: 0.04em;
  transition: background var(--transition), color var(--transition), transform var(--transition);
  cursor: pointer;
  border: none;
}

.cta-btn:hover {
  background: #e0e0e0;
  transform: translateY(-1px);
}

.cta-hero {
  background: var(--white);
  color: var(--ink);
  font-size: 1rem;
  padding: 14px 36px;
  border-radius: 8px;
  margin-top: 20px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}

.cta-hero:hover {
  background: #ececec;
}

/* Hamburger */
.hamburger-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 4px;
}

.ham-line {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.hamburger-btn[aria-expanded="true"] .ham-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger-btn[aria-expanded="true"] .ham-line:nth-child(2) {
  opacity: 0;
}
.hamburger-btn[aria-expanded="true"] .ham-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Desktop nav row */
.header-nav-row {
  padding: 0 32px;
}

.desktop-nav ol {
  display: flex;
  align-items: center;
  gap: 0;
}

.desktop-nav ol li a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  font-size: 0.875rem;
  font-weight: 400;
  color: rgba(255,255,255,0.80);
  letter-spacing: 0.03em;
  transition: color var(--transition);
  position: relative;
}

.desktop-nav ol li a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 16px;
  height: 2px;
  background: var(--white);
  transform: scaleX(0);
  transition: transform var(--transition);
}

.desktop-nav ol li a:hover {
  color: var(--white);
}

.desktop-nav ol li a:hover::after {
  transform: scaleX(1);
}

/* =====================
   Fullscreen Menu
   ===================== */
.fullscreen-menu {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--ink);
  color: var(--white);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.fullscreen-menu.is-open {
  opacity: 1;
  pointer-events: all;
}

.menu-close-btn {
  position: absolute;
  top: 24px;
  right: 32px;
  width: 48px;
  height: 48px;
  background: transparent;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity var(--transition);
}

.menu-close-btn:hover {
  opacity: 0.6;
}

.menu-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  counter-reset: menu-counter;
}

.menu-list li {
  counter-increment: menu-counter;
}

.menu-list li a {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  font-weight: 500;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.05em;
  padding: 10px 24px;
  min-height: 56px;
  transition: color var(--transition), transform var(--transition);
}

.menu-list li a::before {
  content: counter(menu-counter, decimal-leading-zero);
  font-family: 'Lato', sans-serif;
  font-size: 0.8rem;
  font-weight: 300;
  color: rgba(255,255,255,0.35);
  width: 28px;
  text-align: right;
}

.menu-list li a:hover {
  color: var(--white);
  transform: translateX(8px);
}

/* =====================
   Hero Section
   ===================== */
.hero-section {
  position: relative;
  height: 45vh;
  min-height: 320px;
  max-height: 520px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

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

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(31,31,31,0.75) 0%, rgba(31,31,31,0.50) 100%);
}

.hero-slash {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 60px;
  background: var(--surface);
  clip-path: polygon(0 60px, 100% 0, 100% 60px);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 24px 20px 60px;
  color: var(--white);
  max-width: 720px;
}

.hero-h1 {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: clamp(1.8rem, 5vw, 3.2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.03em;
  margin-bottom: 12px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.hero-sub {
  font-size: clamp(0.9rem, 2vw, 1.1rem);
  font-weight: 300;
  color: rgba(255,255,255,0.85);
  line-height: 1.6;
  max-width: 540px;
  margin: 0 auto;
}

/* =====================
   Bento Layout
   ===================== */
.bento-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 40px 24px 60px;
  display: grid;
  grid-template-columns: 1fr 280px;
  grid-template-rows: auto 1fr;
  gap: 24px;
  grid-template-areas:
    "deco aside"
    "content aside";
}

.bento-deco {
  grid-area: deco;
  display: flex;
  gap: 12px;
  height: 80px;
}

.deco-block {
  border-radius: 12px;
}

.deco-a {
  width: 120px;
  height: 100%;
  background: var(--ink);
  opacity: 0.06;
}

.deco-b {
  width: 60px;
  height: 100%;
  background: var(--ink);
  opacity: 0.04;
}

.bento-aside {
  grid-area: aside;
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 28px 24px;
  height: fit-content;
  position: sticky;
  top: calc(var(--nav-height) + 24px);
}

.aside-title {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}

.bento-aside hr {
  border: none;
  border-top: 1px solid #e8e8e8;
  margin-bottom: 16px;
}

.aside-nav-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 20px;
}

.aside-nav-list li a {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--ink-light);
  transition: background var(--transition), color var(--transition);
}

.aside-nav-list li a:hover {
  background: var(--surface);
  color: var(--ink);
}

.aside-note {
  background: var(--surface);
  border-radius: 8px;
  padding: 12px;
  font-size: 0.78rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

.bento-content {
  grid-area: content;
}

/* =====================
   page.content 内部 article 样式（Bento Box）
   ===================== */
.bento-content article {
  background: var(--white);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 36px 40px;
  margin-bottom: 20px;
  transition: box-shadow var(--transition), transform var(--transition);
}

.bento-content article:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px) scale(1.005);
}

.bento-content article h2 {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: clamp(1.3rem, 2.5vw, 1.75rem);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
  line-height: 1.3;
}

.bento-content article h2 + hr {
  border: none;
  border-top: 2px solid #e8e8e8;
  margin-bottom: 20px;
}

.bento-content article h3 {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--ink);
  margin: 20px 0 8px;
}

.bento-content article h3 + hr {
  border: none;
  border-top: 1px solid #efefef;
  margin-bottom: 14px;
}

.bento-content article p {
  font-size: 1rem;
  line-height: 1.75;
  color: #333;
  margin-bottom: 12px;
}

.bento-content article ul,
.bento-content article ol {
  padding-left: 20px;
  margin-bottom: 14px;
}

.bento-content article ul li {
  list-style: disc;
  font-size: 1rem;
  line-height: 1.7;
  color: #333;
  margin-bottom: 6px;
}

.bento-content article ol li {
  list-style: decimal;
  font-size: 1rem;
  line-height: 1.7;
  color: #333;
  margin-bottom: 6px;
}

.bento-content article a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity var(--transition);
}

.bento-content article a:hover {
  opacity: 0.65;
}

.bento-content article table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.bento-content article table th,
.bento-content article table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid #efefef;
}

.bento-content article table th {
  font-weight: 700;
  background: var(--surface);
}

/* =====================
   Footer
   ===================== */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.75);
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 52px 24px 36px;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1.4fr;
  gap: 40px;
}

.footer-col-title {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 14px;
  letter-spacing: 0.04em;
}

.footer-address {
  font-style: normal;
  font-size: 0.9rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.70);
}

.footer-address strong {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 1.1rem;
  color: var(--white);
  display: block;
  margin-bottom: 6px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.footer-col ul li a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.65);
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 2px 0;
  transition: color var(--transition);
}

.footer-col ul li a:hover {
  color: var(--white);
}

.footer-col-info p {
  font-size: 0.875rem;
  line-height: 1.7;
  color: rgba(255,255,255,0.60);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.10);
  padding: 20px 24px;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.03em;
}

/* =====================
   Scroll Reveal Animation
   ===================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html {
    scroll-behavior: auto;
  }
  .bento-content article:hover {
    transform: none;
  }
}

/* =====================
   Responsive
   ===================== */
@media (max-width: 1024px) {
  .bento-wrapper {
    grid-template-columns: 1fr;
    grid-template-areas:
      "deco"
      "content"
      "aside";
  }
  .bento-aside {
    position: static;
  }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
  .footer-col-info {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .header-brand-row {
    padding: 12px 18px;
  }
  .header-nav-row {
    display: none;
  }
  .brand-text {
    font-size: 1.2rem;
  }
  .bento-wrapper {
    padding: 24px 14px 40px;
    gap: 14px;
  }
  .bento-content article {
    padding: 24px 20px;
  }
  .hero-section {
    height: 48vh;
    min-height: 280px;
  }
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 36px 18px 24px;
  }
}

@media (max-width: 480px) {
  .hero-h1 {
    font-size: 1.6rem;
  }
  .cta-btn {
    min-height: 44px;
    padding: 10px 18px;
  }
  .cta-hero {
    padding: 13px 28px;
    font-size: 0.95rem;
    min-height: 48px;
  }
  .menu-list li a {
    font-size: 1.5rem;
    padding: 8px 16px;
    min-height: 52px;
  }
  .bento-content article {
    padding: 20px 16px;
  }
  .aside-nav-list li a {
    min-height: 44px;
  }
  .desktop-nav ol li a {
    min-height: 44px;
  }
}

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