/* 子燕艺术空间 · Base
 * reset · 排版 · 通用组件（按钮、卡片、网格 primitives、nav、footer）
 * Mobile-first
 */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans-cn);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1;
  overflow-x: hidden;
}
img, picture, video, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; transition: color var(--t-fast) var(--ease); }
a:hover { color: var(--cinnabar); }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--cinnabar); color: var(--paper-3); }

/* —— Layout primitives —— */
.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter-x);
}
.section { padding-top: var(--section-y); padding-bottom: var(--section-y); position: relative; }
.section--tight { padding-top: clamp(48px, 8vw, 96px); padding-bottom: clamp(48px, 8vw, 96px); }
.rule { border: 0; height: 1px; background: var(--ink-15); margin: 0; }

/* —— Typography utilities —— */
.eyebrow {
  font-family: var(--sans-en);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-50);
}
.serif { font-family: var(--serif-cn); }
.italic { font-family: var(--serif-en); font-style: italic; }
.dot { color: var(--cinnabar); }

/* —— Section head (1 column on mobile, 2 column on desktop) —— */
.sec-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: clamp(40px, 7vw, 80px);
}
.sec-head__num {
  font-family: var(--serif-en);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(24px, 3vw, 36px);
  color: var(--cinnabar);
  letter-spacing: 0.02em;
}
.sec-head__num .slash { color: var(--ink-30); margin: 0 .35em; font-style: normal; }
.sec-head__body { max-width: 720px; }
.sec-head__title {
  font-family: var(--serif-cn);
  font-weight: 600;
  font-size: clamp(32px, 5.5vw, 64px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 12px 0 16px;
}
.sec-head__title em {
  font-family: var(--serif-en);
  font-style: italic;
  font-weight: 500;
  color: var(--ink-50);
  font-size: 0.6em;
  letter-spacing: 0;
  margin-left: 0.4em;
  vertical-align: 0.06em;
}
.sec-head__lede {
  font-family: var(--serif-cn);
  font-weight: 300;
  font-size: clamp(16px, 2vw, 20px);
  line-height: 1.75;
  color: var(--ink-70);
  margin: 0;
  text-wrap: pretty;
}
@media (min-width: 900px) {
  .sec-head {
    grid-template-columns: minmax(140px, 200px) 1fr;
    gap: clamp(24px, 5vw, 80px);
    align-items: baseline;
  }
}

/* —— Buttons —— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  min-height: 48px;
  font-family: var(--sans-en);
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper-3);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.btn:hover { background: var(--cinnabar); border-color: var(--cinnabar); color: var(--paper-3); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
}
.btn--ghost:hover { background: var(--ink); color: var(--paper-3); }
.btn--cinnabar {
  background: var(--cinnabar);
  border-color: var(--cinnabar);
}
.btn--cinnabar:hover { background: var(--ink); border-color: var(--ink); }
.btn .arrow { transition: transform var(--t-fast) var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* —— Nav —— */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(242, 235, 222, 0.85);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: background var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}
.nav.is-scrolled {
  background: rgba(242, 235, 222, 0.96);
  border-bottom-color: var(--ink-15);
}
.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.nav__brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif-cn);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.06em;
  color: var(--ink);
}
.nav__brand img { width: 28px; height: 28px; }
.nav__brand .nav__brand-en {
  font-family: var(--serif-en);
  font-style: italic;
  font-weight: 500;
  font-size: 12px;
  color: var(--ink-50);
  margin-left: 6px;
  letter-spacing: 0.1em;
}
.nav__links {
  display: none;
  align-items: center;
  gap: clamp(20px, 3vw, 36px);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__links a {
  font-family: var(--sans-cn);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-70);
  position: relative;
  padding: 8px 0;
}
.nav__links a:hover { color: var(--ink); }
.nav__links a[aria-current="page"] {
  color: var(--ink);
}
.nav__links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--cinnabar);
}
.nav__toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.nav__toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  transition: transform var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}
.nav.is-open .nav__toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

@media (min-width: 900px) {
  .nav__links { display: flex; }
  .nav__toggle { display: none; }
}

