/* Converza design system — brutalist white/blue */
@import url('https://fonts.googleapis.com/css2?family=DM+Serif+Display:ital@0;1&family=Space+Grotesk:wght@400;500;600;700&family=Space+Mono:wght@400;700&display=swap');

:root {
  --void: #FFFFFF;
  --surface: #F8F9FA;
  --surface-elevated: #FFFFFF;
  --accent: #0070F3;
  --accent-hover: #0051B3;
  --slate: #888888;
  --slate-light: #A1A1AA;
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(0, 0, 0, 0.16);
  --text-dark: #111111;
  --font-sans: 'Space Grotesk', sans-serif;
  --font-serif: 'DM Serif Display', serif;
  --font-mono: 'Space Mono', monospace;
  --radius-pill: 9999px;
  --radius-lg: 2rem;
  --radius-xl: 3rem;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--void);
  color: var(--text-dark);
  font-family: var(--font-sans);
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

::selection {
  background: var(--accent);
  color: #fff;
}

.font-serif { font-family: var(--font-serif); }
.font-mono { font-family: var(--font-mono); }

.border-surface-edge { border-color: var(--border); }

.bg-grid-workspace {
  background-image:
    linear-gradient(to right, rgba(0, 0, 0, 0.02) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
  background-size: 80px 80px;
  background-position: center top;
}

.transition-silky {
  transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Logo mark */
.logo-mark {
  width: 20px;
  height: 20px;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  flex-shrink: 0;
}

.logo-mark svg { width: 12px; height: 12px; }

/* Pill nav */
.landing-nav {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  width: 91.666667%;
  max-width: 64rem;
  padding: 0 8px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.landing-nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-left: 16px;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
  color: var(--text-dark);
  text-decoration: none;
}

.landing-nav-links {
  display: none;
  align-items: center;
  gap: 32px;
  font-size: 13px;
  font-weight: 500;
  color: var(--slate);
}

@media (min-width: 768px) {
  .landing-nav-links { display: flex; }
}

.landing-nav-links a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.landing-nav-links a:hover { color: var(--text-dark); }

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

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.6);
}

.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--slate);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 6px 8px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

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

.lang-switch button.active {
  background: var(--text-dark);
  color: #fff;
}

.btn-nav-signin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-dark);
  border: 1px solid var(--border);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13px;
  padding: 10px 20px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

@media (min-width: 640px) {
  .btn-nav-signin { padding: 10px 20px; }
}

@media (max-width: 639px) {
  .btn-nav-signin {
    padding: 10px 14px;
    font-size: 12px;
  }
  .landing-nav-actions .btn-pilot {
    padding: 10px 16px;
    font-size: 12px;
  }
}

.btn-nav-signin:hover {
  border-color: var(--border-hover);
  background: var(--surface);
}

#landing-telegram-login {
  display: flex;
  justify-content: center;
  min-height: 48px;
  margin: 8px 0 4px;
}

.auth-modal-hint {
  margin: 12px 0 0;
  font-size: 13px;
  color: var(--slate);
  text-align: center;
  line-height: 1.5;
}

.btn-pilot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13px;
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

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

.btn-pilot svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s;
}

.btn-pilot:hover svg { transform: translateX(4px); }

.btn-dark {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: var(--text-dark);
  color: #fff;
  border: 1px solid transparent;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 15px;
  padding: 20px 32px;
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
  width: 100%;
}

@media (min-width: 640px) {
  .btn-dark { width: auto; }
}

.btn-dark:hover {
  background: #000;
  transform: scale(1.02);
}

.btn-dark svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 0.2s;
}

.btn-dark:hover svg { transform: translateX(4px); }

/* Pilot modal */
.pilot-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(17, 17, 17, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s, visibility 0.25s;
}

.pilot-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.pilot-modal {
  background: var(--void);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.16);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.pilot-modal-overlay.open .pilot-modal {
  transform: translateY(0) scale(1);
}

.pilot-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.pilot-modal-head h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.pilot-modal-head p {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--slate-light);
  line-height: 1.5;
}

.pilot-modal-close {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 18px;
  color: var(--slate);
  transition: background 0.2s;
}

.pilot-modal-close:hover { background: var(--surface-elevated); }

.pilot-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-dark);
}

.pilot-form input,
.pilot-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: var(--font-sans);
  font-size: 14px;
  margin-bottom: 16px;
  background: var(--void);
  color: var(--text-dark);
}

.pilot-form input:focus,
.pilot-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 112, 243, 0.12);
}

.pilot-form textarea {
  min-height: 96px;
  resize: vertical;
}

.pilot-form .btn-submit {
  width: 100%;
  margin-top: 8px;
  padding: 16px;
  font-size: 15px;
}

.pilot-form-hint {
  font-size: 13px;
  color: var(--slate-light);
  margin: 0;
  min-height: 20px;
}

.pilot-success {
  text-align: center;
  padding: 24px 0;
}

.pilot-success strong {
  display: block;
  font-size: 20px;
  margin-bottom: 8px;
}

.pilot-success p {
  color: var(--slate-light);
  font-size: 14px;
  line-height: 1.6;
}
