/* =========================================================
   style-plus.css — 風格強化層 v3
   插畫裝飾／動態效果／輔助配色（暖金、薄荷綠）／新內容區塊
   ========================================================= */
:root {
  --gold: #D9A441; --gold-deep: #A87718; --gold-soft: #FBF0DA;
  --mint: #5FA88F; --mint-deep: #3C7D67; --mint-soft: #E3F2EC;
}

/* ---------- 動畫 ---------- */
@keyframes floaty { 0%,100% { transform: translate(0,0) scale(1); } 50% { transform: translate(12px,-16px) scale(1.06); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes twinkle { 0%,100% { transform: scale(1) rotate(0); opacity: .9; } 50% { transform: scale(.55) rotate(45deg); opacity: .45; } }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes underline { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes stripe { to { background-position: 300% 0; } }
@keyframes gradientShift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* 星芒小裝飾 */
.spark {
  position: absolute; display: block; width: 16px; height: 16px; background: var(--gold);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: twinkle 3.6s ease-in-out infinite;
}

/* ---------- Header ---------- */
header { transition: box-shadow .25s ease, background .25s ease; }
header.is-scrolled { box-shadow: 0 6px 24px rgba(124,58,107,.10); background: rgba(255,255,255,.97); }
header::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--gold), var(--mint), var(--brand));
  background-size: 300% 100%; animation: stripe 14s linear infinite; opacity: .85;
}

/* ---------- Hero 裝飾 ---------- */
.hero { border-bottom: none; }
.hero-inner { z-index: 2; padding-bottom: clamp(3.6rem, 7vw, 5.4rem); }
.hero::after {
  content: ""; position: absolute; left: -5%; right: -5%; bottom: -40px; height: 80px;
  background: var(--surface); border-radius: 50%; z-index: 1;
}
.hero-deco { position: absolute; inset: 0; pointer-events: none; z-index: 0; transition: transform .5s ease-out; }
.hero-deco .blob { position: absolute; border-radius: 50%; animation: floaty 14s ease-in-out infinite; }
.blob-1 { width: 280px; height: 280px; right: -80px; top: -60px; background: radial-gradient(circle at 35% 35%, rgba(243,211,234,.95), rgba(196,123,180,.16) 70%); }
.blob-2 { width: 180px; height: 180px; left: -60px; bottom: 30px; background: radial-gradient(circle at 35% 35%, rgba(255,238,204,.95), rgba(217,164,65,.14) 70%); animation-delay: -5s; }
.blob-3 { width: 110px; height: 110px; left: 47%; top: 6%; background: radial-gradient(circle at 35% 35%, rgba(227,242,236,.95), rgba(95,168,143,.16) 70%); animation-delay: -9s; }
.deco-ring { position: absolute; width: 130px; height: 130px; left: 38%; bottom: 10%; border: 2px dashed rgba(196,123,180,.45); border-radius: 50%; animation: spin 40s linear infinite; }
.hero-deco .s1 { left: 4%; top: 15%; width: 22px; height: 22px; }
.hero-deco .s2 { left: 46%; top: 24%; width: 13px; height: 13px; background: var(--brand); animation-delay: -1.2s; }
.hero-deco .s3 { right: 3%; bottom: 22%; width: 18px; height: 18px; background: var(--mint); animation-delay: -2.4s; }
.deco-squiggle { position: absolute; width: 110px; left: 2%; bottom: 20%; opacity: .7; }

