/* Serya 深海夜光（全站共用；子頁另載 sub.css）。全站深藍單一主題，置中標題 + 卡片網格；互動集中在游標光點、捲動淡入、流程進度線、FAQ 展開。 */
:root {
  --bg: #060D22;
  --bg-2: #081230;
  --panel: #0C1838;
  --panel-2: #12245A;
  --line: rgba(148, 173, 255, .16);
  --line-hi: rgba(143, 176, 255, .5);
  --ink: #EAF0FF;
  --soft: #93A3CC;
  --label: #8FB0FF;
  --blue: #4F7DFF;
  --blue-press: #3D6BF0;
  --blue-deep: #2F5BDF;
  --glow: 45, 91, 255;
  --error: #FF8A8A;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --gl: max(20px, env(safe-area-inset-left, 0px));
  --gr: max(20px, env(safe-area-inset-right, 0px));
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 1.0625rem; line-height: 1.75; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { text-wrap: balance; }
/* 斷行：短句只在標點斷行；長段落（.when、.checks、FAQ 答案）用一般中文斷行。anywhere 必留，避免手機溢出。 */
h1, h2, h3, blockquote, summary, label, .tags li, .lead, .eyebrow, .hero p, .svc b, .svc span, .case-txt p, .steps p, .assure li, .note { word-break: keep-all; overflow-wrap: anywhere; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--label); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgba(var(--glow), .6); color: #fff; }
.w { max-width: 1240px; margin: 0 auto; padding-left: var(--gl); padding-right: var(--gr); }
section[id] { scroll-margin-top: 80px; }

/* nav */
.nav { position: sticky; top: 0; z-index: 40; padding-top: env(safe-area-inset-top, 0px); transition: background .3s, border-color .3s; border-bottom: 1px solid transparent; }
.nav.scrolled { background: rgba(6, 13, 34, .82); backdrop-filter: blur(14px) saturate(1.4); border-color: var(--line); }
.nav .w { display: flex; justify-content: space-between; align-items: center; min-height: 72px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.125rem; text-decoration: none; color: var(--ink); }
.brand img { width: 24px; filter: drop-shadow(0 0 10px rgba(79, 125, 255, .6)); }
.links { display: flex; gap: 4px; }
.links a { position: relative; text-decoration: none; color: var(--soft); font-size: .9375rem; padding: 10px 14px; border-radius: 8px; transition: color .2s; }
.links a:hover { color: var(--ink); }
.links a.on { color: var(--ink); }
.links a.on::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 2px; border-radius: 2px; background: var(--blue); box-shadow: 0 0 10px rgba(var(--glow), .9); }
.menu { display: none; width: 48px; height: 48px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--ink); cursor: pointer; }
.menu svg { margin: auto; }
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; background: var(--blue-press); color: #fff; text-decoration: none; font: 700 .9375rem/1 var(--sans); border: 0; border-radius: 10px; cursor: pointer; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), 0 8px 32px -8px rgba(var(--glow), .75); transition: background .2s, box-shadow .3s; }
.btn::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120px circle at var(--bx, 50%) var(--by, 50%), rgba(255, 255, 255, .1), transparent 70%); opacity: 0; transition: opacity .3s; }
.btn:hover { background: var(--blue-deep); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2), 0 10px 40px -6px rgba(var(--glow), .95); }
.btn:hover::before { opacity: 1; }
.btn svg { position: relative; transition: transform .4s cubic-bezier(.34, 1.56, .64, 1); }
.btn:hover svg { transform: translateX(4px); }
.btn span { position: relative; }
.btn-lg { min-height: 60px; padding: 0 30px; font-size: 1.0625rem; }
.btn[disabled] { background: #34406A; box-shadow: none; cursor: progress; }
@media (max-width: 860px) {
  .menu { display: grid; }
  .nav .btn { display: none; }
  .links { display: none; position: absolute; top: calc(100% + 8px); left: var(--gl); right: var(--gr); flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 8px; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .8); }
  .links.open { display: flex; }
  .links a { min-height: 48px; display: flex; align-items: center; }
  .links a.on::after { display: none; }
}