/* —— Mobile drawer —— */
.drawer {
  position: fixed;
  top: var(--nav-h); left: 0; right: 0; bottom: 0;
  background: var(--paper);
  z-index: 99;
  padding: 32px var(--gutter-x);
  transform: translateY(-100%);
  transition: transform var(--t-base) var(--ease);
  overflow-y: auto;
}
.nav.is-open + .drawer { transform: translateY(0); }
.drawer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 4px;
  border-top: 1px solid var(--ink-15);
}
.drawer li { border-bottom: 1px solid var(--ink-15); }
.drawer a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 4px;
  font-family: var(--serif-cn);
  font-size: 26px;
  font-weight: 600;
  color: var(--ink);
}
.drawer a .en {
  font-family: var(--serif-en);
  font-style: italic;
  font-size: 14px;
  font-weight: 400;
  color: var(--ink-50);
  letter-spacing: 0.06em;
}
.drawer a[aria-current="page"] { color: var(--cinnabar); }
.drawer__meta {
  margin-top: 48px;
  font-family: var(--sans-en);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-50);
  display: grid;
  gap: 12px;
}
@media (min-width: 900px) { .drawer { display: none; } }

/* prevent body scroll when drawer is open */
body.is-locked { overflow: hidden; }

/* —— Footer —— */
.foot {
  background: var(--ink);
  color: rgba(242, 235, 222, 0.7);
  padding: clamp(56px, 8vw, 96px) 0 32px;
  margin-top: var(--section-y);
}
.foot__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
.foot__mark {
  font-family: var(--serif-cn);
  font-weight: 600;
  color: var(--paper-3);
  font-size: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.foot__mark img { width: 32px; filter: brightness(0) invert(1); }
.foot__col h5 {
  font-family: var(--sans-en);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(242, 235, 222, 0.5);
  margin: 0 0 16px;
  font-weight: 500;
}
.foot p {
  font-family: var(--serif-cn);
  font-weight: 300;
  line-height: 1.85;
  font-size: 14.5px;
  margin: 0 0 10px;
}
.foot a { color: var(--paper-3); border-bottom: 1px solid rgba(242, 235, 222, 0.2); }
.foot a:hover { color: var(--cinnabar); border-bottom-color: var(--cinnabar); }
.foot__legal {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(242, 235, 222, 0.1);
  font-family: var(--sans-en);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(242, 235, 222, 0.4);
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
}
@media (min-width: 900px) {
  .foot__grid { grid-template-columns: 1.6fr 1fr 1fr; gap: 64px; }
}

/* —— Page header (shared sub-page hero) —— */
.page-head {
  padding-top: calc(var(--nav-h) + clamp(48px, 10vw, 120px));
  padding-bottom: clamp(48px, 8vw, 96px);
  border-bottom: 1px solid var(--ink-15);
}
.page-head__eyebrow {
  font-family: var(--serif-en);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(18px, 2vw, 24px);
  color: var(--cinnabar);
  margin-bottom: 16px;
}
.page-head__title {
  font-family: var(--serif-cn);
  font-weight: 600;
  font-size: clamp(44px, 8vw, 96px);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin: 0 0 24px;
  text-wrap: balance;
}
.page-head__title em {
  font-family: var(--serif-en);
  font-style: italic;
  font-weight: 500;
  color: var(--ink-50);
  font-size: 0.55em;
  margin-left: 0.5em;
  vertical-align: 0.1em;
}
.page-head__lede {
  font-family: var(--serif-cn);
  font-weight: 300;
  font-size: clamp(17px, 1.8vw, 22px);
  line-height: 1.75;
  color: var(--ink-70);
  max-width: 720px;
  margin: 0;
  text-wrap: pretty;
}

/* —— Reveal animation ——
 * Visible by default. Only hidden when JS is confirmed loaded
 * (.js class added synchronously in <head>). This way: no-JS users,
 * print, full-page screenshots, search crawlers all see content.
 */
.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  will-change: opacity, transform;
}
.js .reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* —— Skip link —— */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper-3);
  padding: 12px 16px;
  font-family: var(--sans-en);
  font-size: 13px;
  z-index: 1000;
}
.skip:focus { left: 16px; top: 16px; }
