@font-face {
  font-family: "Smiley Sans";
  src: url("./fonts/SmileySans-Oblique.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Noto Serif SC";
  src: url("./fonts/NotoSerifSC.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  /* 莫兰迪：纸、墨、灰 */
  --paper: #e8e4db;
  --paper-2: #ddd7cb;
  --paper-3: #f0ece4;
  --ink: #35332e;
  --ink-soft: #4c4941;
  --muted: #7e796e;
  --line: #d0c9b9;
  --line-strong: #b4aa96;

  /* 莫兰迪：彩色 */
  --accent: #8d6156; /* 豆沙陶土 */
  --accent-dark: #6d4a43;
  --gold: #b09a76; /* 暗黄铜 */
  --sage: #6f8069; /* 灰绿 */
  --sage-mist: #aab8a4;
  --blue-mist: #a7b3b9; /* 雾蓝 */
  --clay-mist: #c1a69b; /* 陶粉 */
  --mauve-mist: #b3a6a6; /* 灰紫 */

  --display: "Smiley Sans", "Noto Serif SC", "Songti SC", sans-serif;
  --serif: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;
  --body: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
    "Noto Sans SC", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --container: 1160px;
  --gutter: clamp(20px, 4vw, 48px);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

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

p,
h1,
h2,
h3 {
  margin: 0;
}

button {
  font: inherit;
  color: inherit;
}

::selection {
  background: var(--sage);
  color: var(--paper-3);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.container {
  width: min(var(--container), calc(100% - var(--gutter) * 2));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 10000;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--paper);
  font-size: 0.85rem;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 16px;
}

/* ---------- shared type ---------- */

.eyebrow,
.label,
.footer-heading,
.footer-bottom,
.hero-meta {
  font-family: var(--mono);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.64rem;
  color: var(--muted);
}

.label::before {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--accent);
  transform: rotate(45deg);
}

.label--sage::before {
  background: var(--sage);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border: 1px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease,
    border-color 0.3s ease;
}

.btn:hover {
  background: var(--ink);
  color: var(--paper);
}

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--paper-3);
}

.btn--primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: var(--paper-3);
}

.btn--ghost {
  border-color: var(--line-strong);
  color: var(--ink-soft);
}

.btn--ghost:hover {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.btn--sage {
  background: var(--sage);
  border-color: var(--sage);
  color: var(--paper-3);
}

.btn--sage:hover {
  background: #5d6c58;
  border-color: #5d6c58;
  color: var(--paper-3);
}

.btn--small {
  padding: 10px 18px;
  font-size: 0.74rem;
}

.btn--large {
  padding: 17px 34px;
  font-size: 0.86rem;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  padding-bottom: 3px;
}

.text-link-rule {
  display: inline-block;
  width: 34px;
  height: 1px;
  background: var(--line-strong);
  transition: width 0.35s ease, background-color 0.35s ease;
}

.text-link:hover .text-link-rule {
  width: 54px;
  background: var(--sage);
}

/* ---------- header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: background-color 0.4s ease, border-color 0.4s ease,
    backdrop-filter 0.4s ease;
}

.site-header.is-scrolled {
  background: rgba(232, 228, 219, 0.9);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--line);
}

.header-inner {
  position: relative;
  height: 78px;
  display: flex;
  align-items: center;
  gap: 40px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  position: relative;
  width: 26px;
  height: 26px;
  border: 1px solid var(--ink);
  flex: none;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  height: 1px;
  background: var(--ink);
}

.brand-mark::before {
  top: 8px;
  width: 14px;
}

.brand-mark::after {
  bottom: 8px;
  width: 8px;
}

.brand-mark span {
  position: absolute;
  inset: auto 3px 3px auto;
  width: 7px;
  height: 7px;
  background: var(--accent);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-family: var(--display);
  font-size: 1.06rem;
  letter-spacing: 0.12em;
  color: var(--ink);
}

.brand-sub {
  margin-top: 3px;
  font-size: 0.56rem;
  letter-spacing: 0.22em;
  color: var(--muted);
}

.site-nav {
  margin-left: auto;
  display: flex;
  gap: 38px;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
}

.site-nav a {
  position: relative;
  padding: 6px 0;
  color: var(--ink-soft);
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--sage);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.site-nav a:hover::after {
  transform: scaleX(1);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}

.link-btn {
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}

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

.nav-toggle {
  display: none;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 16px;
  height: 1px;
  margin: 4px auto;
  background: var(--ink);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.nav-toggle[aria-expanded="true"] span:first-child {
  transform: translateY(2.5px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:last-child {
  transform: translateY(-2.5px) rotate(-45deg);
}

@media (min-width: 1081px) {
  .site-nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin-left: 0;
  }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: clamp(130px, 16vh, 180px) 0 clamp(80px, 10vh, 120px);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}

.hero-vertical {
  position: absolute;
  left: max(14px, calc((100vw - var(--container)) / 2 - 34px));
  top: 210px;
  writing-mode: vertical-rl;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.34em;
  color: var(--muted);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: clamp(48px, 6vw, 88px);
  align-items: end;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.64rem;
  color: var(--muted);
}

.eyebrow::before {
  content: "";
  width: 30px;
  height: 1px;
  background: var(--gold);
}

.hero-title {
  margin: 26px 0 24px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.6rem, 4.4vw, 4rem);
  line-height: 1.16;
  letter-spacing: 0.01em;
  text-wrap: balance;
}

.hero-title .mark {
  color: var(--accent);
}

.hero-lede {
  max-width: 30em;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 2.05;
}

.hero-actions {
  margin-top: 36px;
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.hero-meta {
  margin-top: 44px;
  display: flex;
  align-items: center;
  font-size: 0.62rem;
  color: var(--muted);
}

.hero-meta i {
  display: inline-block;
  width: 38px;
  height: 1px;
  background: var(--line-strong);
  margin: 0 16px;
}

/* 屏风：三块莫兰迪色板 */
.screen {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  align-items: end;
  justify-self: end;
  width: min(100%, 440px);
}

.screen-panel {
  position: relative;
  height: 340px;
  background: var(--paper-2);
  border: 1px solid rgba(53, 51, 46, 0.14);
  box-shadow: inset 0 0 0 9px rgba(240, 236, 228, 0.22);
}

.screen-panel::before {
  content: "";
  position: absolute;
  top: 11%;
  bottom: 11%;
  right: 13px;
  width: 1px;
  background: rgba(53, 51, 46, 0.14);
}

.screen-panel--sage {
  background: var(--sage-mist);
  height: 310px;
}

.screen-panel--blue {
  background: var(--blue-mist);
  height: 375px;
}

.screen-panel--clay {
  background: var(--clay-mist);
  height: 345px;
}

.seal {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 52px;
  height: 52px;
  background: var(--accent);
  color: var(--paper-3);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 0.62rem;
  line-height: 1.15;
  letter-spacing: 0.04em;
}

.seal::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(240, 236, 228, 0.45);
  pointer-events: none;
}

