/* GroupiFlow — site vitrine */
:root {
  --bg: #0a0a12;
  --bg-card: #12121f;
  --bg-elevated: #1a1a2e;
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --success: #22c55e;
  --border: rgba(255, 255, 255, 0.08);
  --radius: 14px;
  --font: 'Inter', system-ui, sans-serif;
  --font-display: 'Outfit', 'Inter', sans-serif;
  --max: 1100px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  min-height: 100vh;
}

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

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

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 18, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px 20px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.brand img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.brand span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
}

.nav-desktop {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px 6px;
  width: 100%;
  justify-content: center;
  padding-bottom: 2px;
}

.nav-desktop a {
  color: var(--muted);
  font-size: 0.82rem;
  padding: 5px 9px;
  border-radius: 8px;
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.3;
}

.nav-desktop a:hover,
.nav-desktop a.active {
  color: var(--text);
  background: var(--bg-elevated);
  text-decoration: none;
}

.nav-actions-desktop {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  flex-shrink: 0;
  justify-content: flex-end;
  margin-left: auto;
}

.nav-lang {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
  line-height: 1.2;
}

.nav-mobile-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.btn-sm {
  font-size: 0.75rem;
  padding: 6px 10px;
  white-space: nowrap;
  line-height: 1.25;
}

.btn.disabled,
span.btn.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.footer-muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.2rem;
}

.nav-mobile {
  display: none;
  flex-direction: column;
  padding: 12px 20px 20px;
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.nav-mobile.open { display: flex; }

.nav-mobile a {
  padding: 12px 0;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

.nav-mobile a:last-child { border-bottom: none; }

@media (max-width: 768px) {
  .header-inner {
    padding: 12px 16px 0;
    gap: 0;
  }

  .nav-desktop { display: none; }
  .nav-actions-desktop { display: none; }
  .nav-toggle { display: block; margin-left: auto; }
}

@media (min-width: 769px) {
  .nav-toggle { display: none; }
}

/* ── Layout ── */
main { min-height: calc(100vh - 160px); }

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

.section {
  padding: 64px 0;
}

.section-sm { padding: 40px 0; }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 12px;
}

.section-lead {
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 640px;
  margin-bottom: 32px;
}

/* ── Hero ── */
.hero {
  padding: 80px 0 64px;
  text-align: center;
}

.hero-present {
  position: relative;
  padding-top: 56px;
}

.hero-present::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% -10%, rgba(59, 130, 246, 0.18), transparent);
  pointer-events: none;
  z-index: 0;
}

.hero-present > * { position: relative; z-index: 1; }

.hero-logo {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  margin: 0 auto 20px;
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.25);
}

.section-alt {
  background: linear-gradient(180deg, transparent, rgba(18, 18, 31, 0.6));
  border-radius: var(--radius);
  margin: 0 20px;
  padding-left: 24px;
  padding-right: 24px;
}

.card-feature .card-icon-wrap {
  font-size: 1.75rem;
  margin-bottom: 12px;
}

.feature-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  list-style: none;
}

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

.hero-badge {
  display: inline-block;
  max-width: 100%;
  text-align: center;
  white-space: normal;
  line-height: 1.35;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3.2rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 16px;
}

.hero p {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto 28px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  max-width: 720px;
  margin: 0 auto;
}

.hero-actions .btn {
  font-size: clamp(0.8rem, 2.2vw, 0.95rem);
  padding: 10px 16px;
  white-space: nowrap;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  font-family: inherit;
}

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

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

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-outline:hover {
  background: var(--bg-elevated);
  text-decoration: none;
  color: var(--text);
}

.btn-ghost {
  background: var(--bg-elevated);
  color: var(--muted);
}

.btn-ghost:hover { color: var(--text); text-decoration: none; }

.btn:disabled, .btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.doc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  padding: 16px 20px;
  margin-bottom: 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.card-clickable {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, transform 0.15s;
}

.card-clickable:hover {
  border-color: rgba(59, 130, 246, 0.45);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}

.card-cta {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--accent);
}

/* ── Cards grid ── */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

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

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.card p { color: var(--muted); font-size: 0.92rem; }

.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 14px;
}

/* ── Feature list ── */
.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: var(--muted);
  font-size: 0.95rem;
}

.feature-list li::before {
  content: '✓';
  color: var(--success);
  font-weight: 700;
  flex-shrink: 0;
}

/* ── Docs content ── */
.doc-content {
  max-width: 780px;
  margin: 0 auto;
  padding: 48px 20px 80px;
}

.doc-content h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  margin-bottom: 8px;
}

.doc-content .meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 32px;
}

.doc-content h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin: 36px 0 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.doc-content h2:first-of-type { border-top: none; padding-top: 0; }

.doc-content h3 {
  font-size: 1.05rem;
  margin: 20px 0 8px;
  color: #cbd5e1;
}

.doc-content p, .doc-content li {
  color: var(--muted);
  margin-bottom: 12px;
}

.doc-content ul, .doc-content ol {
  padding-left: 1.4rem;
  margin-bottom: 16px;
}

.doc-content li { margin-bottom: 6px; }

.doc-content code {
  background: var(--bg-elevated);
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 0.88em;
  color: #fcd34d;
}

.callout {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.25);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 20px 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.callout strong { color: var(--text); }

.callout-warn {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.3);
}

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px 20px;
  margin-top: 40px;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
}

.footer-col h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 12px;
}

.footer-col a {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 8px;
  text-decoration: none;
}

.footer-col a:hover { color: var(--text); }

.footer-bottom {
  max-width: var(--max);
  margin: 24px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

/* ── Auth callback (shared) ── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
}

.auth-box {
  max-width: 400px;
  width: 100%;
}

.auth-box .logo {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.auth-box .app-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.animation-container {
  position: relative;
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
}

.envelope, .check {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.envelope svg { width: 60px; height: 60px; color: var(--accent); }
.check { opacity: 0; transform: scale(0); }
.check svg { width: 60px; height: 60px; color: var(--success); }
.envelope.open { opacity: 0; transform: translateY(-20px) scale(1.1); }
.check.pop { animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }

@keyframes popIn {
  0% { opacity: 0; transform: scale(0); }
  70% { opacity: 1; transform: scale(1.2); }
  100% { opacity: 1; transform: scale(1); }
}

.error-title { color: #ef4444 !important; }
