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

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

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

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

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

a:hover {
  text-decoration: underline;
}

ul, ol {
  list-style: none;
}

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: 'EB Garamond', 'Songti SC', Georgia, serif;
  line-height: 1.3;
  font-weight: 600;
  color: #1f1f1f;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.3rem, 3vw, 1.9rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }

hr {
  border: none;
  border-top: 2px solid #1f1f1f;
  margin: 0.6rem 0 1.2rem;
  opacity: 0.12;
}

/* ── Site Wrapper ── */
.site-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── Header ── */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid rgba(31,31,31,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.brand-bar {
  padding: 0.75rem 2rem;
  border-bottom: 1px solid rgba(31,31,31,0.07);
}

.brand-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.brand-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.brand-name {
  font-family: 'EB Garamond', serif;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #1f1f1f;
  text-decoration: none;
}

.brand-name:hover {
  text-decoration: none;
  opacity: 0.8;
}

.main-nav {
  background: #ffffff;
  padding: 0 2rem;
}

.nav-list {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  list-style: none;
}

.nav-item a {
  display: block;
  padding: 0.75rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 400;
  color: #1f1f1f;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s, background 0.2s;
  min-height: 44px;
  line-height: 1;
  display: flex;
  align-items: center;
}

.nav-item a:hover {
  color: #555;
  background: #f5f5f5;
  text-decoration: none;
}

.nav-item.active a {
  font-weight: 700;
  border-bottom: 2px solid #1f1f1f;
}

/* ── Hero (home only) ── */
.hero {
  min-height: 100vh;
  background: #ffffff;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-slash {
  position: absolute;
  top: 0;
  right: 38%;
  width: 120px;
  height: 100%;
  background: linear-gradient(170deg, #f5f5f5 0%, #f5f5f5 100%);
  transform: skewX(-6deg);
  z-index: 0;
}

.hero-text {
  flex: 1;
  padding: 4rem 2rem 4rem 4rem;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 1.5rem;
}

.hero-h1 {
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 700;
  max-width: 520px;
}

.hero-sub {
  font-size: 1.05rem;
  color: #555;
  max-width: 440px;
  line-height: 1.7;
}

.hero-cta {
  display: inline-block;
  padding: 0.85rem 2rem;
  background: #1f1f1f;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
  min-height: 44px;
  line-height: 1.4;
}

.hero-cta:hover {
  background: #333;
  text-decoration: none;
  transform: translateY(-2px);
}

.hero-media {
  flex: 0 0 42%;
  height: 100vh;
  position: relative;
  z-index: 1;
  overflow: hidden;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

/* ── Main & Content ── */
.page-main {
  flex: 1;
  padding: 2.5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.page-article {
  width: 100%;
}

.content-section {
  width: 100%;
}

.content-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 2rem;
  align-items: start;
}

.content-body {
  min-width: 0;
}

.page-eyebrow {
  font-family: 'Lato', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 0.5rem;
}

.page-h1 {
  margin-bottom: 0.75rem;
}

.page-date {
  display: inline-block;
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 1.5rem;
}

.page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.page-updated {
  font-size: 0.85rem;
  color: #aaa;
}

.privacy-updated {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 1.5rem;
}

/* ── Prose ── */
.prose {
  font-size: 1rem;
  line-height: 1.8;
  color: #1f1f1f;
}

.prose h2 {
  margin-top: 2rem;
  margin-bottom: 0.4rem;
}

.prose h2 + hr {
  margin-bottom: 1rem;
}

.prose h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.4rem;
}

.prose p {
  margin-bottom: 1rem;
}

.prose ul, .prose ol {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.prose ol {
  list-style: decimal;
}

.prose li {
  margin-bottom: 0.3rem;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.prose th, .prose td {
  padding: 0.6rem 0.8rem;
  border: 1px solid rgba(31,31,31,0.15);
  text-align: left;
}

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

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

/* ── Aside ── */
.content-aside {
  position: sticky;
  top: 120px;
}

.aside-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 1.25rem 1.25rem 1rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
  margin-bottom: 0;
}

.aside-card-mt {
  margin-top: 1rem;
}

.aside-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.aside-links {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.aside-links li a {
  font-size: 0.85rem;
  color: #555;
  display: block;
  padding: 0.3rem 0;
  line-height: 1.4;
  transition: color 0.2s;
}

.aside-links li a:hover {
  color: #1f1f1f;
  text-decoration: underline;
}

.aside-note {
  font-size: 0.82rem;
  color: #888;
  line-height: 1.6;
}

/* ── Section Heading ── */
.section-heading {
  font-size: 1.4rem;
  margin-bottom: 0.3rem;
}

/* ── Bento Grid (home) ── */
.bento-section {
  margin-top: 3rem;
  padding: 2rem;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 180px;
  gap: 16px;
  margin-top: 1rem;
}

.bento-card {
  background: #f5f5f5;
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

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

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

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

.card-link {
  display: flex;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.card-inner {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 100%;
}

.card-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #aaa;
}

.card-title {
  font-family: 'EB Garamond', serif;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  color: #1f1f1f;
}

.card-arrow {
  font-size: 1.1rem;
  color: #888;
  align-self: flex-end;
}

.card-wide .card-title {
  font-size: 1.15rem;
}

/* ── Home prose ── */
.prose-section {
  background: #ffffff;
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.home-prose {
  max-width: 780px;
}

/* ── Child cards (ranking/category) ── */
.child-section {
  margin-top: 2.5rem;
  padding: 2rem;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.child-card {
  padding: 1rem 1.25rem;
  background: #f5f5f5;
  border-radius: 10px;
  margin-bottom: 0.75rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.child-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0,0,0,0.08);
}

.child-card a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.child-title {
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.child-desc {
  font-size: 0.88rem;
  color: #666;
  line-height: 1.5;
}

.child-date {
  font-size: 0.8rem;
  color: #aaa;
  display: block;
  margin-top: 0.3rem;
}

/* ── Review hero ── */
.review-hero {
  margin: 1.5rem 0;
  border-radius: 10px;
  overflow: hidden;
}

.review-hero-img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 10px;
}

/* ── FAQ prose ── */
.faq-intro {
  font-size: 1rem;
  color: #666;
  margin-bottom: 1.5rem;
  font-style: italic;
  padding: 0.75rem 1rem;
  background: #f5f5f5;
  border-radius: 8px;
  border-left: 3px solid #1f1f1f;
}

/* ── About ── */
.about-brand-display {
  font-family: 'EB Garamond', serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: #f0f0f0;
  letter-spacing: 0.04em;
  margin: 1rem 0 2rem;
  line-height: 1;
}

/* ── Footer ── */
.site-footer {
  background: #1f1f1f;
  color: #f5f5f5;
  margin-top: auto;
}

.footer-brand-section {
  padding: 4rem 2rem 2.5rem;
  border-bottom: 1px solid rgba(245,245,245,0.1);
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.footer-brand-text {
  font-family: 'EB Garamond', serif;
  font-size: clamp(2.5rem, 7vw, 5rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
  color: #ffffff;
  margin-bottom: 1rem;
}

.footer-desc {
  font-size: 0.9rem;
  color: rgba(245,245,245,0.6);
  max-width: 480px;
  line-height: 1.6;
}

.footer-nav-section {
  padding: 2rem;
  border-bottom: 1px solid rgba(245,245,245,0.1);
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.footer-nav-dl {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.3rem;
}

.footer-nav-dl dt {
  padding: 0.1rem 0;
}

.footer-nav-dl dt a {
  font-size: 0.85rem;
  color: rgba(245,245,245,0.7);
  text-decoration: none;
  line-height: 1.5;
  display: block;
  padding: 0.4rem 0;
  min-height: 40px;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.footer-nav-dl dt a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.footer-copy-section {
  padding: 1.5rem 2rem;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.footer-copy {
  font-size: 0.82rem;
  color: rgba(245,245,245,0.5);
  margin-bottom: 0.4rem;
}

.footer-note {
  font-size: 0.78rem;
  color: rgba(245,245,245,0.35);
  margin-bottom: 0.4rem;
}

.footer-legal a {
  font-size: 0.8rem;
  color: rgba(245,245,245,0.5);
  text-decoration: underline;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
}

.footer-legal a:hover {
  color: #ffffff;
}

/* ── Stagger animation ── */
@media (prefers-reduced-motion: no-preference) {
  .bento-card {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.5s ease forwards;
  }

  .bento-card:nth-child(1) { animation-delay: 0.05s; }
  .bento-card:nth-child(2) { animation-delay: 0.10s; }
  .bento-card:nth-child(3) { animation-delay: 0.15s; }
  .bento-card:nth-child(4) { animation-delay: 0.20s; }
  .bento-card:nth-child(5) { animation-delay: 0.25s; }
  .bento-card:nth-child(6) { animation-delay: 0.30s; }

  .child-card {
    opacity: 0;
    transform: translateY(16px);
    animation: fadeUp 0.4s ease forwards;
  }

  .child-card:nth-child(1) { animation-delay: 0.05s; }
  .child-card:nth-child(2) { animation-delay: 0.10s; }
  .child-card:nth-child(3) { animation-delay: 0.15s; }
  .child-card:nth-child(4) { animation-delay: 0.20s; }

  @keyframes fadeUp {
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .prose-section,
  .content-body {
    animation: fadeIn 0.6s ease forwards;
  }

  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .content-layout {
    grid-template-columns: 1fr 240px;
  }
}

@media (max-width: 768px) {
  .brand-bar {
    padding: 0.6rem 1rem;
  }

  .main-nav {
    padding: 0 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-list {
    flex-wrap: nowrap;
  }

  .nav-item a {
    font-size: 0.8rem;
    padding: 0.7rem 0.6rem;
    white-space: nowrap;
  }

  .hero {
    flex-direction: column;
    min-height: 100vh;
    align-items: stretch;
  }

  .hero-slash {
    display: none;
  }

  .hero-text {
    padding: 3rem 1.5rem 2rem;
    order: 1;
    text-align: center;
    align-items: center;
  }

  .hero-media {
    flex: 0 0 280px;
    height: 280px;
    order: 2;
    width: 100%;
  }

  .page-main {
    padding: 1.5rem 1rem;
  }

  .content-layout {
    grid-template-columns: 1fr;
  }

  .content-aside {
    position: static;
  }

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

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

  .bento-section {
    padding: 1.5rem 1rem;
    border-radius: 16px;
  }

  .prose-section {
    padding: 1.5rem 1rem;
    border-radius: 16px;
  }

  .footer-brand-section,
  .footer-nav-section,
  .footer-copy-section {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .footer-brand-text {
    font-size: clamp(2rem, 10vw, 3.5rem);
  }
}

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

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

  .bento-grid {
    grid-auto-rows: 140px;
  }

  .footer-nav-dl {
    grid-template-columns: 1fr;
  }
}
