/* security-brain.com：資芯藍 #0078FF 為主色，深藍黑的科技感區塊和淺色內容區交錯 */
:root {
  --blue: #0078ff;
  --blue-hi: #3c9bff;
  --blue-soft: #e6f1ff;
  --sky: #00adef;
  --red: #ff4d5e;
  --night: #030d1c;
  --night-2: #061a33;
  --line-d: rgba(110, 165, 255, .16);
  --text-d: #a9bad0;
  --ink: #0a1a2f;
  --ink-soft: #4b5b70;
  --paper: #f4f8fd;
  --card: #ffffff;
  --line: #d6e2f1;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink-soft);
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.75;
}
img { max-width: 100%; height: auto; }
a { color: var(--blue); }
h1, h2, h3 { color: var(--ink); line-height: 1.25; margin: 0; letter-spacing: -.01em; }
h1 span, h2 span { display: inline-block; }
section[id], article[id] { scroll-margin-top: 84px; }

.wrap { position: relative; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--blue); color: #fff; padding: 8px 14px; z-index: 20; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--blue-hi); outline-offset: 3px; }

/* 深色區塊共用 */
.dark { position: relative; overflow: hidden; background: var(--night); color: var(--text-d); }
.dark h1, .dark h2, .dark h3 { color: #fff; }
.grid-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--line-d) 1px, transparent 1px), linear-gradient(90deg, var(--line-d) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 60% 40%, #000 20%, transparent 75%);
}
.glow { position: absolute; width: 720px; height: 720px; right: -120px; top: -160px; border-radius: 50%; background: var(--blue); opacity: .22; filter: blur(150px); pointer-events: none; }

.kicker { margin: 0 0 16px; font-family: var(--mono); font-size: 13px; font-weight: 600; letter-spacing: .14em; color: var(--blue); text-transform: uppercase; }
.dark .kicker { color: var(--blue-hi); }