.seal b {
  font-weight: 400;
}

/* ---------- about ---------- */

.about {
  padding: clamp(68px, 9vh, 100px) 0;
  background: var(--paper);
}

.about-inner {
  max-width: 780px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.about-text {
  font-family: var(--serif);
  font-size: clamp(1.05rem, 1.45vw, 1.28rem);
  line-height: 2.1;
  letter-spacing: 0.03em;
  color: var(--ink-soft);
  max-width: 30em;
  text-align: left;
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line-strong);
  padding: 68px 0 40px;
  background: var(--paper);
}

.footer-top {
  text-align: center;
}

.footer-wordmark {
  font-family: var(--display);
  font-size: clamp(1.9rem, 3.4vw, 2.7rem);
  letter-spacing: 0.34em;
  padding-left: 0.34em;
  line-height: 1.1;
}

.footer-sub {
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.34em;
  color: var(--muted);
  padding-left: 0.34em;
}

.footer-grid {
  margin-top: 54px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
}

.footer-desc {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.95;
}

.footer-heading {
  margin-bottom: 16px;
  font-size: 0.58rem;
  color: var(--muted);
}

.footer-col a {
  display: block;
  padding: 5px 0;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

.footer-col a:hover {
  color: var(--sage);
}

.footer-bottom {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  color: var(--muted);
}

.footer-fineprint {
  text-align: right;
}

/* ---------- reveal ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s cubic-bezier(0.22, 0.7, 0.2, 1),
    transform 0.9s cubic-bezier(0.22, 0.7, 0.2, 1);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- responsive ---------- */

@media (max-width: 1180px) {
  .hero-vertical {
    display: none;
  }
}

@media (max-width: 980px) {
  .hero {
    padding-top: 120px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 56px;
  }

  .screen {
    justify-self: start;
    width: min(100%, 520px);
  }

  .screen-panel {
    height: 240px;
  }

  .screen-panel--sage {
    height: 215px;
  }

  .screen-panel--blue {
    height: 265px;
  }

  .screen-panel--clay {
    height: 245px;
  }

  .about-inner {
    gap: 18px;
    align-items: flex-start;
  }
}

@media (max-width: 860px) {
  .site-nav {
    position: absolute;
    top: 78px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    padding: 8px var(--gutter) 22px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    display: none;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }

  .site-nav a::after {
    display: none;
  }

  .nav-toggle {
    display: block;
  }

  .header-inner {
    gap: 18px;
    height: 70px;
  }

  .site-header .site-nav {
    top: 70px;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 108px;
    padding-bottom: 64px;
  }

  .hero-title {
    font-size: clamp(2.2rem, 8.6vw, 2.9rem);
  }

  .hero-actions {
    gap: 22px;
  }

  .hero-meta {
    margin-top: 32px;
  }

  .screen {
    gap: 8px;
    width: 100%;
  }

  .screen-panel {
    height: 170px;
  }

  .screen-panel--sage {
    height: 150px;
  }

  .screen-panel--blue {
    height: 185px;
  }

  .screen-panel--clay {
    height: 170px;
  }

  .seal {
    width: 42px;
    height: 42px;
    right: 7px;
    bottom: 7px;
    font-size: 0.52rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
  }

  .footer-fineprint {
    text-align: left;
  }
}
