/* Wanwyn — shared styles */

:root {
  --bg: #f6f2ea;
  --bg-elev: #fbf8f2;
  --bg-deep: #efe9dd;
  --ink: #1a1714;
  --ink-soft: #3a342e;
  --ink-mute: #6b6358;
  --ink-faint: #9a9286;
  --rule: #e3dccd;
  --rule-soft: #ece5d6;
  --accent: #b8623a; /* warm clay — restrained */
  --accent-soft: #e7c9b6;
  --accent-bg: rgba(184, 98, 58, 0.06);
  --serif: "Instrument Serif", "Iowan Old Style", "Hoefler Text", Georgia, serif;
  --sans: "Avenir Next", "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --hanzi: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --display-cn: "PingFang SC", "Hiragino Sans GB", "Source Han Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  --maxw: 1240px;
  --readw: 860px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01", "cv11";
}

html:lang(zh-CN) body {
  letter-spacing: 0.01em;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }

/* ——— Layout ——— */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
  width: 100%;
}
.read {
  max-width: var(--readw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ——— Nav ——— */
.nav {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.nav.scrolled { border-bottom-color: var(--rule); }
.nav-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand-logo {
  width: 40px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: visible;
  flex: 0 0 auto;
}
.brand-logo img {
  width: 40px;
  height: 30px;
  object-fit: contain;
  border-radius: 0;
}
.brand-copy {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
}
.brand-word {
  font-style: italic;
  font-weight: 400;
  font-size: 24px;
  line-height: 1;
}
.brand-cn {
  font-family: var(--hanzi);
  font-size: 22px;
  color: var(--ink-mute);
  font-style: normal;
  letter-spacing: 0;
  line-height: 1;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  color: var(--ink-soft);
}
.nav-links a {
  position: relative;
  padding: 6px 0;
  transition: color .15s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -2px;
  height: 1px;
  background: var(--accent);
}
.lang-toggle {
  position: relative;
  border: 0;
  background: transparent;
  color: var(--ink-mute);
  padding: 6px 0 7px;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.04em;
  line-height: 1;
  transition: color .15s ease;
}
.lang-toggle::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .18s ease;
}
.lang-toggle:hover {
  color: var(--ink);
}
.lang-toggle:hover::before { transform: scaleX(1); }

/* ——— Eyebrows / labels ——— */
.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.eyebrow .dot {
  display: inline-block;
  width: 5px; height: 5px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 8px;
  position: relative;
  top: -1px;
}

/* ——— Type ——— */
.h-display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 6.6vw, 92px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.h-display .it { font-style: italic; }
.h-display .cn { font-family: var(--hanzi); font-style: normal; letter-spacing: 0; }

html:lang(zh-CN) .h-display,
html:lang(zh-CN) .h-section,
html:lang(zh-CN) .h-sub {
  font-family: var(--display-cn);
  font-weight: 300;
  letter-spacing: 0.02em;
}

.h-section {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(34px, 4.4vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.015em;
}
.h-section .it { font-style: italic; }

.h-sub {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(24px, 2.4vw, 32px);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.lede {
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 640px;
}

p { margin: 0 0 1em; }

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 13px 22px;
  border-radius: 4px;
  font-size: 14px;
  letter-spacing: 0.005em;
  border: 1px solid transparent;
  transition: all .18s ease;
}
.btn-primary {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
  box-shadow: 0 10px 28px rgba(184, 98, 58, 0.16);
}
.btn-primary:hover {
  background: var(--ink);
  border-color: var(--ink);
  box-shadow: 0 12px 32px rgba(26, 23, 20, 0.14);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
.btn-ghost:hover { border-color: var(--ink); }
.btn .arrow {
  transition: transform .18s;
}
.btn:hover .arrow { transform: translateX(3px); }

/* ——— Footer ——— */
.footer {
  margin-top: auto;
  border-top: 1px solid var(--rule);
  padding: 56px 0 40px;
  background: var(--bg);
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 32px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
}
.footer h4 {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin: 0 0 16px;
}
.footer ul { list-style: none; padding: 0; margin: 0; }
.footer li { font-size: 14px; color: var(--ink-soft); padding: 6px 0; }
.footer li a:hover { color: var(--accent); }
.footer-meta {
  max-width: var(--maxw);
  margin: 48px auto 0;
  padding: 24px 32px 0;
  border-top: 1px solid var(--rule);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  font-family: var(--mono);
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}

/* ——— Generic sections ——— */
.section {
  padding: 120px 0;
  border-top: 1px solid var(--rule);
}
.section.tight { padding: 80px 0; }
.section.flush { border-top: none; }

/* ——— Quiet hairline rule ——— */
.hr {
  height: 1px;
  background: var(--rule);
  border: none;
  margin: 0;
}

/* ——— Reveal on load (very subtle) ——— */
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.rise { animation: rise .7s cubic-bezier(.2,.7,.2,1) both; }
.rise.d1 { animation-delay: .08s; }
.rise.d2 { animation-delay: .16s; }
.rise.d3 { animation-delay: .24s; }
.rise.d4 { animation-delay: .32s; }
.rise.d5 { animation-delay: .40s; }

/* ——— Image placeholders (no AI slop) ——— */
.placeholder {
  background:
    repeating-linear-gradient(135deg,
      var(--rule-soft) 0 8px,
      transparent 8px 16px),
    var(--bg-deep);
  border: 1px solid var(--rule);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
}

/* ——— Responsive ——— */
  @media (max-width: 760px) {
  .container { padding: 0 22px; }
  .nav-inner { padding: 14px 22px; gap: 12px; }
  .nav-links { gap: 12px; font-size: 13px; }
  .brand { gap: 8px; }
  .brand-logo { width: 34px; height: 25px; }
  .brand-logo img { width: 34px; height: 25px; }
  .brand-copy { gap: 7px; }
  .brand-word { font-size: 20px; }
  .brand-cn { display: inline; font-size: 18px; }
  .lang-toggle { padding: 6px 0 7px; font-size: 12px; }
  .section { padding: 80px 0; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-meta { padding: 20px 22px 0; flex-direction: column; gap: 6px; }
}
