:root {
  --paper: #fbf7ef;
  --paper-strong: #f2eadc;
  --ink: #1f2925;
  --muted: #5d6862;
  --line: rgba(31, 41, 37, 0.16);
  --moss: #526f5b;
  --moss-dark: #2f4a38;
  --copper: #a75f3f;
  --blue: #355d7d;
  --surface: rgba(255, 252, 246, 0.88);
  --shadow: 0 18px 48px rgba(31, 41, 37, 0.16);
  --reader-scale: 1;
  color-scheme: light;
}

:root[data-mode="dark"] {
  --paper: #17201d;
  --paper-strong: #202b27;
  --ink: #f5efe4;
  --muted: #c8c0b2;
  --line: rgba(245, 239, 228, 0.2);
  --moss: #99b59b;
  --moss-dark: #d4dfcf;
  --copper: #d79873;
  --blue: #a9c4da;
  --surface: rgba(32, 43, 39, 0.88);
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Serif TC", "Songti TC", "PMingLiU", Georgia, serif;
  font-size: calc(18px * var(--reader-scale));
  line-height: 1.72;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

button,
a.button {
  font: inherit;
}

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

.progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: 4px;
  background: transparent;
}

.progress span {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--copper), var(--moss));
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px clamp(18px, 4vw, 56px);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(14px);
}

.brand {
  max-width: 42ch;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
  font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  font-size: 14px;
  color: var(--muted);
}

.nav-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.hero {
  position: relative;
  min-height: 82dvh;
  display: grid;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--moss) 10%, transparent) 0 1px, transparent 1px 100%),
    linear-gradient(180deg, color-mix(in srgb, var(--copper) 8%, transparent), transparent 38%),
    var(--paper);
  background-size: 88px 100%, 100% 100%, auto;
}

.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-shade {
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 63%, color-mix(in srgb, var(--moss) 9%, transparent) 63% 100%),
    linear-gradient(180deg, color-mix(in srgb, var(--paper-strong) 42%, transparent), transparent 52%);
}

.hero-copy {
  position: relative;
  width: min(1080px, calc(100% - 36px));
  margin: 0 auto;
  padding: 10vh 0 9vh;
  color: var(--ink);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.82fr);
  gap: clamp(34px, 6vw, 86px);
  align-items: center;
}

.eyebrow,
.section-kicker {
  margin: 0 0 14px;
  font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--copper);
}

.hero .eyebrow {
  color: var(--copper);
}

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

h1 {
  max-width: 13ch;
  margin: 0;
  font-size: 74px;
  line-height: 1.08;
  font-weight: 800;
}

.title-line {
  display: block;
  white-space: nowrap;
}

.hero-line {
  max-width: 760px;
  margin: 18px 0 0;
  font-size: clamp(18px, 2vw, 25px);
  line-height: 1.62;
}

.hero-subtitle {
  max-width: 720px;
  margin: 26px 0 0;
  font-size: clamp(22px, 2.5vw, 34px);
  line-height: 1.45;
  font-weight: 700;
  color: var(--copper);
}

.hero-cover {
  margin: 0;
  justify-self: end;
  width: min(380px, 32vw);
}

.hero-cover img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  box-shadow: 0 28px 80px rgba(31, 41, 37, 0.22);
}

.hero-actions,
.sample-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button,
.control {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  border: 1px solid transparent;
  padding: 10px 18px;
  font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, border-color 180ms ease;
}

.button:hover,
.control:hover {
  transform: translateY(-1px);
}

.button.primary {
  background: var(--moss);
  color: #fffaf2;
}

.button.secondary,
.control {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.hero .button.secondary {
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  color: var(--ink);
  border-color: var(--line);
}

.section {
  padding: clamp(64px, 10vw, 128px) clamp(18px, 4vw, 56px);
}

.section-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.split,
.sample-layout,
.ebook-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
}

h2 {
  margin: 0;
  font-size: clamp(32px, 4.4vw, 60px);
  line-height: 1.18;
}

h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.32;
}

.long-copy p,
.sample-copy p,
.ebook-grid p,
.chapter-body p,
.audience-card p {
  color: var(--muted);
}

.intro-band {
  background: var(--paper-strong);
}

