/* ═══════════════════════════════════════════════════════════════
   LinkForge — Design System
   Palette: Zinc 950 bg · Indigo 400 accent · Inter + JetBrains Mono
═══════════════════════════════════════════════════════════════ */

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

:root {
  --bg:        #09090b;
  --surface:   #18181b;
  --border:    #27272a;
  --text:      #fafafa;
  --muted:     #a1a1aa;
  --accent:    #818cf8;  /* acento para TEXTO/bordes sobre fondo oscuro */
  --accent-h:  #6366f1;
  --accent-strong: #4f46e5;  /* RELLENO de botones/badges con texto blanco (contraste AA) */
  --accent-strong-h: #4338ca;
  --on-accent: #ffffff;      /* texto sobre rellenos de acento */
  --green:     #22c55e;
  --red:       #ef4444;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.mono { font-family: 'JetBrains Mono', monospace; }
.accent { color: var(--accent); }

/* ── Container ─────────────────────────────────────────────── */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .55rem 1.25rem;
  border-radius: var(--radius-md);
  font-size: .9rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all .18s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent-strong);
  color: var(--on-accent);
  font-weight: 600;
}
.btn-primary:hover { background: var(--accent-strong-h); transform: translateY(-1px); box-shadow: 0 4px 20px rgba(79,70,229,.4); }
.btn-ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.btn-ghost:hover { color: var(--text); border-color: var(--muted); }
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-lg { padding: .8rem 2rem; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-full { width: 100%; }

/* ── Nav ───────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9,9,11,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -.02em;
}
.logo-icon { color: var(--accent); font-size: 1.3rem; display: inline-flex; }
.logo-icon svg { width: 1.25rem; height: 1.25rem; }
.feature-icon svg { width: 1.75rem; height: 1.75rem; stroke-width: 2; color: var(--accent); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-links a { color: var(--muted); text-decoration: none; font-size: .9rem; transition: color .15s; }
.nav-links a:hover { color: var(--text); }
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .5rem;
}
.hamburger span { display: block; width: 22px; height: 2px; background: var(--muted); border-radius: 2px; transition: .2s; }
.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 1rem 1.5rem 1.5rem;
  gap: .75rem;
  border-top: 1px solid var(--border);
}
.mobile-menu a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.mobile-menu.open { display: flex; }

@media (max-width: 700px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
}

/* ── Badge ─────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: .3rem .85rem;
  background: rgba(129,140,248,.12);
  border: 1px solid rgba(129,140,248,.3);
  border-radius: 999px;
  font-size: .78rem;
  color: var(--accent);
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

/* ── Hero ──────────────────────────────────────────────────── */
.hero {
  padding: 6rem 0 4rem;
  text-align: center;
}
.hero-inner { margin-bottom: 3rem; }
.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: 1.1;
  margin-bottom: 1.25rem;
}
.hero-sub {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 540px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}
.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}
.hero-metrics {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}
.metric { display: flex; flex-direction: column; align-items: center; gap: .15rem; }
.metric-val {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--accent);
}
.metric-unit { font-size: .9rem; color: var(--muted); }
.metric-label { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.metric-sep { width: 1px; height: 40px; background: var(--border); }

/* ── Preview Card ──────────────────────────────────────────── */
.preview-card {
  max-width: 420px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,.6), 0 0 0 1px rgba(129,140,248,.08);
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}
.preview-browser {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.browser-dots { display: flex; gap: 6px; }
.browser-dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.browser-dots span:nth-child(1) { background: #ef4444; }
.browser-dots span:nth-child(2) { background: #f59e0b; }
.browser-dots span:nth-child(3) { background: #22c55e; }
.browser-url {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: .3rem .75rem;
  font-size: .78rem;
  color: var(--muted);
  text-align: center;
}
.preview-body { padding: 2rem 1.5rem; text-align: center; }
.preview-avatar { margin-bottom: .75rem; }
.preview-avatar img { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid var(--border); }
.preview-name { font-size: 1.2rem; font-weight: 600; margin-bottom: .35rem; }
.preview-bio { font-size: .82rem; color: var(--muted); margin-bottom: 1.5rem; }
.preview-links { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1.5rem; }
.preview-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .65rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  text-decoration: none;
  font-size: .88rem;
  transition: border-color .15s, transform .15s;
}
.preview-link:hover { border-color: var(--accent); transform: translateX(3px); }
.preview-link svg { width: 1rem; height: 1rem; color: var(--accent); }
.preview-link .link-ico { width: 1rem; height: 1rem; }
.badge { display: inline-flex; align-items: center; gap: .4rem; }
.badge svg { width: .9rem; height: .9rem; color: var(--accent); }
.built-with { display: inline-flex; align-items: center; gap: .3rem; }
.built-with svg { width: .9rem; height: .9rem; color: var(--accent); fill: var(--accent); }
.preview-badge { font-size: .72rem; color: var(--muted); }
.preview-badge strong { color: var(--accent); }

/* ── Sections ──────────────────────────────────────────────── */
.section { padding: 5rem 0; }
.section-dark { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-header { text-align: center; margin-bottom: 3.5rem; }
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.2;
  margin-bottom: .75rem;
}
.section-sub { color: var(--muted); font-size: 1.05rem; max-width: 500px; margin: 0 auto; }

/* ── Features Grid ─────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  transition: border-color .2s, transform .2s;
}
.feature-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.feature-icon { font-size: 1.75rem; margin-bottom: .85rem; }
.feature-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: .5rem; }
.feature-card p { font-size: .88rem; color: var(--muted); line-height: 1.65; }

/* ── Testimonials ──────────────────────────────────────────── */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.25rem;
}
.testimonial {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
}
.testimonial p { font-size: .92rem; color: var(--muted); line-height: 1.7; margin-bottom: 1.25rem; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: .85rem; }
.avatar-placeholder {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(129,140,248,.15);
  border: 1px solid rgba(129,140,248,.3);
  display: flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 600; color: var(--accent);
  flex-shrink: 0;
}
.testimonial-author small { color: var(--muted); font-size: .78rem; }

/* ── Pricing ───────────────────────────────────────────────── */
.pricing-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin-bottom: 2.5rem;
}
.toggle-btn {
  padding: .45rem 1.1rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-size: .88rem;
  cursor: pointer;
  transition: all .15s;
  display: flex; align-items: center; gap: .4rem;
}
.toggle-btn.active { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
.save-badge {
  background: rgba(34,197,94,.15);
  border: 1px solid rgba(34,197,94,.3);
  color: var(--green);
  font-size: .7rem;
  padding: .1rem .4rem;
  border-radius: 999px;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 720px;
  margin: 0 auto;
}
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2rem;
  position: relative;
}
.pricing-card-pro {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 12px 40px rgba(129,140,248,.15);
}
.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-strong);
  color: var(--on-accent);
  font-size: .72rem;
  font-weight: 600;
  padding: .25rem .85rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
}
.plan-name { font-size: .85rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .5rem; }
.plan-price { display: flex; align-items: baseline; gap: .2rem; margin-bottom: .75rem; }
.price-val { font-size: 2.5rem; font-weight: 700; letter-spacing: -.04em; font-family: 'JetBrains Mono', monospace; }
.price-period { color: var(--muted); font-size: .9rem; }
.plan-desc { font-size: .85rem; color: var(--muted); margin-bottom: 1.5rem; }
.plan-features { list-style: none; display: flex; flex-direction: column; gap: .55rem; margin-bottom: 1.75rem; }
.plan-features li { font-size: .88rem; color: var(--text); }
.plan-features li.muted { color: var(--muted); }
.pricing-note { text-align: center; color: var(--muted); font-size: .85rem; margin-top: 1.5rem; }

