/* ===========================================================
   织造之城 — Shared Design System
   AI × Shanghai Textile 1861–2026
   =========================================================== */

:root {
  /* — Color palette: archival paper, deep ink, indigo, madder — */
  --paper:        oklch(0.962 0.012 85);   /* warm bone */
  --paper-deep:   oklch(0.935 0.018 82);   /* shadowed paper */
  --paper-edge:   oklch(0.895 0.022 80);   /* hairline edge */
  --ink:          oklch(0.18  0.014 60);   /* warm near-black */
  --ink-2:        oklch(0.32  0.014 60);   /* secondary text */
  --ink-3:        oklch(0.52  0.012 60);   /* tertiary text */
  --rule:         oklch(0.74  0.015 70);   /* hairlines */
  --indigo:       oklch(0.34  0.085 256);  /* 靛蓝 */
  --indigo-deep:  oklch(0.24  0.075 258);
  --madder:       oklch(0.52  0.135 32);   /* 茜红 */
  --gold:         oklch(0.68  0.095 75);

  /* — Type — */
  --f-cn-serif:   "Noto Serif SC", "Source Han Serif SC", "Songti SC", serif;
  --f-cn-sans:    "Noto Sans SC", "PingFang SC", "Helvetica Neue", sans-serif;
  --f-display:    "Cormorant Garamond", "Noto Serif SC", serif;
  --f-mono:       "JetBrains Mono", "IBM Plex Mono", ui-monospace, monospace;

  /* — Spacing — */
  --col-gap: 32px;
  --max-w: 1320px;
}

/* — Reset & base — */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-cn-serif);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "palt" 1;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
p { text-wrap: pretty; }

