/* ================================================
   CogniSim — Official Website
   Design: Black / White Minimal
   ================================================ */

/* ===== Design Tokens ===== */
:root {
  --radius: 16px;
  --radius-pill: 9999px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: 0.3s ease;
}

/* ===== Reset ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  background: #000;
  color: #fff;
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ===== Chinese Font Override ===== */
body.lang-zh {
  font-family: 'Noto Sans SC', 'Inter', sans-serif;
}
body.lang-zh .nav-brand-name,
body.lang-zh .hero-title,
body.lang-zh .section-title {
  font-family: 'Noto Sans SC', 'Inter', sans-serif;
}

/* ===== Section Themes ===== */
.section-light {
  background: #fff;
  color: #000;
  --card-bg: #f5f5f5;
  --card-border: #e5e5e5;
  --muted: #666;
  --ink2: #444;
  --feature-border: #eaeaea;
}

.section-dark {
  background: #000;
  color: #fff;
  --card-bg: #111;
  --card-border: #222;
  --muted: #999;
  --ink2: #aaa;
  --feature-border: #1a1a1a;
}

/* ================================================
   NAVIGATION
   ================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: transparent;
  transition: background var(--transition), backdrop-filter var(--transition);
}

.navbar.scrolled {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 32px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav-brand-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}

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

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: #888;
  transition: color var(--transition);
  position: relative;
}

.nav-link:hover { color: #fff; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.lang-btn {
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 500;
  color: #888;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-pill);
  padding: 6px 16px;
  cursor: pointer;
  transition: all var(--transition);
}

.lang-btn:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.05);
}

.btn-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 600;
  color: #000;
  background: #fff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 8px 20px;
  transition: background var(--transition), transform 0.2s ease;
}

.btn-nav:hover {
  background: #e0e0e0;
  transform: translateY(-1px);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  transition: all var(--transition);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ================================================
   HERO
   ================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  overflow: hidden;
  background: #000;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero-fade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,0.7) 0%,
    rgba(0,0,0,0.2) 40%,
    rgba(0,0,0,0.1) 55%,
    rgba(0,0,0,0.4) 80%,
    rgba(0,0,0,1) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -0.02em;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.2s;
}

.hero-subtitle {
  font-size: clamp(0.95rem, 1.4vw, 1.15rem);
  font-weight: 300;
  color: #aaa;
  line-height: 1.7;
  max-width: 560px;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.4s;
}

.hero-subtitle br { display: none; }
@media (min-width: 768px) { .hero-subtitle br { display: inline; } }

.btn-white {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 500;
  color: #000;
  background: #fff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 14px 28px;
  cursor: pointer;
  transition: background var(--transition), transform 0.2s ease;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 0.6s;
}

.btn-white:hover {
  background: #e8e8e8;
  transform: translateY(-1px);
}

.btn-white .arrow {
  transition: transform var(--transition);
}

.btn-white:hover .arrow {
  transform: translateX(3px);
}

.hero-footnote {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  font-size: 0.75rem;
  color: #555;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards 1s;
}

/* ================================================
   SECTIONS
   ================================================ */
.section {
  position: relative;
  padding: 120px 0;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
}

.section-inner.narrow {
  max-width: 720px;
}

/* Section header center */
.section-header-center {
  text-align: center;
  margin-bottom: 56px;
}

.stag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.section-body {
  font-size: 1rem;
  font-weight: 300;
  color: var(--ink2);
  line-height: 1.8;
  margin-top: 16px;
}

.section-body-center {
  text-align: center;
  font-size: 1rem;
  font-weight: 300;
  color: var(--ink2);
  line-height: 1.8;
  max-width: 640px;
  margin: 0 auto 48px;
}

.section-body-center br { display: none; }
@media (min-width: 768px) { .section-body-center br { display: inline; } }

/* ================================================
   SPLIT LAYOUT
   ================================================ */
.split-layout {
  display: flex;
  gap: 80px;
  align-items: flex-start;
}

.split-left {
  flex: 1;
  position: sticky;
  top: 120px;
}

.split-left .section-title {
  margin-bottom: 20px;
}

.split-left .section-body {
  margin-bottom: 24px;
}

.split-right {
  flex: 1.3;
}

/* ================================================
   FEATURE LIST
   ================================================ */
.feature-list {
  display: flex;
  flex-direction: column;
}

.feature-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 24px 0;
  border-bottom: 1px solid var(--feature-border);
  transition: background var(--transition);
}

.feature-item:first-child {
  padding-top: 0;
}

.feature-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: inherit;
  margin-top: 2px;
}

.feature-icon svg {
  width: 100%;
  height: 100%;
}

.feature-text h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 6px;
  line-height: 1.3;
}

.feature-text p {
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.6;
}

/* ================================================
   LINK ARROW
   ================================================ */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: #000;
  transition: gap var(--transition);
}

.link-arrow span {
  transition: transform var(--transition);
}

.link-arrow:hover span {
  transform: translateX(4px);
}

.section-dark .link-arrow {
  color: #fff;
}

/* ================================================
   PRODUCT SHOWCASE
   ================================================ */
.product-showcase {
  display: flex;
  justify-content: center;
}

.product-card-main {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 0;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 900px;
  width: 100%;
  transition: border-color var(--transition), transform 0.2s ease;
}

.product-card-main:hover {
  border-color: #333;
  transform: translateY(-2px);
}

.product-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  background: #0a0a0a;
  overflow: hidden;
}

.product-glow {
  position: absolute;
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, transparent 70%);
  border-radius: 50%;
  animation: glowPulse 4s ease-in-out infinite;
}

.product-icon-lg {
  position: relative;
  width: 56px;
  height: 56px;
  color: #fff;
}

.product-icon-lg svg {
  width: 100%;
  height: 100%;
}

.product-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px;
  gap: 16px;
}

.product-info h3 {
  font-size: 1.3rem;
  font-weight: 700;
}

.product-info p {
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.7;
}

.product-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ptag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
}

/* ================================================
   CARD ROW
   ================================================ */
.card-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.card-round {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px;
  transition: border-color var(--transition), transform 0.2s ease;
}

.card-round:hover {
  border-color: #ccc;
  transform: translateY(-2px);
}

.section-dark .card-round:hover {
  border-color: #333;
}

.card-round h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.card-round p {
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.6;
}

/* ================================================
   BUTTONS (dark variant)
   ================================================ */
.btn-dark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  font-size: 0.95rem;
  font-weight: 500;
  color: #fff;
  background: #000;
  border: 1px solid #333;
  border-radius: var(--radius-pill);
  padding: 14px 28px;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), transform 0.2s ease;
}

.btn-dark:hover {
  background: #111;
  border-color: #555;
  transform: translateY(-1px);
}

.btn-dark .arrow {
  transition: transform var(--transition);
}

.btn-dark:hover .arrow {
  transform: translateX(3px);
}

/* ================================================
   ABOUT
   ================================================ */
.loc-pill {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  color: #888;
  background: #111;
  border: 1px solid #222;
  border-radius: var(--radius-pill);
  padding: 6px 18px;
}

/* ================================================
   CAREERS
   ================================================ */
.role-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.role-card-v2 {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color var(--transition), transform 0.2s ease;
}

.role-card-v2:hover {
  border-color: #ccc;
  transform: translateY(-2px);
}

.section-dark .role-card-v2:hover {
  border-color: #333;
}

.role-dept {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.role-card-v2 h4 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.3;
}

.role-card-v2 p {
  font-size: 0.88rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.6;
  flex-grow: 1;
}

.btn-apply-v2 {
  display: inline-flex;
  align-self: flex-start;
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 500;
  color: inherit;
  background: transparent;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-pill);
  padding: 6px 16px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  margin-top: 8px;
}

.btn-apply-v2:hover {
  border-color: #999;
  background: rgba(128,128,128,0.05);
}

/* ================================================
   CONTACT
   ================================================ */
.contact-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.contact-item-v2 {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
}

.ci-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ci-value {
  font-size: 0.95rem;
  font-weight: 400;
  color: inherit;
}

a.ci-value:hover {
  opacity: 0.7;
}

/* ================================================
   FOOTER
   ================================================ */
.footer {
  background: #000;
  border-top: 1px solid #1a1a1a;
  padding: 48px 0;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.footer-name {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}

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

.footer-links a {
  font-size: 0.85rem;
  font-weight: 400;
  color: #666;
  transition: color var(--transition);
}

.footer-links a:hover {
  color: #fff;
}

.footer-copy {
  font-size: 0.78rem;
  color: #555;
  font-weight: 300;
}

.footer-fullname {
  font-size: 0.72rem;
  color: #444;
  font-weight: 300;
}

/* ================================================
   ANIMATIONS
   ================================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.1); }
}

/* Reveal on Scroll */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ================================================
   RESPONSIVE
   ================================================ */
@media (max-width: 1024px) {
  .split-layout {
    flex-direction: column;
    gap: 48px;
  }

  .split-left {
    position: static;
  }

  .product-card-main {
    grid-template-columns: 1fr;
  }

  .product-visual {
    min-height: 200px;
  }
}

@media (max-width: 768px) {
  .nav-center {
    position: fixed;
    inset: 0;
    flex-direction: column;
    justify-content: center;
    gap: 28px;
    background: rgba(0,0,0,0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition);
    z-index: 999;
  }

  .nav-center.active {
    opacity: 1;
    pointer-events: all;
  }

  .nav-center .nav-link {
    font-size: 1.1rem;
    color: #aaa;
  }

  .nav-toggle { display: flex; }
  .nav-right { display: none; }

  .nav-inner {
    padding: 0 24px;
    height: 64px;
  }

  .section {
    padding: 80px 0;
  }

  .section-inner {
    padding: 0 20px;
  }

  .hero-content {
    padding: 0 24px;
  }

  .hero-footnote {
    padding: 0 24px;
    text-align: center;
    width: 100%;
  }

  .card-row,
  .role-row,
  .contact-row {
    grid-template-columns: 1fr;
  }

  .product-info {
    padding: 28px 24px;
  }

  .footer-inner {
    padding: 0 24px;
  }

  .footer-links {
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .section-title {
    font-size: 1.5rem;
  }
}
