/* ============================================
   Archon & Locke — archonlocke.com
   Light institutional theme
   ============================================ */

/* --- CSS Variables --- */
:root {
  --bg: #FAFAF8;
  --bg-alt: #F2F1EE;
  --text: #1A1D2E;
  --text-secondary: #5C5E6A;
  --text-muted: #9B9DA8;
  --accent: #8B7355;
  --accent-hover: #6E5A42;
  --border: #E4E3DF;

  --font-serif: 'Playfair Display', 'Georgia', 'Noto Serif SC', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans SC', 'PingFang SC', Helvetica, Arial, sans-serif;

  --container: 960px;
  --container-narrow: 680px;
}

/* --- Language Toggle (i18n) --- */
html[lang="en"] .lang-zh { display: none; }
html[lang="zh"] .lang-en { display: none; }
html[lang="zh"] .lang-zh { color: var(--text); }

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

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

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  font-weight: 400;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s;
}
a:hover { color: var(--accent-hover); }

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

/* --- Layout --- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: var(--container-narrow);
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 120px 0;
  position: relative;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: transparent;
  transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: rgba(250, 250, 248, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-brand {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 32px;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 400;
  transition: color 0.2s;
  letter-spacing: 0.01em;
}
.nav-links a:hover { color: var(--text); }

.nav-tg {
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}
.nav-tg:hover { color: var(--accent-hover); }

/* --- Hero --- */
#hero {
  min-height: 90vh;
  display: flex;
  align-items: center;
  padding-top: 72px;
  background: var(--bg);
}

.hero-content {
  text-align: center;
  max-width: var(--container-narrow);
  margin: 0 auto;
}

.hero-label {
  font-size: 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 500;
  margin-bottom: 32px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: 56px;
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 48px;
  color: var(--text);
  letter-spacing: -0.01em;
}

.hero-thesis {
  font-size: 20px;
  color: var(--text);
  line-height: 1.65;
  margin-bottom: 48px;
  font-weight: 300;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-ctas {
  display: flex;
  gap: 32px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-ctas a {
  font-size: 15px;
  font-weight: 500;
  color: var(--accent);
  transition: color 0.2s;
}
.hero-ctas a:hover { color: var(--accent-hover); }

/* --- Section Headers --- */
.section-label {
  font-size: 12px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 500;
  margin-bottom: 16px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 40px;
  letter-spacing: -0.01em;
}

/* --- About Section --- */
#about {
  background: var(--bg-alt);
}

.about-prose {
  max-width: var(--container-narrow);
  margin: 0 auto;
}

.about-prose p {
  margin-bottom: 24px;
  line-height: 1.8;
  font-size: 16px;
  color: var(--text);
}

.about-list {
  list-style: none;
  margin-top: 40px;
  padding: 0;
}

.about-list li {
  padding: 8px 0;
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.about-list li::before {
  content: '\2014\00a0\00a0';
  color: var(--accent);
}

/* --- Track Record Section --- */
#track-record-section {
  background: var(--bg);
}

.track-record-context {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: var(--container-narrow);
  margin: -24px auto 48px;
  line-height: 1.7;
}

.metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 2px;
  margin-bottom: 64px;
  overflow: hidden;
}

.metric-item {
  background: var(--bg);
  padding: 32px 24px;
  text-align: center;
}

.metric-value {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 4px;
}

.metric-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Case Study */
.case-study {
  max-width: var(--container-narrow);
  margin: 0 auto 64px;
  border-left: 2px solid var(--accent);
  padding-left: 32px;
}

.case-title {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 400;
  margin-bottom: 24px;
  color: var(--text);
}

.timeline-item {
  padding-bottom: 16px;
}
.timeline-item:last-child { padding-bottom: 0; }

.timeline-time {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 2px;
}

.timeline-text {
  font-size: 15px;
  color: var(--text);
  line-height: 1.5;
}