/* — Paper grain overlay — */
body::before {
  content: "";
  position: fixed; inset: 0;
  background-image:
    radial-gradient(rgba(40,28,18,.025) 1px, transparent 1px),
    radial-gradient(rgba(40,28,18,.018) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 2px 2px;
  pointer-events: none;
  mix-blend-mode: multiply;
  z-index: 100;
}

/* — Weave grid: subtle warp/weft texture (decorative, opt-in) — */
.weave-bg {
  background-image:
    linear-gradient(to right,  oklch(0.18 0.014 60 / 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, oklch(0.18 0.014 60 / 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* ===========================================================
   Layout primitives
   =========================================================== */

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
}

.wrap--narrow { max-width: 980px; }

/* ===========================================================
   Top navigation
   =========================================================== */

.topnav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: oklch(0.962 0.012 85 / 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--paper-edge);
}
.topnav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 18px 40px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.topnav__brand {
  display: flex; align-items: baseline; gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
  font-family: var(--f-cn-serif);
  font-weight: 600;
}
.topnav__brand-mark {
  display: inline-grid;
  place-items: center;
  width: 28px; height: 28px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-cn-serif);
  font-size: 14px;
  letter-spacing: 0;
  transform: translateY(2px);
}
.topnav__brand-name { font-size: 17px; letter-spacing: 0.06em; line-height: 1.35; }
.topnav__brand-en {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-3);
  letter-spacing: 0.04em;
}
.topnav__links {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
  row-gap: 10px;
  font-family: var(--f-cn-serif);
  font-size: 16px;
  color: var(--ink-2);
}
.topnav__links a {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 10px 0 12px;
  border-bottom: 1px solid transparent;
  transition: border-color .2s, color .2s;
}
.topnav__links a:hover { color: var(--ink); border-bottom-color: var(--ink); }
.topnav__links a.is-active { color: var(--ink); border-bottom-color: var(--madder); }
.topnav__links .num {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 13px;
  color: var(--ink-3);
}

/* ===========================================================
   Generic display elements
   =========================================================== */

.rule {
  height: 1px;
  background: var(--rule);
  width: 100%;
}
.rule--double {
  height: 5px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.eyebrow {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.kicker {
  font-family: var(--f-cn-serif);
  font-size: 13px;
  letter-spacing: 0.32em;
  color: var(--madder);
  font-weight: 500;
}

.chapter-num {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(80px, 14vw, 200px);
  line-height: 0.9;
  color: var(--ink);
}
.chapter-num__cn {
  font-family: var(--f-cn-serif);
  font-style: normal;
  font-size: 0.5em;
  vertical-align: top;
  margin-left: 0.2em;
  color: var(--ink-2);
}

h1, h2, h3, h4 { margin: 0; font-weight: 500; }

.h-display {
  font-family: var(--f-cn-serif);
  font-weight: 600;
  font-size: clamp(38px, 5.5vw, 84px);
  line-height: 1.1;
  letter-spacing: 0.02em;
}
.h-display__en {
  display: block;
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 400;
  font-size: 0.42em;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  margin-top: 0.6em;
}

.h-section {
  font-family: var(--f-cn-serif);
  font-weight: 600;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.2;
  letter-spacing: 0.01em;
}
.h-section__en {
  display: block;
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 400;
  font-size: 0.5em;
  color: var(--ink-3);
  margin-top: 0.4em;
}

.h-block {
  font-family: var(--f-cn-serif);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.35;
  letter-spacing: 0.02em;
}

.lede {
  font-family: var(--f-cn-serif);
  font-size: 19px;
  line-height: 1.8;
  color: var(--ink);
}

.body-cn {
  font-family: var(--f-cn-serif);
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink);
}

.body-cn p + p { margin-top: 1em; }

.caption {
  font-family: var(--f-mono);
  font-size: 11.5px;
  line-height: 1.6;
  letter-spacing: 0.05em;
  color: var(--ink-3);
}

.marker {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--paper);
  background: var(--ink);
  padding: 4px 9px 3px;
}
.marker--indigo { background: var(--indigo); }
.marker--madder { background: var(--madder); }
.marker--ghost  { background: transparent; color: var(--ink-2); border: 1px solid var(--rule); padding: 3px 8px 2px; }

/* ===========================================================
   Footer
   =========================================================== */

.foot {
  margin-top: 120px;
  padding: 60px 0 40px;
  border-top: 1px solid var(--ink);
  background: var(--paper);
}
.foot__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 56px;
  align-items: start;
}
.foot__col h4 {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 16px;
}
.foot__col p, .foot__col li {
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink-2);
}
.foot__col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot__contact-inline {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.foot__contact-inline:hover {
  color: var(--madder);
  border-bottom-color: var(--madder);
}
.foot__contact-arrow {
  font-family: var(--f-display);
  font-style: italic;
  margin-left: 0.35em;
  white-space: nowrap;
}
.foot__bottom {
  max-width: var(--max-w);
  margin: 60px auto 0;
  padding: 16px 40px 0;
  border-top: 1px solid var(--paper-edge);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 24px;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  color: var(--ink-3);
}

/* ===========================================================
   Placeholder slot (for user to drop screenshots/content later)
   =========================================================== */

.slot {
  position: relative;
  border: 1px dashed var(--rule);
  background:
    repeating-linear-gradient(
      135deg,
      transparent 0 8px,
      oklch(0.18 0.014 60 / 0.025) 8px 9px
    ),
    var(--paper-deep);
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  color: var(--ink-3);
  text-align: center;
}
.slot::before, .slot::after {
  content: "";
  position: absolute;
  width: 10px; height: 10px;
  border: 1px solid var(--ink-3);
}
.slot::before { top: 6px; left: 6px;  border-right: none; border-bottom: none; }
.slot::after  { bottom: 6px; right: 6px; border-left: none; border-top: none; }

.slot__inner { max-width: 360px; }
.slot__label {
  font-family: var(--f-mono);
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--madder);
  margin-bottom: 10px;
}
.slot__hint {
  font-family: var(--f-cn-serif);
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  line-height: 1.65;
}

