:root {
  color-scheme: light dark;
  --bg: #f5f5f7;
  --bg-elevated: #ffffff;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --border: rgba(0, 0, 0, 0.08);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --hero-gradient: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(0, 113, 227, 0.12), transparent 70%);
  --feature-bg: rgba(255, 255, 255, 0.72);
  --nav-bg: rgba(245, 245, 247, 0.82);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-elevated: #1c1c1e;
    --text: #f5f5f7;
    --text-secondary: #a1a1a6;
    --accent: #2997ff;
    --accent-hover: #40a9ff;
    --border: rgba(255, 255, 255, 0.1);
    --shadow: 0 4px 32px rgba(0, 0, 0, 0.4);
    --hero-gradient: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(41, 151, 255, 0.18), transparent 70%);
    --feature-bg: rgba(28, 28, 30, 0.72);
    --nav-bg: rgba(0, 0, 0, 0.72);
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", sans-serif;
  font-size: 17px;
  line-height: 1.47059;
  letter-spacing: -0.022em;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  width: min(980px, calc(100% - 48px));
  margin-inline: auto;
}

/* Nav */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--border);
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

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

.lang-toggle {
  display: flex;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.lang-toggle button {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 0.82rem;
  padding: 6px 12px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.lang-toggle button.active {
  background: var(--accent);
  color: #fff;
}

.lang-toggle button:not(.active):hover {
  color: var(--text);
}

/* Hero */
.hero {
  padding: 72px 0 56px;
  text-align: center;
  background: var(--hero-gradient);
}

.hero-icon {
  width: 128px;
  height: 128px;
  border-radius: 28px;
  box-shadow: var(--shadow);
  margin-bottom: 28px;
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0 0 12px;
}

.hero .subtitle {
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  color: var(--text-secondary);
  font-weight: 400;
  margin: 0 0 36px;
  max-width: 540px;
  margin-inline: auto;
}

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  align-items: center;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 980px;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s;
  border: none;
  cursor: pointer;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}

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

.platform-note {
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* Features */
.features {
  padding: 48px 0 80px;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 40px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.feature-card {
  background: var(--feature-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px 24px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.feature-icon {
  font-size: 1.75rem;
  margin-bottom: 12px;
  line-height: 1;
}

.feature-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 8px;
  letter-spacing: -0.01em;
}

.feature-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* About strip */
.about-strip {
  padding: 56px 0;
  text-align: center;
  border-top: 1px solid var(--border);
}

.about-strip p {
  max-width: 640px;
  margin: 0 auto;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.6;
}

/* Footer */
.site-footer {
  padding: 32px 0 48px;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: center;
}

.footer-links a {
  color: var(--text-secondary);
}

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

/* Legal pages */
.legal-page body,
body.legal-page {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}

.legal-nav {
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

.legal-nav a {
  color: var(--text-secondary);
}

@media (max-width: 734px) {
  .hero {
    padding: 48px 0 40px;
  }

  .hero-icon {
    width: 96px;
    height: 96px;
    border-radius: 22px;
  }

  .feature-grid {
    grid-template-columns: 1fr;
  }
}