/* hero */
.hero { position: relative; overflow: hidden; margin-top: -73px; padding-block: calc(73px + clamp(88px, 12vw, 170px)) clamp(110px, 13vw, 190px); text-align: center; isolation: isolate; }
.hero::before { content: ""; position: absolute; left: var(--mx, 50%); top: var(--my, 10%); width: min(1100px, 150vw); aspect-ratio: 1; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(var(--glow), .55), rgba(var(--glow), .12) 55%, transparent 72%); transition: left .8s var(--ease), top .8s var(--ease); z-index: -1; pointer-events: none; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(rgba(201, 213, 255, .14) 1px, transparent 1px); background-size: 28px 28px; -webkit-mask-image: radial-gradient(60% 55% at 50% 45%, #000, transparent 75%); mask-image: radial-gradient(60% 55% at 50% 45%, #000, transparent 75%); pointer-events: none; }
.key { display: inline-flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: rgba(12, 24, 56, .7); font-size: .9375rem; color: #C9D5FF; margin-bottom: 36px; }
.key::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #6FE3FF; box-shadow: 0 0 12px #6FE3FF; animation: blink 2.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .35; } }
.hero h1 { font-weight: 900; font-size: clamp(2.75rem, 8.4vw, 7.25rem); line-height: 1.08; letter-spacing: -.01em; }
.hero h1 .key-wrap { display: block; font-size: 1rem; font-weight: 500; letter-spacing: 0; line-height: 1; }
.hero h1 .dim { background: linear-gradient(180deg, #A9BCF2, #5E78C9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--soft); max-width: 32em; margin: 32px auto 0; font-size: 1.1875rem; }
.cta { display: flex; flex-direction: column; align-items: center; gap: 16px; margin-top: 44px; }
.note { color: var(--soft); font-size: .9375rem; }
.hero-line { position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(120, 150, 255, .5), transparent); }

/* 區塊共用 */
.sec { padding-block: clamp(96px, 11vw, 150px); position: relative; }
.head { text-align: center; max-width: 1000px; margin: 0 auto; }
.eyebrow { font-size: .875rem; color: var(--label); letter-spacing: .16em; font-weight: 700; }
h2 { font-weight: 900; font-size: clamp(2rem, 4.6vw, 3.5rem); line-height: 1.2; margin-top: 16px; }
.lead { color: var(--soft); margin: 20px auto 0; max-width: 40em; text-wrap: balance; }

/* 游標光點卡片（服務、作品、創辦人共用） */
.spot { position: relative; border: 1px solid var(--line); background-color: var(--panel); transition: border-color .3s, transform .5s var(--ease); }
.spot::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: radial-gradient(360px circle at var(--cx, -200px) var(--cy, -200px), rgba(var(--glow), .2), transparent 60%); opacity: 0; transition: opacity .4s; pointer-events: none; }
.spot:hover { border-color: var(--line-hi); }
.spot:hover::before { opacity: 1; }
.spot > * { position: relative; }

/* 服務 */
.svc { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 64px; }
.svc a { display: flex; flex-direction: column; min-height: 180px; padding: 28px; border-radius: 14px; text-decoration: none; background-image: linear-gradient(180deg, rgba(20, 36, 82, .9), rgba(12, 24, 56, .9)); }
.svc a:hover { transform: translateY(-4px); }
.svc small { color: var(--label); font-size: .8125rem; font-weight: 700; letter-spacing: .12em; }
.svc b { font-size: 1.375rem; margin-top: 14px; }
.svc span { color: var(--soft); font-size: .9375rem; margin-top: 8px; }
.svc .go { box-sizing: content-box; margin-top: auto; padding-top: 20px; color: var(--soft); transition: color .3s, transform .4s cubic-bezier(.34, 1.56, .64, 1); }
.svc a:hover .go { color: var(--ink); transform: translateX(6px); }
.svc li:first-child { grid-row: span 2; }
.svc li:first-child a { height: 100%; justify-content: flex-end; background-image: radial-gradient(120% 80% at 100% 0%, rgba(var(--glow), .45), transparent 60%), linear-gradient(180deg, #14296A, #0E1D48); }
.svc li:first-child b { font-size: clamp(1.75rem, 2.6vw, 2.25rem); }
.svc li:first-child span { font-size: 1.0625rem; }
.svc li:first-child .go { margin-top: 0; }
.svc li { display: flex; }
.svc li > a { flex: 1; }
@media (max-width: 1000px) { .svc { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .svc { grid-template-columns: 1fr; } .svc li:first-child { grid-row: auto; } }

/* 作品 */
.cases { display: grid; gap: 20px; margin-top: 64px; }
.case { display: grid; grid-template-columns: 1fr 1fr; border-radius: 20px; overflow: hidden; text-decoration: none; }
.case-txt { padding: clamp(28px, 4vw, 56px); display: flex; flex-direction: column; justify-content: center; }
.case h3 { font-weight: 900; font-size: clamp(1.625rem, 2.8vw, 2.25rem); line-height: 1.3; margin-top: 12px; }
.case p { color: var(--soft); margin-top: 16px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.tags li { font-size: .8125rem; padding: 4px 10px; border-radius: 6px; background: rgba(79, 125, 255, .14); color: #C9D5FF; }
.more { display: inline-flex; align-items: center; gap: 8px; margin-top: 28px; font-weight: 700; color: var(--ink); }
.more svg { transition: transform .4s cubic-bezier(.34, 1.56, .64, 1); }
.case:hover .more svg { transform: translateX(6px); }
.shots { display: flex; gap: 14px; align-items: flex-end; justify-content: center; padding: 48px 28px 0; background: radial-gradient(80% 70% at 50% 100%, rgba(var(--glow), .45), transparent 70%), #0A1430; overflow: hidden; }
.shots img { width: 30%; max-width: 170px; border-radius: 14px 14px 0 0; transition: transform .7s var(--ease); }
.case:hover .shots img:nth-child(1) { transform: translateY(-10px); }
.case:hover .shots img:nth-child(2) { transform: translateY(-20px); }
.case:hover .shots img:nth-child(3) { transform: translateY(-10px); }
.shots.wide { align-items: center; padding: 40px; }
.shots.wide img { width: 100%; max-width: none; border-radius: 10px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8); }
.case:hover .shots.wide img { transform: scale(1.02); }
@media (max-width: 860px) { .case { grid-template-columns: 1fr; } }

/* 關於 */
.people { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 64px; }
.person { border-radius: 20px; padding: clamp(28px, 4vw, 44px); background-image: linear-gradient(160deg, rgba(var(--glow), .16), transparent 60%); display: flex; flex-direction: column; }
.person .mark { font-size: 4rem; line-height: .6; font-weight: 900; color: var(--blue); opacity: .6; height: 32px; }
.person blockquote { font-size: clamp(1.25rem, 2.2vw, 1.625rem); font-weight: 700; line-height: 1.6; }
.person figcaption { margin-top: auto; padding-top: 28px; color: var(--soft); font-size: .9375rem; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 28px; }
.person figcaption b { color: var(--ink); }
.stack { margin-top: 48px; text-align: center; }
.stack b { display: block; font-size: .875rem; color: var(--label); letter-spacing: .16em; margin-bottom: 16px; }
.stack .tags { justify-content: center; margin-top: 0; }
.stack .tags li { font-size: .9375rem; padding: 6px 14px; border: 1px solid var(--line); background: transparent; transition: border-color .2s, background .2s; }
.stack .tags li:hover { border-color: var(--line-hi); background: rgba(79, 125, 255, .14); }
@media (max-width: 860px) { .people { grid-template-columns: 1fr; } }

/* 流程：一條會隨捲動亮起的進度線 */
.steps { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 72px; }
.track { position: absolute; left: 28px; right: 28px; top: 20px; height: 2px; background: var(--line); }
.track i { display: block; height: 100%; width: calc(var(--p, 0) * 100%); background: linear-gradient(90deg, var(--blue), #8FB0FF); box-shadow: 0 0 12px rgba(var(--glow), .9); }
.steps li { position: relative; padding-top: 64px; }
.steps .dot { position: absolute; left: 20px; top: 12px; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); border: 2px solid var(--line-hi); transition: background .4s, border-color .4s, box-shadow .4s; }
.steps li.lit .dot { background: var(--blue); border-color: #BFD0FF; box-shadow: 0 0 0 6px rgba(var(--glow), .2), 0 0 18px rgba(var(--glow), .9); }
.steps em { font-style: normal; font-weight: 900; font-size: 2.5rem; line-height: 1; background: linear-gradient(180deg, #8FB0FF, #2D5BFF); -webkit-background-clip: text; background-clip: text; color: transparent; }
.steps h3 { font-size: 1.25rem; margin: 16px 0 8px; }
.steps p { color: var(--soft); font-size: .9375rem; padding-right: 12px; }
@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; gap: 0; }
  .track { left: 28px; right: auto; top: 20px; bottom: 20px; width: 2px; height: auto; }
  .track i { width: 100%; height: calc(var(--p, 0) * 100%); }
  .steps li { padding: 0 0 40px 68px; }
  .steps .dot { top: 12px; }
}

/* FAQ */
.faq-grid { display: grid; grid-template-columns: 4fr 8fr; gap: 48px; }
.faq-grid .head { text-align: left; margin: 0; position: sticky; top: 120px; align-self: start; }
.faq-grid h2 { font-size: clamp(2rem, 3.4vw, 2.75rem); }
.faq-grid h2 span { white-space: nowrap; }
.faq-grid .lead { margin-left: 0; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 76px; font-size: 1.125rem; font-weight: 700; transition: color .2s; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: #fff; }
.faq .pm { flex: none; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); display: grid; place-items: center; transition: background .3s, border-color .3s; }
.faq .pm svg { transition: transform .4s var(--ease); }
.faq details[open] .pm { background: var(--blue); border-color: var(--blue); }
.faq details[open] .pm svg { transform: rotate(45deg); }
.faq .ans { overflow: hidden; height: 0; transition: height .45s var(--ease); }
.faq details[open] .ans { height: auto; }
.faq .ans p { color: var(--soft); padding: 0 56px 28px 0; }
@media (max-width: 860px) { .faq-grid { grid-template-columns: 1fr; gap: 32px; } .faq-grid .head { position: static; } }

/* contact */
.contact { position: relative; overflow: hidden; isolation: isolate; }
.contact::before { content: ""; position: absolute; left: 20%; bottom: -40%; width: min(1000px, 150vw); aspect-ratio: 1; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(var(--glow), .4), transparent 70%); z-index: -1; }
.contact-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: start; }
.contact h2 { font-size: clamp(2.25rem, 5vw, 4rem); margin-top: 16px; }
.assure { margin-top: 32px; display: grid; gap: 14px; }
.assure li { display: flex; gap: 12px; align-items: center; color: #C9D5FF; }
.assure svg { flex: none; color: #6FE3FF; }
.mail { display: inline-block; margin-top: 32px; font-size: 1.25rem; font-weight: 700; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line-hi); padding-bottom: 2px; transition: border-color .2s; }
.mail:hover { border-color: var(--ink); }
form { border-radius: 20px; padding: clamp(24px, 4vw, 44px); display: grid; grid-template-columns: 1fr 1fr; gap: 20px; background-color: rgba(12, 24, 56, .85); backdrop-filter: blur(6px); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8); }
form .full { grid-column: 1 / -1; }
label { display: block; font-size: .9375rem; font-weight: 700; margin-bottom: 8px; }
label small { color: var(--soft); font-weight: 400; font-size: .875rem; margin-left: 6px; }
input, textarea { width: 100%; font: inherit; color: var(--ink); background: rgba(6, 13, 34, .7); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; min-height: 52px; transition: border-color .2s, box-shadow .2s, background .2s; }
textarea { min-height: 128px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #5E6C93; }
input:hover, textarea:hover { border-color: rgba(143, 176, 255, .32); }
input:focus, textarea:focus { outline: none; border-color: var(--blue); background: rgba(6, 13, 34, .95); box-shadow: 0 0 0 4px rgba(var(--glow), .25); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--error); }
.err { display: block; min-height: 0; color: var(--error); font-size: .875rem; margin-top: 6px; }
.err:empty { display: none; }
.cf-turnstile { grid-column: 1 / -1; min-height: 65px; min-width: 0; }
.privacy { color: var(--soft); font-size: .875rem; }
.privacy a { color: #C9D5FF; }
form .btn { width: 100%; }
.result { font-size: .9375rem; }
.result:empty { display: none; }
.result.fail { background: rgba(255, 138, 138, .1); border: 1px solid rgba(255, 138, 138, .4); color: var(--error); padding: 12px 14px; border-radius: 10px; }
.result.ok { background: rgba(111, 227, 255, .1); border: 1px solid rgba(111, 227, 255, .35); color: #C9F4FF; padding: 12px 14px; border-radius: 10px; }
@media (max-width: 960px) { .contact-grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { form { grid-template-columns: 1fr; } .hero .btn-lg { width: 100%; } }

/* footer */
footer { border-top: 1px solid var(--line); padding-block: 64px 40px; color: var(--soft); font-size: .9375rem; }
.foot { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; }
.foot p { margin-top: 16px; line-height: 1.9; }
.foot-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.foot-cols b { display: block; color: var(--ink); font-size: .875rem; letter-spacing: .12em; margin-bottom: 12px; }
.foot-cols a { display: flex; align-items: center; min-height: 40px; text-decoration: none; transition: color .2s; }
.foot-cols a:hover { color: var(--ink); }
.copy { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); font-size: .875rem; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
@media (max-width: 860px) { .foot { grid-template-columns: 1fr; } }
@media (max-width: 520px) { .foot-cols { grid-template-columns: 1fr 1fr; } }

/* 捲動淡入 */
.rv { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s var(--ease); }
.rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation: none !important; }
}