/* ── FAQ ───────────────────────────────────────────────────── */
.faq-container { max-width: 680px; margin: 0 auto; }
.faq-list { display: flex; flex-direction: column; gap: .75rem; }
.faq-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.faq-item summary {
  padding: 1.1rem 1.25rem;
  font-size: .95rem;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: color .15s;
}
.faq-item summary:hover { color: var(--accent); }
.faq-item summary::after { content: '+'; font-size: 1.2rem; color: var(--muted); transition: transform .2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 1.25rem 1.1rem; font-size: .88rem; color: var(--muted); line-height: 1.7; }

/* ── CTA Section ───────────────────────────────────────────── */
.cta-section {
  background: radial-gradient(ellipse at 50% 0%, rgba(129,140,248,.12) 0%, transparent 70%);
  border-top: 1px solid var(--border);
}
.cta-inner { text-align: center; }
.cta-title {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -.03em;
  margin-bottom: .75rem;
}
.cta-sub { color: var(--muted); font-size: 1.05rem; margin-bottom: 2rem; }
.cta-note { color: var(--muted); font-size: .82rem; margin-top: 1rem; }

/* ── Footer ────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
}
.footer-inner {
  display: flex;
  gap: 3rem;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.footer-brand { flex: 1; min-width: 200px; }
.footer-brand p { color: var(--muted); font-size: .85rem; margin-top: .75rem; max-width: 260px; line-height: 1.6; }
.footer-links { display: flex; gap: 3rem; flex-wrap: wrap; }
.footer-links > div { display: flex; flex-direction: column; gap: .5rem; }
.footer-links strong { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .25rem; }
.footer-links a { color: var(--muted); text-decoration: none; font-size: .88rem; transition: color .15s; }
.footer-links a:hover { color: var(--text); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: .8rem;
  color: var(--muted);
}

/* ── Auth pages ────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem;
  width: 100%;
  max-width: 420px;
}
.auth-card h1 { font-size: 1.5rem; font-weight: 700; margin-bottom: .4rem; letter-spacing: -.02em; }
.auth-card .subtitle { color: var(--muted); font-size: .88rem; margin-bottom: 2rem; }
.form-group { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
.form-group label { font-size: .82rem; font-weight: 500; color: var(--muted); }
.form-group input, .form-group select, .form-group textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  padding: .65rem .9rem;
  font-size: .9rem;
  font-family: inherit;
  transition: border-color .15s;
  width: 100%;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-group textarea { resize: vertical; min-height: 80px; }
.form-error { color: var(--red); font-size: .82rem; margin-top: .25rem; }
.form-link { color: var(--muted); font-size: .85rem; text-align: center; margin-top: 1.25rem; }
.form-link a { color: var(--accent); text-decoration: none; }

/* ── Dashboard ─────────────────────────────────────────────── */
.dashboard {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px 1fr;
}
.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.sidebar-logo { padding: .5rem .75rem; margin-bottom: 1rem; }
.sidebar-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .6rem .75rem;
  border-radius: var(--radius-md);
  color: var(--muted);
  text-decoration: none;
  font-size: .88rem;
  transition: all .15s;
}
.sidebar-link:hover, .sidebar-link.active { background: rgba(129,140,248,.1); color: var(--text); }
.sidebar-link.active { color: var(--accent); }
.main-content { padding: 2rem; overflow-y: auto; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }
.page-header h1 { font-size: 1.4rem; font-weight: 700; letter-spacing: -.02em; }

