:root {
  color-scheme: light;
  --paper: #f8f0e5;
  --paper-deep: #efe1d1;
  --paper-light: #fffaf3;
  --ink: #332117;
  --ink-soft: #765949;
  --ink-muted: #9a7866;
  --line: #d9c2ad;
  --line-strong: #b9957f;
  --wood: #3f291f;
  --wood-light: #5f3d2f;
  --rust: #9d4939;
  --rust-dark: #7d352a;
  --cream: #fff7ec;
  --shadow: 51 33 23;
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong, SimSun, Georgia, serif;
  --sans: "Noto Sans SC", "Source Han Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 12% 8%, rgb(255 255 255 / 0.72), transparent 30rem),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  opacity: 0.17;
  background-image: url("/textures/noise.svg");
  background-size: 240px 240px;
  mix-blend-mode: multiply;
}

a {
  color: inherit;
}

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

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

.shell {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--cream);
  color: var(--wood);
  font-weight: 700;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgb(217 194 173 / 0.78);
  background: rgb(248 240 229 / 0.9);
  backdrop-filter: blur(18px);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.brand img {
  flex: 0 0 auto;
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-copy strong,
.footer-brand strong {
  font-family: var(--serif);
  font-size: 18px;
  letter-spacing: 0.08em;
}

.brand-copy small {
  color: var(--ink-muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.17em;
}

.main-nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

.main-nav a,
.site-footer nav a {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
  text-decoration: none;
}

.main-nav a:hover,
.site-footer nav a:hover,
.text-link:hover {
  color: var(--rust);
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 0 22px;
  border: 1px solid var(--rust-dark);
  border-radius: 10px 10px 10px 3px;
  background: var(--rust);
  box-shadow: 0 14px 28px -20px rgb(var(--shadow) / 0.7);
  color: #fff9f2;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.button:hover {
  background: var(--rust-dark);
  box-shadow: 0 18px 34px -22px rgb(var(--shadow) / 0.9);
  transform: translateY(-2px);
}

.button:focus-visible,
.main-nav a:focus-visible,
.text-link:focus-visible,
.site-footer a:focus-visible {
  outline: 3px solid rgb(157 73 57 / 0.26);
  outline-offset: 4px;
}

.button-compact {
  min-height: 40px;
  padding-inline: 17px;
  font-size: 12px;
}

.hero {
  min-height: calc(100dvh - 76px);
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(560px, 1.18fr);
  align-items: center;
  gap: clamp(48px, 7vw, 96px);
  padding-block: 78px 92px;
}

.hero-copy {
  animation: reveal-copy 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--rust);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.final-cta h2 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.18;
  text-wrap: balance;
}

.hero h1 {
  max-width: 10.5em;
  font-size: clamp(44px, 5.2vw, 72px);
}

.hero-lede {
  max-width: 37rem;
  margin: 28px 0 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.9;
}

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

.text-link {
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 750;
  text-underline-offset: 5px;
}

.studio-stage {
  min-width: 0;
  animation: reveal-stage 850ms 120ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.studio-window {
  position: relative;
  overflow: hidden;
  border: 1px solid #bda18d;
  border-radius: 18px 18px 18px 5px;
  background: #fbf8f2;
  box-shadow:
    0 34px 70px -38px rgb(var(--shadow) / 0.62),
    0 1px 0 rgb(255 255 255 / 0.9) inset;
}

.studio-window::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgb(255 255 255 / 0.7);
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.studio-topbar {
  height: 63px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 20px;
  border-bottom: 1px solid #d9cfc3;
  background: #eee7dd;
}

.window-dots {
  display: flex;
  gap: 6px;
}

.window-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c7b3a4;
}

.project-name {
  display: grid;
  justify-items: center;
  line-height: 1.25;
}

.project-name span {
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 700;
}

.project-name small {
  color: #9a8779;
  font-size: 8px;
  letter-spacing: 0.11em;
}

.sync-state {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #806f62;
  font-size: 9px;
  font-weight: 700;
}

.sync-state i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6e8f6a;
  box-shadow: 0 0 0 3px rgb(110 143 106 / 0.13);
}

.studio-grid {
  min-height: 500px;
  display: grid;
  grid-template-columns: 142px minmax(0, 1fr) 151px;
}

.chapter-panel,
.context-panel {
  padding: 23px 16px;
  background: #f2eee8;
}

