:root {
  --paper: #e9dec8;
  --paper-light: #f5eedf;
  --paper-deep: #d8c7aa;
  --ink: #28251f;
  --ink-soft: #655f54;
  --rust: #9b4e36;
  --rule: rgba(52, 73, 78, 0.18);
  --serif: "Iowan Old Style", "Baskerville", "Palatino Linotype", "Songti SC", serif;
  --hand: "Kaiti SC", "STKaiti", "Bradley Hand", "Segoe Print", cursive;
  --system: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 17% 8%, rgba(255, 255, 255, 0.44), transparent 32rem),
    linear-gradient(90deg, rgba(79, 58, 34, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: auto, 5px 5px, auto;
  font-family: var(--system);
  font-size: 17px;
  line-height: 1.58;
  font-optical-sizing: auto;
  min-width: 320px;
}

.paper-noise {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  opacity: 0.24;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 160 160' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.12'/%3E%3C/svg%3E");
}

a { color: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

[data-zh] { display: none; }

html[data-language="zh"] [data-en] { display: none !important; }
html[data-language="zh"] [data-zh] { display: inline; }

.site-header {
  width: min(1400px, calc(100% - 64px));
  min-height: 68px;
  margin: 16px auto 0;
  padding: 0 22px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  position: sticky;
  top: 14px;
  z-index: 30;
  border: 1px solid rgba(255, 255, 255, 0.46);
  border-radius: 22px;
  background: rgba(245, 238, 223, 0.72);
  box-shadow: 0 14px 40px rgba(57, 43, 27, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: 0.01em;
}

.wordmark em { font-size: 0.72em; color: var(--rust); }

.wordmark-mark {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid var(--ink);
  border-radius: 50% 49% 47% 52%;
  font-style: italic;
  font-weight: 700;
}

nav { display: flex; gap: 32px; }
nav a, .footer-links a {
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
  text-decoration-color: transparent;
  transition: text-decoration-color 180ms ease;
}
nav a:hover, .footer-links a:hover { text-decoration-color: currentColor; }
nav a:active, .footer-links a:active { opacity: 0.56; }

.language-switch {
  justify-self: end;
  border: 0;
  border-bottom: 1px solid var(--ink);
  background: transparent;
  padding: 6px 1px 3px;
  font: inherit;
  cursor: pointer;
}
.language-switch:active { transform: scale(0.94); }

main, footer { position: relative; z-index: 11; }

.hero {
  min-height: calc(100vh - 84px);
  width: min(1400px, calc(100% - 64px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(420px, 0.9fr) minmax(470px, 1.1fr);
  align-items: center;
  gap: clamp(28px, 7vw, 120px);
  padding: 68px 0 86px;
}
.hero-copy { min-width: 0; }

.eyebrow {
  margin: 0 0 20px;
  color: var(--rust);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1, h2, h3, p { text-wrap: pretty; }

h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(70px, 7.8vw, 126px);
  font-weight: 400;
  letter-spacing: -0.065em;
  line-height: 0.84;
}

h1 i, h2 i { color: var(--rust); font-weight: 400; }

.hero-lede {
  max-width: 620px;
  margin: 40px 0 0;
  color: var(--ink-soft);
  font-size: clamp(18px, 1.6vw, 23px);
  line-height: 1.55;
}

.hero-actions { display: flex; align-items: center; gap: 30px; margin-top: 40px; }

.button {
  min-height: 54px;
  padding: 14px 23px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ink);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.01em;
  border-radius: 15px;
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 220ms cubic-bezier(0.2, 0.8, 0.2, 1), background 180ms ease;
  will-change: transform;
}

.button:hover:not(.is-disabled) { transform: translateY(-2px); box-shadow: 0 9px 24px rgba(55, 37, 21, 0.18); }
.button:active:not(.is-disabled) { transform: scale(0.97); transition-duration: 90ms; box-shadow: 0 3px 10px rgba(55, 37, 21, 0.16); }
.button-primary { background: var(--rust); border-color: var(--rust); color: #fff9ec; }
.button-dark { background: var(--ink); color: var(--paper-light); }
.button-outline { background: transparent; }
.button-wide { width: 100%; }
.is-disabled { cursor: default; opacity: 0.56; }
.text-link { text-underline-offset: 6px; }

.compatibility {
  margin-top: 28px;
  color: var(--ink-soft);
  font-size: 13px;
}
.compatibility > span:first-child { color: #53724e; font-size: 9px; }

.device-scene { position: relative; display: grid; place-items: center; min-height: 680px; }

.tablet {
  width: min(520px, 80%);
  aspect-ratio: 0.75;
  padding: 17px 15px 20px;
  background: #24241f;
  border: 2px solid #151512;
  border-radius: 15px 15px 24px 24px;
  box-shadow: 23px 34px 0 rgba(80, 53, 28, 0.14), 0 35px 70px rgba(44, 34, 23, 0.25);
  transform: rotate(2.2deg);
  position: relative;
}

.tablet-camera {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #65645d;
}

.screen {
  height: 100%;
  position: relative;
  overflow: hidden;
  padding: 46px 40px;
  color: #272822;
  background:
    linear-gradient(90deg, transparent 58px, rgba(154, 62, 45, 0.22) 59px, transparent 60px),
    repeating-linear-gradient(0deg, #eeeee7 0, #eeeee7 37px, #b7c0b9 38px, #eeeee7 39px);
  border-radius: 3px;
  filter: grayscale(0.9) contrast(0.94);
}

.screen-menu { position: absolute; left: 15px; top: 12px; font-size: 29px; }
.screen-date { text-align: right; color: #66675f; font-size: 12px; letter-spacing: 0.08em; }
.handwriting { font-family: var(--hand); line-height: 1.85; }
.user-writing { margin: 73px 0 0; font-size: 21px; transform: rotate(-0.5deg); }
.reply-writing { margin: 36px 0 0 46px; font-size: 19px; color: #4c504a; transform: rotate(0.3deg); }
.ink-rule { width: 38px; height: 2px; margin: 27px 0 0 46px; background: #5a5e57; transform: rotate(-4deg); }
.persona-chip { position: absolute; right: 24px; bottom: 24px; font-size: 11px; color: #66675f; }

.stylus {
  position: absolute;
  right: 3%;
  bottom: 8%;
  width: 17px;
  height: 520px;
  border-radius: 9px;
  background: linear-gradient(90deg, #181817, #4a4a45 48%, #181817);
  transform: rotate(19deg);
  box-shadow: 12px 14px 18px rgba(36, 28, 20, 0.25);
}

.stylus::after { content: ""; position: absolute; bottom: -17px; left: 4px; border: 5px solid transparent; border-top: 19px solid #171716; }

.pressed-note {
  position: absolute;
  z-index: 2;
  padding: 13px 21px;
  background: #c9b483;
  box-shadow: 4px 8px 16px rgba(55, 37, 21, 0.18);
  font-family: var(--hand);
  font-size: 18px;
}
.note-one { left: 0; top: 15%; transform: rotate(-7deg); }
.note-two { right: 1%; top: 16%; transform: rotate(8deg); }

.manifesto, .plan, .download, .faq, footer {
  width: min(1400px, calc(100% - 64px));
  margin-inline: auto;
}

.manifesto {
  display: grid;
  grid-template-columns: 80px 1fr 0.9fr;
  gap: 38px;
  align-items: end;
  padding: 130px 0 80px;
  border-top: 1px solid rgba(40, 37, 31, 0.35);
}

.section-number { font-size: 13px; color: var(--rust); letter-spacing: 0.1em; }

h2 { margin: 0; font-size: clamp(48px, 6vw, 92px); font-weight: 400; line-height: 0.97; letter-spacing: -0.045em; }
h2, h3 { font-family: var(--serif); }
.manifesto-copy { margin: 0 0 7px; max-width: 560px; color: var(--ink-soft); font-size: 22px; }

.principles {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.principles article { min-height: 350px; padding: 45px clamp(28px, 5vw, 78px); border-right: 1px solid var(--ink); }
.principles article:last-child { border-right: 0; }
.principle-mark { color: var(--rust); }
.principles h3, .download-card h3 { margin: 62px 0 20px; font-size: 31px; font-weight: 400; line-height: 1.1; }
.principles p { color: var(--ink-soft); }

.plan { padding: 150px 0; display: grid; grid-template-columns: 0.78fr 0.92fr; gap: clamp(60px, 9vw, 140px); align-items: center; }
.plan-copy .section-number { margin-bottom: 45px; }
.plan-copy > p:last-child { margin-top: 34px; max-width: 570px; color: var(--ink-soft); font-size: 20px; }
.tier-stack { display: grid; gap: 25px; }

.price-card {
  position: relative;
  padding: 45px;
  background: var(--paper-light);
  border: 1px solid var(--ink);
  box-shadow: 13px 13px 0 var(--rust);
  transition: transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.price-card:hover { transform: translateY(-4px); }

.price-card::before { content: ""; position: absolute; width: 42%; height: 18px; top: -10px; left: 30%; background: rgba(197, 179, 142, 0.77); transform: rotate(-1deg); }
.price-card-plus { margin-left: 34px; box-shadow: 13px 13px 0 #4f625c; }
.price-card-plus::before { left: 19%; transform: rotate(1.2deg); }
.price-label { color: var(--rust); text-transform: uppercase; letter-spacing: 0.12em; font-size: 12px; font-weight: 700; }
.price { display: flex; gap: 16px; align-items: center; margin: 15px 0 27px; }
.price strong { font-size: 70px; font-weight: 400; letter-spacing: -0.06em; line-height: 1; }
.price span { color: var(--ink-soft); font-size: 12px; line-height: 1.3; text-transform: uppercase; letter-spacing: 0.08em; }
.price-card ul { margin: 0 0 34px; padding: 0; list-style: none; }
.price-card li { padding: 12px 0 12px 27px; border-top: 1px solid rgba(40, 37, 31, 0.18); position: relative; }
.price-card li::before { content: "×"; position: absolute; left: 2px; color: var(--rust); }
.fine-print { margin: 19px 0 0; color: var(--ink-soft); font-size: 12px; }

.download { padding: 120px 0 150px; border-top: 1px solid rgba(40, 37, 31, 0.35); }
.download-heading { display: flex; justify-content: space-between; align-items: end; margin: 25px 0 65px; }
.download-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.download-card { min-height: 440px; padding: 42px; border: 1px solid var(--ink); display: flex; flex-direction: column; }
.download-card { border-radius: 24px; overflow: hidden; }
.boox-card { background: #33342f; color: #f3eddf; }
.ipad-card { background: rgba(245, 238, 223, 0.55); }
.platform-name { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid currentColor; padding-bottom: 12px; }
.platform-name span { font-size: 13px; letter-spacing: 0.18em; }
.platform-name small { opacity: 0.65; }
.download-card h3 { margin-top: 58px; }
.download-card p { max-width: 570px; opacity: 0.73; }
.download-card .button { margin-top: auto; align-self: flex-start; }
.boox-card .button-dark { color: var(--ink); background: var(--paper-light); border-color: var(--paper-light); }
.checksum { border: 0; background: transparent; color: inherit; text-decoration: underline; text-underline-offset: 5px; margin-top: 15px; width: fit-content; cursor: pointer; }

.faq { padding: 105px 0 130px; max-width: 900px; }
.faq details { border-top: 1px solid var(--ink); }
.faq details:last-child { border-bottom: 1px solid var(--ink); }
.faq summary { padding: 24px 0; cursor: pointer; font-size: 21px; }
.faq details p { max-width: 760px; margin: -3px 0 29px; color: var(--ink-soft); }

footer { padding: 52px 0 38px; border-top: 1px solid var(--ink); display: grid; grid-template-columns: 1fr 1fr auto; gap: 24px; align-items: start; }
footer p { margin: 3px 0 0; color: var(--ink-soft); }
.footer-links { display: flex; gap: 22px; }
footer small { grid-column: 1 / -1; color: var(--ink-soft); margin-top: 35px; }

.legal-page { width: min(860px, calc(100% - 48px)); margin: 0 auto; padding: 70px 0 120px; }
.legal-page h1 { font-size: clamp(52px, 8vw, 88px); margin: 60px 0 45px; }
.legal-page h2 { font-size: 30px; margin: 48px 0 14px; letter-spacing: -0.02em; }
.legal-page .updated { color: var(--ink-soft); }
.legal-page nav { justify-content: space-between; align-items: center; }

.reveal { animation: rise-in 900ms cubic-bezier(0.2, 0.75, 0.15, 1) both; }
.reveal-late { animation-delay: 160ms; }
@keyframes rise-in { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1040px) {
  .site-header { grid-template-columns: 1fr auto; }
  .site-header nav { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero-copy { max-width: 800px; }
  .device-scene { min-height: 730px; }
  .tablet { width: min(520px, 69%); }
  .manifesto { grid-template-columns: 60px 1fr; }
  .manifesto-copy { grid-column: 2; }
  .principles { grid-template-columns: 1fr; }
  .principles article { border-right: 0; border-bottom: 1px solid var(--ink); min-height: auto; }
  .principles article:last-child { border-bottom: 0; }
  .principles h3 { margin-top: 30px; }
  .plan { grid-template-columns: 1fr; }
}

@media (max-width: 700px) {
  body { font-size: 16px; }
  .site-header, .hero, .manifesto, .plan, .download, .faq, footer { width: min(calc(100% - 36px), 1400px); }
  .site-header { min-height: 62px; top: 9px; padding-inline: 17px; border-radius: 18px; }
  .wordmark { font-size: 16px; }
  .hero { padding-top: 52px; min-height: auto; }
  h1 { max-width: 100%; font-size: clamp(48px, 13.5vw, 56px); letter-spacing: -0.055em; }
  .hero-lede { max-width: 100%; font-size: 18px; overflow-wrap: anywhere; }
  .hero-actions { align-items: flex-start; flex-direction: column; gap: 19px; }
  .device-scene { min-height: 560px; margin-inline: -10px; }
  .tablet { width: 79%; padding: 11px 9px 14px; }
  .screen { padding: 34px 23px; }
  .user-writing { margin-top: 48px; font-size: 16px; }
  .reply-writing { font-size: 15px; margin-left: 23px; }
  .ink-rule { margin-left: 23px; }
  .stylus { height: 390px; right: 0; }
  .pressed-note { font-size: 13px; padding: 9px 13px; }
  .manifesto { grid-template-columns: 1fr; padding-top: 95px; }
  .manifesto-copy { grid-column: auto; font-size: 19px; }
  .principles article { padding: 38px 28px; }
  .plan { padding: 100px 0; gap: 65px; }
  .price-card { padding: 30px 24px; box-shadow: 8px 8px 0 var(--rust); }
  .price-card-plus { margin-left: 0; box-shadow: 8px 8px 0 #4f625c; }
  .price strong { font-size: 57px; }
  .download-heading { display: block; }
  .download-grid { grid-template-columns: 1fr; }
  .download-card { min-height: 420px; padding: 30px 24px; }
  footer { grid-template-columns: 1fr; }
  footer small { grid-column: auto; }
  .footer-links { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { animation: none; }
  .button { transition: none; }
}

@media (prefers-reduced-transparency: reduce) {
  .site-header {
    background: #f5eedf;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
}

@media (prefers-contrast: more) {
  .site-header { background: #f5eedf; border: 2px solid var(--ink); }
  .button, .download-card, .price-card { border-width: 2px; }
  .ink-soft, .hero-lede, .manifesto-copy, .principles p { color: var(--ink); }
}
