/* ============================================================
   Claude Max 使用心得分享 — styles
   深色主題 · 沿用簡報配色 (#1A1730 / #4F46E5 / #0D9488)
   ============================================================ */

:root {
  --bg:          #14111f;
  --bg-1:        #1a1730;
  --bg-2:        #100e1c;
  --surface:     rgba(255, 255, 255, .035);
  --surface-2:   rgba(255, 255, 255, .06);
  --border:      rgba(255, 255, 255, .09);
  --border-str:  rgba(255, 255, 255, .17);

  --text:        #eef0fa;
  --text-dim:    #a7b1c8;
  --text-mute:   #6c7690;

  --indigo:      #6366f1;
  --indigo-2:    #818cf8;
  --indigo-soft: #c7d2fe;
  --teal:        #2dd4bf;
  --teal-2:      #14b8a6;
  --amber:       #fbbf24;
  --violet:      #a78bfa;

  --font: "Microsoft JhengHei", "PingFang TC", "Noto Sans TC", "Hiragino Sans GB",
          -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "SF Mono", "JetBrains Mono", Consolas, "Roboto Mono", monospace;

  --maxw: 1120px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

code {
  font-family: var(--mono);
  font-size: .86em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .08em .42em;
  color: var(--indigo-soft);
  white-space: nowrap;
}

.arrow { color: var(--indigo-2); font-style: normal; padding: 0 .15em; }

/* ---------- 捲動容器 & snap ---------- */
.deck {
  height: 100vh;
  height: 100svh;
  overflow-y: scroll;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
}
.deck::-webkit-scrollbar { width: 0; height: 0; }
.deck { scrollbar-width: none; }

.slide {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(4.5rem, 5vw, 6rem) clamp(1.25rem, 5vw, 4rem) clamp(3rem, 4vw, 4rem);
  overflow: hidden;
}
/* 交錯背景，讓相鄰段落有層次 */
.slide:nth-child(odd)  { background: radial-gradient(120% 120% at 80% -10%, #221d3d 0%, var(--bg-1) 42%, var(--bg-2) 100%); }
.slide:nth-child(even) { background: radial-gradient(120% 120% at 15% 110%, #1d1936 0%, var(--bg) 45%, var(--bg-2) 100%); }

.slide__inner { width: 100%; max-width: var(--maxw); }
.slide--wide .slide__inner { max-width: 1200px; }

/* ---------- 頂部進度條 ---------- */
.progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 50;
  background: rgba(255, 255, 255, .06);
}
.progress__bar {
  display: block; height: 100%; width: 0;
  background: linear-gradient(90deg, var(--indigo), var(--teal));
  transition: width .15s linear;
}

/* ---------- 右側導覽點 ---------- */
.dots {
  position: fixed; right: clamp(.75rem, 2vw, 1.75rem); top: 50%;
  transform: translateY(-50%);
  display: flex; flex-direction: column; gap: 14px; z-index: 40;
}
.dots__item {
  position: relative; width: 12px; height: 12px;
  display: grid; place-items: center;
}
.dots__item span {
  width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255, 255, 255, .28);
  transition: all .35s var(--ease);
}
.dots__item:hover span { background: var(--indigo-soft); transform: scale(1.25); }
.dots__item.is-active span {
  background: var(--indigo-2);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, .22);
  transform: scale(1.15);
}
.dots__item::after {
  content: attr(data-label);
  position: absolute; right: 22px; top: 50%; transform: translateY(-50%) translateX(6px);
  font-size: .72rem; white-space: nowrap; color: var(--text-dim);
  background: rgba(20, 17, 31, .9); border: 1px solid var(--border);
  padding: .18rem .5rem; border-radius: 6px;
  opacity: 0; pointer-events: none; transition: all .25s var(--ease);
}
.dots__item:hover::after { opacity: 1; transform: translateY(-50%) translateX(0); }

/* ---------- 裝飾光暈 ---------- */
.blob {
  position: absolute; border-radius: 50%; filter: blur(6px);
  pointer-events: none; z-index: 0;
}
.blob--indigo {
  width: 46vmax; height: 46vmax; top: -22vmax; right: -14vmax;
  background: radial-gradient(circle, rgba(79, 70, 229, .30), transparent 62%);
  animation: float1 16s ease-in-out infinite;
}
.blob--teal {
  width: 34vmax; height: 34vmax; bottom: -16vmax; right: -6vmax;
  background: radial-gradient(circle, rgba(13, 148, 136, .26), transparent 62%);
  animation: float2 19s ease-in-out infinite;
}
.slide--closing .blob--indigo { right: auto; left: -16vmax; top: -18vmax; }
.slide--closing .blob--teal   { right: auto; left: 40%; bottom: -20vmax; }

@keyframes float1 { 50% { transform: translate(-3vmax, 3vmax) scale(1.06); } }
@keyframes float2 { 50% { transform: translate(2vmax, -2vmax) scale(1.08); } }

/* ============================================================
   S1 · Hero
   ============================================================ */
.hero { position: relative; z-index: 1; text-align: left; }
.hero__eyebrow {
  font-family: var(--mono); font-size: .8rem; letter-spacing: .42em;
  color: var(--indigo-2); text-transform: uppercase; margin-bottom: 1.4rem;
  padding-left: .1em;
}
.hero__title {
  font-size: clamp(3.6rem, 12vw, 8.5rem); font-weight: 800; line-height: .98;
  letter-spacing: -.02em; color: #fff;
  text-shadow: 0 8px 40px rgba(79, 70, 229, .35);
}
.hero__subtitle {
  font-size: clamp(2rem, 6vw, 3.8rem); font-weight: 700; line-height: 1.1;
  color: var(--indigo-soft); margin-top: .4rem;
}
.hero__tagline {
  font-size: clamp(1rem, 2.4vw, 1.4rem); color: var(--text-dim);
  margin-top: 1.6rem; letter-spacing: .02em;
}
.hero__tagline .dot { color: var(--teal); padding: 0 .7em; font-weight: 700; }
.hero__meta {
  font-size: clamp(.9rem, 2vw, 1.05rem); color: var(--text-mute);
  margin-top: 2.6rem; letter-spacing: .03em;
}
.hero__meta strong { color: var(--text); font-weight: 700; }
.hero__meta .sep { padding: 0 .5em; color: rgba(255, 255, 255, .22); }

.scroll-hint {
  position: absolute; left: 50%; bottom: clamp(1.4rem, 4vh, 2.6rem);
  transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: .5rem;
  color: var(--text-mute); text-decoration: none;
  font-family: var(--mono); font-size: .68rem; letter-spacing: .3em;
}
.scroll-hint svg { width: 20px; height: 20px; animation: bob 1.8s ease-in-out infinite; }
.scroll-hint:hover { color: var(--indigo-soft); }
@keyframes bob { 50% { transform: translateY(6px); } }

/* ============================================================
   段落標題
   ============================================================ */
.head { position: relative; z-index: 1; margin-bottom: clamp(1.8rem, 4vw, 3rem); }
.head__num {
  font-family: var(--mono); font-size: 1rem; font-weight: 700;
  color: var(--indigo-2); letter-spacing: .1em;
}
.head__num i { color: var(--text-mute); font-style: normal; font-weight: 400; }
.head__title {
  font-size: clamp(2rem, 5.5vw, 3.4rem); font-weight: 800; line-height: 1.12;
  letter-spacing: -.01em; margin-top: .5rem; color: #fff;
}
.head__title::after {
  content: ""; display: block; width: 60px; height: 4px; margin-top: 1rem;
  border-radius: 4px; background: linear-gradient(90deg, var(--indigo), var(--teal));
}
.head__sub { font-size: clamp(1rem, 2.4vw, 1.25rem); color: var(--text-dim); margin-top: 1rem; }

/* ============================================================
   S2 · 使用量
   ============================================================ */
.usage {
  display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(1.4rem, 3vw, 2.6rem);
  align-items: start; position: relative; z-index: 1;
}
.shot {
  background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));
  border: 1px solid var(--border); border-radius: 16px; overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6);
}
.shot__bar { display: flex; gap: 7px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.shot__bar i { width: 11px; height: 11px; border-radius: 50%; background: rgba(255, 255, 255, .18); }
.shot__bar i:nth-child(1) { background: #ff5f57; }
.shot__bar i:nth-child(2) { background: #febc2e; }
.shot__bar i:nth-child(3) { background: #28c840; }
.shot img { display: block; width: 100%; height: auto; background: #262626; }
.shot figcaption {
  padding: .8rem 1rem; font-size: .85rem; color: var(--text-mute);
  border-top: 1px solid var(--border); text-align: center;
}

.usage__stats { display: flex; flex-direction: column; gap: 1rem; }
.stat {
  display: flex; gap: 1rem; align-items: center;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; padding: 1.1rem 1.25rem;
  transition: transform .3s var(--ease), border-color .3s var(--ease);
}
.stat:hover { transform: translateY(-3px); border-color: var(--border-str); }
.stat__icon { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; }
.stat__icon svg { width: 24px; height: 24px; }
.stat__label { font-size: .9rem; color: var(--text-dim); }
.stat__value { font-size: 1.15rem; font-weight: 600; color: var(--text); margin-top: .1rem; }
.stat__value b { color: #fff; font-size: 1.35rem; font-weight: 800; }
.usage__note {
  margin-top: .4rem; font-size: .92rem; line-height: 1.7; color: var(--text-dim);
  background: rgba(99, 102, 241, .08); border: 1px solid rgba(99, 102, 241, .2);
  border-left: 3px solid var(--indigo); border-radius: 10px; padding: .9rem 1.1rem;
}
.usage__note b { color: #fff; font-weight: 700; }

/* tone helpers */
[data-tone="indigo"] { background: rgba(99, 102, 241, .14); color: var(--indigo-2); }
[data-tone="teal"]   { background: rgba(45, 212, 191, .14); color: var(--teal); }
[data-tone="amber"]  { background: rgba(251, 191, 36, .14); color: var(--amber); }
[data-tone="violet"] { background: rgba(167, 139, 250, .14); color: var(--violet); }

/* ============================================================
   卡片格線 (S3 / S5)
   ============================================================ */
.grid { display: grid; gap: clamp(1rem, 2vw, 1.5rem); position: relative; z-index: 1; }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 1.5rem 1.4rem;
  transition: transform .35s var(--ease), border-color .35s var(--ease), background .35s var(--ease);
}
.card:hover { transform: translateY(-6px); border-color: var(--border-str); background: var(--surface-2); }
.card__icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 1.1rem; }
.card__icon svg { width: 28px; height: 28px; }
.card__title { font-size: 1.15rem; font-weight: 700; color: #fff; line-height: 1.35; }
.card__tag {
  font-family: var(--mono); font-size: .68rem; font-weight: 700; vertical-align: middle;
  color: var(--indigo-2); background: rgba(99, 102, 241, .16);
  border: 1px solid rgba(99, 102, 241, .3); border-radius: 6px; padding: .1rem .4rem; margin-left: .35rem;
}
.card__list { list-style: none; margin-top: 1rem; display: flex; flex-direction: column; gap: .55rem; }
.card__list li {
  position: relative; padding-left: 1.1rem; font-size: .95rem; color: var(--text-dim);
}
.card__list li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--teal);
}

/* ============================================================
   S4 · 問題與解法
   ============================================================ */
.ps { display: flex; flex-direction: column; gap: clamp(.9rem, 2vw, 1.4rem); position: relative; z-index: 1; }
.ps__row {
  display: grid; grid-template-columns: 44px 1fr 1fr; gap: clamp(1rem, 2.5vw, 2rem);
  align-items: stretch;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: clamp(1.1rem, 2vw, 1.6rem);
  transition: border-color .3s var(--ease);
}
.ps__row:hover { border-color: var(--border-str); }
.ps__n {
  font-family: var(--mono); font-size: 1.5rem; font-weight: 800;
  color: transparent; -webkit-text-stroke: 1.5px var(--indigo-2);
  align-self: start; line-height: 1;
}
.ps__problem { border-right: 1px solid var(--border); padding-right: clamp(1rem, 2.5vw, 2rem); }
.ps__tag {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .8rem; font-weight: 700; letter-spacing: .05em;
  padding: .25rem .6rem; border-radius: 999px; margin-bottom: .7rem;
}
.ps__tag svg { width: 15px; height: 15px; }
.ps__tag--p { color: var(--amber); background: rgba(251, 191, 36, .12); border: 1px solid rgba(251, 191, 36, .3); }
.ps__tag--s { color: var(--teal); background: rgba(45, 212, 191, .12); border: 1px solid rgba(45, 212, 191, .3); }
.ps__title { font-size: 1.08rem; font-weight: 700; color: #fff; line-height: 1.4; }
.ps__desc { font-size: .92rem; color: var(--text-dim); margin-top: .55rem; }
.ps__list { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.ps__list li {
  position: relative; padding-left: 1.3rem; font-size: .95rem; color: var(--text-dim); line-height: 1.55;
}
.ps__list li::before {
  content: "✓"; position: absolute; left: 0; top: -.02em;
  color: var(--teal); font-weight: 800; font-size: .95em;
}

/* ============================================================
   S5 · 實用技巧
   ============================================================ */
.tip {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 1.5rem 1.5rem 1.6rem;
  transition: transform .35s var(--ease), border-color .35s var(--ease), background .35s var(--ease);
}
.tip:hover { transform: translateY(-5px); border-color: var(--border-str); background: var(--surface-2); }
.tip__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.tip__n { font-family: var(--mono); font-size: 1.6rem; font-weight: 800; color: rgba(255, 255, 255, .14); }
.tip__icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; }
.tip__icon svg { width: 24px; height: 24px; }
.tip__title { font-size: 1.12rem; font-weight: 700; color: #fff; line-height: 1.4; }
.tip__desc { font-size: .95rem; color: var(--text-dim); margin-top: .6rem; }
.tip__cmds { display: flex; flex-direction: column; gap: .45rem; margin-top: .7rem; }
.tip__cmds span { display: block; }

/* ============================================================
   S6 · 結語
   ============================================================ */
.closing { position: relative; z-index: 1; text-align: center; max-width: 860px; margin: 0 auto; }
.closing__quote { width: clamp(46px, 8vw, 68px); height: auto; color: rgba(129, 140, 248, .5); margin: 0 auto 1.5rem; display: block; }
.closing__quote-text {
  font-size: clamp(1.9rem, 6vw, 3.6rem); font-weight: 800; line-height: 1.35;
  color: #fff; letter-spacing: -.01em;
}
.closing__quote-text em { font-style: normal; color: var(--indigo-soft); }
.closing .grad {
  background: linear-gradient(120deg, var(--indigo-2), var(--teal));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.closing__thanks { font-size: clamp(1rem, 2.6vw, 1.3rem); color: var(--text-dim); margin-top: 2.2rem; }
.closing__sign { font-size: 1rem; color: var(--text-mute); margin-top: 1rem; letter-spacing: .03em; }
.closing__sign strong { color: var(--text); }
.closing__sign .sep { padding: 0 .5em; color: rgba(255, 255, 255, .2); }

/* ============================================================
   進場動畫
   ============================================================ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.slide.is-active .reveal { opacity: 1; transform: none; }
/* 依序延遲 */
.slide.is-active .reveal:nth-child(1) { transition-delay: .05s; }
.slide.is-active .reveal:nth-child(2) { transition-delay: .12s; }
.slide.is-active .reveal:nth-child(3) { transition-delay: .19s; }
.slide.is-active .reveal:nth-child(4) { transition-delay: .26s; }
.stat:nth-child(2) { transition-delay: .1s; }

/* ============================================================
   響應式
   ============================================================ */
@media (max-width: 1000px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .usage { grid-template-columns: 1fr; }
  .ps__row { grid-template-columns: 1fr; gap: 1rem; }
  .ps__n { position: absolute; }
  .ps__row { position: relative; padding-top: 1.4rem; }
  .ps__problem { border-right: none; border-bottom: 1px solid var(--border); padding-right: 0; padding-bottom: 1rem; }
  .dots { display: none; }
}
@media (max-width: 560px) {
  .grid--4, .grid--2 { grid-template-columns: 1fr; }
  .slide { padding-left: 1.15rem; padding-right: 1.15rem; }
  .hero__meta .sep:first-of-type { display: block; height: 0; }
  .shot img { image-rendering: auto; }
}

/* 較矮螢幕：放寬 snap，改為可自由捲動 */
@media (max-height: 700px), (max-width: 860px) {
  .deck { scroll-snap-type: none; }
  .slide { scroll-snap-stop: normal; }
}

/* 減少動態 */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .deck { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .blob { animation: none; }
  .scroll-hint svg { animation: none; }
}

/* 支援鍵盤 focus 樣式 */
a:focus-visible, .dots__item:focus-visible {
  outline: 2px solid var(--indigo-2); outline-offset: 3px; border-radius: 4px;
}