/* Dashboard cards */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.25rem; }
.stat-label { font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: .4rem; }
.stat-val { font-size: 1.8rem; font-weight: 700; font-family: 'JetBrains Mono', monospace; color: var(--accent); }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1.25rem; }
.card h2 { font-size: 1rem; font-weight: 600; margin-bottom: 1.25rem; }

/* Link items */
.link-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: .5rem;
}
.link-drag { color: var(--muted); cursor: grab; font-size: 1rem; }
.link-info { flex: 1; min-width: 0; }
.link-label { font-size: .88rem; font-weight: 500; }
.link-url { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.link-actions { display: flex; gap: .4rem; }
.btn-icon {
  width: 30px; height: 30px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
  transition: all .15s;
}
.btn-icon:hover { border-color: var(--accent); color: var(--accent); }
.btn-icon.danger:hover { border-color: var(--red); color: var(--red); }

/* Plan badge */
.plan-tag {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .2rem .65rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.plan-tag.free { background: rgba(161,161,170,.1); color: var(--muted); border: 1px solid var(--border); }
.plan-tag.pro  { background: rgba(129,140,248,.15); color: var(--accent); border: 1px solid rgba(129,140,248,.3); }

/* Public page themes */
.theme-dark   { --pg-bg: #09090b; --pg-surface: #18181b; --pg-border: #27272a; --pg-text: #fafafa; --pg-muted: #a1a1aa; --pg-accent: #818cf8; }
.theme-midnight { --pg-bg: #0f0f23; --pg-surface: #1a1a3e; --pg-border: #2d2d6b; --pg-text: #e2e8f0; --pg-muted: #94a3b8; --pg-accent: #7c3aed; }
.theme-forest { --pg-bg: #0a1628; --pg-surface: #0f2137; --pg-border: #1e3a5f; --pg-text: #e2f0e2; --pg-muted: #86a886; --pg-accent: #22c55e; }

/* Alerts */
.alert { padding: .75rem 1rem; border-radius: var(--radius-md); font-size: .88rem; margin-bottom: 1rem; }
.alert-error   { background: rgba(239,68,68,.1);  border: 1px solid rgba(239,68,68,.3);  color: #fca5a5; }
.alert-success { background: rgba(34,197,94,.1);  border: 1px solid rgba(34,197,94,.3);  color: #86efac; }
.alert-info    { background: rgba(129,140,248,.1); border: 1px solid rgba(129,140,248,.3); color: #c7d2fe; }

/* Responsive dashboard */
@media (max-width: 768px) {
  .dashboard { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--border); padding: .75rem; }
  .sidebar-logo { display: none; }
  .main-content { padding: 1.25rem; }
}

/* Animations */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero-inner > * { animation: fadeUp .6s ease both; }
.hero-inner > *:nth-child(1) { animation-delay: .05s; }
.hero-inner > *:nth-child(2) { animation-delay: .12s; }
.hero-inner > *:nth-child(3) { animation-delay: .2s; }
.hero-inner > *:nth-child(4) { animation-delay: .28s; }
.hero-inner > *:nth-child(5) { animation-delay: .36s; }

.lang-switch{min-width:42px;padding:.4rem .6rem;font-weight:600;font-size:.8rem;cursor:pointer}
