/* ============================================================
   Outwit Network — official site stylesheet
   Editorial Modernism · single-page bilingual
   ============================================================ */

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

html,
body,
h1, h2, h3, p, dl, dt, dd, ul, ol, figure {
  margin: 0;
  padding: 0;
}

img, svg { display: block; max-width: 100%; }

button {
  background: none;
  border: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  padding: 0;
}

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

/* ---------- Tokens (Light) ---------- */
:root {
  --bg: #FAFAF8;
  --bg-elevated: #FFFFFF;
  --bg-alt: #F4F1EB;
  --text: #0A0A0A;
  --text-muted: #6B6661;
  --text-subtle: #9B968D;
  --border: #E8E5DD;
  --border-strong: #C9C3B7;
  --hover-bg: #F2EFEA;
  --focus-ring: #0A0A0A;

  --font-serif-en: "Instrument Serif", "Noto Serif SC", Georgia, serif;
  --font-serif-zh: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", serif;
  --font-sans: "Geist", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --ease-out: cubic-bezier(0.2, 0, 0, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-io: cubic-bezier(0.4, 0, 0.2, 1);

  --dur-fast: 150ms;
  --dur-base: 250ms;
  --dur-slow: 400ms;

  --max-w: 1200px;
  --gutter: 24px;
}

/* ---------- Tokens (Dark) ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0A0A0A;
    --bg-elevated: #161410;
    --bg-alt: #121110;
    --text: #F5F2EC;
    --text-muted: #A8A39A;
    --text-subtle: #6B6661;
    --border: #2A2722;
    --border-strong: #3D3933;
    --hover-bg: #1A1714;
    --focus-ring: #F5F2EC;
  }
}

/* ---------- Base ---------- */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  font-feature-settings: "ss01" on, "cv11" on;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* Chinese mode: swap display fonts */
html[data-lang="zh"] body { font-family: var(--font-sans); }
html[data-lang="zh"] h1,
html[data-lang="zh"] h2,
html[data-lang="zh"] .hero__title { font-family: var(--font-serif-zh); }

html[data-lang="en"] h1,
html[data-lang="en"] h2,
html[data-lang="en"] .hero__title { font-family: var(--font-serif-en); }

::selection {
  background: var(--text);
  color: var(--bg);
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 4px;
}

/* ---------- Container ---------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 24px;
}

@media (min-width: 768px) {
  .container { padding-inline: 48px; }
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}

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

.logo {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-sans);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.logo__primary {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.04em;
  color: var(--text);
}

.logo__secondary {
  font-weight: 400;
  font-size: 16px;
  color: var(--text-muted);
}

.lang-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  color: var(--text-muted);
  transition: background var(--dur-fast) var(--ease-io), border-color var(--dur-fast) var(--ease-io);
}

.lang-toggle:hover {
  background: var(--hover-bg);
  border-color: var(--border-strong);
}

.lang-toggle__sep { color: var(--text-subtle); }
.lang-toggle [data-active="true"] { color: var(--text); }

/* ---------- Hero ---------- */
.hero {
  padding-block: 96px 80px;
}

@media (min-width: 768px) {
  .hero { padding-block: 160px 120px; }
}

.hero__title {
  font-weight: 400;
  font-size: clamp(40px, 8.5vw, 96px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  max-width: 18ch;
  color: var(--text);
}

html[data-lang="en"] .hero__title {
  font-style: italic;
  letter-spacing: -0.015em;
}

html[data-lang="zh"] .hero__title {
  letter-spacing: -0.01em;
  font-weight: 700;
}

.hero__sub {
  margin-top: 32px;
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.55;
  color: var(--text-muted);
  max-width: 38ch;
}

@media (min-width: 768px) {
  .hero__sub { margin-top: 40px; max-width: 48ch; }
}

/* ---------- Section ---------- */
.section {
  padding-block: 80px;
  border-top: 1px solid var(--border);
}

@media (min-width: 768px) {
  .section { padding-block: 120px; }
}

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

.section__head {
  margin-bottom: 48px;
}

@media (min-width: 768px) {
  .section__head { margin-bottom: 64px; }
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 16px;
}

.section__title {
  font-weight: 400;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text);
  max-width: 22ch;
}

html[data-lang="en"] .section__title { font-style: italic; }
html[data-lang="zh"] .section__title { font-weight: 700; letter-spacing: -0.01em; }

/* ---------- Grid 3-col ---------- */
.grid { display: grid; gap: 32px; }

@media (min-width: 768px) {
  .grid--3 { grid-template-columns: repeat(3, 1fr); gap: 48px; }
}

.card {
  padding: 0;
}

.card__num {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--text-subtle);
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-strong);
}

