/* 鴻綸科技成果展示 — 深色科技風共用樣式 */
:root {
  --bg: #070d1a;
  --bg-soft: #0b1526;
  --card: #0e1b30;
  --card-hover: #12233f;
  --line: rgba(148, 184, 255, 0.14);
  --text: #dbe7ff;
  --muted: #8aa0c4;
  --accent: #38bdf8;
  --accent-deep: #2563eb;
  --glow: rgba(56, 189, 248, 0.35);
  --radius: 14px;
  --maxw: 1080px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Noto Sans TC", "PingFang TC", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 13, 26, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand img { height: 56px; width: auto; display: block; }
.main-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav a {
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.95rem;
  white-space: nowrap;
}
.main-nav a:hover { color: var(--text); background: var(--bg-soft); text-decoration: none; }
.main-nav a.active { color: var(--accent); }
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  color: var(--text);
  font-size: 1.3rem;
  padding: 4px 12px;
  border-radius: 8px;
  cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 96px 0 80px;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 50% at 50% -10%, rgba(37, 99, 235, 0.28), transparent),
    radial-gradient(ellipse 40% 35% at 80% 20%, rgba(56, 189, 248, 0.10), transparent);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 65% 60% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 65% 60% at 50% 30%, #000 30%, transparent 75%);
  pointer-events: none;
}
.hero > .wrap { position: relative; }
.hero h1 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.3;
}
.hero h1 .grad {
  background: linear-gradient(100deg, #7dd3fc, #38bdf8 45%, #2563eb);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  margin: 20px auto 0;
  max-width: 640px;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.15rem);
}
.hero-badge {
  display: inline-block;
  margin-bottom: 20px;
  padding: 6px 16px;
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}
.hero-cta { margin-top: 36px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary {
  background: linear-gradient(120deg, var(--accent-deep), var(--accent));
  color: #04101f;
  box-shadow: 0 4px 24px var(--glow);
}
.btn-primary:hover { box-shadow: 0 6px 32px var(--glow); color: #04101f; }
.btn-ghost { border: 1px solid var(--line); color: var(--text); background: var(--bg-soft); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 8px 20px; font-size: 0.9rem; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section.alt { background: var(--bg-soft); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-title { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 900; text-align: center; }
.section-sub { text-align: center; color: var(--muted); margin: 12px auto 48px; max-width: 620px; }
.eyebrow {
  display: block;
  text-align: center;
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  margin-bottom: 10px;
}

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 18px; }
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
}
.stat .num { font-size: 2rem; font-weight: 900; color: var(--accent); }
.stat .label { color: var(--muted); font-size: 0.92rem; margin-top: 6px; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr)); }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.card:hover {
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 8px 40px rgba(37, 99, 235, 0.22);
  transform: translateY(-4px);
}
.card-visual {
  height: 130px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
}
.card-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 28px 28px;
}
.v-blue   { background: linear-gradient(135deg, #0c4a6e, #1e3a8a); }
.v-indigo { background: linear-gradient(135deg, #1e3a8a, #312e81); }
.v-cyan   { background: linear-gradient(135deg, #164e63, #0c4a6e); }
.v-teal   { background: linear-gradient(135deg, #134e4a, #164e63); }
.v-navy   { background: linear-gradient(135deg, #172554, #0f172a); }
.card-body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 1.15rem; margin-bottom: 4px; }
.card-body h3 a { color: var(--text); }
.card-body .tagline { color: var(--accent); font-size: 0.85rem; margin-bottom: 10px; }
.card-body p { color: var(--muted); font-size: 0.94rem; flex: 1; }
.card-actions { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Feature list ---------- */
.feature-list { list-style: none; display: grid; gap: 14px; }
.feature-list li {
  padding-left: 28px;
  position: relative;
  color: var(--muted);
}
.feature-list li::before {
  content: "▸";
  position: absolute;
  left: 8px;
  color: var(--accent);
}
.feature-list li strong { color: var(--text); }

/* ---------- FAQ ---------- */
.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  padding: 18px 22px;
  font-weight: 700;
  list-style: none;
  position: relative;
  padding-right: 48px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 22px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 1.3rem;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item .faq-a { padding: 0 22px 20px; color: var(--muted); }

/* ---------- Content pages ---------- */
.page-head { padding: 64px 0 40px; text-align: center;
  background: radial-gradient(ellipse 60% 80% at 50% -20%, rgba(37, 99, 235, 0.25), transparent); }
.page-head h1 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 900; }
.page-head p { color: var(--muted); margin-top: 12px; max-width: 640px; margin-inline: auto; }
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { margin: 40px 0 14px; font-size: 1.35rem; color: var(--text); }
.prose p, .prose li { color: var(--muted); }
.prose ul { padding-left: 24px; }
.breadcrumb { font-size: 0.85rem; color: var(--muted); margin-bottom: 8px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }

/* ---------- Tags ---------- */
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.tag {
  font-size: 0.78rem;
  padding: 3px 12px;
  border-radius: 6px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--bg-soft);
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); max-width: 820px; margin: 0 auto; }
.contact-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px;
  text-align: center;
}
.contact-card .ico { font-size: 1.8rem; }
.contact-card h3 { margin: 10px 0 6px; font-size: 1rem; }
.contact-card p { color: var(--muted); font-size: 0.95rem; }

/* ---------- Partner badge ---------- */
.badge-chip {
  display: inline-block;
  background: #fff;
  border-radius: 12px;
  padding: 14px 22px;
  line-height: 0;
}
.badge-chip img { height: 56px; width: auto; }
@media (max-width: 480px) { .badge-chip img { height: 44px; } }
.directory-excerpt {
  display: block;
  max-width: 640px;
  width: 100%;
  margin: 28px auto 0;
  border-radius: 12px;
  border: 1px solid var(--line);
  box-shadow: 0 8px 40px rgba(37, 99, 235, 0.18);
}
.excerpt-caption {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin-top: 12px;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 44px 0 36px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.9rem;
}
.footer-grid { display: grid; gap: 28px; grid-template-columns: 2fr 1fr 1fr; }
.footer-grid h4 { color: var(--text); font-size: 0.95rem; margin-bottom: 12px; }
.footer-grid ul { list-style: none; }
.footer-grid li { margin-bottom: 6px; }
.footer-grid a { color: var(--muted); }
.footer-grid a:hover { color: var(--accent); }
.footer-logo img { height: 48px; width: auto; margin-bottom: 14px; }
.copyright { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); text-align: center; font-size: 0.82rem; }

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

/* ---------- RWD ---------- */
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .brand img { height: 46px; }
  .header-inner { padding: 10px 16px; }
  .wrap { padding: 0 16px; }
  .section { padding: 52px 0; }
  .btn { padding: 12px 22px; }
  .hero-cta .btn { width: 100%; max-width: 320px; }
  .card-actions .btn { flex: 1; text-align: center; min-width: 120px; }
  .stat { padding: 20px 14px; }
  .stat .num { font-size: 1.6rem; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px;
  }
  .main-nav.open { display: flex; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 56px; }
}
