:root {
  --bg: #f7f4ee;
  --bg-warm: #fbfaf6;
  --ink: #26344a;
  --ink-soft: #5e6980;
  --blue: #7eb8ea;
  --blue-deep: #4b8cc8;
  --lavender: #c8c1ef;
  --lavender-deep: #7f74bf;
  --line: rgba(71, 112, 162, 0.22);
  --card: rgba(255, 255, 255, 0.74);
  --shadow: 0 22px 60px rgba(58, 86, 126, 0.12);
  --radius-xl: 34px;
  --radius-lg: 26px;
  --radius-md: 18px;
  --content-width: min(1160px, calc(100vw - 32px));
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Manrope", "PingFang TC", "Microsoft JhengHei", sans-serif;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.72)),
    url("./assets/bg-portrait.png") center top / cover fixed no-repeat,
    linear-gradient(180deg, #f7f4ee 0%, #f6f7fb 100%);
  min-height: 100vh;
  overflow-x: clip;
}

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

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

.page-shell {
  position: relative;
  overflow: clip;
}

.ambient {
  position: fixed;
  border-radius: 999px;
  filter: blur(14px);
  pointer-events: none;
  z-index: 0;
}

.ambient-a {
  top: 4rem;
  right: -6rem;
  width: 18rem;
  height: 18rem;
  background: radial-gradient(circle, rgba(200, 193, 239, 0.56), transparent 68%);
}

.ambient-b {
  left: -7rem;
  bottom: 10vh;
  width: 20rem;
  height: 20rem;
  background: radial-gradient(circle, rgba(126, 184, 234, 0.38), transparent 70%);
}

.hero,
.summary-section,
.timeline-section,
.quote-section,
.author-section,
.cta-section {
  position: relative;
  z-index: 1;
  width: var(--content-width);
  margin: 0 auto;
}

.hero {
  min-height: 100svh;
  padding: 24px 0 88px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand,
.top-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(101, 123, 161, 0.18);
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(18px);
  box-shadow: 0 12px 30px rgba(112, 128, 168, 0.08);
}

.brand-code {
  letter-spacing: 0.16em;
  color: var(--blue-deep);
  font-weight: 800;
}

.brand-name,
.top-link-strong {
  font-weight: 800;
}

.top-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.top-link-strong {
  color: #fff;
  background: linear-gradient(135deg, #739fe0, #6f7fe4);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 32px;
  align-items: center;
  padding-top: 56px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--lavender-deep);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2,
.cta-copy h2 {
  margin: 0;
  font-family: "Noto Serif TC", "PingFang TC", serif;
  line-height: 1.08;
}

.hero h1 {
  font-size: clamp(3rem, 10vw, 5.6rem);
  max-width: 7ch;
  color: #2a3b56;
}

.hero-subtitle {
  margin: 18px 0 0;
  color: #548dc4;
  font-size: clamp(1.35rem, 4vw, 2rem);
  font-family: "Noto Serif TC", serif;
}

.hero-lead,
.section-heading p,
.timeline-copy p,
.cta-copy p {
  line-height: 1.9;
  color: var(--ink-soft);
}

.hero-lead {
  max-width: 44rem;
  margin: 22px 0 0;
}

.price-card {
  margin-top: 28px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 20px;
  max-width: 32rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(115, 145, 198, 0.18);
  box-shadow: var(--shadow);
}

.price-item {
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(245, 249, 255, 0.82);
}

.price-item.sale {
  background: linear-gradient(135deg, rgba(126, 184, 234, 0.18), rgba(200, 193, 239, 0.32));
}

.price-item span {
  display: block;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #72829f;
}

.price-item strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(1.55rem, 4vw, 2.1rem);
  color: #2f4f7a;
}

.price-note {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 0.94rem;
  color: #6f7891;
}

.price-card.is-expired .sale,
.price-card.is-expired .price-note {
  display: none;
}

.hero-actions,
.cta-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.button:hover,
.floating-buy:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: #fff;
  background: linear-gradient(135deg, #5f9edd, #7a7fe5);
  box-shadow: 0 18px 34px rgba(108, 132, 222, 0.24);
}

.button-secondary {
  border: 1px solid rgba(95, 125, 180, 0.18);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.hero-visual {
  justify-self: end;
  width: min(100%, 35rem);
}

.hero-book-frame {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 36rem;
}

.hero-book-frame::before {
  content: "";
  position: absolute;
  width: 26rem;
  height: 26rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.94), rgba(232, 241, 251, 0.2) 58%, transparent 74%);
  filter: blur(6px);
}

.hero-book {
  position: relative;
  z-index: 1;
  width: min(100%, 31rem);
  filter: drop-shadow(0 32px 50px rgba(83, 103, 154, 0.2));
  transform: rotate(-5deg);
}

