/* TJ Technology — site styles */
:root {
  --ink: #0a1520;
  --ink-2: #13283b;
  --brand: #1d5f8c;
  --brand-2: #2d86bf;
  --accent: #6cc4ee;
  --sand: #f4f1ea;
  --paper: #fbfaf7;
  --line: #e3e0d8;
  --text: #1c2630;
  --muted: #5d6974;
  --radius: 18px;
  --wrap: 1200px;
  --serif: "Noto Serif TC", "Songti TC", serif;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --latin: "Manrope", var(--sans);
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font: 400 16px/1.8 var(--sans); letter-spacing: .02em; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--serif); font-weight: 700; line-height: 1.3; letter-spacing: .03em; color: var(--ink); }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 700 12px/1 var(--latin); letter-spacing: .22em; text-transform: uppercase; color: var(--brand); margin-bottom: 18px; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.on-dark .eyebrow { color: var(--accent); }
.section { padding: 112px 0; }
.section.tight { padding: 80px 0; }
.section.sand { background: var(--sand); }
.section.dark { background: var(--ink); color: #c9d4de; }
.section.dark h2, .section.dark h3 { color: #fff; }
.h-xl { font-size: clamp(36px, 5.6vw, 72px); }
.h-lg { font-size: clamp(30px, 4vw, 48px); }
.h-md { font-size: clamp(22px, 2.4vw, 30px); }
.lead { font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); line-height: 1.9; }
.on-dark .lead, .dark .lead { color: #aebccb; }
.head { max-width: 760px; margin-bottom: 56px; }
.head.center { margin-left: auto; margin-right: auto; text-align: center; }
.head.center .eyebrow { justify-content: center; }
.head h2 + p { margin-top: 18px; }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 15px 28px; border-radius: 999px; font: 700 15px/1 var(--sans); letter-spacing: .06em; border: 1px solid transparent; transition: transform .2s, background .2s, color .2s, border-color .2s; cursor: pointer; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-2); }
.btn-light { background: #fff; color: var(--ink); }
.btn-ghost { border-color: currentColor; color: inherit; }
.btn-line { background: #06c755; color: #fff; }
.btn svg { width: 18px; height: 18px; }
.btns { display: flex; flex-wrap: wrap; gap: 14px; }

/* header */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; transition: background .3s, box-shadow .3s; }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; height: 78px; }
.site-header .logo img { height: 34px; width: auto; }
.site-header .logo .l-dark { display: none; }
.site-header.solid, .site-header.light-page { background: rgba(251, 250, 247, .94); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
.site-header.solid .logo .l-dark, .site-header.light-page .logo .l-dark { display: block; }
.site-header.solid .logo .l-light, .site-header.light-page .logo .l-light { display: none; }
.nav { display: flex; align-items: center; gap: 34px; }
.nav a { font-size: 15px; font-weight: 500; color: #fff; position: relative; }
.site-header.solid .nav a, .site-header.light-page .nav a { color: var(--ink); }
.nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 2px; background: var(--accent); transform: scaleX(0); transition: transform .25s; }
.nav a:not(.btn):hover::after, .nav a.active::after { transform: scaleX(1); }
.nav .btn { padding: 11px 22px; color: #fff; }
.menu-btn { display: none; width: 44px; height: 44px; border: 0; background: transparent; padding: 10px; cursor: pointer; }
.menu-btn span { display: block; height: 2px; background: #fff; margin: 6px 0; transition: transform .3s, opacity .3s; }
.site-header.solid .menu-btn span, .site-header.light-page .menu-btn span { background: var(--ink); }

/* hero */
.hero { position: relative; min-height: 100vh; min-height: 100svh; background: radial-gradient(1200px 600px at 80% 20%, #1c4b6e 0%, transparent 60%), linear-gradient(160deg, var(--ink) 0%, var(--ink-2) 100%); color: #fff; overflow: hidden; display: flex; align-items: center; padding: 120px 0 80px; }
.hero::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); background-size: 64px 64px; mask-image: linear-gradient(180deg, transparent, #000 30%, #000 70%, transparent); pointer-events: none; }
.hero .wrap { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lead { margin: 26px 0 40px; max-width: 520px; }
.hero-stack { position: relative; height: 480px; }
.hero-stack figure { position: absolute; margin: 0; border-radius: 14px; overflow: hidden; box-shadow: 0 30px 60px rgba(0,0,0,.45); border: 1px solid rgba(255,255,255,.12); background: #0e2233; }
.hero-stack figure img { width: 100%; height: 100%; object-fit: cover; }
.hero-stack .f1 { width: 78%; aspect-ratio: 2/1; top: 0; right: 0; animation: float 9s ease-in-out infinite; }
.hero-stack .f2 { width: 64%; aspect-ratio: 2/1; top: 38%; left: 0; animation: float 11s ease-in-out infinite reverse; }
.hero-stack .f3 { width: 52%; aspect-ratio: 2/1; bottom: 0; right: 6%; animation: float 10s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-14px); } }
.page-hero { background: linear-gradient(160deg, var(--ink) 0%, var(--ink-2) 100%); color: #fff; padding: 180px 0 100px; position: relative; overflow: hidden; }
.page-hero::after { content: ""; position: absolute; right: -120px; top: -120px; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(108,196,238,.25), transparent 65%); }
.page-hero h1 { color: #fff; max-width: 860px; }
.page-hero .lead { margin-top: 22px; max-width: 680px; }

/* grids & cards */
.grid { display: grid; gap: 28px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 34px 30px; transition: transform .25s, box-shadow .25s, border-color .25s; }
.card:hover { transform: translateY(-4px); box-shadow: 0 20px 40px rgba(10,21,32,.08); border-color: transparent; }
.card h3 { font-size: 21px; margin-bottom: 12px; }
.card p { color: var(--muted); margin: 0; font-size: 15px; }
.icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; margin-bottom: 22px; }
.icon svg { width: 26px; height: 26px; }
.num { font: 800 13px/1 var(--latin); color: var(--brand-2); letter-spacing: .14em; margin-bottom: 14px; display: block; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); margin-top: 64px; }
.stat { padding: 34px 20px 0 0; }
.stat b { display: block; font: 800 clamp(38px, 4.4vw, 56px)/1 var(--latin); color: var(--ink); letter-spacing: -.02em; }
.stat b small { font-size: .5em; color: var(--brand-2); margin-left: 4px; }
.stat > span { color: var(--muted); font-size: 15px; display: block; margin-top: 12px; }

/* projects */
.proj-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.proj { display: block; border-radius: var(--radius); overflow: hidden; background: #fff; border: 1px solid var(--line); transition: transform .3s, box-shadow .3s; }
.proj:hover { transform: translateY(-6px); box-shadow: 0 24px 48px rgba(10,21,32,.12); }
.proj .thumb { aspect-ratio: 3/2; overflow: hidden; background: #e9edf0; }
.proj .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.proj:hover .thumb img { transform: scale(1.05); }
.proj .meta { padding: 22px 24px 26px; }
.proj .cat { font: 700 11px/1 var(--latin); letter-spacing: .16em; color: var(--brand-2); text-transform: uppercase; }
.proj h3 { font-size: 19px; margin: 10px 0 8px; }
.proj p { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.7; }
.proj .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.proj .tags span { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--sand); color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 40px; }
.filters button { border: 1px solid var(--line); background: #fff; padding: 10px 20px; border-radius: 999px; font: 500 14px/1 var(--sans); color: var(--text); cursor: pointer; transition: all .2s; }
.filters button.on, .filters button:hover { background: var(--ink); color: #fff; border-color: var(--ink); }
.proj.hide { display: none; }
.more-list { display: flex; flex-wrap: wrap; gap: 10px 12px; }
.more-list a, .more-list span { padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; background: #fff; transition: border-color .2s, color .2s; }
.more-list a:hover { border-color: var(--brand); color: var(--brand); }

/* logos marquee */
.logos { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.logos .track { display: flex; gap: 64px; width: max-content; animation: marquee 50s linear infinite; align-items: center; }
.logos img { height: 52px; width: auto; max-width: 170px; object-fit: contain; opacity: .75; transition: opacity .2s; }
.logos img:hover { opacity: 1; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* testimonials */
.quote { background: #fff; border-radius: var(--radius); padding: 38px 34px; border: 1px solid var(--line); display: flex; flex-direction: column; }
.quote blockquote { margin: 0 0 28px; font-size: 16px; line-height: 1.95; color: var(--text); flex: 1; }
.quote blockquote::before { content: "“"; display: block; font: 700 64px/0.6 var(--serif); color: var(--brand-2); margin-bottom: 18px; }
.who { display: flex; align-items: center; gap: 14px; }
.who img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; }
.who b { display: block; font-size: 16px; color: var(--ink); }
.who span { font-size: 13px; color: var(--muted); }

/* feature rows */
.row-feature { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; padding: 64px 0; border-top: 1px solid var(--line); }
.row-feature:first-of-type { border-top: 0; }
.row-feature.rev .media { order: 2; }
.row-feature .media { border-radius: var(--radius); overflow: hidden; background: var(--sand); }
.row-feature .media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16/10; }
.row-feature h3 { font-size: clamp(24px, 2.6vw, 32px); margin-bottom: 8px; }
.row-feature .en { font: 700 12px/1 var(--latin); letter-spacing: .2em; color: var(--brand-2); text-transform: uppercase; display: block; margin-bottom: 16px; }
.row-feature p { color: var(--muted); }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks li::before { content: ""; flex: none; width: 20px; height: 20px; margin-top: 5px; border-radius: 50%; background: var(--brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/12px no-repeat; }

/* team */
.team { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.member { text-align: left; }
.member .ph { aspect-ratio: 1/1; border-radius: var(--radius); overflow: hidden; background: var(--sand); margin-bottom: 16px; }
.member .ph img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(.2); transition: filter .3s, transform .5s; }
.member:hover .ph img { filter: none; transform: scale(1.04); }
.member b { font: 700 19px/1.3 var(--latin); color: var(--ink); display: block; }
.member span { font-size: 14px; color: var(--muted); }

/* CTA */
.cta { background: linear-gradient(135deg, var(--brand) 0%, #123d5c 100%); color: #fff; border-radius: 28px; padding: 72px 64px; display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; position: relative; overflow: hidden; }
.cta::after { content: ""; position: absolute; right: -80px; bottom: -120px; width: 360px; height: 360px; border-radius: 50%; border: 60px solid rgba(255,255,255,.06); }
.cta h2 { color: #fff; }
.cta p { color: #cfe2f0; margin: 16px 0 0; }
.cta .btns { justify-content: flex-end; position: relative; z-index: 1; }

/* contact */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.info-card { background: var(--ink); color: #c9d4de; border-radius: var(--radius); padding: 40px 36px; }
.info-card h3 { color: #fff; font-size: 20px; margin-bottom: 6px; }
.info-card .blk { padding: 22px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.info-card .blk:last-child { border-bottom: 0; padding-bottom: 0; }
.info-card .blk:first-child { padding-top: 0; }
.info-card a { color: #fff; }
.info-card a:hover { color: var(--accent); }
.info-card small { display: block; font: 700 11px/1 var(--latin); letter-spacing: .18em; color: var(--accent); margin-bottom: 10px; text-transform: uppercase; }
.form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 40px 36px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 8px; }
.field label i { color: #c0392b; font-style: normal; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; font: 400 16px/1.5 var(--sans); background: var(--paper); color: var(--text); transition: border-color .2s, box-shadow .2s; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 4px rgba(45,134,191,.14); }
.field textarea { min-height: 130px; resize: vertical; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips label { margin: 0; position: relative; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span { display: inline-block; padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; cursor: pointer; transition: all .2s; background: var(--paper); }
.chips input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.chips input:focus-visible + span { box-shadow: 0 0 0 3px rgba(45,134,191,.35); }
.form-note { font-size: 13px; color: var(--muted); margin-top: 14px; }
.notice { background: var(--sand); border-left: 3px solid var(--brand); padding: 18px 22px; border-radius: 0 12px 12px 0; margin-bottom: 28px; font-size: 15px; }

/* footer */
.site-footer { background: var(--ink); color: #8fa1b2; padding: 88px 0 36px; font-size: 14px; }
.site-footer .top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 56px; border-bottom: 1px solid rgba(255,255,255,.08); }
.site-footer .brand img { height: 34px; width: auto; margin-bottom: 22px; }
.site-footer h4 { color: #fff; font: 700 13px/1 var(--latin); letter-spacing: .18em; text-transform: uppercase; margin-bottom: 20px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.site-footer a:hover { color: #fff; }
.site-footer .bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding-top: 28px; font-size: 13px; }
.social { display: flex; gap: 10px; margin-top: 22px; }
.social a { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.15); display: grid; place-items: center; transition: background .2s, border-color .2s; }
.social a:hover { background: var(--brand); border-color: var(--brand); }
.social svg { width: 17px; height: 17px; fill: #fff; }
.float-line { position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 56px; height: 56px; border-radius: 50%; background: #06c755; display: grid; place-items: center; box-shadow: 0 10px 24px rgba(6,199,85,.35); transition: transform .2s; }
.float-line:hover { transform: scale(1.08); }
.float-line svg { width: 30px; height: 30px; fill: #fff; }

/* reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .logos .track, .hero-stack figure { animation: none; }
  html { scroll-behavior: auto; }
}

/* responsive */
@media (max-width: 1024px) {
  .g4, .team { grid-template-columns: repeat(2, 1fr); }
  .proj-grid, .g3 { grid-template-columns: repeat(2, 1fr); }
  .site-footer .top { grid-template-columns: 1fr 1fr; }
  .cta { grid-template-columns: 1fr; padding: 56px 40px; }
  .cta .btns { justify-content: flex-start; }
}
@media (max-width: 860px) {
  .menu-btn { display: block; }
  .nav { position: fixed; inset: 78px 0 auto; background: var(--paper); flex-direction: column; align-items: stretch; gap: 0; padding: 12px 24px 28px; box-shadow: 0 20px 40px rgba(0,0,0,.12); transform: translateY(-120%); transition: transform .35s; }
  .nav.open { transform: none; }
  .nav a { color: var(--ink) !important; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
  .nav a:not(.btn)::after { display: none; }
  .nav .btn { margin-top: 18px; justify-content: center; border-bottom: 0; color: #fff !important; }
  .menu-open .menu-btn span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .menu-open .menu-btn span:nth-child(2) { opacity: 0; }
  .menu-open .menu-btn span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .menu-open.site-header { background: var(--paper); }
  .menu-open .menu-btn span { background: var(--ink); }
  .menu-open .logo .l-dark { display: block; }
  .menu-open .logo .l-light { display: none; }
  .hero .wrap, .split, .row-feature, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .row-feature.rev .media { order: 0; }
  .hero-stack { height: 300px; }
  .section { padding: 80px 0; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .page-hero { padding: 140px 0 72px; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .g2, .g3, .g4, .proj-grid { grid-template-columns: 1fr; }
  .team { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .form .row { grid-template-columns: 1fr; gap: 0; }
  .form, .info-card { padding: 30px 22px; }
  .cta { padding: 44px 24px; border-radius: 22px; }
  .site-footer .top { grid-template-columns: 1fr; }
  .btn { padding: 14px 22px; }
  .hero-stack { height: 240px; }
}
/* hero devices */
.hero-stack .f-main, .hero-stack .f-phone { box-shadow: none; border: 0; background: transparent; border-radius: 0; overflow: visible; }
.hero-stack .f-main { width: 100%; top: 6%; right: -4%; animation: float 10s ease-in-out infinite; }
.hero-stack .f-phone { width: 46%; bottom: 0; left: -6%; animation: float 8s ease-in-out infinite reverse; filter: drop-shadow(0 30px 40px rgba(0,0,0,.5)); }
.hero-stack .f-main img { filter: drop-shadow(0 40px 60px rgba(0,0,0,.55)); }
@media (max-width: 860px) { .hero-stack .f-main { right: 0; } .hero-stack .f-phone { left: 0; } }
/* 樣機圖（透明底 PNG）完整顯示不裁切 */
.row-feature .media.contain { background: var(--sand); padding: 24px; }
.row-feature .media.contain img { object-fit: contain; }

/* form status + honeypot */
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 14px 0 0; font-size: 15px; min-height: 1.5em; }
.form-status.ok { color: #0a7d3b; font-weight: 700; }
.form-status.err { color: #b42318; }
.form-status a { text-decoration: underline; }
.btn[disabled] { opacity: .6; cursor: wait; transform: none; }
