/* ===== 品牌故事頁面 - 文青簡約風格 ===== */

.brand-story-page {
  padding: 80px 24px 120px;
  max-width: 100%;
  user-select: text;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
}

/* 文章主體 */
.story-article {
  max-width: 600px;
  margin: 0 auto;
  opacity: 0;
  animation: storyFadeIn 0.8s ease-out forwards 0.2s;
  user-select: text;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
}

@keyframes storyFadeIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 標題區 */
.story-header {
  margin-bottom: 48px;
  text-align: center;
}

.story-header h1 {
  font-size: 1.6em;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.6;
  margin: 0 0 40px 0;
  letter-spacing: 0.01em;
  user-select: text;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
}

.story-lead {
  font-size: 0.95em;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.7;
  font-weight: 300;
  user-select: text;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
}

/* 內文 */
.story-body {
  margin-bottom: 80px;
  user-select: text;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
}

.story-body p {
  font-size: 0.95em;
  font-weight: 300;
  line-height: 2.2;
  color: var(--text-primary);
  margin: 0 0 32px 0;
  text-align: justify;
  letter-spacing: 0.02em;
  user-select: text;
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
}

.story-body p:last-child {
  margin-bottom: 0;
}

/* 強調段落 */
.story-emphasis {
  color: var(--text-primary) !important;
  font-weight: 400 !important;
  padding: 40px 0;
  margin: 48px 0 !important;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  text-align: center !important;
  line-height: 2.4 !important;
  letter-spacing: 0.03em;
}

/* P5.js 互動藝術區塊 */
.p5-container {
  margin: 56px 0;
  text-align: center;
}

#p5-canvas {
  width: 100%;
  height: 320px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--background-secondary);
  touch-action: none;
}

#p5-canvas canvas {
  display: block;
  border-radius: 12px;
}

.p5-caption {
  font-size: 0.85em;
  color: var(--text-tertiary);
  margin: 16px 0 0 0 !important;
  font-weight: 300;
  letter-spacing: 0.02em;
}

/* 手機版 P5 提示文字 */
@media screen and (max-width: 768px) {
  #p5-canvas {
    height: 240px;
  }
  
  .p5-caption {
    font-size: 0.8em;
  }
}

@media screen and (max-width: 480px) {
  #p5-canvas {
    height: 200px;
    border-radius: 8px;
  }
}

/* 結尾區 */
.story-footer {
  text-align: center;
  padding-top: 48px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* CTA 按鈕 - 黃色 */
.story-cta {
  display: inline-block;
  background: var(--accent-yellow);
  color: var(--text-primary);
  padding: 14px 36px;
  border-radius: 8px;
  font-size: 0.9em;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
}

.story-cta:hover {
  background: var(--accent-yellow-dark);
  box-shadow: var(--shadow-yellow);
}

/* 響應式 */
@media screen and (max-width: 768px) {
  .brand-story-page {
    padding: 64px 24px 96px;
  }

  .story-header {
    margin-bottom: 40px;
  }

  .story-header h1 {
    font-size: 1.4em;
    margin-bottom: 32px;
  }

  .story-body p {
    font-size: 0.92em;
    line-height: 2.1;
    margin-bottom: 28px;
  }

  .story-emphasis {
    padding: 32px 0;
    margin: 40px 0 !important;
  }

  .p5-container {
    margin: 48px 0;
  }

  #p5-canvas {
    border-radius: 8px;
  }

  .story-footer {
    padding-top: 40px;
  }

  .story-cta {
    padding: 12px 32px;
    font-size: 0.88em;
  }
}

@media screen and (max-width: 480px) {
  .brand-story-page {
    padding: 56px 20px 80px;
  }

  .story-header {
    margin-bottom: 32px;
  }

  .story-header h1 {
    font-size: 1.25em;
    margin-bottom: 28px;
  }

  .story-lead {
    font-size: 0.9em;
  }

  .story-body {
    margin-bottom: 64px;
  }

  .story-body p {
    font-size: 0.9em;
    line-height: 2;
    margin-bottom: 24px;
  }
}