.chapter-panel {
  border-right: 1px solid #ddd3c8;
}

.context-panel {
  border-left: 1px solid #ddd3c8;
}

.panel-kicker,
.chapter-label {
  margin: 0;
  color: #a08f82;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.chapter-panel h2,
.context-panel h2 {
  margin: 5px 0 18px;
  font-family: var(--serif);
  font-size: 14px;
}

.chapter-panel ol {
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  list-style: none;
}

.chapter-panel li {
  min-height: 48px;
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: center;
  gap: 7px;
  padding: 8px 8px;
  border: 1px solid transparent;
  border-radius: 9px;
  color: #78685d;
  font-size: 8px;
  line-height: 1.35;
}

.chapter-panel li span {
  color: #aa978a;
  font-size: 7px;
  font-variant-numeric: tabular-nums;
}

.chapter-panel li.active {
  border-color: #cbb9aa;
  background: #fffaf3;
  box-shadow: 0 6px 16px -14px rgb(var(--shadow) / 0.8);
  color: var(--ink);
}

.chapter-panel li.complete span::after {
  content: " ·";
  color: #6e8f6a;
}

.chapter-footer {
  margin-top: 28px;
  padding-top: 14px;
  display: flex;
  gap: 6px;
  border-top: 1px solid #ddd3c8;
}

.chapter-footer span {
  padding: 3px 5px;
  border: 1px solid #d5c8bc;
  border-radius: 4px;
  color: #8b7769;
  font-size: 7px;
}

.manuscript-panel {
  position: relative;
  padding: 58px clamp(28px, 5vw, 58px);
  background: #fffdf8;
}

.manuscript-panel h2 {
  margin: 9px 0 34px;
  font-family: var(--serif);
  font-size: clamp(19px, 2vw, 26px);
  letter-spacing: -0.04em;
}

.manuscript-copy {
  color: #4d4239;
  font-family: var(--serif);
  font-size: clamp(12px, 1.15vw, 14px);
  line-height: 2.05;
}

.manuscript-copy p {
  margin: 0 0 14px;
}

.manuscript-copy mark {
  padding: 0 2px;
  background: #f1ddc9;
  color: inherit;
}

.editor-caret {
  width: 1px;
  height: 18px;
  margin-top: -8px;
  background: var(--rust);
  animation: caret 1.1s steps(2, jump-none) infinite;
}

.context-panel dl {
  margin: 0;
  display: grid;
}

.context-panel dl div {
  padding: 10px 0;
  border-top: 1px solid #ddd3c8;
}

.context-panel dt {
  color: #a08f82;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.context-panel dd {
  margin: 3px 0 0;
  color: #5f5147;
  font-family: var(--serif);
  font-size: 9px;
  line-height: 1.5;
}

.context-panel button {
  width: 100%;
  min-height: 37px;
  margin-top: 18px;
  border: 1px solid #6e4536;
  border-radius: 8px 8px 8px 3px;
  background: #513428;
  color: #fff8ef;
  font-family: var(--sans);
  font-size: 8px;
  font-weight: 700;
}

.thesis-section {
  padding-block: 122px;
  background: var(--wood);
  color: var(--cream);
}

.thesis-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(560px, 1.2fr);
  gap: clamp(72px, 10vw, 150px);
}

.section-heading h2,
.final-cta h2 {
  font-size: clamp(36px, 4.4vw, 58px);
}

.section-heading > p:not(.eyebrow) {
  max-width: 39rem;
  margin: 22px 0 0;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.9;
}

.thesis-section .eyebrow {
  color: #d58d79;
}

.thesis-section .section-heading > p:not(.eyebrow) {
  color: #c8aea0;
}

.workflow-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.workflow-list li {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 26px;
  padding: 25px 0 27px;
  border-top: 1px solid rgb(239 225 209 / 0.2);
}

.workflow-list li:last-child {
  border-bottom: 1px solid rgb(239 225 209 / 0.2);
}

.workflow-list > li > span {
  color: #a98270;
  font-family: var(--serif);
  font-size: 13px;
}

.workflow-list h3 {
  margin: 0;
  font-family: var(--serif);
  font-size: 20px;
}

.workflow-list p {
  margin: 7px 0 0;
  color: #bca497;
  font-size: 13px;
  line-height: 1.7;
}