.slot--tall  { min-height: 380px; }
.slot--wide  { min-height: 200px; }
.slot--short { min-height: 140px; }

/* ===========================================================
   Cards & tiles
   =========================================================== */

.tile {
  border: 1px solid var(--rule);
  background: var(--paper-deep);
  padding: 28px 28px 24px;
  position: relative;
}
.tile__num {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 14px;
  color: var(--madder);
  letter-spacing: 0.06em;
}

/* ===========================================================
   Decorative pattern: punch-card / Jacquard motif
   (used sparingly as visual signature)
   =========================================================== */

.jacquard {
  background-image:
    radial-gradient(circle at center, var(--ink) 0 3px, transparent 3.5px);
  background-size: 14px 18px;
  background-position: 0 0;
}
.jacquard--sparse {
  background-image:
    radial-gradient(circle at center, oklch(0.18 0.014 60 / 0.45) 0 2px, transparent 2.5px);
  background-size: 18px 22px;
}

/* ===========================================================
   Utility
   =========================================================== */

.center  { text-align: center; }
.muted   { color: var(--ink-3); }
.indigo  { color: var(--indigo); }
.madder  { color: var(--madder); }
.italic  { font-style: italic; font-family: var(--f-display); }
.mono    { font-family: var(--f-mono); }

/* Inline AI emphasis (contact page & shared body copy) */
.ai-inline {
  font-family: var(--f-display);
  font-style: normal;
  font-weight: 600;
  font-size: 1.15em;
  color: var(--ink);
  letter-spacing: 0.02em;
  padding: 0 0.06em;
  position: relative;
  display: inline-block;
}
.ai-inline::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.06em;
  height: 0.32em;
  background: var(--gold);
  z-index: -1;
  opacity: 0.55;
  mix-blend-mode: multiply;
}

.flow > * + * { margin-top: 1em; }
.flow-2 > * + * { margin-top: 2em; }
.flow-3 > * + * { margin-top: 3em; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--col-gap); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--col-gap); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--col-gap); }

@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .foot__inner { grid-template-columns: 1fr; gap: 40px; }
  .wrap { padding: 0 22px; }
  .topnav__inner { padding: 14px 22px 14px; }
}

/* ===========================================================
   联系我们 / Collaboration（contact.html 与首页引导条共用）
   =========================================================== */

.speakers-grid {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.speaker-card {
  border-top: 1px solid var(--ink);
  padding-top: 28px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
.speaker-card__role-tag {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: flex;
  align-items: center;
  gap: 10px;
}
.speaker-card__role-tag .dot {
  width: 6px; height: 6px;
  background: var(--madder);
  border-radius: 50%;
}
.speaker-card h3 {
  font-family: var(--f-cn-serif);
  font-weight: 600;
  font-size: 30px;
  line-height: 1.15;
  margin: 4px 0 6px;
  letter-spacing: 0.06em;
}
.speaker-card .role {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 17px;
  color: var(--madder);
  display: block;
  margin-bottom: 4px;
}
.speaker-card .role-cn {
  font-family: var(--f-cn-serif);
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.6;
  display: block;
}
.speaker-card__social-handle {
  font-family: var(--f-cn-serif);
  font-size: 14.5px;
  color: var(--ink);
  line-height: 1.6;
  display: block;
  margin-top: 6px;
  letter-spacing: 0.02em;
}
.speaker-card__body {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 24px;
  align-items: start;
}
.speaker-card__bio p {
  font-family: var(--f-cn-serif);
  font-size: 14.5px;
  line-height: 1.8;
  color: var(--ink);
  margin: 0 0 0.6em;
}
.speaker-card__bio p:last-child { margin-bottom: 0; }
.speaker-card__bio .focus {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--rule);
  font-family: var(--f-cn-serif);
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink-2);
}
.speaker-card__bio .focus strong {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  display: block;
  margin-bottom: 6px;
}
.speaker-card__qr {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.qr-frame {
  width: 180px;
  aspect-ratio: 592 / 754;
  border: 1px solid var(--ink);
  padding: 0;
  background: var(--paper);
  position: relative;
  overflow: hidden;
}
.qr-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.qr-frame::before, .qr-frame::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  border: 2px solid var(--ink);
  z-index: 1;
}
.qr-frame::before { top: -1px; left: -1px; border-right: none; border-bottom: none; }
.qr-frame::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }

