/* Algoritmia · landing y páginas legales
 * Paleta y tipografía: docs/branding/README.md
 */

:root {
  --carbon: #0B0F14;
  --carbon-soft: #11161F;
  --surface: #1A2230;
  --border: #243042;
  --cyan: #22D3EE;
  --sky: #0EA5E9;
  --text: #E6EDF7;
  --text-muted: #9AAEC4;
  --max-width: 760px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--carbon);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 48px 24px 64px;
}

/* Header / nav */
.topbar {
  width: 100%;
  background: var(--carbon-soft);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -0.01em;
}

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

.lang-switch {
  display: flex;
  gap: 8px;
  font-size: 14px;
}

.lang-switch a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid transparent;
}

.lang-switch a:hover {
  color: var(--text);
  border-color: var(--border);
}

.lang-switch a.active {
  color: var(--carbon);
  background: var(--cyan);
  font-weight: 600;
}

/* Hero (landing index) */
.hero {
  text-align: center;
  padding: 32px 0 56px;
}

.hero-icon {
  width: 128px;
  height: 128px;
  border-radius: 28px;
  margin: 0 auto 24px;
  display: block;
  box-shadow: 0 12px 32px rgba(34, 211, 238, 0.18);
}

.hero h1 {
  font-size: 44px;
  letter-spacing: -0.025em;
  font-weight: 700;
  margin-bottom: 12px;
}

.hero p.tagline {
  color: var(--text-muted);
  font-size: 19px;
  max-width: 560px;
  margin: 0 auto;
}

.hero-cta {
  margin-top: 36px;
  display: inline-flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  font-size: 15px;
  transition: transform 0.08s ease, background 0.15s ease;
}

.btn-primary {
  background: var(--cyan);
  color: var(--carbon);
}

.btn-primary:hover {
  background: #5EE5F2;
  transform: translateY(-1px);
}

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

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

/* Feature grid */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 56px;
}

.feature {
  background: var(--carbon-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
}

.feature h3 {
  font-size: 16px;
  margin-bottom: 6px;
  color: var(--cyan);
  font-weight: 600;
}

.feature p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

/* Legal pages (privacy / terms) */
.legal {
  background: var(--carbon-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 40px 36px;
}

.legal h1 {
  font-size: 32px;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  font-weight: 700;
}

.legal .updated {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 32px;
}

.legal h2 {
  font-size: 20px;
  margin-top: 32px;
  margin-bottom: 12px;
  color: var(--cyan);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.legal p,
.legal ul,
.legal ol {
  margin-bottom: 14px;
  color: var(--text);
}

.legal ul,
.legal ol {
  padding-left: 22px;
}

.legal li {
  margin-bottom: 6px;
}

.legal a {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal a:hover {
  color: var(--sky);
}

.legal strong {
  color: var(--text);
  font-weight: 600;
}

.contact-block {
  margin-top: 16px;
  padding: 16px 18px;
  background: var(--surface);
  border-left: 3px solid var(--cyan);
  border-radius: 6px;
}

/* Footer */
footer {
  background: var(--carbon-soft);
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

footer a {
  color: var(--text-muted);
  text-decoration: none;
  margin: 0 10px;
}

footer a:hover {
  color: var(--cyan);
}

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

/* Responsive */
@media (max-width: 600px) {
  .hero h1 {
    font-size: 32px;
  }
  .hero p.tagline {
    font-size: 16px;
  }
  .legal {
    padding: 28px 22px;
  }
  .legal h1 {
    font-size: 26px;
  }
  main {
    padding: 32px 16px 48px;
  }
}