.hero h1 em { background: none; position: relative; white-space: nowrap; }
.hero h1 em::after {
  content: ""; position: absolute; left: -3%; right: -3%; bottom: .06em; height: .34em;
  background: linear-gradient(90deg, var(--gold), #F0C878); border-radius: 999px; z-index: -1;
  transform-origin: left; opacity: .6; animation: underline 1.1s .4s cubic-bezier(.2,.8,.2,1) both;
}

.float-chip {
  position: absolute; z-index: 3; display: inline-flex; align-items: center; gap: .5rem;
  background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .4rem .95rem .4rem .45rem;
  font-size: .86rem; font-weight: 700; color: var(--ink); box-shadow: var(--shadow);
  animation: bob 5s ease-in-out infinite; white-space: nowrap; line-height: 1.5;
}
.float-chip .ci { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; flex-shrink: 0; }
.float-chip .ci svg { width: 15px; height: 15px; }
.chip-a { top: 1.4rem; right: .2rem; }
.chip-a .ci { background: linear-gradient(135deg, #E8B95C, var(--gold-deep)); }
.chip-b { bottom: 2.4rem; left: 50%; margin-left: -4.5rem; animation-delay: -2.5s; }
.chip-b .ci { background: linear-gradient(135deg, #7DC0A9, var(--mint-deep)); }

/* ---------- 數據列 ---------- */
.stat-bar { border-top: none; position: relative; z-index: 2; }
.stat-item { position: relative; }
.stat-item + .stat-item::before { content: ""; position: absolute; left: -.5rem; top: 18%; bottom: 18%; width: 1px; background: var(--line); }
.stat-num { font-variant-numeric: tabular-nums; }
.stat-item:nth-child(2) .stat-num { color: var(--gold-deep); }
.stat-item:nth-child(3) .stat-num { color: var(--mint-deep); }
.stat-item:nth-child(4) .stat-num { color: var(--brand-ink); }

/* ---------- 區塊標題 ---------- */
.section-head h2::after {
  content: ""; display: block; width: 56px; height: 6px; margin-top: .75rem; border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--gold));
}
.eyebrow--gold, .section--alt .eyebrow { color: var(--gold-deep); background: var(--gold-soft); }
.eyebrow--mint { color: var(--mint-deep); background: var(--mint-soft); }
.section--alt .section-head h2::after { background: linear-gradient(90deg, var(--gold), var(--brand)); }
.section--mint .section-head h2::after { background: linear-gradient(90deg, var(--mint), var(--gold)); }

/* ---------- 區塊背景裝飾 ---------- */
.section { position: relative; overflow: hidden; }
.section > .container { position: relative; z-index: 1; }
.section--alt::before {
  content: ""; position: absolute; right: -70px; top: -70px; width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(rgba(217,164,65,.30) 1.5px, transparent 1.7px) 0 0 / 16px 16px; pointer-events: none;
}
.section--mint { background: linear-gradient(180deg, var(--mint-soft), #F4FAF7); }
.section--mint::before {
  content: ""; position: absolute; left: -90px; bottom: -90px; width: 280px; height: 280px; border-radius: 50%;
  border: 2px dashed rgba(95,168,143,.35); pointer-events: none; animation: spin 60s linear infinite;
}

/* ---------- 特色卡片 ---------- */
.feature-grid { counter-reset: fc; }
.feature-card { position: relative; overflow: hidden; }
.feature-card::before {
  content: ""; position: absolute; left: 0; top: 0; right: 0; height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--gold));
  transform: scaleX(0); transform-origin: left; transition: transform .35s ease;
}
.feature-card:hover::before { transform: scaleX(1); }
.feature-card::after {
  counter-increment: fc; content: "0" counter(fc); position: absolute; right: 1.1rem; top: .7rem;
  font-size: 2.3rem; font-weight: 700; line-height: 1; color: rgba(124,58,107,.08);
}
.feature-ico { transition: transform .35s cubic-bezier(.3,1.6,.5,1); }
.feature-card:hover .feature-ico { transform: rotate(-8deg) scale(1.1); }
.feature-card:nth-child(2) .feature-ico { background: var(--gold-soft); color: var(--gold-deep); }
.feature-card:nth-child(3) .feature-ico { background: var(--mint-soft); color: var(--mint-deep); }
.feature-card:nth-child(4) .feature-ico { background: linear-gradient(135deg, var(--brand), var(--brand-deep)); color: #fff; }
.feature-card:nth-child(2):hover { border-color: var(--gold); }
.feature-card:nth-child(3):hover { border-color: var(--mint); }
.feature-card:nth-child(2)::before { background: linear-gradient(90deg, var(--gold), #F0C878); }
.feature-card:nth-child(3)::before { background: linear-gradient(90deg, var(--mint), #9FD3C1); }

/* ---------- 依序淡入 ---------- */
html.js .reveal.stagger:not(.stagger-done) > * { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
html.js .reveal.stagger.is-visible:not(.stagger-done) > * { opacity: 1; transform: none; }

/* ---------- 按鈕 ---------- */
.btn-primary { position: relative; overflow: hidden; isolation: isolate; }
.btn-primary::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; z-index: -1;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
  transform: skewX(-20deg); transition: left .6s ease;
}
.btn-primary:hover::after { left: 130%; }
.btn .icon { transition: transform .25s ease; }
.btn:hover .icon { transform: translateY(-1px) scale(1.08); }

/* ---------- 消息 ---------- */
.news-item > .icon { background: var(--brand-soft); border-radius: 8px; padding: .35rem; box-sizing: content-box; margin-top: .1rem; }
.news-item:nth-child(even) { border-left-color: var(--gold); }
.news-item:nth-child(even) > .icon { background: var(--gold-soft); color: var(--gold-deep); }
.news-item:nth-child(3n) { border-left-color: var(--mint); }
.news-item:nth-child(3n) > .icon { background: var(--mint-soft); color: var(--mint-deep); }

/* ---------- CTA 橫幅 ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--brand-ink), var(--brand-deep), var(--brand), var(--brand-deep), var(--brand-ink));
  background-size: 300% 300%; animation: gradientShift 16s ease infinite;
}
.cta-band::before {
  content: ""; position: absolute; right: 7%; top: 16%; width: 16px; height: 16px; background: var(--gold);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  animation: twinkle 3s ease-in-out infinite;
}

/* ---------- 頁尾 ---------- */
.site-footer::before { content: ""; display: block; height: 4px; background: linear-gradient(90deg, var(--brand), var(--gold), var(--mint)); }

/* ---------- 內頁標頭 ---------- */
.page-hero {
  background:
    radial-gradient(420px 220px at 92% 0%, rgba(217,164,65,.30), transparent 70%),
    radial-gradient(380px 240px at 6% 120%, rgba(95,168,143,.32), transparent 70%),
    linear-gradient(120deg, var(--brand-ink), var(--brand-deep) 55%, var(--brand));
  padding-bottom: calc(clamp(2.2rem, 5vw, 3.4rem) + 26px);
}
.page-hero::after { right: auto; left: -5%; top: auto; bottom: -40px; width: 110%; height: 72px; border-radius: 50%; background: var(--cream); }
.page-deco { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
.page-deco .pd-ring { position: absolute; right: 7%; top: 50%; width: 150px; height: 150px; margin-top: -95px; border: 2px dashed rgba(255,255,255,.38); border-radius: 50%; animation: spin 50s linear infinite; }
.page-deco .pd-dot { position: absolute; right: calc(7% + 50px); top: 50%; margin-top: -45px; width: 50px; height: 50px; border-radius: 50%; background: rgba(255,255,255,.16); animation: bob 6s ease-in-out infinite; }
.page-deco .pd-a { right: 20%; top: 20%; }
.page-deco .pd-b { right: 4%; top: 62%; width: 11px; height: 11px; background: #fff; animation-delay: -1.4s; }
.page-deco .pd-c { right: 30%; bottom: 34%; width: 12px; height: 12px; background: var(--mint-soft); animation-delay: -2.2s; }

/* 內頁：圖示與卡片配色輪替 */
main h2:nth-of-type(3n+2) .icon { background: var(--gold-soft); color: var(--gold-deep); }
main h2:nth-of-type(3n) .icon { background: var(--mint-soft); color: var(--mint-deep); }
.contact-item:nth-child(3n+2) .icon { background: linear-gradient(135deg, #E8B95C, var(--gold-deep)); }
.contact-item:nth-child(3n) .icon { background: linear-gradient(135deg, #7DC0A9, var(--mint-deep)); }
.contact-item { transition: transform .2s ease, box-shadow .2s ease; }
.contact-item:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.course-card { position: relative; overflow: hidden; }
.course-card:not(.is-past) { border-top-color: transparent; }
.course-card:not(.is-past)::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--brand), var(--gold), var(--mint)); }

/* ---------- 課程模組 ---------- */
.module-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: .9rem; }
.module {
  display: flex; align-items: center; gap: .85rem; background: #fff; border: 1px solid rgba(95,168,143,.25);
  border-radius: var(--radius); padding: 1rem 1.1rem; font-weight: 700; color: var(--ink); line-height: 1.6;
  box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease;
}
.module:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.module-ico { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.module-ico svg { width: 21px; height: 21px; }
.c-brand { background: var(--brand-soft); color: var(--brand-deep); }
.c-gold { background: var(--gold-soft); color: var(--gold-deep); }
.c-mint { background: var(--mint-soft); color: var(--mint-deep); }
.hours-bar { margin-top: 1.9rem; }
.hours-track { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: #fff; box-shadow: inset 0 0 0 1px rgba(95,168,143,.25); }
.hours-track span { flex: 0 0 var(--w); }
.hours-theory { background: linear-gradient(90deg, var(--gold), #E8B95C); }
.hours-practice { background: linear-gradient(90deg, var(--mint), var(--mint-deep)); }
html.js .hours-bar.reveal .hours-track span { flex-basis: 0; transition: flex-basis 1.3s cubic-bezier(.2,.8,.2,1) .25s; }
html.js .hours-bar.reveal.is-visible .hours-track span { flex-basis: var(--w); }
.hours-legend { display: flex; flex-wrap: wrap; gap: .3rem 1.4rem; margin-top: .7rem; font-size: .92rem; color: var(--ink-2); }
.hours-legend i { display: inline-block; width: 11px; height: 11px; border-radius: 50%; margin-right: .4rem; vertical-align: -1px; }
.hours-legend .lg-gold { background: var(--gold); }
.hours-legend .lg-mint { background: var(--mint); }
.hours-legend .total { margin-left: auto; font-weight: 700; color: var(--mint-deep); }

/* ---------- 報名流程 ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.4rem; position: relative; }
.steps::before { content: ""; position: absolute; top: 34px; left: 12%; right: 12%; border-top: 2px dashed #E3CFDD; }
.step { position: relative; text-align: center; margin: 0; padding: 0 .4rem; }
.step-num {
  width: 68px; height: 68px; margin: 0 auto 1rem; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 700; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-deep));
  box-shadow: 0 0 0 7px var(--cream), var(--shadow); position: relative; z-index: 1;
}
.step:nth-child(2) .step-num { background: linear-gradient(135deg, #E8B95C, var(--gold-deep)); }
.step:nth-child(3) .step-num { background: linear-gradient(135deg, #7DC0A9, var(--mint-deep)); }
.step:nth-child(4) .step-num { background: linear-gradient(135deg, var(--brand-deep), var(--brand-ink)); }
.step:hover .step-num { animation: pop .5s ease; }
.step h3 { margin: 0 0 .35rem; font-size: 1.07rem; color: var(--ink); }
.step p { margin: 0; font-size: .93rem; color: var(--ink-2); line-height: 1.75; }

/* ---------- 常見問題 ---------- */
.faq-wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 5vw, 3.5rem); align-items: center; }
.faq-art svg { width: 100%; height: auto; max-width: 380px; display: block; margin: 0 auto; overflow: visible; }
.art-float { animation: bob 6s ease-in-out infinite; }
.art-bob { animation: bob 4.5s ease-in-out infinite; animation-delay: -1.5s; }
.art-twinkle { transform-box: fill-box; transform-origin: center; animation: twinkle 3s ease-in-out infinite; }
.faq-list { display: flex; flex-direction: column; gap: .75rem; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); overflow: hidden; transition: border-color .2s ease, box-shadow .2s ease; }
.faq-item[open] { border-color: var(--brand); box-shadow: var(--shadow); }
.faq-item summary { cursor: pointer; list-style: none; padding: 1rem 3.2rem 1rem 1.2rem; font-weight: 700; position: relative; color: var(--ink); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 1rem; top: 50%; width: 28px; height: 28px; margin-top: -14px; border-radius: 50%;
  background: var(--brand-soft); color: var(--brand-deep); display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem; line-height: 1; transition: transform .25s ease, background .25s ease, color .25s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); background: var(--brand-deep); color: #fff; }
.faq-item p { margin: 0; padding: 0 1.2rem 1.1rem; color: var(--ink-2); font-size: .95rem; animation: fadeDown .3s ease; }

/* ---------- 回到頁首 ---------- */
.to-top {
  position: fixed; right: 1.1rem; bottom: 1.1rem; width: 46px; height: 46px; border-radius: 50%; border: none;
  background: linear-gradient(135deg, var(--brand), var(--brand-deep)); color: #fff; box-shadow: var(--shadow); cursor: pointer;
  display: flex; align-items: center; justify-content: center; opacity: 0; transform: translateY(12px) scale(.9);
  pointer-events: none; transition: opacity .25s ease, transform .25s ease; z-index: 90;
}
.to-top.is-show { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { transform: translateY(-3px); }
.to-top svg { width: 20px; height: 20px; }

/* ---------- 響應式 ---------- */
@media (max-width: 900px) {
  .float-chip { display: none; }
  .blob-3, .deco-ring, .hero-deco .s2 { display: none; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 2rem; }
  .steps::before { display: none; }
  .faq-wrap { grid-template-columns: 1fr; }
  .faq-art svg { max-width: 250px; }
}
@media (max-width: 700px) {
  .stat-item + .stat-item::before { display: none; }
  .page-deco .pd-ring { width: 96px; height: 96px; right: -24px; margin-top: -60px; }
  .page-deco .pd-dot, .page-deco .pd-c { display: none; }
  .hours-legend .total { margin-left: 0; }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; row-gap: 1.3rem; }
  .step { display: grid; grid-template-columns: 56px 1fr; column-gap: 1rem; text-align: left; align-items: start; padding: 0; }
  .step-num { width: 56px; height: 56px; margin: 0; grid-row: span 2; font-size: 1.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .spark, .hero-deco .blob, .deco-ring, .float-chip, header::after, .cta-band, .cta-band::before,
  .page-deco *, .section--mint::before, .art-float, .art-bob, .art-twinkle, .hero h1 em::after { animation: none !important; }
  html.js .reveal.stagger > * { opacity: 1 !important; transform: none !important; }
  html.js .hours-bar.reveal .hours-track span { flex-basis: var(--w); transition: none; }
}
