/* ============================================================
   Artificial Homo Sapiens
   Minimalist, high-contrast tech aesthetic.
   ============================================================ */

:root {
  --bg:        #08090a;
  --bg-soft:   #0d0f11;
  --fg:        #f4f6f7;
  --muted:     #8b9299;
  --faint:     #5a616a;
  --line:      rgba(255, 255, 255, 0.09);
  --accent:    #7cf5e3;          /* used sparingly */
  --accent-dim: rgba(124, 245, 227, 0.14);

  --font-sans: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", "Consolas", monospace;

  --maxw: 1100px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-weight: 300;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

/* ---------- Decorative layers ---------- */

#network {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* faint vignette so content stays legible over the canvas */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(124, 245, 227, 0.05), transparent 55%),
    radial-gradient(100% 100% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.55));
}

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Logo (inline SVG, recolored via currentColor) ---------- */
.hero__logo,
.brandmark__logo {
  display: block;
  width: auto;
  aspect-ratio: 620 / 1188;   /* matches the symbol's viewBox so height drives width */
  color: var(--fg);
}

/* ---------- Header ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  background: linear-gradient(to bottom, rgba(8, 9, 10, 0.7), transparent);
}

.header__tag { justify-self: center; text-align: center; }

.header__actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.brandmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.brandmark__logo { height: 26px; width: auto; }

.brandmark__text {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.28em;
}

.header__tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: rgba(244, 246, 247, 0.82);
  text-transform: uppercase;
}

.header__cta {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  transition: color 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.header__cta:hover {
  color: var(--bg);
  background: var(--fg);
  border-color: var(--fg);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}

.lang-switch a {
  padding: 0.42rem 0.75rem;
  color: var(--muted);
  transition: color 0.3s var(--ease), background 0.3s var(--ease);
}

.lang-switch a:hover { color: var(--fg); }

.lang-switch a.is-active {
  color: var(--bg);
  background: var(--accent);
}

/* ---------- Layout primitives ---------- */

main { position: relative; z-index: 2; }

.section {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2.5rem, 6vh, 4.5rem) clamp(1.25rem, 5vw, 3rem);
}

.section__label,
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 2.2rem;
}

.section__label { font-size: 0.85rem; }

html[lang="zh-CN"] .section__label { font-size: 1rem; }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  z-index: 2;
  min-height: min(88svh, 52rem);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 7rem 1.25rem 4rem;
}

.hero__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 760px;
}

.hero__logo {
  height: clamp(120px, 22vh, 190px);
  width: auto;
  margin-bottom: 2.4rem;
  animation: float 13s ease-in-out infinite;
  filter: drop-shadow(0 0 28px rgba(124, 245, 227, 0.16));
}

.hero .eyebrow {
  margin-bottom: 1.4rem;
  color: var(--muted);
}

.hero__title {
  margin: 0 0 1.6rem;
  font-size: clamp(2.8rem, 9vw, 6rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.03em;
}

.hero__lede {
  margin: 0;
  max-width: 46ch;
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  color: var(--muted);
}

/* ---------- Mission statement ---------- */

.statement {
  margin: 0;
  font-size: clamp(1.7rem, 4.6vw, 3.1rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
  max-width: 18ch;
}

.statement__muted {
  display: block;
  margin-top: 1.2rem;
  max-width: 30ch;
  font-size: clamp(1.05rem, 2.3vw, 1.45rem);
  font-weight: 300;
  line-height: 1.45;
  color: var(--muted);
  letter-spacing: 0;
}

/* ---------- Principles grid ---------- */

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.grid--two { grid-template-columns: repeat(2, 1fr); }

/* Below this width three (or two) columns get cramped; skip straight to a
   single stacked column instead of an awkward intermediate wrap. */
@media (max-width: 760px) {
  .grid,
  .grid--two { grid-template-columns: 1fr; }
}

.card {
  position: relative;
  background: var(--bg-soft);
  padding: 2.4rem 2rem 2.6rem;
  transition: background 0.4s var(--ease);
}

.card:hover { background: #14171a; }

.card__index {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  letter-spacing: 0.1em;
}

.card__title {
  margin: 1.4rem 0 0.7rem;
  font-size: 1.3rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.card__body {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.card__tag {
  display: inline-block;
  margin: 1.4rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}

/* ---------- Closing ---------- */

.closing { text-align: center; }
.closing .section__label { color: var(--accent); }

.closing__title {
  margin: 0 auto 2.6rem;
  max-width: 22ch;
  font-size: clamp(1.7rem, 4.4vw, 2.9rem);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.button {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  padding: 0.95rem 1.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--fg);
  transition: color 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.button:hover {
  color: var(--bg);
  background: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 40px var(--accent-dim);
}

/* ---------- Footer ---------- */

.site-footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--faint);
}

.site-footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 1rem clamp(1.25rem, 5vw, 3rem) 2.4rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.footer__brand { color: var(--muted); }

/* ---------- Reveal animation ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: calc(var(--d, 0) * 90ms);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Keyframes ---------- */

@keyframes float {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(6px, -9px); }
  38%  { transform: translate(-8px, -3px); }
  55%  { transform: translate(4px, 8px); }
  72%  { transform: translate(-5px, 5px); }
  88%  { transform: translate(7px, -4px); }
  100% { transform: translate(0, 0); }
}

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
  .header__tag { display: none; }
  .statement, .statement__muted { max-width: none; }

  .site-footer__inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 0.35rem 0.75rem;
  }

  .footer__brand { grid-column: 1; }
  .footer__year { grid-column: 2; }
  .footer__note { grid-column: 1 / -1; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__logo { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}
