/* 內容區塊：Hero、情境卡、Before/After、產品示意畫面、能力卡、FAQ、CTA 帶。 */
.hero {
  padding: 72px 0 80px;
  background: linear-gradient(180deg, var(--blue-50) 0%, var(--white) 100%);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  /* 左欄多一點：大標題左邊有書法標誌，第二行「不應該靠人腦記住。」要整句放得下 */
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
}

.hero h1 {
  margin-bottom: 20px;
}

/* 書法標誌放在大標題左側，像落款（與系統登入頁同一張，檔案在 web/public/youjuan-calligraphy.png） */
.hero-title {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
}

/* 標題欄是容器：字級依它的實際寬度算，最長的一行（9 個字）剛好放得下 */
.hero-title > div {
  flex: 1;
  min-width: 0;
  container-type: inline-size;
}

.hero-title h1 {
  margin-bottom: 0;
  font-size: clamp(1.625rem, calc(100cqi / 9.4), 3.5rem);
}

/* 大標題固定兩行：「幾千頁卷宗，」「不應該靠人腦記住。」，行內不拆 */
.hero-title h1 .phrase {
  display: inline-block;
  white-space: nowrap;
}

.hero-logo {
  flex: none;
  width: auto;
  height: 160px;
  user-select: none;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 28px 0 24px;
}

.proof-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--slate-600);
  font-size: 0.9375rem;
}

.proof-list li::before {
  content: '✓';
  margin-right: 6px;
  color: var(--blue-700);
  font-weight: 700;
}

.page-hero {
  padding: 64px 0 48px;
  background: var(--blue-50);
}

.page-hero .lead {
  max-width: 720px;
}

.breadcrumb {
  margin-bottom: 12px;
  font-size: 0.875rem;
}

.breadcrumb a {
  text-decoration: none;
}

/* 產品示意畫面（合成資料，正式版替換為真實截圖） */
.app-mock {
  position: relative;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  font-size: 0.8125rem;
}

.app-mock-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--slate-200);
  background: var(--slate-50);
}

.app-mock-bar i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--slate-300);
}

.app-mock-search {
  flex: 1;
  margin-left: 12px;
  padding: 6px 12px;
  border: 1px solid var(--slate-200);
  border-radius: 6px;
  background: var(--white);
  color: var(--slate-500);
}

.app-mock-body {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  min-height: 300px;
}

.app-mock table {
  width: 100%;
  border-collapse: collapse;
}

.app-mock th,
.app-mock td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--slate-100);
  text-align: left;
  white-space: nowrap;
}

.app-mock th {
  color: var(--slate-500);
  font-weight: 600;
}

.app-mock tr.is-hit td {
  background: var(--blue-50);
}

.loc-chip {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--blue-900);
  font-weight: 700;
}

.app-mock-page {
  padding: 16px;
  border-left: 1px solid var(--slate-200);
  background: var(--slate-50);
}

.paper {
  height: 100%;
  min-height: 240px;
  padding: 16px;
  border: 1px solid var(--slate-200);
  background: var(--white);
}

.paper .line {
  height: 7px;
  margin-bottom: 9px;
  border-radius: 4px;
  background: var(--slate-200);
}

.paper .line.mark {
  background: #fde68a;
}

.paper .line.short {
  width: 60%;
}

.mock-caption {
  margin: 12px 0 0;
  color: var(--slate-500);
  font-size: 0.8125rem;
  text-align: center;
}

/* 卡片格線 */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.card p {
  color: var(--slate-600);
}

