/* 關於泰坦（contact.html）專用樣式。共用的在 site.css
   段落：深 首屏 → 深 三站 → 深 帶隊的人 → 淺 預約診斷 → 頁尾
   主角：首屏機甲巨人雙手捧著 Ditto 光環；往下捲光環離開巨人的手，一路變身：Echo 儀表 → AI 的聲紋 → 工程圖掃描 → 兩張照片 → 頁尾大光環 */

/* ---------- 01 首屏：跟首頁同一個結構——左邊大字，右邊會點燃的光環 ----------
   巨人交給字：「產業／巨人」兩行大字本身就是巨人。光環沿用首頁 .world 的位置和大小；
   中央放泰坦的標誌（首頁光環中央是「Ditto.」，這頁是泰坦自己）。不放任何人形。 */
.ab-hero { align-items: center; padding: 96px 0 56px; }
.ab-mark { position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: calc(var(--S) * .4); animation: appear 1.6s var(--ease) 1.5s both; }
.ab-mark img { display: block; width: 100%; height: auto; }

/* 標題：一行小字領進來，「產業／巨人」兩行大字一個字一個字落地 */
.ab-hero-in { position: relative; z-index: 2; opacity: calc(1 - var(--hp, 0) * 1.3); }
.ab-hero-in > * { max-width: min(46vw, 640px); }
.hero .ab-h1 { margin: 0; font-size: 16px; line-height: 1; letter-spacing: 0; font-weight: 700; }
.ab-h1-a { display: block; font-size: clamp(18px, 1.7vw, 26px); font-weight: 500; line-height: 1.5; letter-spacing: .14em; color: rgba(242, 240, 236, .86); animation: fade 1.2s var(--ease) .95s both; }
.ab-giant { display: block; margin-top: clamp(8px, 1.4vh, 16px); font-size: clamp(84px, 10.5vw, 196px); font-weight: 900; line-height: 1.04; letter-spacing: .06em; color: #F2F0EC; white-space: nowrap; }
.ab-giant > span { display: inline-block; animation: ab-land 1s cubic-bezier(.2, 1.15, .35, 1) both; }
.ab-giant > span:nth-of-type(1) { animation-delay: 1.05s; }
.ab-giant > span:nth-of-type(2) { animation-delay: 1.13s; }
.ab-giant > span:nth-of-type(3) { animation-delay: 1.21s; }
.ab-giant > span:nth-of-type(4) { animation-delay: 1.29s; }
@keyframes ab-land { 0% { opacity: 0; translate: 0 -38%; scale: 1.22; filter: blur(12px); } 55% { opacity: 1; filter: blur(0); } 100% { opacity: 1; translate: 0 0; scale: 1; } }
.ab-lead { margin: clamp(20px, 3.2vh, 34px) 0 0; font-size: 16.5px; line-height: 1.8; color: var(--ink-2); animation: fade 1.2s var(--ease) 1.55s both; }
.ab-lead b { color: var(--ink); font-weight: 700; }
.ab-more { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(18px, 2.6vh, 28px); animation: fade 1.2s var(--ease) 1.7s both; }
.ab-more .btn { min-width: 240px; }

/* ---------- 02 三站 ---------- */
.ab-route { display: block; padding-bottom: clamp(64px, 10vh, 120px); }
.ab-route-h { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px clamp(32px, 6vw, 96px); align-items: end; margin-bottom: clamp(32px, 6vh, 72px); }
.ab-route-h .eyebrow { grid-column: 1 / -1; }
.ab-route-h .h2 { font-size: clamp(32px, 3.6vw, 58px); line-height: 1.25; }

.ab-ch {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1.1fr) minmax(0, .9fr); grid-template-areas: "big vis txt";
  align-items: center; gap: clamp(24px, 4vw, 72px); min-height: min(92vh, 880px); padding: 6vh 0; border-top: 1px solid var(--line);
}
.ab-ch-r { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr) auto; grid-template-areas: "txt vis big"; }