.contact-note {
  max-width: var(--max-w);
  margin: 56px auto 0;
  padding: 0 40px;
}
.contact-note__inner {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 22px 0;
  display: grid;
  grid-template-columns: 160px 1fr 1fr;
  gap: 32px;
  align-items: start;
}
.contact-note h4 {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-3);
  font-weight: 500;
  line-height: 1.5;
}
.contact-note p {
  font-family: var(--f-cn-serif);
  font-size: 14.5px;
  line-height: 1.75;
  color: var(--ink);
  margin: 0;
}
.contact-note p strong {
  color: var(--madder);
  font-weight: 600;
  margin-right: 6px;
}

.collab {
  padding: 120px 0 100px;
  background: var(--paper-deep);
  border-top: 1px solid var(--ink);
}
.collab__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 40px;
}
.collab__head {
  display: grid;
  grid-template-columns: 1fr;
  align-items: end;
  gap: 32px;
  margin-bottom: 48px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--ink);
}
.collab__head h2 {
  font-family: var(--f-cn-serif);
  font-weight: 600;
  font-size: clamp(36px, 4.5vw, 64px);
  line-height: 1.1;
  margin-top: 0;
}
.collab__head .en-h {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 22px;
  color: var(--ink-3);
  margin-top: 10px;
  display: block;
}
.collab__invite {
  max-width: 880px;
  margin: 0 0 56px;
}
.collab__invite p {
  font-family: var(--f-cn-serif);
  font-size: 17px;
  line-height: 1.9;
  color: var(--ink);
  margin: 0 0 1em;
}
.collab__invite p strong {
  color: var(--madder);
  font-weight: 600;
}
.collab .speakers-grid {
  max-width: none;
  padding: 0;
  margin: 0;
}

.cta-strip {
  padding: 100px 0 120px;
  text-align: center;
}
.cta-strip h2 {
  font-family: var(--f-cn-serif);
  font-weight: 600;
  font-size: clamp(32px, 4vw, 52px);
  line-height: 1.2;
  max-width: 920px;
  margin: 0 auto;
  letter-spacing: 0.02em;
}
.cta-strip .en {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 22px;
  color: var(--ink-3);
  margin-top: 18px;
  display: block;
}

.cta-strip__btns {
  margin-top: 40px;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 28px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--f-cn-serif);
  font-size: 15px;
  letter-spacing: 0.08em;
  border: 1px solid var(--ink);
  transition: background .2s, color .2s;
  text-decoration: none;
}
.btn:hover { background: var(--madder); border-color: var(--madder); }
.btn--ghost {
  background: transparent;
  color: var(--ink);
}
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn .arrow {
  font-family: var(--f-display);
  font-style: italic;
  font-size: 17px;
}

.collab--teaser {
  padding: 88px 0 72px;
}
.collab--teaser .collab__head {
  margin-bottom: 28px;
}
.collab--teaser .cta-strip__btns {
  justify-content: flex-start;
  margin-top: 24px;
}
.collab__teaser-lede {
  font-family: var(--f-cn-serif);
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink-2);
  max-width: 720px;
  margin: 0 0 8px;
}

@media (max-width: 900px) {
  .speakers-grid { grid-template-columns: 1fr; gap: 56px; }
  .speaker-card__body { grid-template-columns: 1fr; }
  .speaker-card__qr { align-items: flex-start; }
  .contact-note__inner { grid-template-columns: 1fr; }
}

/* ===========================================================
   Print
   =========================================================== */

@media print {
  body::before { display: none; }
  .topnav { display: none; }
}