.card__title {
  font-weight: 600;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: -0.005em;
  color: var(--text);
  margin-bottom: 12px;
  font-family: var(--font-sans);
}

.card__body {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 36ch;
}

/* ---------- Description list (For Talents / For Partners) ---------- */
.prose { max-width: 100%; }

.dl { display: grid; gap: 0; }

.dl__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding-block: 24px;
  border-bottom: 1px solid var(--border);
}

.dl__row:first-child { border-top: 1px solid var(--border); }

@media (min-width: 768px) {
  .dl__row {
    grid-template-columns: 220px 1fr;
    gap: 48px;
    padding-block: 32px;
  }
}

.dl dt {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 16px;
  color: var(--text);
  letter-spacing: -0.005em;
}

.dl dd {
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-muted);
  max-width: 56ch;
}

/* ---------- About ---------- */
.about {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
  max-width: 720px;
}

@media (min-width: 768px) {
  .about { grid-template-columns: 1fr 1fr; gap: 64px; }
}

.about__col {
  border-top: 1px solid var(--border-strong);
  padding-top: 16px;
}

.about__label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-subtle);
  margin-bottom: 8px;
}

.about__value {
  font-size: 18px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: var(--text);
}

.about__value.mono {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0;
  word-break: break-all;
}

/* ---------- Contact ---------- */
.contact {
  display: grid;
  gap: 0;
}

.contact__row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding-block: 24px;
  border-bottom: 1px solid var(--border);
}

.contact__row:first-child { border-top: 1px solid var(--border); }

@media (min-width: 768px) {
  .contact__row {
    grid-template-columns: 220px 1fr;
    gap: 48px;
    padding-block: 32px;
  }
}

.contact__label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-subtle);
}

.contact__value {
  font-size: 18px;
  font-weight: 500;
  color: var(--text);
}

.contact__value a {
  position: relative;
  border-bottom: 1px solid var(--border-strong);
  transition: border-color var(--dur-fast) var(--ease-io), color var(--dur-fast) var(--ease-io);
}

.contact__value a:hover {
  color: var(--text);
  border-color: var(--text);
}

/* ---------- Footer ---------- */
.footer {
  border-top: 1px solid var(--border);
  padding-block: 48px 32px;
  background: var(--bg);
}

.footer__inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

@media (min-width: 768px) {
  .footer__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
  }
}

.footer__brand {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.footer__brand .logo__primary,
.footer__brand .logo__secondary { font-size: 14px; }

.footer__legal {
  font-size: 12px;
  color: var(--text-subtle);
  letter-spacing: 0.02em;
  line-height: 1.5;
}

/* ---------- Reveal on scroll ---------- */
.section,
.hero__title,
.hero__sub {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
  }
  .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Lang fade (cross-fade on toggle) ---------- */
.lang-switching main,
.lang-switching .footer__legal,
.lang-switching .hero__title,
.lang-switching .hero__sub {
  transition: opacity 200ms var(--ease-io);
  opacity: 0;
}

/* ---------- Small screens polish ---------- */
@media (max-width: 480px) {
  .hero__title { font-size: 44px; }
  .section__title { font-size: 32px; }
  .nav__inner { height: 56px; }
  .logo__primary, .logo__secondary { font-size: 14px; }
}