.btn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: 4px; font-weight: 700; text-decoration: none; transition: background-color .2s, color .2s, border-color .2s, box-shadow .2s; }
.btn-blue { background: var(--blue); color: #fff; box-shadow: 0 0 0 1px rgba(60, 155, 255, .5), 0 10px 30px -10px rgba(0, 120, 255, .8); }
.btn-blue:hover { background: var(--blue-hi); }
.btn-blue::after { content: "→"; font-family: var(--mono); }
.btn-ghost { border: 1px solid rgba(169, 186, 208, .4); color: #fff; }
.btn-ghost:hover { border-color: var(--blue-hi); color: var(--blue-hi); }

/* 頁首 */
.top { position: sticky; top: 0; z-index: 10; background: rgba(3, 13, 28, .86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-d); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; min-height: 68px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { width: 118px; }
.brand-sub { border-left: 1px solid var(--line-d); padding-left: 12px; color: var(--text-d); font-family: var(--mono); font-size: 12px; letter-spacing: .16em; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; font-size: 15px; }
.nav a { color: #d6e1ef; text-decoration: none; }
.nav a:hover { color: var(--blue-hi); }
.nav .nav-cta { background: var(--blue); color: #fff; padding: 6px 16px; border-radius: 4px; }
.nav .nav-cta:hover { background: var(--blue-hi); color: #fff; }
@media (max-width: 760px) {
  .top { position: static; }
  section[id], article[id] { scroll-margin-top: 16px; }
  .nav { width: 100%; justify-content: space-between; gap: 6px 12px; font-size: 14px; }
  .brand img { width: 100px; }
}

/* 主視覺 */
.hero { padding: 80px 0 0; }
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(32px, 4.2vw, 52px); font-weight: 900; line-height: 1.15; }
.hero h1 em { font-style: normal; color: var(--blue-hi); text-shadow: 0 0 28px rgba(0, 120, 255, .55); }
.lead { font-size: 18px; margin: 26px 0 0; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

/* HUD 框：四個角的括號 */
.hud, .product { position: relative; margin: 0; padding: 20px; border: 1px solid var(--line-d); background: linear-gradient(180deg, rgba(6, 26, 51, .7), rgba(3, 13, 28, .4)); }
.hud-c { position: absolute; width: 16px; height: 16px; border-color: var(--blue-hi); border-style: solid; border-width: 0; }
.hud-c.tl { top: -1px; left: -1px; border-top-width: 2px; border-left-width: 2px; }
.hud-c.tr { top: -1px; right: -1px; border-top-width: 2px; border-right-width: 2px; }
.hud-c.bl { bottom: -1px; left: -1px; border-bottom-width: 2px; border-left-width: 2px; }
.hud-c.br { bottom: -1px; right: -1px; border-bottom-width: 2px; border-right-width: 2px; }
.hud-tag { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: .1em; color: var(--text-d); }
.hud-top { justify-content: flex-start; gap: 8px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #2ee6a6; box-shadow: 0 0 10px #2ee6a6; animation: blink 1.6s infinite; }
@keyframes blink { 50% { opacity: .25; } }
.legend { display: inline-flex; align-items: center; gap: 6px; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-left: 8px; }
.lg-ok { background: var(--blue-hi); }
.lg-bad { background: var(--red); }

.map { display: block; width: 100%; height: auto; margin: 8px 0; }
.lanes use { fill: none; stroke: rgba(60, 155, 255, .28); stroke-width: 1; stroke-dasharray: 2 6; }
.ring-faint { fill: none; stroke: rgba(60, 155, 255, .12); }
.ring-dash { fill: none; stroke: rgba(60, 155, 255, .45); stroke-dasharray: 3 9; }
.ring-shield { fill: rgba(0, 120, 255, .06); stroke: var(--blue); stroke-width: 1.5; }
.spin-slow { transform-origin: 0 0; transform-box: view-box; animation: spin 24s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.core { filter: drop-shadow(0 0 16px rgba(0, 120, 255, .9)); }
.core-t { fill: #fff; font-size: 13px; font-weight: 700; text-anchor: middle; }
.core-s { fill: #cfe4ff; font-size: 9px; font-family: var(--mono); letter-spacing: .15em; text-anchor: middle; }
.ring-label { fill: var(--text-d); font-size: 11px; font-family: var(--mono); text-anchor: middle; letter-spacing: .08em; }
.pkt.ok circle { fill: var(--blue-hi); filter: drop-shadow(0 0 4px var(--blue-hi)); }
.pkt.bad circle { fill: var(--red); filter: drop-shadow(0 0 5px var(--red)); }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 72px; border-top: 1px solid var(--line-d); }
.stats div { padding: 26px 20px 30px 0; }
.stats div + div { border-left: 1px solid var(--line-d); padding-left: 24px; }
.stats strong { display: block; font-family: var(--mono); font-size: 34px; font-weight: 600; color: #fff; line-height: 1.2; }
.stats small { font-size: 15px; margin-left: 4px; color: var(--blue-hi); }
.stats span { font-size: 14px; }

@media (max-width: 900px) {
  .hero { padding-top: 48px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .stats { grid-template-columns: 1fr 1fr; margin-top: 44px; }
  .stats div:nth-child(3) { border-left: 0; padding-left: 0; }
  .stats div:nth-child(n+3) { border-top: 1px solid var(--line-d); }
}

/* 淺色區塊 */
.block { padding: 96px 0; }
.light.alt { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.block-head { max-width: 720px; margin-bottom: 48px; }
.block-head h2, .band h2, .contact h2 { font-size: clamp(26px, 3.4vw, 40px); font-weight: 900; }
.block-head p:not(.kicker) { margin: 16px 0 0; }
@media (max-width: 640px) { .block { padding: 64px 0; } }

/* 服務卡片 */
.svc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.svc { position: relative; padding: 28px 28px 24px; background: var(--card); border: 1px solid var(--line); border-radius: 4px; transition: border-color .2s, box-shadow .2s, transform .2s; }
.svc::before { content: ""; position: absolute; left: -1px; top: -1px; width: 56px; height: 3px; background: var(--blue); }
.svc:hover { border-color: rgba(0, 120, 255, .45); box-shadow: 0 18px 40px -24px rgba(0, 120, 255, .55); transform: translateY(-2px); }
.svc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.svc-id { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; color: var(--blue); background: var(--blue-soft); padding: 3px 8px; border-radius: 2px; }
.svc-ic { width: 30px; height: 30px; fill: none; stroke: var(--blue); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.svc h3 { font-size: 22px; }
.svc p { margin: 10px 0 0; }
.svc dl { display: grid; grid-template-columns: 44px 1fr; gap: 6px 12px; margin: 18px 0 0; padding-top: 16px; border-top: 1px dashed var(--line); font-size: 15px; }
.svc dt { font-family: var(--mono); font-size: 12px; color: var(--blue); padding-top: 3px; }
.svc dd { margin: 0; color: var(--ink); }
@media (max-width: 800px) { .svc-grid { grid-template-columns: 1fr; } .svc { padding: 24px 20px 20px; } }

/* Entraffic */
.band { padding: 96px 0; }
.band p:not(.kicker) { margin: 18px 0 30px; max-width: 36em; }
.band-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center; }
.product { display: block; padding: 32px; text-decoration: none; color: var(--text-d); transition: border-color .2s; }
.product:hover { border-color: rgba(60, 155, 255, .5); }
.product img { width: 100%; max-width: 320px; display: block; }
.product-meta { display: block; margin-top: 18px; font-family: var(--mono); font-size: 11px; letter-spacing: .1em; color: var(--blue-hi); word-break: break-all; }
.product ul { margin: 18px 0 0; padding: 0; list-style: none; }
.product li { padding: 8px 0; border-top: 1px solid var(--line-d); font-size: 15px; }
.product li::before { content: "›"; color: var(--blue-hi); font-family: var(--mono); margin-right: 10px; }
@media (max-width: 900px) { .band-grid { grid-template-columns: 1fr; gap: 32px; } .band { padding: 64px 0; } }

/* 合作方式：終端機風格 */
.process-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 48px; align-items: start; }
.term { background: var(--night); border-radius: 6px; overflow: hidden; box-shadow: 0 30px 60px -30px rgba(3, 13, 28, .6); font-family: var(--mono); }
.term-bar { display: flex; align-items: center; gap: 6px; margin: 0; padding: 10px 14px; background: var(--night-2); border-bottom: 1px solid var(--line-d); font-size: 12px; color: var(--text-d); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.term-bar i:nth-child(2) { background: #febc2e; }
.term-bar i:nth-child(3) { background: #28c840; }
.term-bar span { margin-left: 10px; }
.term-body { list-style: none; margin: 0; padding: 18px 20px; }
.term-body li { display: grid; grid-template-columns: 36px 150px 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line-d); font-size: 14px; }
.term-body li:last-child { border-bottom: 0; }
.t-n { color: var(--blue-hi); }
.t-c { color: #fff; font-family: "Noto Sans TC", sans-serif; font-weight: 700; }
.t-d { color: var(--text-d); font-family: "Noto Sans TC", sans-serif; }
@media (max-width: 900px) {
  .process-grid { grid-template-columns: 1fr; gap: 0; }
  .term-body li { grid-template-columns: 32px 1fr; }
  .t-d { grid-column: 2; }
}

/* 常見問題 */
.faq-grid { display: grid; grid-template-columns: 1fr 1.6fr; gap: 48px; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; position: relative; color: var(--ink); font-weight: 700; font-size: 18px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 16px; font-family: var(--mono); font-size: 22px; color: var(--blue); }
.faq details[open] summary::after { content: "−"; }
.faq details[open] summary { color: var(--blue); }
.faq details p { margin: 0 0 20px; }
@media (max-width: 900px) { .faq-grid { grid-template-columns: 1fr; gap: 0; } }

/* 聯絡 */
.contact { padding: 96px 0; background: radial-gradient(ellipse at 80% 0%, rgba(0, 120, 255, .35), transparent 60%), var(--night); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact p:not(.kicker) { margin: 16px 0 0; }
.contact-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line-d); background: rgba(6, 26, 51, .6); }
.contact-list li { display: grid; grid-template-columns: 100px 1fr; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line-d); }
.contact-list li:last-child { border-bottom: 0; }
.contact-list span { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; color: var(--blue-hi); padding-top: 4px; }
.contact-list a { color: #fff; font-weight: 700; text-decoration: none; word-break: break-all; }
.contact-list a:hover { color: var(--blue-hi); }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 28px; } .contact { padding: 64px 0; } }

/* 頁尾 */
.foot { background: #020812; color: var(--text-d); padding: 30px 0; font-size: 14px; border-top: 1px solid var(--line-d); }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px 28px; }
.foot-logo { width: 104px; }
.foot nav { display: flex; gap: 20px; }
.foot a { color: #cfd8e1; text-decoration: none; }
.foot a:hover { color: #fff; }
.foot .copy { width: 100%; margin: 0; font-family: var(--mono); font-size: 12px; }

/* 404 */
.notfound { min-height: 70vh; display: flex; align-items: center; }
.notfound h1 { font-size: clamp(30px, 5vw, 48px); font-weight: 900; }
.notfound p:not(.kicker) { margin: 16px 0 28px; }
