:root {
  --bg: #f5f3ee;
  --surface: #ffffff;
  --ink: #12110f;
  --ink-soft: #2a2824;
  --muted: #6b6760;
  --faint: #9a958c;
  --line: #ddd8cf;
  --accent: #8f1f2f;
  --dark: #12110f;
  --dark-muted: rgba(255, 255, 255, 0.62);
  --max: 1120px;
  --narrow: 680px;
  --pad: clamp(20px, 4.5vw, 48px);
  --sans: Inter, "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", sans-serif;
  --serif: "Noto Serif SC", "Songti SC", serif;
  --body: var(--sans);
  --heading: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --slogan: "XuanZongTi", "Noto Serif SC", serif;
}

@font-face {
  font-family: "XuanZongTi";
  src: url("/assets/fonts/xuanzongti-slogan.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--body);
  font-weight: 400;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}

h1,
h2,
h3 {
  font-family: var(--heading);
  font-weight: 600;
}

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

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

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

.wrap {
  width: min(var(--max), calc(100% - var(--pad) * 2));
  margin: 0 auto;
}

.eyebrow {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--faint);
}

/* —— Header —— */

.top {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(245, 243, 238, 0.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}

.top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  gap: 20px;
}

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

.brand img {
  height: 32px;
  width: auto;
}

.brand-name {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  font-family: var(--sans);
}

.brand-name .en {
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
}

.brand-name .zh {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.menu-btn {
  display: none;
  width: 44px;
  height: 44px;
  position: relative;
}

.menu-btn span,
.menu-btn span::before,
.menu-btn span::after {
  position: absolute;
  left: 12px;
  width: 18px;
  height: 1.5px;
  background: var(--ink);
}

.menu-btn span {
  top: 21px;
}

.menu-btn span::before,
.menu-btn span::after {
  content: "";
  left: 0;
}

.menu-btn span::before {
  top: -5px;
}

.menu-btn span::after {
  top: 5px;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px 20px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.nav a {
  color: var(--muted);
  transition: color 0.2s ease;
}

.nav a:hover,
.nav a.is-on {
  color: var(--ink);
}

body.hold-sections .nav,
body.hold-sections .menu-btn,
body.hold-sections .home-gate,
body.hold-sections .foot-nav,
body.hold-sections:not(.home) main {
  display: none !important;
}

/* —— Home cover —— */

.hero--cover {
  background: var(--dark);
  color: #fff;
  padding: clamp(48px, 10vh, 88px) 0 clamp(56px, 12vh, 96px);
}

.hero-cover {
  max-width: var(--max);
}

.hero--cover .eyebrow {
  color: var(--dark-muted);
  margin-bottom: 28px;
}

.hero-cover__slogan {
  font-family: var(--slogan);
  font-size: clamp(28px, 5.8vw, 64px);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.hero-cover__roles {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0;
  margin-top: 32px;
  font-family: var(--serif);
  font-size: clamp(14px, 2vw, 19px);
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(255, 255, 255, 0.88);
  white-space: nowrap;
}

.hero-cover__roles span + span::before {
  content: " · ";
  color: var(--dark-muted);
  font-weight: 400;
}

.hero-cover__lead {
  margin-top: 28px;
  font-size: clamp(12px, 1.5vw, 15px);
  line-height: 1.6;
  color: var(--dark-muted);
  white-space: nowrap;
}

/* —— Chapter index —— */

.chapter-index {
  padding: clamp(56px, 10vh, 96px) 0;
}

.chapter-index__head {
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--ink);
}

.chapter-index__head h2 {
  margin-top: 12px;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.chapter-list {
  list-style: none;
}

.chapter-link {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 32px;
  gap: 20px;
  align-items: start;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.25s ease, color 0.2s ease;
}

.chapter-link:hover {
  padding-left: 8px;
  color: var(--accent);
}

.chapter-link__num {
  font-family: var(--serif);
  font-size: 13px;
  font-weight: 600;
  color: var(--faint);
  padding-top: 6px;
}

.chapter-link:hover .chapter-link__num {
  color: var(--accent);
}

.chapter-link__en {
  display: block;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 6px;
}

.chapter-link__title {
  display: block;
  font-family: var(--heading);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}

.chapter-link:hover .chapter-link__title {
  color: var(--accent);
}

.chapter-link__desc {
  display: block;
  margin-top: 8px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--muted);
  max-width: 36em;
}

.chapter-link__arrow {
  font-size: 20px;
  color: var(--faint);
  padding-top: 8px;
  transition: transform 0.25s ease, color 0.2s ease;
}

.chapter-link:hover .chapter-link__arrow {
  transform: translateX(4px);
  color: var(--accent);
}

/* —— Statement band —— */

.statement {
  background: var(--dark);
  color: #fff;
  padding: clamp(64px, 12vh, 112px) 0;
}

.statement__inner {
  max-width: var(--narrow);
}

.statement__quote {
  font-family: var(--heading);
  font-size: clamp(26px, 4.5vw, 44px);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.02em;
}

.statement__sub {
  margin-top: 20px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--dark-muted);
}

/* —— Inner page hero —— */

.page-hero {
  padding: clamp(48px, 8vh, 72px) 0 clamp(32px, 5vh, 48px);
  border-bottom: 1px solid var(--line);
}

.page-hero--editorial .page-hero__grid {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.page-hero__num {
  font-family: var(--serif);
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 600;
  line-height: 1;
  color: var(--line);
  letter-spacing: -0.02em;
}

.page-hero .eyebrow,
.page-hero .label {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}

.page-hero h1 {
  font-size: clamp(32px, 5.5vw, 52px);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.02em;
}

.page-hero .lead {
  margin-top: 16px;
  max-width: 32em;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.7;
}

/* —— Sections —— */

.section {
  padding: clamp(48px, 8vh, 80px) 0;
}

.section + .section {
  border-top: 1px solid var(--line);
}

.section h2 {
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 600;
  margin-bottom: 28px;
}

.prose {
  font-size: 15px;
  max-width: var(--narrow);
  color: var(--muted);
  line-height: 1.8;
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 1px;
  background: var(--line);
}

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

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  background: var(--surface);
  padding: 32px 28px;
}

.card h3 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 16px;
}