/* 直排大字：先是極暗的字，捲過這一站時一層實心紅由上往下蓋滿 */
.ab-big { grid-area: big; --cp: 100%; position: relative; margin: 0; writing-mode: vertical-rl; justify-self: start; }
.ab-js .ab-big { --cp: 0%; }
.ab-big span { display: block; font-weight: 900; font-size: clamp(88px, 22vh, 210px); line-height: 1; letter-spacing: .02em; color: rgba(242, 240, 236, .08); }
.ab-big .ab-fill { position: absolute; inset: 0; color: #E8232B; clip-path: inset(0 0 calc(100% - var(--cp)) 0); }
.ab-vis { grid-area: vis; display: grid; place-items: center; min-width: 0; }
.ab-txt { grid-area: txt; max-width: 30em; }
.ab-n { font: 700 15px/1.3 var(--zh); letter-spacing: .08em; color: var(--ink); display: flex; align-items: baseline; gap: 12px; }
.ab-n b { font: 400 12px/1 var(--mono); letter-spacing: .1em; color: var(--red-text); }
.ab-txt h3 { margin-top: 18px; font-size: clamp(28px, 2.6vw, 42px); font-weight: 900; line-height: 1.2; color: var(--ink); }
.ab-txt h3 + p { margin-top: 18px; font-size: 16.5px; line-height: 1.85; color: var(--ink-2); }
.ab-go { display: inline-flex; align-items: center; gap: 10px; margin-top: 26px; padding-bottom: 4px; font-size: 15.5px; font-weight: 500; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-2); transition: border-color .3s var(--ease); }
.ab-go i { font-style: normal; font-family: var(--mono); color: #FF4A4F; transition: transform .4s var(--ease); }
.ab-go:hover { border-color: #FF4A4F; }
.ab-go:hover i { transform: translateX(5px); }

/* 三站的畫面 */
.ab-emb { justify-self: center; width: min(100%, 60vh); }
.ab-voice { width: min(100%, 540px); padding: 22px 24px 8px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 22px; background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .015)); box-shadow: 0 40px 90px -50px rgba(237, 28, 36, .5); }
.ab-voice-top { display: flex; align-items: center; gap: 10px; font: 500 14px/1 var(--zh); letter-spacing: .06em; color: var(--ink); }
.ab-voice-top span:last-child { margin-left: auto; font: 400 12px/1 var(--mono); letter-spacing: .12em; color: #FF6A6E; }
.ab-wave { position: relative; height: clamp(200px, 34vh, 320px); }
.ab-draw { width: 100%; margin: 0; }

.ab-route-end { margin-top: clamp(28px, 5vh, 48px); padding-top: clamp(28px, 5vh, 48px); border-top: 1px solid var(--line); font-size: clamp(18px, 1.7vw, 24px); font-weight: 700; line-height: 1.6; color: var(--ink); max-width: 36em; }
.ab-route-end::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 14px; background: var(--red); vertical-align: .12em; }