.context-section {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(420px, 0.96fr);
  align-items: center;
  gap: clamp(64px, 9vw, 130px);
  padding-block: 138px;
}

.context-visual {
  position: relative;
  min-height: 510px;
  display: grid;
  align-items: center;
  padding: 42px 22px 42px 84px;
}

.context-visual::before {
  position: absolute;
  inset: 0 28px 0 36px;
  border: 1px solid var(--line-strong);
  border-radius: 48% 52% 45% 55% / 53% 44% 56% 47%;
  content: "";
  transform: rotate(-3deg);
}

.context-spine {
  position: absolute;
  left: 0;
  z-index: 2;
  display: grid;
  gap: 9px;
}

.context-spine span {
  min-width: 112px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 8px 8px 8px 2px;
  background: var(--paper-light);
  box-shadow: 0 12px 25px -24px rgb(var(--shadow) / 0.8);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
}

.context-spine span:last-child {
  border-color: var(--rust);
  color: var(--rust-dark);
}

.context-page {
  position: relative;
  z-index: 1;
  min-height: 344px;
  padding: 42px 38px;
  border: 1px solid var(--line);
  border-radius: 14px 14px 14px 3px;
  background: var(--paper-light);
  box-shadow: 0 32px 60px -44px rgb(var(--shadow) / 0.7);
}

.context-page small,
.paper-front small {
  color: var(--rust);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.context-page h3 {
  max-width: 17em;
  margin: 16px 0 12px;
  font-family: var(--serif);
  font-size: 24px;
  line-height: 1.4;
}

.context-page > p {
  margin: 0 0 24px;
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 13px;
  line-height: 1.85;
}

.context-result {
  display: grid;
  grid-template-columns: 7px 1fr;
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 11px;
}

.context-result i {
  width: 5px;
  height: 5px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--rust);
}

.plain-list {
  margin: 36px 0 0;
  padding: 0;
  display: grid;
  gap: 0;
  list-style: none;
}

.plain-list li {
  padding: 18px 0;
  display: grid;
  gap: 5px;
  border-top: 1px solid var(--line);
}

.plain-list li:last-child {
  border-bottom: 1px solid var(--line);
}

.plain-list b {
  font-family: var(--serif);
  font-size: 16px;
}

.plain-list span {
  color: var(--ink-muted);
  font-size: 12px;
}

.portable-section {
  padding-block: 124px;
  border-block: 1px solid var(--line);
  background: #efe1d1;
}

.portable-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 0.78fr);
  align-items: center;
  gap: clamp(72px, 12vw, 170px);
}

.format-lines {
  margin-top: 34px;
  display: grid;
}

.format-lines div {
  padding: 15px 0;
  display: grid;
  grid-template-columns: 66px 1fr;
  border-top: 1px solid var(--line-strong);
  font-size: 12px;
}

.format-lines div:last-child {
  border-bottom: 1px solid var(--line-strong);
}

.format-lines span {
  color: var(--ink-muted);
}

.paper-stack {
  position: relative;
  min-height: 430px;
}

.paper {
  position: absolute;
  inset: 22px 30px;
  border: 1px solid var(--line-strong);
  border-radius: 8px 8px 8px 2px;
  background: var(--paper-light);
  box-shadow: 0 28px 50px -40px rgb(var(--shadow) / 0.7);
}

.paper-back {
  transform: rotate(7deg) translate(14px, -4px);
  background: #d7c2ad;
}

.paper-middle {
  transform: rotate(-4deg) translate(-10px, 5px);
  background: #f3e8da;
}

.paper-front {
  z-index: 2;
  padding: 52px 44px;
}

.paper-front h3 {
  margin: 30px 0 5px;
  font-family: var(--serif);
  font-size: 34px;
}

.paper-front > p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 12px;
}

.paper-front hr {
  margin: 46px 0 28px;
  border: 0;
  border-top: 1px solid var(--line);
}

.paper-front div {
  display: flex;
  gap: 8px;
}

.paper-front div span {
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 800;
}

