/* 智核科技 官網樣式
   色彩來源：ui-ux-pro-max design system（Trust & Authority）
   修改品牌色只需改 :root 內的變數 */

:root {
  --color-primary: #0F172A;
  --color-on-primary: #FFFFFF;
  --color-secondary: #334155;
  --color-accent: #0369A1;
  --color-accent-hover: #075985;
  --color-on-accent: #FFFFFF;
  --color-background: #FFFFFF;
  --color-surface: #F8FAFC;
  --color-foreground: #020617;
  --color-card: #FFFFFF;
  --color-muted: #E8ECF1;
  --color-muted-foreground: #475569;
  --color-border: #E2E8F0;
  --color-accent-soft: #E0F2FE;

  --font-body: "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", "Heiti TC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-latin: "Space Grotesk", var(--font-body);

  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .06);
  --container: 1160px;
  --gutter: 20px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.75;
  color: var(--color-foreground);
  background: var(--color-background);
  letter-spacing: .02em;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--color-accent); text-underline-offset: 3px; }
a:hover { color: var(--color-accent-hover); }
:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 .6em; color: var(--color-primary); letter-spacing: .01em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--color-primary); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
}
.skip-link:focus { top: 12px; color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--color-primary); }
.brand-mark { width: 34px; height: 34px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-weight: 700; font-size: 1.05rem; }
.brand-en { font-family: var(--font-latin); font-size: .68rem; color: var(--color-muted-foreground); letter-spacing: .06em; }

.nav-list { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-list a {
  display: block; padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--color-secondary); text-decoration: none; font-size: .95rem;
  transition: background-color .2s, color .2s;
}
.nav-list a:hover { background: var(--color-muted); color: var(--color-primary); }
.nav-list a[aria-current="page"] { color: var(--color-accent); font-weight: 600; }
.nav-list .btn { margin-left: 8px; }

