/* =============================================
   KOSYNE NEUROTECH — shared.css
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500;9..40,600&display=swap');

:root {
  --white: #ffffff;
  --off-white: #f8f7f5;
  --light-gray: #f0eeeb;
  --text-dark: #1a1814;
  --text-body: #3d3a35;
  --text-muted: #8a8580;
  --accent: #1d4ed8;
  --accent-light: #dbeafe;
  --accent-deep: #1e3a8a;
  --teal: #0d9488;
  --teal-light: #ccfbf1;
  --border: #e5e2de;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.10);
  --radius: 12px;
  --radius-lg: 20px;
  --nav-h: 76px;
  --font-display: 'DM Serif Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; }
h1 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.05rem, 2vw, 1.35rem); }
em { font-style: italic; }
p { line-height: 1.8; }

/* =============================================
   NAVBAR
   ============================================= */

#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: box-shadow 0.3s ease;
}
#navbar.scrolled { box-shadow: var(--shadow-md); }

.nav-inner {
  max-width: 1240px;
  margin: 0 auto;
  height: 100%;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1;
  gap: 2px;
  flex-shrink: 0;
  text-decoration: none;
}

/* Both names equally sized */
.logo-en {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text-dark);
  letter-spacing: -0.01em;
  display: block;
}
.logo-zh {
  font-family: var(--font-body);
  font-size: 1.0rem;
  font-weight: 500;
  color: var(--text-dark);
  letter-spacing: 0.04em;
  display: block;
}

.nav-links {
  display: flex;
  gap: 0.1rem;
  margin-left: auto;
}
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-body);
  padding: 0.45rem 1rem;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.nav-links a:hover { background: var(--light-gray); color: var(--text-dark); }
.nav-links a.active {
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
}

.lang-toggle {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  margin-left: 0.75rem;
  padding-left: 1rem;
  border-left: 1px solid var(--border);
  flex-shrink: 0;
}
.lang-btn {
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.3rem 0.45rem;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
  letter-spacing: 0.05em;
}
.lang-btn.active { color: var(--accent); background: var(--accent-light); }
.lang-btn:hover:not(.active) { color: var(--text-dark); }
.lang-divider { color: var(--border); }

/* =============================================
   BUTTONS
   ============================================= */

.btn-primary {
  display: inline-block;
  background: var(--accent);
  color: white;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.8rem 1.9rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.btn-primary:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(29,78,216,0.28);
}

.btn-secondary {
  display: inline-block;
  background: transparent;
  color: var(--text-dark);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.8rem 1.9rem;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.btn-secondary:hover {
  border-color: var(--text-dark);
  background: var(--off-white);
  transform: translateY(-1px);
}

/* =============================================
   SHARED SECTION STYLES
   ============================================= */

.section { padding: 6rem 2rem; }
.container { max-width: 1240px; margin: 0 auto; }

.section-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.85rem;
  display: block;
}
.section-title { margin-bottom: 1rem; color: var(--text-dark); }
.section-subtitle {
  font-size: 1rem;
  color: var(--text-body);
  max-width: 640px;
  margin-bottom: 3rem;
  line-height: 1.8;
}

/* Page header (inner pages) */
.page-header {
  padding: calc(var(--nav-h) + 5rem) 2rem 4rem;
  background: var(--off-white);
  border-bottom: 1px solid var(--border);
}
.page-header .section-tag { margin-bottom: 0.75rem; }
.page-header h1 { max-width: 700px; margin-bottom: 1rem; }
.page-header p {
  font-size: 1.05rem;
  color: var(--text-body);
  max-width: 600px;
  line-height: 1.8;
}

/* =============================================
   SCROLL ANIMATIONS
   ============================================= */

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* =============================================
   FOOTER
   ============================================= */

.footer {
  background: #0f172a;
  color: var(--white);
  padding: 4rem 2rem 2.5rem;
}

.footer-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 3rem;
  align-items: start;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 2rem;
}

.footer-brand .logo-en {
  font-family: var(--font-display);
  font-size: 1.15rem;
  display: block;
  color: var(--white);
  margin-bottom: 4px;
}

.footer-brand .logo-zh {
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 0.85rem;
}

.footer-brand p {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.35);
  line-height: 1.6;
}

.footer-nav-group { display: flex; flex-direction: column; gap: 0.2rem; }

.footer-nav-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 0.75rem;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  transition: color 0.2s;
  width: fit-content;
}

.footer-links a:hover { color: var(--white); }

.footer-contact-group { display: flex; flex-direction: column; gap: 0.2rem; }

.footer-contact-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 0.75rem;
}

.footer-contact-email {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.6);
  transition: color 0.2s;
}
.footer-contact-email:hover { color: var(--white); }

.footer-bottom {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-copy {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.25);
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
  .nav-links { display: none; }
  .footer-inner { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}
