:root {
  --primary: #1f8dba;
  --primary-dark: #0e4e6d;
  --dark: #111827;
  --gray: #6b7280;
  --light-bg: #f9fafb;
  --border: #e5e7eb;
}

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

html { color-scheme: light; }

body {
  font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  color: var(--dark);
  background: #fff;
  line-height: 1.7;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  background: #fff;
  border-bottom: 1px solid var(--border);
  z-index: 10;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--primary);
  text-decoration: none;
}

.logo-mark {
  height: 38px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  white-space: nowrap;
}

.logo-text small {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--gray);
  line-height: 1.3;
}

.nav nav a {
  margin-left: 28px;
  text-decoration: none;
  color: var(--dark);
  font-size: 0.95rem;
}

.nav nav a:hover { color: var(--primary); }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 120px 0 100px;
  text-align: center;
}

.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.hero .container {
  position: relative;
}

.hero-kicker {
  font-size: 0.95rem;
  letter-spacing: 0.3em;
  opacity: 0.8;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 16px;
}

.hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 560px;
  margin: 0 auto 32px;
}

.btn {
  display: inline-block;
  background: #fff;
  color: var(--primary);
  padding: 12px 32px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: transform 0.15s ease;
}

.btn:hover { transform: translateY(-2px); }

/* Sections */
.section {
  padding: 80px 0;
}

.section.alt {
  background: var(--light-bg);
}

.section h2 {
  font-size: 2rem;
  margin-bottom: 24px;
  text-align: center;
}

.section > .container > p {
  color: var(--gray);
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}

.lead {
  color: var(--gray);
  max-width: 720px;
  margin: 0 auto 16px;
  text-align: center;
}

.lead strong { color: var(--primary); }

/* Vision network */
.vision-net {
  position: relative;
  margin: 8px 0 0;
  overflow: hidden;
}

.vision-net canvas {
  display: block;
  width: 100%;
  height: 300px;
  touch-action: none;
}

.vision-net-hint {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--gray);
  text-align: center;
}

/* Stats */
.stats {
  display: flex;
  justify-content: center;
  gap: 64px;
  margin-top: 48px;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat .num {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.stat .label {
  color: var(--gray);
  font-size: 0.9rem;
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0;
  text-align: left;
  overflow: hidden;
}

.card-viz {
  position: relative;
  height: 160px;
  background: linear-gradient(180deg, rgba(31, 141, 186, 0.07), rgba(31, 141, 186, 0.02));
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  overflow: hidden;
}

.card-viz svg {
  position: absolute;
  left: 0;
  top: 0;
  width: 200%;
  height: 200%;
  display: block;
  will-change: transform;
}

.card-viz::after {
  content: '點擊互動・按住拖移觀看';
  position: absolute;
  right: 10px;
  bottom: 7px;
  font-size: 10px;
  color: var(--gray);
  opacity: 0.55;
  pointer-events: none;
}

.card-body {
  padding: 24px 28px 28px;
}

.card-tag {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  background: rgba(31, 141, 186, 0.1);
  border-radius: 999px;
  padding: 3px 12px;
  margin-bottom: 14px;
}

.card h3 {
  margin-bottom: 12px;
  color: var(--dark);
}

.card p {
  color: var(--gray);
  font-size: 0.95rem;
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.photo {
  margin: 0;
}

.photo-ph {
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.85);
}

.photo-ph svg {
  width: 48px;
  height: 48px;
}

.ph-1 { background: linear-gradient(135deg, #1f8dba, #7c3aed); }
.ph-2 { background: linear-gradient(135deg, #059669, #1f8dba); }
.ph-3 { background: linear-gradient(135deg, #d97706, #dc2626); }

.photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}

.photo figcaption {
  margin-top: 10px;
  text-align: center;
  color: var(--gray);
  font-size: 0.9rem;
}

/* Ecosystem */
.eco-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.eco-item {
  border-top: 3px solid var(--primary);
  background: var(--light-bg);
  border-radius: 0 0 8px 8px;
  padding: 28px 24px;
}

.eco-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(31, 141, 186, 0.1);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.eco-icon svg {
  width: 24px;
  height: 24px;
}

.eco-item h3 { margin-bottom: 4px; }

.eco-role {
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 12px;
}

.eco-item p:not(.eco-role) {
  color: var(--gray);
  font-size: 0.92rem;
}

.eco-note {
  margin-top: 40px;
  color: var(--gray);
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
  border-left: 3px solid var(--primary);
  padding: 8px 20px;
  text-align: left;
}

/* Contact */
.contact-info {
  list-style: none;
  text-align: center;
  margin-top: 32px;
  color: var(--gray);
}

.contact-info li {
  margin-bottom: 8px;
}

.contact-info a {
  color: var(--primary);
  text-decoration: none;
}

.contact-info a:hover {
  text-decoration: underline;
}

/* Footer */
.site-footer {
  background: var(--dark);
  color: #d1d5db;
  text-align: center;
  padding: 24px 0;
  font-size: 0.85rem;
}

@media (max-width: 900px) {
  .eco-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav { height: 56px; }
  .logo { gap: 6px; font-size: 1rem; }
  .logo-mark { height: 26px; }
  .logo-text small { font-size: 0.48rem; letter-spacing: 0.06em; }
  .nav nav { white-space: nowrap; }
  .nav nav a { margin-left: 10px; font-size: 0.78rem; white-space: nowrap; }
  .hero h1 { font-size: 1.8rem; }
  .cards { grid-template-columns: 1fr; }
  .stats { gap: 32px; }
  .vision-net canvas { height: 240px; }
}