/* ---------- 03 帶隊的人：深底，兩張大照片 ---------- */
.ab-team { display: block; }
.ab-team-h { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px clamp(32px, 6vw, 96px); align-items: end; }
.ab-team-h .eyebrow { grid-column: 1 / -1; }
.ab-team-h .h2 { font-size: clamp(30px, 3.2vw, 50px); line-height: 1.3; }
/* 照片框寬約 330px：羅秦的原檔只有 653px 寬，這個大小在高解析度螢幕上剛好夠清楚 */
.ab-pics, .ab-bios, .ab-crew { max-width: 720px; margin-left: auto; margin-right: auto; }
.ab-pics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 3vw, 44px); margin-top: clamp(48px, 8vh, 88px); }
.ab-ph { position: relative; margin: 0; aspect-ratio: 4 / 5; border-radius: 18px; overflow: hidden; background: #1A1A1D; box-shadow: 0 50px 100px -60px rgba(237, 28, 36, .55), 0 0 0 1px rgba(255, 255, 255, .08); }
.ab-ph img { width: 100%; height: 100%; object-fit: cover; }
.ab-ph::after { content: ""; position: absolute; inset: auto 0 0; height: 34%; background: linear-gradient(180deg, rgba(11, 11, 13, 0), rgba(11, 11, 13, .55)); pointer-events: none; }
.ab-ph figcaption { position: absolute; left: 20px; bottom: 18px; z-index: 1; font: 400 12px/1 var(--mono); letter-spacing: .16em; color: #F2F0EC; }
.ab-ph figcaption::before { content: ""; display: inline-block; width: 18px; height: 3px; margin-right: 10px; background: var(--red); vertical-align: .25em; }
.ab-bios { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(16px, 3vw, 44px); margin-top: clamp(24px, 4vh, 36px); }
.ab-name { font-size: clamp(40px, 4.4vw, 68px); font-weight: 900; line-height: 1.05; letter-spacing: .02em; color: var(--ink); }
.ab-name span { display: block; margin-top: 12px; font-family: var(--wide); font-stretch: 125%; font-variation-settings: "wdth" 125; font-weight: 600; font-size: clamp(13px, 1vw, 15px); letter-spacing: .04em; color: var(--mute); }
.ab-bio ul { list-style: none; margin: 22px 0 0; padding: 0; }
.ab-bio li { position: relative; padding: 10px 0 10px 18px; border-top: 1px solid var(--line); font-size: 15.5px; line-height: 1.65; color: var(--ink-2); }
.ab-bio li::before { content: ""; position: absolute; left: 0; top: calc(10px + .62em); width: 5px; height: 5px; background: var(--red); }
.ab-crew { margin-top: clamp(40px, 6vh, 64px); padding-top: 24px; border-top: 1px solid var(--line-2); display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 56px; }
.ab-crew p:not(.lbl) { font-size: 16px; line-height: 1.6; color: var(--ink-2); }
.ab-crew b { color: var(--ink); font-weight: 700; margin-right: 12px; }

/* ---------- 04 預約診斷：淺底，左邊說明＋聯絡資料，右邊深色表單 ---------- */
.ct-hero { min-height: 0; align-items: flex-start; padding: clamp(96px, 14vh, 150px) 0 clamp(80px, 11vh, 128px); }
.ct-grid { grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr); }
.ct-l .eyebrow { margin-bottom: 24px; }
.ct-h1 { font-size: clamp(44px, 5.2vw, 84px); line-height: 1.16; font-weight: 300; letter-spacing: 0; }
.ct-h1 b { font-weight: 900; }
.ct-h1 .ct-p { font-weight: 300; color: var(--mute); }
.ct-lead { margin-top: 26px; max-width: 30em; }
.ct-l .info { margin-top: 36px; }
.ct-next { margin-top: 34px; }
.ct-flow { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 0; font-size: 15px; line-height: 1.5; color: var(--ink-2); }
.ct-flow li { display: flex; align-items: baseline; white-space: nowrap; }
.ct-flow li + li::before { content: "→"; font: 400 13px/1 var(--mono); color: var(--mute); margin: 0 12px; }
.ct-flow b { font: 400 11px/1 var(--mono); letter-spacing: .08em; color: var(--mute); margin-right: 7px; }
.ct-flow .now { color: var(--ink); font-weight: 700; }
.ct-flow .now b { color: var(--red-text); }
.ct-more { display: inline-block; margin-top: 18px; font-size: 15px; text-decoration: none; padding-bottom: 3px; border-bottom: 1px solid var(--line-2); transition: border-color .3s var(--ease); }
.ct-more:hover { border-color: var(--red-text); }
.ct-more span { font-family: var(--mono); margin-left: 4px; }
/* 底部不放表單了：一張深色卡，一句話＋一顆按鈕帶到聯絡我們 */
.ct-go { align-self: center; padding: clamp(28px, 3.4vw, 48px); border-radius: 22px; background: #0F0F12; color: #F2F1EE; box-shadow: 0 50px 100px -60px rgba(237, 28, 36, .5), inset 0 0 0 1px rgba(255, 255, 255, .07); }
.ct-go-t { font-size: clamp(20px, 1.9vw, 28px); font-weight: 700; line-height: 1.55; }
.ct-go .btn { margin-top: 28px; width: min(100%, 320px); }
.ct-gf-n { margin-left: auto; font: 400 13px/1.4 var(--zh); letter-spacing: .04em; color: rgba(242, 241, 238, .55); }

/* 表單的三種狀態：送出中一條紅線來回跑；送到了整張單亮一圈紅邊；失敗時訊息帶驚嘆號 */
.ct-form { scroll-margin-top: 110px; transition: border-color .5s var(--ease); }
.ct-form::after { content: ""; position: absolute; left: 22px; right: 22px; top: -1px; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: left center; pointer-events: none; }
.ct-form[data-state="sending"]::after { animation: ct-send 1.3s cubic-bezier(.7, 0, .3, 1) infinite; }
@keyframes ct-send { 0% { transform: scaleX(0); transform-origin: left center; } 50% { transform: scaleX(1); transform-origin: left center; } 50.1% { transform-origin: right center; } 100% { transform: scaleX(0); transform-origin: right center; } }
.ct-form[data-state="sending"] .msg:empty::before { content: "送出中…"; color: rgba(242, 241, 238, .7); }
.ct-form[data-state="sent"] { border-color: rgba(255, 90, 94, .55); }
.ct-form[data-state="sent"]::after { transform: scaleX(1); }
.ct-form[data-state="sent"] .msg { font-size: 16px; font-weight: 700; color: #fff; }
.ct-form[data-state="sent"] .msg::before { content: "✓"; display: inline-block; margin-right: 10px; color: #FF6A6E; }
.ct-form[data-state="error"] .msg::before { content: "!"; display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: 10px; border-radius: 50%; background: #D3141B; color: #fff; font: 700 12px/1 var(--mono); vertical-align: 1px; }
.ct-form:not([data-state="sending"]) .msg:empty::before { display: none; }

/* ---------- 減少動態：每個東西都直接是完成的樣子 ---------- */
@media (prefers-reduced-motion: reduce) {
  .ab-h1-a, .ab-giant > span, .ab-lead, .ab-more, .ab-mark { animation: none; }
}

/* ---------- 平板 ---------- */
@media (max-width: 1080px) {
  /* 窄螢幕：跟首頁一樣，大字在上、光環接在下面 */
  .ab-hero-in > * { max-width: none; }
  .ab-route-h, .ab-team-h { grid-template-columns: minmax(0, 1fr); align-items: start; }
  .ab-ch { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "big vis" "big txt"; min-height: 0; padding: 64px 0; }
  .ab-ch-r { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "vis big" "txt big"; }
  .ab-big span { font-size: clamp(80px, 13vw, 140px); }
  .ab-emb { width: min(100%, 440px); }
  .ct-grid { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .ct-l { display: contents; }
  .ct-form, .ct-go { order: 1; margin-top: 48px; }
  .ct-next { order: 2; margin-top: 44px; }
}

/* ---------- 手機 ---------- */
@media (max-width: 760px) {
  .ab-hero { padding-bottom: 40px; }
  .ab-h1-a { letter-spacing: .1em; font-size: 17px; }
  .ab-giant { font-size: 23vw; letter-spacing: .04em; }
  .ab-lead { font-size: 15.5px; }
  .ab-more { margin-top: 18px; }
  .ab-more .btn { width: 100%; }
  .ab-more .btn-ghost { display: none; }

  .ab-ch, .ab-ch-r { grid-template-columns: minmax(0, 1fr); grid-template-areas: "big" "vis" "txt"; gap: 24px; padding: 56px 0; }
  .ab-big { writing-mode: horizontal-tb; }
  .ab-big span { font-size: 25vw; letter-spacing: .04em; }
  .ab-big .ab-fill { clip-path: inset(0 calc(100% - var(--cp)) 0 0); }
  .ab-emb { width: min(100%, 330px); }
  .ab-voice { padding: 18px 18px 4px; }
  .ab-wave { height: 190px; }

  .ab-team-h .h2 { font-size: clamp(22px, 7.3vw, 30px); }
  .ab-pics { gap: 12px; }
  .ab-ph { border-radius: 12px; }
  .ab-ph figcaption { left: 12px; bottom: 12px; font-size: 10.5px; letter-spacing: .1em; }
  .ab-ph figcaption::before { width: 12px; margin-right: 6px; }
  .ab-bios { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .ab-crew { flex-direction: column; gap: 10px; }
  .ab-crew b { display: block; margin: 0 0 2px; }

  .ct-hero { padding: 88px 0 72px; }
  .ct-h1 { font-size: clamp(40px, 11.6vw, 52px); }
  .ct-lead { margin-top: 20px; }
  .ct-flow { flex-direction: column; gap: 8px; }
  .ct-flow li + li::before { display: none; }
  .ct-form .form-end .btn { width: 100%; }
  .gf-top { flex-wrap: wrap; row-gap: 8px; }
  .ct-gf-n { margin-left: 20px; flex-basis: 100%; }
}