.nav-toggle {
  display: none; width: 44px; height: 44px; border: 1px solid var(--color-border); border-radius: var(--radius-sm);
  background: #fff; cursor: pointer; align-items: center; justify-content: center; color: var(--color-primary);
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 68px;
    background: #fff; border-bottom: 1px solid var(--color-border); box-shadow: var(--shadow);
    display: none;
  }
  .site-nav.is-open { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; padding: 8px var(--gutter) 16px; }
  .nav-list a { padding: 12px; }
  .nav-list .btn { margin: 8px 0 0; text-align: center; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 22px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 1rem; text-decoration: none; cursor: pointer;
  border: 1px solid transparent; transition: background-color .2s, border-color .2s, color .2s;
}
.btn-primary, .nav-list a.btn-primary { background: var(--color-accent); color: var(--color-on-accent); }
.btn-primary:hover, .nav-list a.btn-primary:hover { background: var(--color-accent-hover); color: #fff; }
.btn-ghost { background: transparent; color: var(--color-primary); border-color: var(--color-border); }
.btn-ghost:hover { border-color: var(--color-primary); color: var(--color-primary); }
.btn-light { background: #fff; color: var(--color-primary); }
.btn-light:hover { background: var(--color-accent-soft); color: var(--color-primary); }
.btn-outline-light { color: #fff; border-color: rgba(255,255,255,.4); }
.btn-outline-light:hover { border-color: #fff; color: #fff; }
.btn svg { width: 18px; height: 18px; }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-alt { background: var(--color-surface); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow {
  display: inline-block; font-family: var(--font-latin); font-size: .8rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--color-accent); margin-bottom: 10px;
}
.lead { font-size: 1.1rem; color: var(--color-muted-foreground); }

/* ---------- Hero ---------- */
.hero { padding: clamp(64px, 10vw, 120px) 0 clamp(56px, 8vw, 96px); position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(600px 300px at 85% 10%, rgba(3, 105, 161, .10), transparent 70%),
    linear-gradient(var(--color-border) 1px, transparent 1px) 0 0 / 40px 40px,
    linear-gradient(90deg, var(--color-border) 1px, transparent 1px) 0 0 / 40px 40px;
  mask-image: linear-gradient(to bottom, #000 30%, transparent 95%);
  opacity: .7;
}
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; }
.hero h1 span { color: var(--color-accent); }
.hero .lead { max-width: 560px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-visual {
  background: var(--color-primary); color: #CBD5E1; border-radius: var(--radius);
  padding: 22px; box-shadow: 0 20px 50px rgba(15, 23, 42, .25);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: .88rem; line-height: 1.9;
}
.hero-visual .dots { display: flex; gap: 6px; margin-bottom: 14px; }
.hero-visual .dots i { width: 10px; height: 10px; border-radius: 50%; background: #334155; display: block; }
.hero-visual .k { color: #7DD3FC; } .hero-visual .s { color: #86EFAC; } .hero-visual .c { color: #64748B; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } }

.page-hero { padding: clamp(48px, 7vw, 80px) 0 clamp(32px, 5vw, 48px); background: linear-gradient(180deg, var(--color-surface), #fff); border-bottom: 1px solid var(--color-border); }
.page-hero .lead { max-width: 680px; margin-bottom: 0; }

.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0 0 16px; font-size: .88rem; color: var(--color-muted-foreground); }
.breadcrumb li + li::before { content: "/"; margin-right: 6px; color: #94A3B8; }
.breadcrumb a { color: var(--color-muted-foreground); text-decoration: none; }
.breadcrumb a:hover { color: var(--color-accent); }

/* ---------- Trust strip ---------- */
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.trust-item { display: flex; gap: 12px; align-items: flex-start; }
.trust-item svg { width: 24px; height: 24px; flex: none; color: var(--color-accent); margin-top: 3px; }
.trust-item strong { display: block; color: var(--color-primary); }
.trust-item span { font-size: .9rem; color: var(--color-muted-foreground); }
@media (max-width: 900px) { .trust { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .trust { grid-template-columns: 1fr; } }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.card {
  background: var(--color-card); border: 1px solid var(--color-border); border-radius: var(--radius);
  padding: 26px; transition: border-color .2s, box-shadow .2s, transform .2s;
}
a.card { display: block; text-decoration: none; color: inherit; }
a.card:hover { border-color: var(--color-accent); box-shadow: var(--shadow); }
.card p { color: var(--color-muted-foreground); margin-bottom: 0; }
.icon, .card .icon {
  width: 48px; height: 48px; border-radius: 10px; background: var(--color-accent-soft); color: var(--color-accent);
  display: flex; align-items: center; justify-content: center; margin-bottom: 18px;
}
.card .icon svg { width: 24px; height: 24px; }
.card .more { display: inline-flex; align-items: center; gap: 4px; margin-top: 14px; font-weight: 600; color: var(--color-accent); font-size: .95rem; }
.card .more svg { width: 16px; height: 16px; transition: transform .2s; }
a.card:hover .more svg { transform: translateX(3px); }

.check-list { list-style: none; padding: 0; margin: 0; }
.check-list li { position: relative; padding-left: 30px; margin-bottom: 10px; }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: .45em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--color-accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230369A1' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.tags li { font-size: .82rem; padding: 4px 10px; border-radius: 999px; background: var(--color-muted); color: var(--color-secondary); }

/* ---------- Process ---------- */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.steps li { counter-increment: step; position: relative; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); padding: 22px 20px; }
.steps li::before {
  content: counter(step, decimal-leading-zero); display: block; font-family: var(--font-latin);
  font-weight: 700; font-size: 1.5rem; color: var(--color-accent); margin-bottom: 8px;
}
.steps h3 { font-size: 1.05rem; margin-bottom: 6px; }
.steps p { font-size: .92rem; color: var(--color-muted-foreground); margin: 0; }
@media (max-width: 1000px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--color-border); }
.timeline > li { position: relative; padding: 0 0 36px 32px; }
.timeline > li::before {
  content: ""; position: absolute; left: -9px; top: 6px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; border: 3px solid var(--color-accent);
}
.timeline .when { font-size: .85rem; color: var(--color-accent); font-weight: 600; }

/* ---------- FAQ ---------- */
.faq { max-width: 820px; }
.faq details { background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); margin-bottom: 12px; }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 52px 18px 22px; font-weight: 600; color: var(--color-primary); position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 22px; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; font-weight: 400; color: var(--color-accent); transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq .answer { padding: 0 22px 18px; color: var(--color-muted-foreground); }
.faq .answer p:last-child { margin-bottom: 0; }

/* ---------- Info table ---------- */
.info-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; }
.info-table th, .info-table td { text-align: left; padding: 14px 20px; border-bottom: 1px solid var(--color-border); vertical-align: top; }
.info-table tr:last-child th, .info-table tr:last-child td { border-bottom: 0; }
.info-table th { width: 30%; background: var(--color-surface); color: var(--color-secondary); font-weight: 600; white-space: nowrap; }
@media (max-width: 560px) {
  .info-table th, .info-table td { display: block; width: 100%; }
  .info-table th { border-bottom: 0; padding-bottom: 4px; }
  .info-table td { padding-top: 0; }
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-item { display: flex; gap: 16px; align-items: flex-start; padding: 20px 0; border-bottom: 1px solid var(--color-border); }
.contact-item:first-child { padding-top: 0; }
.contact-item .icon { margin: 0; flex: none; }
.contact-item h3 { margin: 0 0 2px; font-size: 1rem; }
.contact-item p { margin: 0; color: var(--color-muted-foreground); }
.map-frame { width: 100%; aspect-ratio: 4 / 3; border: 1px solid var(--color-border); border-radius: var(--radius); background: var(--color-muted); }

/* ---------- Prose ---------- */
.prose { max-width: 780px; }
.prose h2 { font-size: 1.35rem; margin-top: 2em; }
.prose ul { padding-left: 1.3em; }
.prose li { margin-bottom: .4em; }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(135deg, var(--color-accent-soft), #F0F9FF 60%, #fff); color: var(--color-muted-foreground); border-top: 1px solid var(--color-border); padding: clamp(56px, 8vw, 88px) 0; }
.cta-band h2 { color: var(--color-primary); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-inner p { margin: 0; max-width: 560px; }
.cta-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer { background: var(--color-surface); color: var(--color-muted-foreground); border-top: 1px solid var(--color-border); padding: 56px 0 28px; font-size: .92rem; }
.site-footer a { color: var(--color-secondary); text-decoration: none; }
.site-footer a:hover { color: var(--color-accent); text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.footer-grid h2 { font-size: .95rem; color: var(--color-primary); margin-bottom: 14px; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-brand .brand { color: var(--color-primary); margin-bottom: 14px; }

.footer-brand dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; }
.footer-brand dt { color: #64748B; white-space: nowrap; }
.footer-brand dd { margin: 0; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--color-border); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Reveal (內容預設可見，JS 載入後才加動畫，避免爬蟲看到空白) ---------- */
.js .reveal { opacity: 0; transform: translateY(12px); transition: opacity .35s ease-out, transform .35s ease-out; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }
