@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&family=Crimson+Pro:wght@400;500;600;700&display=swap');

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

html {
  font-size: 17px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: 'Atkinson Hyperlegible', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background-color: #f5f5f5;
  color: #1f1f1f;
  min-height: 100vh;
  overflow-x: hidden;
}

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

a {
  color: #1f1f1f;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ===========================
   Layout: Sidebar + Main
   =========================== */
.site-wrapper {
  display: flex;
  min-height: 100vh;
}

/* ===========================
   Sidebar Navigation
   =========================== */
.sidenav {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 100vh;
  background: #ffffff;
  border-right: 1px solid #e8e8e8;
  display: flex;
  flex-direction: column;
  padding: 28px 20px;
  z-index: 100;
  overflow-y: auto;
}

.sidenav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 32px;
}

.brand__logo-img {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  object-fit: cover;
}

.sidenav__brand-name {
  font-family: 'Crimson Pro', Georgia, serif;
  font-weight: 700;
  font-size: 1.15rem;
  color: #1f1f1f;
  letter-spacing: 0.02em;
  line-height: 1.2;
  text-decoration: none;
}

.sidenav__brand-name:hover {
  text-decoration: none;
  opacity: 0.75;
}

.sidenav__nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.sidenav__link {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 400;
  color: #444;
  transition: background 0.18s ease, color 0.18s ease;
  line-height: 1.4;
  min-height: 40px;
  display: flex;
  align-items: center;
}

.sidenav__link:hover {
  background: #f5f5f5;
  color: #1f1f1f;
  text-decoration: none;
}

.sidenav__link--active {
  background: #1f1f1f;
  color: #ffffff;
  font-weight: 700;
}

.sidenav__link--active:hover {
  background: #333;
  color: #ffffff;
}

.sidenav__search {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e8e8e8;
}

.search-form {
  display: flex;
  gap: 6px;
}

.search-form__input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 0.82rem;
  font-family: inherit;
  background: #f5f5f5;
  color: #1f1f1f;
  outline: none;
  min-height: 40px;
  transition: border-color 0.15s ease;
}

.search-form__input:focus {
  border-color: #1f1f1f;
  background: #fff;
}

.search-form__btn {
  padding: 8px 12px;
  background: #1f1f1f;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.8rem;
  font-family: inherit;
  cursor: pointer;
  min-height: 40px;
  min-width: 48px;
  transition: background 0.15s ease;
}

.search-form__btn:hover {
  background: #333;
}

/* ===========================
   Main Area
   =========================== */
.site-main {
  margin-left: 240px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.main-content {
  flex: 1;
}

/* ===========================
   Hero: Home
   =========================== */
.hero--home {
  position: relative;
  background: #1f1f1f;
  color: #ffffff;
  min-height: 45vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: 60px 48px 80px;
}

.hero__inner {
  position: relative;
  z-index: 2;
  max-width: 680px;
}

.hero__badge {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 18px;
  border: 1px solid rgba(255,255,255,0.25);
}

.hero__title {
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 18px;
  letter-spacing: -0.01em;
}

.hero__sub {
  font-size: 1rem;
  line-height: 1.7;
  opacity: 0.82;
  max-width: 540px;
}

.hero__slant {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 64px;
  background: #f5f5f5;
  clip-path: polygon(0 100%, 100% 0, 100% 100%);
  z-index: 3;
}

/* ===========================
   Hero: Inner Pages
   =========================== */
.inner-hero {
  position: relative;
  background: #1f1f1f;
  color: #ffffff;
  padding: 44px 48px 72px;
  overflow: hidden;
}

.inner-hero__wrap {
  position: relative;
  z-index: 2;
  max-width: 760px;
}

.inner-hero__badge {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 3px 12px;
  border-radius: 16px;
  margin-bottom: 14px;
  border: 1px solid rgba(255,255,255,0.2);
}

.inner-hero__title {
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 12px;
}

/* ===========================
   Breadcrumb
   =========================== */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 14px;
}

.breadcrumb a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: color 0.15s;
}

.breadcrumb a:hover {
  color: #fff;
  text-decoration: underline;
}

.breadcrumb span[aria-hidden] {
  opacity: 0.4;
}

/* ===========================
   Article Meta
   =========================== */
.article-meta {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.article-meta__date {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  font-style: normal;
}

/* ===========================
   Article Hero Image
   =========================== */
.article-hero {
  margin-top: 24px;
}

.article-hero__img {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 10px;
}

/* ===========================
   Page Body / Prose
   =========================== */
.page-body {
  padding: 40px 48px;
  max-width: 900px;
}

.page-body__content.prose {
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 1.1rem;
  line-height: 1.8;
  color: #1f1f1f;
}

.prose h2 {
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2.2em;
  margin-bottom: 0.5em;
  letter-spacing: -0.01em;
}

.prose h3 {
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 1.8em;
  margin-bottom: 0.4em;
}

.prose p {
  margin-bottom: 1.2em;
}

.prose ul, .prose ol {
  margin-left: 1.6em;
  margin-bottom: 1.2em;
}

.prose li {
  margin-bottom: 0.4em;
}

.prose strong {
  font-weight: 700;
}

.prose em {
  font-style: italic;
}

.prose blockquote {
  border-left: 3px solid #1f1f1f;
  padding-left: 18px;
  margin: 1.4em 0;
  color: #555;
  font-style: italic;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.4em;
  font-size: 0.95rem;
}

.prose th, .prose td {
  border: 1px solid #e0e0e0;
  padding: 10px 14px;
  text-align: left;
}

.prose th {
  background: #f5f5f5;
  font-weight: 700;
}

.prose a {
  color: #1f1f1f;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.prose a:hover {
  opacity: 0.65;
}

.privacy-prose {
  font-family: 'Atkinson Hyperlegible', sans-serif;
  font-size: 1rem;
}

/* ===========================
   Section Titles
   =========================== */
.section-title {
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f1f1f;
  margin-bottom: 8px;
}

.section-divider {
  border: none;
  border-top: 2px solid #1f1f1f;
  margin-bottom: 24px;
}

.bento-section {
  padding: 40px 48px;
}

/* ===========================
   Bento Grid
   =========================== */
.bento-grid {
  display: grid;
  gap: 16px;
}

.bento-grid--home {
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
}

.bento-grid--cards {
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 180px;
}

.bento-grid--related {
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 160px;
}

.bento-grid--about {
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 160px;
}

/* ===========================
   Bento Cards
   =========================== */
.bento-card {
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease;
  position: relative;
}

.bento-card:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.bento-card--wide {
  grid-column: span 2;
}

.bento-card--tall {
  grid-row: span 2;
}

.bento-card--nav {
  background: #f5f5f5;
}

.bento-card--featured {
  background: #ffffff;
}

.bento-card--related {
  background: #ffffff;
}

.bento-card--about {
  background: #f5f5f5;
}

.bento-card__link {
  display: flex;
  flex-direction: column;
  padding: 22px 24px;
  height: 100%;
  text-decoration: none;
  color: #1f1f1f;
  gap: 6px;
}

.bento-card__link:hover {
  text-decoration: none;
}

.bento-card__eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #888;
  text-transform: uppercase;
}

.bento-card__badge {
  display: inline-block;
  background: #1f1f1f;
  color: #fff;
  font-size: 0.7rem;
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 8px;
  width: fit-content;
}

.bento-card__title {
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  color: #1f1f1f;
  flex-shrink: 0;
}

.bento-card__divider {
  border: none;
  border-top: 1px solid #e0e0e0;
  margin: 4px 0;
}

.bento-card__desc {
  font-size: 0.82rem;
  color: #666;
  line-height: 1.5;
  flex: 1;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.bento-card__meta {
  font-size: 0.75rem;
  color: #999;
  margin-top: auto;
}

.bento-card__arrow {
  font-size: 1.1rem;
  margin-top: auto;
  color: #1f1f1f;
  align-self: flex-end;
}

/* ===========================
   Child Table (FAQ subpages)
   =========================== */
.child-section {
  padding: 0 48px 40px;
}

.child-table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.child-table__th {
  background: #1f1f1f;
  color: #fff;
  padding: 12px 18px;
  font-size: 0.85rem;
  font-weight: 700;
  text-align: left;
}

.child-table__row {
  transition: background 0.15s;
}

.child-table__row:nth-child(even) {
  background: #f9f9f9;
}

.child-table__row:hover {
  background: #f0f0f0;
}

.child-table__title {
  padding: 14px 18px;
  font-size: 0.95rem;
}

.child-table__title a {
  color: #1f1f1f;
  font-weight: 600;
  text-decoration: none;
}

.child-table__title a:hover {
  text-decoration: underline;
}

.child-table__desc {
  padding: 14px 18px;
  font-size: 0.85rem;
  color: #555;
  max-width: 420px;
}

.child-table__date {
  padding: 14px 18px;
  font-size: 0.8rem;
  color: #888;
  white-space: nowrap;
}

.child-date {
  font-style: normal;
}

/* ===========================
   Privacy Links Section
   =========================== */
.privacy-links-section {
  padding: 0 48px 48px;
}

.privacy-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.privacy-link-item {
  display: inline-block;
  padding: 10px 20px;
  background: #1f1f1f;
  color: #fff;
  border-radius: 8px;
  font-size: 0.88rem;
  text-decoration: none;
  transition: background 0.15s ease;
  min-height: 40px;
  line-height: 1.2;
  display: flex;
  align-items: center;
}

.privacy-link-item:hover {
  background: #333;
  text-decoration: none;
}

/* ===========================
   Footer
   =========================== */
.site-footer {
  background: #1f1f1f;
  color: #ffffff;
  padding: 56px 48px 32px;
  margin-top: auto;
}

.site-footer__brand-row {
  margin-bottom: 48px;
}

.site-footer__big-brand {
  font-family: 'Crimson Pro', Georgia, serif;
  font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
  line-height: 1;
  opacity: 0.95;
}

.site-footer__cols {
  display: flex;
  gap: 48px;
  flex-wrap: wrap;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.footer-dl {
  flex: 1;
  min-width: 160px;
}

.footer-dl__title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  margin-bottom: 14px;
  display: block;
}

.footer-dl__item {
  margin-bottom: 8px;
  list-style: none;
}

.footer-dl__item a {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  transition: color 0.15s;
  display: inline-block;
  padding: 2px 0;
  min-height: 24px;
}

.footer-dl__item a:hover {
  color: #fff;
  text-decoration: underline;
}

.site-footer__bottom {
  text-align: center;
  padding-top: 28px;
}

.site-footer__bottom p {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
  line-height: 1.6;
}

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

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

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .bento-card:hover {
    transform: none;
  }
  * {
    transition: none !important;
    animation: none !important;
  }
}