.card ul,
.list {
  list-style: none;
}

.card li,
.list li {
  padding: 12px 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.card li:first-child,
.list li:first-child {
  border-top: 0;
  padding-top: 0;
}

.culture-brand {
  text-align: center;
  margin-bottom: 56px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--line);
}

.culture-brand img {
  width: 88px;
  height: 88px;
  margin: 0 auto 20px;
  object-fit: contain;
}

.culture-brand__en {
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--faint);
}

.culture-brand__zh {
  margin-top: 8px;
  font-family: var(--heading);
  font-size: 22px;
  font-weight: 600;
}

.culture-pillars {
  display: grid;
  gap: 48px;
}

.culture-pillar h2 {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.culture-pillar .prose {
  max-width: none;
  color: var(--ink-soft);
}

@media (min-width: 768px) {
  .culture-pillars {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
  }
}

.founder {
  display: grid;
  grid-template-columns: minmax(0, 0.34fr) minmax(0, 0.66fr);
  gap: clamp(32px, 5vw, 56px);
  align-items: start;
}

.founder-photo img {
  width: 100%;
  object-fit: cover;
  object-position: 50% 15%;
  aspect-ratio: 4 / 5;
  filter: grayscale(8%);
}

.founder h3 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 600;
}

.founder .role {
  margin: 10px 0 24px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

.founder-copy,
.founder-copy li {
  font-size: 15px;
  line-height: 1.8;
  color: var(--muted);
}

.values .card h3 {
  font-family: var(--heading);
  font-size: 22px;
  color: var(--ink);
}

.values .card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.quote-list li {
  font-family: var(--serif);
  font-size: clamp(17px, 2.2vw, 21px);
  font-weight: 500;
  line-height: 1.65;
  color: var(--ink-soft);
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  max-width: var(--narrow);
}

.quote-list li:last-child {
  border-bottom: 0;
}

.video-stage {
  background: var(--surface);
  min-height: min(56vw, 440px);
  display: grid;
  place-items: center;
}

.video-stage video {
  width: 100%;
  height: min(56vw, 440px);
  object-fit: contain;
}

.video-empty {
  color: var(--faint);
  font-size: 12px;
  letter-spacing: 0.1em;
}

.media-block p {
  margin-top: 12px;
  color: var(--faint);
  font-size: 13px;
}

.news-empty {
  min-height: 200px;
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--muted);
  text-align: center;
  padding: 48px 24px;
}

.news-empty strong {
  display: block;
  font-family: var(--heading);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ink);
}

/* —— Footer —— */

.foot {
  padding: 28px 0 max(24px, env(safe-area-inset-bottom));
  font-size: 13px;
  margin-top: auto;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

.foot--dark {
  background: var(--dark);
  border-top: 0;
  color: var(--dark-muted);
}

.foot--dark .foot-meta {
  border-top: 0;
  padding-top: 0;
  color: rgba(255, 255, 255, 0.45);
}

.foot--dark a:hover {
  color: #fff;
}

.foot-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--faint);
}

.works a {
  color: var(--accent);
}

/* —— Responsive —— */

@media (max-width: 860px) {
  .menu-btn {
    display: block;
  }

  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(60px + env(safe-area-inset-top));
    background: var(--bg);
    flex-direction: column;
    gap: 0;
    padding: 8px var(--pad) 16px;
    border-bottom: 1px solid var(--line);
  }

  body.nav-open .nav {
    display: flex;
  }

  body.nav-open .nav a {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid var(--line);
    font-size: 14px;
  }

  .hero-cover__slogan {
    white-space: nowrap;
  }

  .chapter-link {
    grid-template-columns: 40px minmax(0, 1fr) 24px;
    gap: 12px;
    padding: 22px 0;
  }

  .page-hero--editorial .page-hero__grid {
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 16px;
  }

  .grid-2,
  .grid-3,
  .founder {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 24px 20px;
  }
}

@media (min-width: 861px) {
  body {
    font-size: 16px;
  }

  .prose {
    font-size: 16px;
  }

  .founder {
    align-items: stretch;
  }

  .founder-photo {
    min-height: 100%;
  }

  .founder-photo img {
    aspect-ratio: auto;
    height: 100%;
    min-height: 100%;
  }
}