a.card {
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

a.card:hover {
  border-color: var(--blue-700);
  box-shadow: var(--shadow);
}

.card .card-foot {
  margin-top: auto;
  color: var(--blue-700);
  font-weight: 700;
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 10px;
  background: var(--blue-50);
  color: var(--blue-700);
  font-size: 1.375rem;
}

.scenario-index {
  margin-bottom: 8px;
  color: var(--blue-700);
  font-size: 0.8125rem;
  font-weight: 700;
}

/* 以前 vs 現在 */
.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.compare-col {
  padding: 28px;
  border-radius: var(--radius);
}

.compare-col.before {
  background: var(--slate-100);
}

.compare-col.after {
  background: var(--blue-50);
  border: 1.5px solid var(--blue-200);
}

.compare-col h3 {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.9375rem;
}

.compare-col.before h3 {
  background: var(--slate-600);
  color: var(--white);
}

.compare-col.after h3 {
  background: var(--blue-700);
  color: var(--white);
}

.compare-col ol {
  margin: 12px 0 0;
  padding-left: 1.25rem;
}

.compare-col li {
  margin-bottom: 8px;
}

/* 差異化主張帶 */
.statement {
  padding: 56px 0;
  background: var(--blue-900);
  color: var(--white);
  text-align: center;
}

.statement p {
  max-width: 820px;
  margin: 0 auto;
  font-size: clamp(1.375rem, 3vw, 1.875rem);
  font-weight: 700;
  line-height: 1.5;
}

.statement small {
  display: block;
  margin-top: 12px;
  color: var(--blue-200);
  font-size: 0.9375rem;
  font-weight: 400;
}

/* 步驟 */
.steps {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding: 20px 20px 20px 64px;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  background: var(--white);
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  left: 20px;
  top: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--blue-700);
  color: var(--white);
  font-weight: 700;
}

.steps strong {
  color: var(--blue-950);
}

/* 限制說明 */
.limit-box {
  padding: 20px 24px;
  border-left: 4px solid var(--amber-500);
  border-radius: var(--radius-sm);
  background: var(--amber-50);
}

.limit-box h3 {
  font-size: 1rem;
}

.limit-box ul {
  margin: 0;
  padding-left: 1.25rem;
}

/* FAQ */
.faq {
  display: grid;
  gap: 12px;
}

.faq details {
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  background: var(--white);
}

.faq summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  color: var(--blue-950);
  font-weight: 700;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: '＋';
  color: var(--blue-700);
}

.faq details[open] summary::after {
  content: '－';
}

.faq .answer {
  padding: 0 20px 20px;
}

.faq .answer ul {
  margin: 0 0 12px;
  padding-left: 1.25rem;
}

.faq .contact-only {
  color: var(--slate-600);
}

/* CTA 帶 */
.cta-band {
  padding: 72px 0;
  background: linear-gradient(135deg, var(--blue-800), var(--blue-950));
  color: var(--blue-100);
  text-align: center;
}

.cta-band h2 {
  color: var(--white);
}

.cta-band .btn-primary {
  background: var(--white);
  color: var(--blue-900);
}

.cta-band .btn-primary:hover {
  background: var(--blue-50);
}

.cta-band .btn-secondary {
  background: transparent;
  border-color: var(--white);
  color: var(--white);
}

.cta-band .actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 24px;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 48px;
}

.check-list {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  margin-bottom: 12px;
  padding-left: 28px;
}

.check-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--blue-700);
  font-weight: 700;
}

@media (max-width: 960px) {
  .hero-grid,
  .split,
  .compare {
    grid-template-columns: 1fr;
  }

  .hero {
    padding: 48px 0 56px;
  }

  .hero-logo {
    height: 140px;
  }

  .app-mock-body {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 480px) {
  .hero-title {
    gap: 16px;
  }

  .hero-logo {
    height: 104px;
  }

  .app-mock th:nth-child(3),
  .app-mock td:nth-child(3) {
    display: none;
  }
}

/* 六張卡片固定三欄，避免 5＋1 的孤兒卡片 */
.card-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 960px) {
  .card-grid.three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .card-grid.three {
    grid-template-columns: 1fr;
  }
}

.card-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 1100px) {
  .card-grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .card-grid.four {
    grid-template-columns: 1fr;
  }
}

/* 生成的概念照片與插畫（不是產品截圖，圖說一律標「示意」） */
.photo-figure {
  margin: 0;
}

.photo-figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--blue-50);
}

.card-photo {
  display: block;
  width: calc(100% + 48px);
  max-width: none;
  height: auto;
  aspect-ratio: 16 / 9;
  margin: -24px -24px 16px;
  object-fit: cover;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--blue-50);
}

/* 手機：示意畫面不再隱藏原卷頁，改成上下排列，保留「結果 → 原頁」的核心畫面 */
@media (max-width: 960px) {
  .app-mock-page {
    display: block;
    border-left: 0;
    border-top: 1px solid var(--slate-200);
  }

  .paper {
    min-height: 140px;
  }
}
