/* ============ TOKENS ============ */
:root {
  --bg: #FBF7F2;          /* 米白偏暖 */
  --ink: #1A1716;         /* 近黑非黑 */
  --mute: #6B6360;        /* 中性灰 */
  --line: #E8E0D6;        /* 分割线 */
  --accent: #C9603D;      /* 赭石暖跳色 */
  --accent-soft: #F4D9CC;

  --font-display: 'Fraunces', 'LXGW WenKai', serif;
  --font-body: 'Manrope', 'LXGW WenKai', -apple-system, BlinkMacSystemFont, 'PingFang SC', sans-serif;

  --max: 1280px;
  --pad-x: clamp(20px, 5vw, 80px);
  --pad-y: clamp(80px, 12vw, 200px);
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
em { font-style: italic; font-family: var(--font-display); font-weight: 500; }


/* ============ ENTER ANIMATIONS ============ */
.hero, .block, .contact, .work, .tool {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .9s ease, transform .9s cubic-bezier(.2, .65, .3, 1);
}
.hero.in, .block.in, .contact.in, .work.in, .tool.in {
  opacity: 1;
  transform: translateY(0);
}
.work, .tool { transition-delay: 50ms; }


/* ============ NAV ============ */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 247, 242, .82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex; justify-content: space-between; align-items: center;
  padding: 18px var(--pad-x);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav:hover { border-bottom-color: var(--line); }
.nav .logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.nav nav { display: flex; gap: 28px; }
.nav nav a {
  font-size: 15px;
  color: var(--mute);
  position: relative;
  padding: 4px 0;
  transition: color .25s;
}
.nav nav a:hover { color: var(--ink); }
.nav nav a::after {
  content: '';
  position: absolute; left: 0; bottom: -2px;
  width: 0; height: 1.5px;
  background: var(--accent);
  transition: width .35s cubic-bezier(.2, .65, .3, 1);
}
.nav nav a:hover::after { width: 100%; }


/* ============ HERO ============ */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--pad-y) var(--pad-x) calc(var(--pad-y) * 0.6);
  display: flex; flex-direction: column;
  gap: clamp(20px, 3vw, 40px);
}
.hero__eyebrow {
  font-size: clamp(13px, 1.1vw, 15px);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 500;
}
.hero__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(96px, 22vw, 280px);
  line-height: .9;
  letter-spacing: -0.04em;
  font-variation-settings: "opsz" 144;
}
.hero__dot { color: var(--accent); }
.hero__tagline {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 56px);
  line-height: 1.25;
  font-weight: 400;
  max-width: 720px;
  letter-spacing: -0.01em;
}
.hero__tagline em {
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
}
.hero__meta {
  display: flex; gap: 12px; align-items: center;
  font-size: 14px;
  color: var(--mute);
  letter-spacing: .04em;
}
.hero__meta .dot { opacity: .5; }


/* ============ BLOCK (works/tools section) ============ */
.block {
  max-width: var(--max);
  margin: 0 auto;
  padding: calc(var(--pad-y) * 0.5) var(--pad-x);
  border-top: 1px solid var(--line);
}
.block__head {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: clamp(24px, 4vw, 48px);
  row-gap: 8px;
  align-items: baseline;
  margin-bottom: clamp(48px, 6vw, 80px);
}
.block__num {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(40px, 5vw, 64px);
  color: var(--mute);
  font-feature-settings: "tnum";
  grid-row: 1 / 3;
}
.block__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(40px, 6vw, 80px);
  line-height: 1;
  letter-spacing: -0.025em;
}
.block__sub {
  color: var(--mute);
  font-size: clamp(15px, 1.5vw, 18px);
  grid-column: 2;
}