.summary-section,
.timeline-section,
.quote-section,
.author-section,
.cta-section {
  padding-top: 104px;
}

.section-heading {
  max-width: 50rem;
}

.section-heading.narrow {
  max-width: 46rem;
  text-align: center;
  margin: 0 auto;
}

.section-heading h2 {
  font-size: clamp(2rem, 5vw, 3.4rem);
  color: #2d3f5d;
}

.timeline {
  position: relative;
  margin-top: 42px;
  display: grid;
  gap: 32px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 65px;
  width: 2px;
  background: linear-gradient(180deg, rgba(126, 184, 234, 0), rgba(126, 184, 234, 0.8) 12%, rgba(200, 193, 239, 0.9) 88%, rgba(200, 193, 239, 0));
}

.timeline-entry {
  position: relative;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.timeline-marker {
  position: sticky;
  top: 18px;
  display: flex;
  justify-content: center;
}

.timeline-marker span {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(135deg, #78aee3, #8f88d8);
  box-shadow: 0 16px 36px rgba(103, 126, 197, 0.28);
  border: 4px solid rgba(255, 255, 255, 0.86);
}

.timeline-card,
.quote-panel,
.preview-card,
.cta-section {
  border-radius: var(--radius-xl);
  background: var(--card);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(108, 135, 179, 0.14);
  box-shadow: var(--shadow);
}

.timeline-card {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.9fr);
  gap: 28px;
  padding: 26px;
}

.timeline-kicker {
  margin: 0;
  color: #7e83b5;
  letter-spacing: 0.08em;
  font-size: 0.92rem;
  font-weight: 800;
}

.timeline-copy h3 {
  margin: 10px 0 16px;
  color: #294569;
  font-family: "Noto Serif TC", serif;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
}

.timeline-visual {
  margin: 0;
  align-self: center;
}

.timeline-visual img,
.preview-card img {
  width: 100%;
  border-radius: 24px;
  background: #fff;
  box-shadow: inset 0 0 0 1px rgba(112, 140, 188, 0.08);
}

.quote-panel {
  padding: 40px;
  text-align: center;
}

.quote-lead {
  margin: 0;
  font-family: "Noto Serif TC", serif;
  font-size: clamp(1.5rem, 4vw, 2.4rem);
  line-height: 1.7;
  color: #35537e;
}

.quote-source {
  margin: 18px 0 0;
  color: #76839b;
}

.author-layout {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.author-photo-frame,
.author-card {
  margin: 0;
  padding: 22px;
  border-radius: var(--radius-xl);
  background: var(--card);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(108, 135, 179, 0.14);
  box-shadow: var(--shadow);
}

.author-photo-frame img {
  width: 100%;
  border-radius: 22px;
  background: #fff;
}

.author-card p {
  margin: 0;
  line-height: 1.95;
  color: var(--ink-soft);
}

.author-card p + p {
  margin-top: 18px;
}

.cta-section {
  margin-top: 112px;
  margin-bottom: 140px;
  padding: 42px;
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 22px;
  align-items: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(243, 247, 255, 0.72)),
    url("./assets/bg-portrait.png") center / cover no-repeat;
}

.cta-copy .eyebrow,
.cta-copy p {
  color: #58657d;
}

.cta-copy h2 {
  font-size: clamp(2rem, 5vw, 3.3rem);
}

.floating-buy {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10;
  min-height: 52px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #5f9edd, #787fe6);
  color: white;
  box-shadow: 0 24px 48px rgba(80, 108, 188, 0.28);
  transform: translateY(110px);
  opacity: 0;
  transition: transform 220ms ease, opacity 220ms ease;
}

.floating-buy.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity 620ms ease, transform 620ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1024px) {
  .hero-grid,
  .timeline-card,
  .author-layout,
  .cta-section {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    justify-self: stretch;
  }

  .hero-book-frame {
    min-height: 28rem;
  }
}

@media (max-width: 820px) {
  .timeline::before {
    left: 28px;
  }

  .timeline-entry {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .timeline-marker span {
    width: 42px;
    height: 42px;
    font-size: 0.88rem;
  }
}

@media (max-width: 720px) {
  body {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.82)),
      url("./assets/bg-portrait.png") center top / cover no-repeat,
      linear-gradient(180deg, #f7f4ee 0%, #f6f7fb 100%);
  }

  .hero {
    padding-bottom: 64px;
  }

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

  .price-card,
  .author-photo-frame,
  .author-card,
  .cta-section {
    padding-left: 20px;
    padding-right: 20px;
  }

  .price-card {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .cta-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .floating-buy {
    left: 18px;
    right: 18px;
    width: auto;
  }

  .quote-panel {
    padding: 28px 22px;
  }
}
