/* Go.js Lite official site — bilingual marketing landing page */

:root {
  --bg: #ffffff;
  --bg-elev: #f7f8fa;
  --bg-soft: #f1f3f6;
  --fg: #0f1115;
  --fg-muted: #5b6471;
  --fg-subtle: #8a93a3;
  --border: #e3e6eb;
  --border-strong: #cfd4dc;
  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-soft: #eef0ff;
  --success: #16a34a;
  --code-bg: #0f1115;
  --code-fg: #e7e9ee;
  --shadow-sm: 0 1px 2px rgba(15, 17, 21, 0.05);
  --shadow-md: 0 6px 24px -8px rgba(15, 17, 21, 0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --maxw: 1120px;
}

[data-theme='dark'] {
  --bg: #0f1115;
  --bg-elev: #161922;
  --bg-soft: #1c2030;
  --fg: #e7e9ee;
  --fg-muted: #9aa3b2;
  --fg-subtle: #6b7384;
  --border: #262b39;
  --border-strong: #353b4a;
  --accent: #818cf8;
  --accent-hover: #a5b0ff;
  --accent-soft: #1f2240;
  --success: #4ade80;
  --code-bg: #06080d;
  --code-fg: #e7e9ee;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 30px -10px rgba(0, 0, 0, 0.55);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.brand img {
  display: block;
  border-radius: 6px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}

.nav a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--fg-muted);
  font-weight: 500;
  font-size: 14px;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav a:hover {
  background: var(--bg-soft);
  color: var(--fg);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ghost-btn,
.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  font: inherit;
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.05s ease;
  white-space: nowrap;
}

.ghost-btn {
  background: transparent;
  color: var(--fg-muted);
  border-color: var(--border);
}

.ghost-btn:hover {
  background: var(--bg-soft);
  color: var(--fg);
}

.primary-btn {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.primary-btn:hover {
  background: #000;
  border-color: #000;
}

[data-theme='dark'] .primary-btn:hover {
  background: #fff;
  color: #0f1115;
  border-color: #fff;
}

.secondary-btn {
  background: transparent;
  color: var(--fg);
  border-color: var(--border-strong);
}

.secondary-btn:hover {
  background: var(--bg-soft);
}

#theme-toggle .theme-icon-dark {
  display: none;
}

#theme-toggle svg {
  display: block;
}

[data-theme='dark'] #theme-toggle .theme-icon-light {
  display: none;
}

[data-theme='dark'] #theme-toggle .theme-icon-dark {
  display: block;
}

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

.hero {
  position: relative;
  padding: 96px 0 80px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 380px at 20% 0%, rgba(99, 102, 241, 0.18), transparent 60%),
    radial-gradient(700px 320px at 90% 20%, rgba(20, 184, 166, 0.15), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.eyebrow {
  display: inline-block;
  margin: 0 0 18px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.hero h1 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 18px;
  color: var(--fg);
}

.subtitle {
  font-size: clamp(16px, 1.6vw, 19px);
  color: var(--fg-muted);
  margin: 0 auto 32px;
  max-width: 680px;
}

.cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.cta-row .primary-btn,
.cta-row .secondary-btn {
  padding: 12px 22px;
  font-size: 15px;
}

.hero-stats {
  display: flex;
  gap: 28px;
  justify-content: center;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.hero-stats li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--fg-muted);
  font-size: 13px;
}

.hero-stats strong {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: var(--fg);
}

/* ---------- Sections ---------- */

.section {
  padding: 72px 0;
}

.section-alt {
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 12px;
  color: var(--fg);
  text-align: center;
}

.section-subtitle {
  text-align: center;
  color: var(--fg-muted);
  margin: 0 auto 36px;
  max-width: 640px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
}

.two-col .section-title {
  text-align: left;
}

/* ---------- Grid ---------- */

.grid {
  display: grid;
  gap: 18px;
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 22px 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

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

.card:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 600;
  color: var(--fg);
}

.card p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 14.5px;
  line-height: 1.55;
}

/* ---------- What's new ---------- */

.whats-new-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.whats-new-group {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
}

.whats-new-group h3 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--accent);
}

.whats-new-group ul {
  margin: 0;
  padding-left: 18px;
  color: var(--fg-muted);
  font-size: 14.5px;
  line-height: 1.6;
}

.whats-new-group li + li {
  margin-top: 6px;
}

/* ---------- Install steps ---------- */

.install-steps {
  counter-reset: step;
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.install-steps li {
  counter-increment: step;
  position: relative;
  padding: 22px 22px 22px 64px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.install-steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 18px;
  top: 20px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.install-steps h3 {
  margin: 0 0 6px;
  font-size: 15.5px;
  font-weight: 600;
}

.install-steps p {
  margin: 0;
  color: var(--fg-muted);
  font-size: 14px;
  line-height: 1.55;
}

.tip {
  text-align: center;
  margin-top: 28px;
  color: var(--fg-muted);
  font-size: 14px;
}

/* ---------- Tables ---------- */

.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg);
  box-shadow: var(--shadow-sm);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
}

.data-table th,
.data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table tr:last-child th,
.data-table tr:last-child td {
  border-bottom: none;
}

.data-table th {
  background: var(--bg-soft);
  color: var(--fg-muted);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.data-table tbody td:first-child {
  font-weight: 600;
  color: var(--fg);
}

.data-table tbody td {
  color: var(--fg-muted);
}

/* ---------- Check list (security) ---------- */

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 14px 20px;
}

.check-list li {
  position: relative;
  padding: 10px 0 10px 28px;
  border-bottom: 1px solid var(--border);
  color: var(--fg-muted);
  font-size: 14.5px;
}

.check-list li:last-child {
  border-bottom: none;
}

.check-list li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 16px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='4 12 10 18 20 6'/></svg>") no-repeat center / contain;
  mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='4 12 10 18 20 6'/></svg>") no-repeat center / contain;
}

[data-theme='dark'] .check-list li::before {
  background: var(--accent);
}

/* ---------- FAQ ---------- */

.faq-list {
  display: grid;
  gap: 12px;
  max-width: 820px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  box-shadow: var(--shadow-sm);
}

.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--fg);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 22px;
  color: var(--fg-muted);
  transition: transform 0.2s ease;
}

.faq-item[open] {
  background: var(--bg-elev);
}

.faq-item[open] summary::after {
  content: '−';
}

.faq-item p {
  margin: 12px 0 0;
  color: var(--fg-muted);
  font-size: 14.5px;
  line-height: 1.6;
}

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

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg);
  padding: 36px 0 48px;
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.site-footer strong {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: 16px;
  color: var(--fg);
}

.site-footer p {
  margin: 6px 0 0;
  color: var(--fg-muted);
  font-size: 14px;
}

.site-footer .muted {
  color: var(--fg-subtle);
  font-size: 13px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
}

.footer-links a {
  color: var(--fg-muted);
  font-size: 14px;
  transition: color 0.15s ease;
}

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

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

@media (max-width: 880px) {
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .two-col .section-title {
    text-align: center;
  }
  .nav {
    display: none;
  }
  .hero {
    padding: 72px 0 56px;
  }
  .section {
    padding: 56px 0;
  }
}

@media (max-width: 560px) {
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  .header-actions .ghost-btn:first-of-type {
    display: none;
  }
  .footer-inner {
    flex-direction: column;
  }
}