.case-outcome {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.case-outcome strong {
  color: var(--accent);
  font-weight: 600;
}

/* Accuracy Tables */
.accuracy-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.table-card {
  border: 1px solid var(--border);
  border-radius: 2px;
  overflow: hidden;
}

.table-card-title {
  padding: 12px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  background: var(--bg-alt);
}

.table-card table {
  width: 100%;
  border-collapse: collapse;
}

.table-card th, .table-card td {
  padding: 10px 20px;
  text-align: left;
  font-size: 14px;
  border-bottom: 1px solid var(--border);
}

.table-card th {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.table-card tr:last-child td { border-bottom: none; }

.table-card td.value {
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--text);
}

.download-link {
  margin-top: 40px;
  text-align: center;
}

.download-link a {
  font-size: 14px;
  color: var(--accent);
  font-weight: 500;
}
.download-link a:hover { color: var(--accent-hover); }

/* --- Updates Section --- */
#updates {
  background: var(--bg-alt);
}

.updates-list {
  max-width: var(--container-narrow);
  margin: 0 auto;
}

.version-item {
  border-bottom: 1px solid var(--border);
}
.version-item:last-child { border-bottom: none; }

.version-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 20px 0;
  cursor: pointer;
  user-select: none;
}

.version-number {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  min-width: 48px;
}

.version-info { flex: 1; }

.version-title {
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
}

.version-date {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

.version-toggle {
  color: var(--text-muted);
  font-size: 14px;
  transition: transform 0.3s;
  margin-left: 8px;
}

.version-item.expanded .version-toggle {
  transform: rotate(180deg);
}

.version-body {
  display: none;
  padding: 0 0 24px 64px;
}

.version-item.expanded .version-body {
  display: block;
}

.version-summary {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.7;
}

.version-changes {
  list-style: none;
}

.change-item {
  padding: 6px 0;
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
}

.change-prefix {
  font-weight: 600;
  color: var(--text-secondary);
}

/* --- Footer --- */
#footer {
  background: var(--bg-alt);
  padding: 80px 0 48px;
  text-align: center;
}

.footer-brand {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 24px;
}

.footer-tg {
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 32px;
  display: block;
}
.footer-tg:hover { color: var(--accent-hover); }

.footer-links {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-bottom: 32px;
}

.footer-links a {
  font-size: 14px;
  color: var(--text-secondary);
}
.footer-links a:hover { color: var(--accent); }

/* Language Selector */
.lang-selector {
  margin-bottom: 24px;
}

.lang-selector button {
  background: none;
  border: none;
  font-family: var(--font-sans);
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  transition: color 0.2s;
}

.lang-selector button:hover {
  color: var(--text);
}

.lang-selector button.active {
  color: var(--text);
  font-weight: 500;
}

.lang-selector .lang-divider {
  color: var(--border);
  font-size: 13px;
  margin: 0 4px;
}

.footer-disclaimer {
  font-size: 12px;
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto 8px;
  line-height: 1.7;
}

.footer-copyright {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 24px;
}

/* --- Animations --- */
.fade-in {
  opacity: 0;
  transition: opacity 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
  section { padding: 80px 0; }
  .hero-title { font-size: 44px; }
  .accuracy-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  section { padding: 56px 0; }
  .hero-title { font-size: 36px; }
  .hero-thesis { font-size: 17px; }
  .section-title { font-size: 28px; }
  .metrics-row { grid-template-columns: repeat(2, 1fr); }
  .nav-links { display: none; }
  .version-header { flex-wrap: wrap; gap: 8px; }
  .version-body { padding-left: 0; }
  .version-date { width: 100%; order: 3; }
  .case-study { padding-left: 20px; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 32px; }
  .hero-ctas { flex-direction: column; align-items: center; }
  .metrics-row { grid-template-columns: 1fr 1fr; }
  .metric-item { padding: 20px 16px; }
  .metric-value { font-size: 24px; }
  .accuracy-grid { grid-template-columns: 1fr; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
}