.final-cta {
  margin-block: 64px;
  padding: clamp(34px, 5vw, 48px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 44px;
  border-radius: 18px 18px 18px 5px;
  background: var(--wood);
  color: var(--cream);
  box-shadow: 0 36px 70px -54px rgb(var(--shadow) / 0.85);
}

.final-cta h2 {
  max-width: 16em;
  font-size: clamp(30px, 3.2vw, 42px);
}

.button-light {
  flex: 0 0 auto;
  border-color: #ead5c3;
  background: var(--cream);
  color: var(--wood);
}

.button-light:hover {
  background: #ead5c3;
}

.site-footer {
  padding-block: 36px 42px;
  border-top: 1px solid var(--line);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: end;
  gap: 24px 48px;
}

.footer-inner > div > p {
  margin: 11px 0 0;
  color: var(--ink-muted);
  font-size: 12px;
}

.site-footer nav {
  display: flex;
  gap: 25px;
}

.site-footer small {
  grid-column: 2;
  color: var(--ink-muted);
  font-size: 10px;
  text-align: right;
}

@keyframes reveal-copy {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes reveal-stage {
  from { opacity: 0; transform: translateY(26px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes caret {
  50% { opacity: 0; }
}

@media (max-width: 1040px) {
  .main-nav {
    display: none;
  }

  .header-inner > .button {
    margin-left: auto;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 56px;
    padding-block: 72px 82px;
  }

  .hero h1 {
    max-width: 12em;
  }

  .hero-lede {
    max-width: 48rem;
  }

  .studio-stage {
    width: min(760px, 100%);
    margin-inline: auto;
  }

  .thesis-grid,
  .context-section,
  .portable-grid {
    grid-template-columns: 1fr;
  }

  .thesis-grid {
    gap: 58px;
  }

  .context-section,
  .portable-grid {
    gap: 62px;
  }

  .context-visual {
    width: min(680px, 100%);
    margin-inline: auto;
  }

  .paper-stack {
    width: min(520px, 100%);
    margin-inline: auto;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 32px, 1180px);
  }

  .header-inner {
    min-height: 68px;
    gap: 14px;
  }

  .brand-copy small {
    display: none;
  }

  .brand-copy strong {
    font-size: 16px;
  }

  .brand img {
    width: 36px;
    height: 36px;
  }

  .button-compact {
    min-height: 38px;
    padding-inline: 13px;
  }

  .hero {
    min-height: auto;
    padding-block: 58px 70px;
  }

  .hero h1 {
    font-size: clamp(40px, 12vw, 56px);
  }

  .hero-lede {
    font-size: 16px;
    line-height: 1.85;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 18px;
  }

  .hero-actions .button {
    width: 100%;
  }

  .studio-window {
    overflow: hidden;
  }

  .studio-topbar,
  .studio-grid {
    width: 100%;
  }

  .studio-grid {
    min-height: 430px;
    grid-template-columns: 108px minmax(0, 1fr);
  }

  .context-panel {
    display: none;
  }

  .chapter-panel {
    padding-inline: 10px;
  }

  .chapter-panel li {
    grid-template-columns: 18px 1fr;
    gap: 4px;
    padding-inline: 5px;
  }

  .chapter-footer {
    flex-wrap: wrap;
  }

  .manuscript-panel {
    padding: 44px 22px;
  }

  .thesis-section,
  .portable-section {
    padding-block: 88px;
  }

  .context-section {
    padding-block: 92px;
  }

  .section-heading h2 {
    font-size: clamp(34px, 10vw, 48px);
  }

  .workflow-list li {
    grid-template-columns: 38px 1fr;
    gap: 16px;
  }

  .context-visual {
    min-height: 456px;
    padding: 34px 0 34px 40px;
  }

  .context-visual::before {
    inset-inline: 16px 0;
  }

  .context-spine span {
    min-width: 86px;
    padding: 8px 9px;
    font-size: 9px;
  }

  .context-page {
    min-height: 338px;
    padding: 34px 24px 34px 58px;
  }

  .context-page h3 {
    font-size: 19px;
  }

  .context-page > p {
    font-size: 11px;
  }

  .context-result {
    font-size: 9px;
  }

  .paper-stack {
    min-height: 380px;
    overflow: hidden;
  }

  .paper {
    inset: 18px 12px;
  }

  .paper-front {
    padding: 42px 30px;
  }

  .paper-front h3 {
    font-size: 28px;
  }

  .final-cta {
    margin-block: 40px;
    padding: 34px 28px;
    align-items: stretch;
    flex-direction: column;
  }

  .button-light {
    width: 100%;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .site-footer nav {
    flex-wrap: wrap;
  }

  .site-footer small {
    grid-column: 1;
    text-align: left;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
