/* 常見問題（faq.html）。共用的在 site.css
   段落：深 首屏（標題＋分類跳轉）→ 淺 問答（一個分類一組，點開看答案）→ 頁尾
   不放背景動畫、不放 sticky：這頁是拿來讀的，捲動要順 */

/* ---------- 01 首屏：跟首頁同一套——右邊點燃的光環（中央 FAQ.），左欄說明＋「問泰坦」對話列 ---------- */
/* 矮版首屏：不撐滿螢幕，只留內容要的高度，答案早一點露出來；光環縮一級 */
.hero.fq-hero { min-height: 0; padding: clamp(120px, 15vh, 150px) 0 clamp(56px, 8vh, 80px); }
.fq-hero .fq-world { --S: min(54vh, 32vw); right: max(4vw, calc(50% - 640px)); transform: translateY(-44%); }
.hero .fq-h1 { font-size: clamp(40px, 4.6vw, 78px); line-height: 1.18; font-weight: 300; letter-spacing: .01em; margin: 0; color: var(--ink); animation: fade 1.2s var(--ease) .9s both; }
.hero .fq-h1 b { font-weight: 900; }
.fq-lead { margin-top: 24px; max-width: 30em; animation: fade 1.2s var(--ease) 1.1s both; }

/* 問泰坦：一條深色玻璃對話列，排在說明下面，跟標題、說明同一條左邊線、同一個寬度；問題一個字一個字打出來 */
.fq-ask {
  position: relative; z-index: 2; margin-top: 36px; width: min(100%, 30em);
  display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 18px; border-radius: 16px; text-decoration: none; color: #F2F1EE;
  background: rgba(16, 16, 20, .86); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 255, 255, .12), 0 0 40px -10px rgba(237, 28, 36, .45);
  transition: box-shadow .3s var(--ease); animation: fade 1.2s var(--ease) 1.3s both;
}
.fq-ask:hover, .fq-ask:focus-visible { box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 90, 94, .7), 0 0 50px -8px rgba(237, 28, 36, .6); outline: none; }
.fq-ask-k { flex: none; display: flex; align-items: center; gap: 8px; font: 400 11.5px/1 var(--mono); letter-spacing: .12em; color: rgba(242, 241, 238, .6); padding-right: 14px; border-right: 1px solid rgba(255, 255, 255, .12); }
.fq-typed { flex: 1; min-width: 0; font-size: 16px; font-weight: 500; line-height: 1.5; min-height: 1.5em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fq-ask.typing:not(.done) .fq-typed::after { content: ""; display: inline-block; width: 2px; height: 1.05em; margin-left: 3px; vertical-align: -.18em; background: #FF4A4F; animation: blink 1s steps(2) infinite; }
.fq-ask-go { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #D3141B; font-family: var(--mono); transition: transform .3s var(--ease); }
.fq-ask:hover .fq-ask-go { transform: translateX(3px); }
.fq-ask.done .fq-ask-go { box-shadow: 0 0 18px rgba(255, 74, 79, .8); }
.fq-lead a { color: var(--ink); text-underline-offset: 4px; text-decoration-color: #FF4A4F; }
/* 分類目錄：問答區最上方一整排，八格平均排開 */
.fq-cats { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); margin-bottom: clamp(56px, 8vh, 88px); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--line-2); }
.fq-cats a { padding: 18px 8px; text-align: center; font-size: 15px; font-weight: 500; color: var(--ink); text-decoration: none; white-space: nowrap; transition: color .3s var(--ease), background-color .3s var(--ease); }
.fq-cats a + a { border-left: 1px solid var(--line); }
.fq-cats a:hover, .fq-cats a:focus-visible { color: var(--red-text); background: rgba(237, 28, 36, .05); }

/* ---------- 02 問答 ---------- */
.fq-main { min-height: 0; display: block; padding: clamp(72px, 10vh, 120px) 0 clamp(88px, 12vh, 140px); }
.fq-group { display: grid; grid-template-columns: minmax(0, .32fr) minmax(0, 1fr); gap: 16px clamp(32px, 5vw, 80px); align-items: start; scroll-margin-top: 96px; }
.fq-group + .fq-group { margin-top: clamp(56px, 8vh, 88px); }
.fq-gt { font-size: clamp(24px, 2.2vw, 34px); line-height: 1.3; font-weight: 900; color: var(--ink); padding-top: 22px; }
.fq-qs { border-top: 1px solid var(--ink); }
.fq-qs details { border-bottom: 1px solid var(--line-2); }
.fq-qs summary { display: flex; align-items: center; gap: 20px; padding: 22px 0; cursor: pointer; list-style: none; }
.fq-qs summary::-webkit-details-marker { display: none; }
.fq-qs summary h3 { flex: 1; font-size: clamp(18px, 1.5vw, 21px); line-height: 1.5; font-weight: 700; color: var(--ink); }
.fq-qs summary i { position: relative; flex: none; width: 16px; height: 16px; }
.fq-qs summary i::before, .fq-qs summary i::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1.5px; margin-top: -.75px; background: var(--red); transition: transform .35s var(--ease); }
.fq-qs summary i::after { transform: rotate(90deg); }
.fq-qs details[open] summary i::after { transform: rotate(0deg); }
.fq-qs summary:hover h3 { color: var(--red-text); }
.fq-qs summary:focus-visible { outline: 2px solid var(--red-text); outline-offset: 4px; }
.fq-qs details p { padding: 0 0 26px; max-width: 44em; font-size: 16.5px; line-height: 1.9; color: var(--ink-2); word-break: break-word; }
.fq-more { grid-column: 2; justify-self: start; margin-top: 6px; font-size: 15px; font-weight: 500; color: var(--ink); text-decoration: none; padding-bottom: 3px; border-bottom: 1px solid var(--line-2); transition: border-color .3s var(--ease); }
.fq-more:hover { border-color: var(--red-text); }
.fq-more span { font-family: var(--mono); margin-left: 4px; color: var(--red-text); }

/* 收尾：找不到答案就問我們 */
.fq-end { margin-top: clamp(72px, 10vh, 112px); padding: clamp(28px, 3.4vw, 48px); border-radius: 22px; background: #0F0F12; color: #F2F1EE; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; box-shadow: 0 50px 100px -60px rgba(237, 28, 36, .5), inset 0 0 0 1px rgba(255, 255, 255, .07); }
.fq-end-t { font-size: clamp(19px, 1.7vw, 25px); font-weight: 700; line-height: 1.55; }
.fq-end .btn { width: min(100%, 300px); }

/* ---------- 平板、手機 ---------- */
@media (max-width: 1080px) {
  .fq-hero .fq-world { --S: min(72vw, 340px); right: auto; transform: none; margin: 24px auto 0; }
  /* 目錄排成兩列，每列四格 */
  .fq-cats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .fq-cats a:nth-child(4n + 1) { border-left: 0; }
  .fq-cats a:nth-child(n + 5) { border-top: 1px solid var(--line); }
}
@media (max-width: 900px) {
  .fq-group { grid-template-columns: minmax(0, 1fr); }
  .fq-gt { padding-top: 0; }
  .fq-more { grid-column: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .hero .fq-h1, .fq-lead, .fq-ask { animation: none; }
}
@media (max-width: 760px) {
  .hero .fq-h1 { font-size: clamp(32px, 9vw, 42px); }
  .fq-ask { width: 100%; margin-top: 28px; }
  .hero.fq-hero { padding: 104px 0 24px; }
  .fq-hero .fq-world { --S: min(58vw, 240px); margin-top: 8px; }
  .fq-typed { white-space: normal; overflow: visible; min-height: 3em; display: flex; align-items: center; }
  .fq-ask-k { padding-right: 10px; }
  .fq-cats a { padding: 14px 4px; font-size: 14px; }
  .fq-end .btn { width: 100%; }
}