.author-section {
  background: var(--surface);
}

.author-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: clamp(32px, 6vw, 72px);
  align-items: start;
}

.author-thread-image {
  margin-top: 58px;
}

.author-copy p:first-child {
  margin-top: 0;
}

.author-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.author-facts div {
  border-left: 3px solid var(--copper);
  padding: 12px 14px;
  background: var(--paper-strong);
}

.author-facts span {
  display: block;
  margin-bottom: 6px;
  font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: var(--copper);
}

.author-facts strong {
  display: block;
  font-size: 17px;
  line-height: 1.45;
}

.preview-section {
  background: var(--paper-strong);
}

.preview-head {
  align-items: start;
}

.preview-lead {
  max-width: 360px;
  margin: 0;
  color: var(--muted);
}

.preview-grid {
  display: grid;
  grid-template-columns: minmax(220px, 0.82fr) repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.preview-card {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper-strong);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.preview-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: top center;
}

.cover-preview img {
  aspect-ratio: 3 / 4;
}

.preview-card figcaption {
  min-height: 92px;
  margin: 0;
  padding: 14px 16px 16px;
  background: var(--surface);
}

.audience-grid,
.ebook-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
}

.audience-card,
.ebook-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 26px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.ebook-actions {
  margin-top: 22px;
}

.faq-section {
  background: var(--paper-strong);
}

.faq-list {
  display: grid;
  gap: 18px;
  margin-top: 34px;
}

.faq-list article {
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.faq-list h3 {
  margin-bottom: 10px;
}

.faq-list p {
  max-width: 760px;
  color: var(--muted);
}

.card-mark {
  display: block;
  margin-bottom: 18px;
  font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: var(--blue);
}

.image-break {
  height: clamp(240px, 48vw, 560px);
  overflow: hidden;
}

.image-break img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 34px;
}

.reader-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.timeline {
  display: grid;
  gap: 12px;
}

.chapter-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  overflow: hidden;
}

.chapter-toggle {
  width: 100%;
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 72px;
  border: 0;
  padding: 18px 22px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.chapter-number {
  font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  font-size: 14px;
  font-weight: 800;
  color: var(--copper);
}

.chapter-title {
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 700;
  line-height: 1.28;
}

.chapter-body {
  display: none;
  padding: 0 22px 22px 136px;
  border-top: 1px solid var(--line);
}

.chapter-item.open .chapter-body {
  display: block;
}

.sample-section {
  background: var(--paper-strong);
}

.sample-image {
  margin: 0;
}

.sample-image img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

figcaption {
  margin-top: 12px;
  color: var(--muted);
  font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  font-size: 14px;
  line-height: 1.55;
}

.site-footer {
  padding: 34px clamp(18px, 4vw, 56px);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-family: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  font-size: 14px;
  text-align: center;
}

@media (max-width: 860px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
  }

  .hero {
    min-height: auto;
  }

  .hero-copy {
    padding: 8vh 0 7vh;
    grid-template-columns: 1fr;
    align-items: start;
    gap: 30px;
  }

  .hero-cover {
    justify-self: start;
    width: min(260px, 70vw);
  }

  h1 {
    font-size: 58px;
  }

  .split,
  .author-layout,
  .sample-layout,
  .ebook-layout,
  .preview-grid,
  .audience-grid,
  .ebook-grid {
    grid-template-columns: 1fr;
  }

  .preview-lead {
    max-width: none;
  }

  .author-facts {
    grid-template-columns: 1fr;
  }

  .preview-card figcaption {
    min-height: auto;
  }

  .section-head {
    align-items: start;
    flex-direction: column;
  }

  .reader-controls {
    justify-content: flex-start;
  }

  .chapter-toggle {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .chapter-body {
    padding: 0 22px 22px;
  }
}

@media (min-width: 1180px) {
  h1 {
    font-size: 92px;
  }
}

@media (max-width: 520px) {
  h1 {
    font-size: 40px;
  }

  .hero-subtitle {
    font-size: 21px;
  }

  .hero-line {
    font-size: 17px;
  }

  .hero-actions,
  .sample-actions {
    margin-top: 28px;
  }
}

@media (max-width: 380px) {
  h1 {
    font-size: 38px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
