/* ==========================================================================
   Lucia Research Portal — CSS Stylesheet
   ========================================================================== */

:root {
  --bg: #f5f4ef;
  --card-bg: #ffffff;
  --text-main: #2c2a29;
  --text-muted: #73706c;
  --border-color: #e6e2db;
  --brand-primary: #2c5e43;
  --brand-primary-hover: #1b3d2b;
  --brand-secondary: #c07c1e;
  --brand-secondary-hover: #a66a18;
  --accent-light: #fbfbfa;
  
  --shadow-sm: 0 4px 12px rgba(44, 40, 36, 0.02);
  --shadow-md: 0 16px 40px rgba(44, 40, 36, 0.04);
  
  --radius-lg: 12px;
  --radius-md: 8px;
  --radius-sm: 4px;
  
  --font-serif: "Noto Serif SC", Georgia, serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-outfit: "Outfit", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text-main);
}

p {
  color: var(--text-muted);
}

a {
  color: var(--brand-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

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

/* Layout Utilities */
.container {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
}

.section {
  padding: 80px 0;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 50px;
}

.section-label {
  display: inline-block;
  font-family: var(--font-outfit);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--brand-secondary);
  margin-bottom: 12px;
}

.section-title {
  font-size: 32px;
  margin-bottom: 16px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-primary {
  background: var(--brand-primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-primary-hover);
  transform: translateY(-1px);
}

.btn-secondary {
  background: transparent;
  color: var(--brand-primary);
  border-color: var(--border-color);
}

.btn-secondary:hover {
  background: rgba(44, 94, 67, 0.06);
  border-color: var(--brand-primary);
  transform: translateY(-1px);
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 16px;
  border-radius: 99px;
  background: rgba(44, 94, 67, 0.06);
  color: var(--brand-primary);
  font-family: var(--font-outfit);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Header & Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  padding: 16px 0;
}

.nav-container {
  width: min(1200px, calc(100% - 48px));
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-icon {
  width: 32px;
  height: 32px;
  background: var(--brand-primary);
  color: #fff;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 18px;
}

.logo-text {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 19px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-menu a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
}

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



/* Hero Section */
.hero {
  position: relative;
  padding: 100px 0 80px;
  text-align: center;
  overflow: hidden;
}

.hero-container {
  position: relative;
  z-index: 2;
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
}

.hero .badge {
  margin-bottom: 24px;
}

.hero-title {
  font-size: 48px;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero-title .highlight {
  position: relative;
  color: var(--brand-primary);
  display: inline-block;
}

.hero-title .highlight::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 0;
  width: 100%;
  height: 8px;
  background: rgba(44, 94, 67, 0.08);
  z-index: -1;
  border-radius: 4px;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 16px;
}

/* Workflows Section */
.workflows-section {
  background: var(--accent-light);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.workflow-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

@media (max-width: 768px) {
  .workflow-grid {
    grid-template-columns: 1fr;
  }
}

.workflow-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.workflow-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-primary);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.card-tag {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 99px;
  background: rgba(115, 112, 108, 0.08);
  color: var(--text-muted);
  white-space: nowrap;
}

.card-tag.online {
  background: rgba(44, 94, 67, 0.1);
  color: var(--brand-primary);
}

.card-tag.local {
  background: rgba(192, 124, 30, 0.1);
  color: var(--brand-secondary);
}

.workflow-card.featured {
  border-color: rgba(44, 94, 67, 0.25);
  box-shadow: var(--shadow-md);
}

.workflow-card code {
  font-size: 12px;
  background: rgba(44, 94, 67, 0.06);
  padding: 2px 6px;
  border-radius: 4px;
}

/* Status Section */
.status-section {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
}

.status-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 960px) {
  .status-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .status-grid {
    grid-template-columns: 1fr;
  }
}

.status-card {
  background: var(--accent-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
}

.status-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.status-card h3 {
  font-size: 15px;
  font-weight: 700;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  background: #c0bdb8;
}

.status-dot.checking {
  background: #c0bdb8;
  animation: pulse 1.2s ease-in-out infinite;
}

.status-dot.online {
  background: #2c5e43;
}

.status-dot.offline {
  background: #c45c4a;
}

.status-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.status-detail {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-main);
}

@keyframes pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.card-num {
  font-family: var(--font-outfit);
  font-size: 16px;
  font-weight: 700;
  color: var(--brand-secondary);
  background: rgba(192, 124, 30, 0.08);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.workflow-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
}

.card-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
  flex-grow: 1;
}

.card-features {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 24px;
  border-top: 1px solid var(--border-color);
  padding-top: 16px;
}

.card-features span {
  font-size: 13px;
  color: var(--text-main);
  font-weight: 500;
}

.card-link {
  font-size: 14px;
  font-weight: 700;
  color: var(--brand-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.card-link:hover {
  color: var(--brand-primary-hover);
}

/* Philosophy Section */
.philosophy-section {
  background: var(--bg);
}

.philosophy-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
}

.philosophy-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 36px;
}

.philosophy-header h2 {
  font-size: 28px;
  margin-bottom: 12px;
}

.boundaries-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}

@media (max-width: 768px) {
  .boundaries-grid {
    grid-template-columns: 1fr;
  }
}

.boundary-box {
  padding: 24px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.boundary-box.allow {
  background: rgba(44, 94, 67, 0.02);
  border-left: 4px solid var(--brand-primary);
}

.boundary-box.forbid {
  background: rgba(192, 108, 83, 0.02);
  border-left: 4px solid var(--brand-secondary);
}

.boundary-box h4 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 14px;
}

.boundary-box ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.boundary-box li {
  font-size: 13.5px;
  color: var(--text-main);
  position: relative;
  padding-left: 14px;
}

.boundary-box li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--text-muted);
}

.privacy-note {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px;
  background: var(--accent-light);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}

.shield-icon {
  font-size: 20px;
  flex-shrink: 0;
}

.privacy-note p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-main);
}

/* Footer */
.footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
  padding: 20px 0;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 8px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 8px 14px;
}

.icp-link {
  color: inherit;
}

.police-beian-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: inherit;
}

.police-beian-icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  flex: 0 0 auto;
  object-fit: contain;
  vertical-align: middle;
}
