/* Serya 深海夜光：子頁（服務頁、案例頁）專用規則。載入順序 site.css → sub.css。token、nav、footer、按鈕、.spot、.svc、.steps、.rv 都在 site.css，這裡只放子頁才有的東西。 */

/* hero：比首頁矮，靠左，光暈與點格沿用 .hero */
.sub-hero { text-align: left; padding-block: calc(73px + clamp(40px, 6vw, 80px)) clamp(56px, 7vw, 96px); }
.sub-hero::before { left: var(--mx, 30%); top: var(--my, 20%); width: min(900px, 140vw); }
.sub-hero::after { -webkit-mask-image: radial-gradient(60% 70% at 30% 40%, #000, transparent 75%); mask-image: radial-gradient(60% 70% at 30% 40%, #000, transparent 75%); }
.crumb { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; min-height: 32px; color: var(--soft); font-size: .9375rem; }
.crumb a { display: inline-flex; align-items: center; min-height: 48px; color: var(--soft); text-decoration: none; transition: color .2s; }
.crumb a:hover { color: var(--ink); }
.crumb [aria-current] { color: var(--ink); }
.sub-hero .eyebrow { display: block; margin-top: 28px; }
.sub-hero h1 { font-weight: 900; font-size: clamp(2.5rem, 6.4vw, 5rem); line-height: 1.12; letter-spacing: -.01em; margin-top: 12px; }
.sub-hero .en { margin: 8px 0 0; max-width: none; font-size: 1.125rem; color: var(--label); letter-spacing: .04em; font-weight: 500; }
.sub-hero .desc { margin: 24px 0 0; max-width: 34em; font-size: 1.1875rem; color: #C9D5FF; }
.sub-hero .locale { margin: 12px 0 0; max-width: none; font-size: .9375rem; }
.sub-hero .cta { align-items: flex-start; margin-top: 36px; }

/* 子頁區塊：標題區比首頁靠近內容 */
.sub-sec { padding-block: clamp(72px, 8vw, 112px); }
.sub-sec .head h2 { font-size: clamp(1.75rem, 3.6vw, 2.75rem); margin-top: 0; }
.sub-sec .head .eyebrow + h2 { margin-top: 16px; }
.sub-sec .head + * { margin-top: 48px; }
.sub-sec + .sub-sec { border-top: 1px solid var(--line); }

/* 什麼時候需要：三張光點卡，上方一顆發光小點 */
.when { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.when li { display: flex; }
.when .spot { flex: 1; display: flex; flex-direction: column; padding: 28px; border-radius: 14px; background-image: linear-gradient(180deg, rgba(20, 36, 82, .9), rgba(12, 24, 56, .9)); }
.when .spot::after { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 5px rgba(var(--glow), .2), 0 0 14px rgba(var(--glow), .9); margin-bottom: 20px; order: -1; }
@media (max-width: 860px) { .when { grid-template-columns: 1fr; } }

/* 服務內容：方形勾選框清單 */
.deliver { border-radius: 20px; padding: clamp(24px, 4vw, 44px); background-image: linear-gradient(160deg, rgba(var(--glow), .16), transparent 60%); }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 40px; }
.checks li { display: flex; align-items: center; gap: 14px; min-height: 48px; font-weight: 500; border-bottom: 1px solid var(--line); }
.checks .box { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; border: 1px solid var(--line-hi); background: rgba(var(--glow), .2); color: #BFD0FF; box-shadow: 0 0 12px rgba(var(--glow), .4); }
.fit { margin-top: 28px; color: var(--soft); }
.fit b { color: var(--label); font-weight: 700; letter-spacing: .08em; margin-right: 8px; }
@media (max-width: 760px) { .checks { grid-template-columns: 1fr; } }

/* 其他服務：沿用首頁 .svc 卡片，改成等寬三欄（第一張不放大） */
.svc.flat { margin-top: 48px; grid-template-columns: repeat(3, 1fr); }
.svc.flat li:first-child { grid-row: auto; }
.svc.flat li:first-child a { height: auto; justify-content: flex-start; background-image: linear-gradient(180deg, rgba(20, 36, 82, .9), rgba(12, 24, 56, .9)); }
.svc.flat li:first-child b { font-size: 1.375rem; }
.svc.flat li:first-child span { font-size: .9375rem; }
.svc.flat li:first-child .go { margin-top: auto; }
@media (max-width: 1000px) { .svc.flat { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .svc.flat { grid-template-columns: 1fr; } }

/* 結尾 CTA */
.sub-cta { text-align: center; border-top: 1px solid var(--line); padding-block: clamp(88px, 10vw, 136px); }
.sub-cta::before { left: 50%; bottom: -60%; }
.sub-cta h2 { margin-top: 0; }
.sub-cta .cta { margin-top: 36px; }
.sub-cta .mail { margin-top: 0; font-size: 1.125rem; }
@media (max-width: 560px) { .sub-hero .btn-lg, .sub-cta .btn-lg { width: 100%; } }

/* 斷行：子頁 hero 的短句只在標點斷行 */
.sub-hero .en, .sub-hero .desc, .sub-hero .locale { word-break: keep-all; overflow-wrap: anywhere; }

/* ===== 案例頁 ===== */
.case-grid { display: grid; grid-template-columns: 4fr 8fr; gap: 24px 64px; align-items: start; }
.case-grid > h2 { font-weight: 900; font-size: clamp(1.75rem, 3.2vw, 2.5rem); line-height: 1.25; word-break: keep-all; overflow-wrap: anywhere; position: sticky; top: 120px; }
@media (max-width: 1023px) { .case-grid { grid-template-columns: 1fr; } .case-grid > h2 { position: static; } }
.case-prose p, .facts p { color: var(--soft); font-size: 1.0625rem; line-height: 1.85; }
.case-prose > * + * { margin-top: 20px; }
.case-prose p { word-break: normal; overflow-wrap: break-word; }
.case-points { display: grid; gap: 12px; counter-reset: pt; }
.case-points li { counter-increment: pt; position: relative; padding: 18px 22px 18px 64px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: var(--soft); line-height: 1.75; }
.case-points li::before { content: counter(pt); position: absolute; left: 20px; top: 18px; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line-hi); background: rgba(var(--glow), .2); color: #BFD0FF; font-weight: 700; font-size: .9375rem; box-shadow: 0 0 12px rgba(var(--glow), .4); }
.case-points b { display: block; color: var(--ink); font-weight: 700; margin-bottom: 2px; word-break: keep-all; overflow-wrap: anywhere; }
.case-facts { display: grid; gap: 10px; }
.case-facts li { position: relative; padding-left: 22px; color: var(--ink); line-height: 1.75; }
.case-facts li::before { content: ""; position: absolute; left: 0; top: .72em; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 4px rgba(var(--glow), .2), 0 0 12px rgba(var(--glow), .9); }
.case-prose .case-note { padding-top: 20px; border-top: 1px solid var(--line); font-size: .9375rem; word-break: keep-all; overflow-wrap: anywhere; }
.case-deliver .checks li { align-items: flex-start; padding-block: 14px; font-weight: 400; color: var(--soft); line-height: 1.75; }
.case-deliver .checks .box { margin-top: 2px; }
.case-deliver .checks b { display: block; color: var(--ink); font-weight: 700; word-break: keep-all; overflow-wrap: anywhere; }
.case-shots { display: flex; gap: 20px; margin-top: 32px; justify-content: center; align-items: flex-start; }
.case-shots li { flex: 1 1 0; min-width: 0; max-width: 300px; }
.case-shots.wide { display: grid; grid-template-columns: 1fr 1fr; }
.case-shots.wide li { max-width: none; }
.case-shots figure { margin: 0; }
.case-shots img { display: block; width: 100%; height: auto; border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8); background: var(--panel); }
.case-shots figcaption { margin-top: 12px; color: var(--soft); font-size: .9375rem; line-height: 1.6; word-break: keep-all; overflow-wrap: anywhere; }
@media (max-width: 760px) { .case-shots { flex-direction: column; align-items: center; } .case-shots li { max-width: 320px; width: 100%; } .case-shots.wide { grid-template-columns: 1fr; } .case-shots.wide li { max-width: none; } }
.facts li { padding: 22px 0; border-bottom: 1px solid var(--line); }
.facts li:first-child { padding-top: 0; }
.facts h3 { font-weight: 700; font-size: 1.25rem; line-height: 1.5; color: var(--ink); margin-bottom: 8px; word-break: keep-all; overflow-wrap: anywhere; }
.facts p { word-break: normal; overflow-wrap: break-word; }
.sub-hero .note.case-out { display: inline-flex; align-items: center; min-height: 48px; color: var(--label); text-decoration: none; font-weight: 700; word-break: keep-all; }
.sub-hero .note.case-out:hover { color: var(--ink); }
.sub-hero .cta { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; }

/* ===== 隱私說明：深色文件頁 ===== */
.doc-body { max-width: 46em; margin-inline: auto; color: var(--soft); font-size: 1.0625rem; line-height: 1.9; word-break: normal; overflow-wrap: break-word; }
.doc-body > * + * { margin-top: 18px; }
.doc-body h2 { margin-top: 56px; font-weight: 900; font-size: clamp(1.375rem, 2.4vw, 1.75rem); line-height: 1.4; color: var(--ink); text-align: left; word-break: keep-all; overflow-wrap: anywhere; }
.doc-body ul, .doc-body ol { padding-left: 1.4em; }
.doc-body ul { list-style: disc; }
.doc-body ol { list-style: decimal; }
.doc-body li + li { margin-top: 8px; }
.doc-body li::marker { color: var(--label); }
.doc-body a { color: var(--label); text-decoration: underline; text-underline-offset: 3px; }
.doc-body a:hover { color: var(--ink); }

/* ===== 404 ===== */
.err-page { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 48px 20px; position: relative; overflow: hidden; isolation: isolate; }
.err-page::before { content: ""; position: absolute; left: 50%; top: 40%; width: min(900px, 140vw); aspect-ratio: 1; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(var(--glow), .4), rgba(var(--glow), .1) 60%, transparent 75%); z-index: -1; }
.err-logo { width: 48px; height: auto; filter: drop-shadow(0 0 10px rgba(79, 125, 255, .6)); }
.err-code { margin-top: 24px; font-weight: 900; font-size: clamp(5rem, 22vw, 11rem); line-height: 1; letter-spacing: -.01em; background: linear-gradient(180deg, #A9BCF2, #5E78C9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.err-page h1 { margin-top: 8px; font-weight: 900; font-size: clamp(1.75rem, 4vw, 2.5rem); }
.err-msg { margin-top: 16px; max-width: 30em; color: var(--soft); font-size: 1.0625rem; line-height: 1.8; word-break: keep-all; overflow-wrap: anywhere; }
.err-page .btn { margin-top: 36px; }
@media (max-width: 560px) { .err-page .btn { width: 100%; max-width: 320px; } }