/* ============ WORKS LIST ============ */
.works { border-top: 1px solid var(--ink); }
.work { border-bottom: 1px solid var(--line); }
.work__link {
  display: grid;
  grid-template-columns: 60px 1fr auto auto 32px;
  gap: clamp(16px, 3vw, 40px);
  align-items: center;
  padding: clamp(20px, 3vw, 32px) 0;
  position: relative;
  transition: padding .35s cubic-bezier(.2, .65, .3, 1);
}
.work__link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-soft);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s cubic-bezier(.2, .65, .3, 1);
  z-index: -1;
}
.work__link:hover { padding-left: 24px; padding-right: 24px; }
.work__link:hover::before { transform: scaleX(1); }
.work__idx {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--mute);
  font-feature-settings: "tnum";
  letter-spacing: .08em;
}
.work__main { display: flex; flex-direction: column; gap: 4px; }
.work__title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.work__desc {
  font-size: 15px;
  color: var(--mute);
}
.work__tag {
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--mute);
  white-space: nowrap;
}
.work__year {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--mute);
  font-feature-settings: "tnum";
}
.work__arrow {
  font-size: 24px;
  font-family: var(--font-display);
  color: var(--mute);
  transition: transform .35s cubic-bezier(.2, .65, .3, 1), color .25s;
}
.work__link:hover .work__arrow {
  transform: translateX(8px);
  color: var(--accent);
}

@media (max-width: 720px) {
  .work__link {
    grid-template-columns: 40px 1fr 24px;
    grid-template-rows: auto auto;
    gap: 8px 16px;
  }
  .work__tag, .work__year { display: none; }
}


/* ============ TOOLS LIST ============ */
.tools { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--ink); }
.tool {
  display: grid;
  grid-template-columns: 60px 1fr auto;
  gap: clamp(16px, 3vw, 40px);
  align-items: center;
  padding: clamp(24px, 3vw, 32px) 0;
  border-bottom: 1px solid var(--line);
}
.tool__idx {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--mute);
  letter-spacing: .08em;
}
.tool__title {
  font-family: var(--font-display);
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.tool__desc {
  font-size: 15px;
  color: var(--mute);
  margin-top: 4px;
}
.tool__status {
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  white-space: nowrap;
}
.tool--soon .tool__status { color: var(--mute); }


/* ============ CONTACT ============ */
.contact {
  max-width: var(--max);
  margin: 0 auto;
  padding: var(--pad-y) var(--pad-x);
  display: flex; flex-direction: column;
  gap: clamp(16px, 2vw, 24px);
  align-items: flex-start;
  border-top: 1px solid var(--line);
}
.contact .block__num { margin-bottom: 8px; }
.contact__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(40px, 7vw, 96px);
  line-height: 1;
  letter-spacing: -0.025em;
}
.contact__line {
  font-size: clamp(16px, 1.5vw, 19px);
  color: var(--mute);
  max-width: 540px;
}
.contact__cta {
  display: inline-flex; align-items: center; gap: 12px;
  margin-top: 24px;
  padding: 18px 32px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(18px, 1.6vw, 22px);
  border-radius: 4px;
  transition: background .25s, gap .25s cubic-bezier(.2, .65, .3, 1);
}
.contact__cta span { transition: transform .25s; }
.contact__cta:hover { background: var(--accent); }
.contact__cta:hover span { transform: translateX(6px); }


/* ============ FOOTER ============ */
.foot {
  border-top: 1px solid var(--line);
  padding: 32px var(--pad-x);
}
.foot__row {
  max-width: var(--max);
  margin: 0 auto;
  display: flex; justify-content: space-between;
  font-size: 13px;
  color: var(--mute);
  letter-spacing: .04em;
}
.foot__icp {
  max-width: var(--max);
  margin: 12px auto 0;
  text-align: center;
  font-size: 12px;
  color: var(--mute);
  letter-spacing: .04em;
}
.foot__icp a {
  color: var(--mute);
  border-bottom: 1px dotted transparent;
  transition: color .25s, border-color .25s;
}
.foot__icp a:hover {
  color: var(--ink);
  border-bottom-color: var(--mute);
}

@media (max-width: 600px) {
  .foot__row { flex-direction: column; gap: 8px; }
  .nav nav { gap: 16px; }
  .hero__meta { flex-wrap: wrap; }
}


/* ============ ACCESSIBILITY ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* SELECTION */
::selection { background: var(--accent); color: var(--bg); }