/* ===========================
   Responsive: Tablet
   =========================== */
@media (max-width: 1024px) {
  .sidenav {
    width: 200px;
  }

  .site-main {
    margin-left: 200px;
  }

  .bento-grid--home {
    grid-template-columns: repeat(2, 1fr);
  }

  .bento-grid--cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-body {
    padding: 32px 36px;
  }

  .bento-section, .child-section {
    padding-left: 36px;
    padding-right: 36px;
  }

  .inner-hero {
    padding: 36px 36px 60px;
  }

  .hero--home {
    padding: 48px 36px 72px;
  }

  .site-footer {
    padding: 44px 36px 28px;
  }

  .site-footer__cols {
    gap: 32px;
  }
}

/* ===========================
   Responsive: Mobile
   =========================== */
@media (max-width: 768px) {
  .site-wrapper {
    flex-direction: column;
  }

  .sidenav {
    position: relative;
    width: 100%;
    height: auto;
    border-right: none;
    border-bottom: 1px solid #e8e8e8;
    padding: 16px 20px;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    overflow-y: visible;
  }

  .sidenav__brand {
    margin-bottom: 0;
    flex-shrink: 0;
  }

  .sidenav__nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 4px;
    flex: 1;
    min-width: 0;
  }

  .sidenav__link {
    font-size: 0.78rem;
    padding: 8px 10px;
    white-space: nowrap;
    min-height: 40px;
  }

  .sidenav__search {
    width: 100%;
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid #e8e8e8;
  }

  .site-main {
    margin-left: 0;
  }

  .hero--home {
    min-height: auto;
    padding: 40px 20px 60px;
  }

  .hero__title {
    font-size: 1.8rem;
  }

  .inner-hero {
    padding: 28px 20px 52px;
  }

  .inner-hero__title {
    font-size: 1.4rem;
  }

  .page-body {
    padding: 24px 20px;
  }

  .bento-section {
    padding: 28px 20px;
  }

  .child-section {
    padding: 0 20px 28px;
  }

  .bento-grid--home,
  .bento-grid--cards,
  .bento-grid--related,
  .bento-grid--about {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
  }

  .bento-card--wide,
  .bento-card--tall {
    grid-column: span 1;
    grid-row: span 1;
  }

  .bento-card {
    min-height: 140px;
  }

  .bento-card__link {
    padding: 18px 18px;
  }

  .site-footer {
    padding: 36px 20px 24px;
  }

  .site-footer__cols {
    flex-direction: column;
    gap: 24px;
  }

  .site-footer__big-brand {
    font-size: 2.2rem;
  }

  .child-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .privacy-links {
    flex-direction: column;
  }

  .privacy-link-item {
    width: 100%;
    justify-content: center;
  }

  .breadcrumb {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 16px;
  }

  .hero__title {
    font-size: 1.55rem;
  }

  .inner-hero__title {
    font-size: 1.25rem;
  }

  .section-title {
    font-size: 1.25rem;
  }

  .prose h2 {
    font-size: 1.3rem;
  }

  .site-footer__big-brand {
    font-size: 1.8rem;
  }
}
